/* * Parse the /link option. */ static int parse_link( OPT_STRING **p ) /*************************************/ { char * str; int gotOne = 0; if( !CmdScanRecogChar( ' ' ) && !CmdScanRecogChar( '\t' ) ) { FatalError( "Whitespace required after /link" ); return( 0 ); } for( ;; ) { CmdScanWhitespace(); str = CmdScanString(); if( str == NULL ) { if( !gotOne ) { FatalError( "/link requires at least one argument" ); return( 0 ); } else { break; } } add_string( p, str ); gotOne = 1; } return( 1 ); }
/* * Parse the /passwopts option. */ static int parse_passwopts( OPT_STRING **p ) { char *str; char *src; char *dst; if( !CmdScanRecogChar( ':' ) ) { FatalError("/passwopts:{argument} requires an argument"); return 0; } str = CmdScanString(); if (str == NULL) { FatalError("/passwopts requires an argument"); return 0; } /* * If quoted, stip out the quote characters. */ if (*str == '\"') { for (dst = str, src = str + 1; *src && (*src != '\"'); ) { *dst++ = *src++; } if (*src != '\"') { FatalError("/passwopts argument is missing closing quote"); return 0; } *dst = 0x00; } add_string(p, str, '\0'); return 1; } /* parse_passwopts() */
/* * If the next character is ch (in either uppercase or lowercase form), it * is consumed and a non-zero value is returned; otherwise, it is not * consumed and zero is returned. */ static int OPT_RECOG_LOWER( int ch ) /**********************************/ { return( CmdScanRecogChar( ch ) ); }