home *** CD-ROM | disk | FTP | other *** search
- /*
- COMLINE.C Command line parameter parser.
- R.J.P. 9-5/90
- */
-
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <ctype.h>
- #include "grep.h"
-
- void strupper(char *s)
- { while( *s) { *s = toupper(*s) ; ++s ; } }
-
-
- char *comline( int ac , char **av, char *tag)
- {
- int sl = strlen(tag) ;
- char *cp ;
-
- while( --ac)
- {
- cp = *++av ;
- if(( *cp != '/') && ( *cp != '-' )) continue ;
-
- if( !strncmp( ++cp , tag , sl) ) return( cp + sl) ;
- }
- return 0 ;
- }
-
-
-