O
OzBob
Am performing the following check to determine if a set of text is at the
start of a string,....
/* Check for literal text DD at beginning of string date_format */
char date_format[24];
if (strstr(date_format, "DD") != date_format)
{
/* perform swap here */
}
Is there something wrong with the structure here? I know that strstr()
returns a pointer, and "date_format" is a pointer to the first character of
the string.
I perform this on Solaris 9 using gcc, and it works. I relocate it to HP-UX
11.11 using the generic 'cc' and it gives me compiler warnings.
Is there a good guide for portability out there across platforms and
compilers? Share and Enjoy, Ian Dennison
start of a string,....
/* Check for literal text DD at beginning of string date_format */
char date_format[24];
if (strstr(date_format, "DD") != date_format)
{
/* perform swap here */
}
Is there something wrong with the structure here? I know that strstr()
returns a pointer, and "date_format" is a pointer to the first character of
the string.
I perform this on Solaris 9 using gcc, and it works. I relocate it to HP-UX
11.11 using the generic 'cc' and it gives me compiler warnings.
Is there a good guide for portability out there across platforms and
compilers? Share and Enjoy, Ian Dennison