Listing 6
// create valid char set if (retValue = strcreate_m(&str1, "abc") ) { fprintf( stderr, "Error %d from strcreate_m.\n", retValue ); } if (retValue = setcharset(str1)) { fprintf( stderr, "Error %d from setcharset().\n", retValue ); } if (retValue=strcreate_m(&str1, "aabbccabc")) { fprintf( stderr, "Error %d from strcreate_m.\n", retValue ); } // create string with invalid char set if (retValue=strcreate_m(&str1, "abbccdabc")) { fprintf( stderr, "Error %d from strcreate_m.\n", retValue ); }