msgtxt.c
/* TestParserProc returns 1 to tell ParseMsgTxt() to continue, or returns 0 */
/* for ParseMsgTxt() to stop */
TestParserProc returns 1 to tell ParseMsgTxt() to continue, or returns 0
for ParseMsgTxt() to stop
TestParserProc returns 1 to tell ParseMsgTxt () to continue or returns 0 for ParseMsgTxt () to stop
static int TestParserProc(char *str, int condition, long offset)
{
    switch (condition) {
    case MTXT_FILENOTOPEN:
        printf("MTXT_FILENOTOPEN: File not open!\n");
        return 0;
    case MTXT_ENDOFFILE:
        printf("MTXT_ENDOFFILE: End-of-file encountered (ofs=%ld).\n", offset);
        return 0;
    case MTXT_ENDOFTEXT:
        printf("MTXT_ENDOFTEXT: End-of-text encountered (ofs=%ld).\n", offset);
        return 1;
    case MTXT_NOMEM:
        printf("MTXT_NOMEM: Out of memory! (ofs=%ld)\n", offset);
        return 0;
    case MTXT_TEXT:
        return 1;
    default:
        printf("Error! Unhandled parser condition %d (ofs=%ld)!\n", condition, offset);
        return 0;
    }
}
static int TestParserProc ( char * str , int condition , long offset ) { switch ( condition ) { case MTXT_FILENOTOPEN : printf ( " \n " ) ; return 0 ; case MTXT_ENDOFFILE : printf ( " \n " , offset ) ; return 0 ; case MTXT_ENDOFTEXT : printf ( " \n " , offset ) ; return 1 ; case MTXT_NOMEM : printf ( " \n " , offset ) ; return 0 ; case MTXT_TEXT : return 1 ; default : printf ( " \n " , condition , offset ) ; return 0 ; } }
TestParserProc returns 1 to tell ParseMsgTxt() to continue, or returns 0
for ParseMsgTxt() to stop
TestParserProc returns 1 to tell ParseMsgTxt () to continue or returns 0 for ParseMsgTxt () to stop
/* puts(str); */