I am using strtok to parse the argv. On windows it works just fine but on Solaris I get a fault. I have traced it down to the "$" character on the command line.
char *result = NULL;
char *value = NULL;
char *argPointer = NULL;
char delims[] = " ,=";
int i = 1;
while (i < argc)
{
argPointer = argv[i];
printf("parse the arg %s\n",argPointer);
result = strtok( argPointer, delims);
while( result != NULL ) {
printf( "var is \"%s\"\n", result );
value = strtok( NULL, delims );
printf( "value is \"%s\"\n", value );
if (strcmp(result,"_VARIABLE") == 0){
subjectName = value;
printf( "subject is \"%s\"\n", value );
}
if (strcmp(result,"$TYPE") == 0){
printf( "skipping type \n" );
break;
}
if (result != NULL && value != NULL){
status = tibrvMsg_UpdateString(message, result, value);
}
result = strtok( NULL, delims );
}
i++;
}