This is getdocopts.c in view mode; [Download] [Up]
/*
docgen Objective C Document Generator
Copyright (C) 1995 Bill Bereza.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Email:
berezaw@river.it.gvsu.edu
S-mail:
Bill Bereza
9526 Judson Rd.
Ravenna, MI 49451-9427
*/
/* docgen Objective C Document Generator
* Copyright (c) 1994 Bill Bereza
*
* $Log: getdocopts.c,v $
* Revision 1.16 96/01/07 01:29:56 berezaw
* added extern's for compatability
*
* Revision 1.15 95/07/26 21:46:19 berezaw
*
*
* Revision 1.14 95/07/26 17:50:21 berezaw
* *** empty log message ***
*
* Revision 1.13 95/07/26 16:17:29 berezaw
* 0.3.1
*
* Revision 1.12 95/07/23 14:33:29 berezaw
* added NXBundle stuff
*
* Revision 1.11 95/07/23 01:09:31 berezaw
* *** empty log message ***
*
* Revision 1.10 95/07/21 01:58:26 berezaw
* added ObjC stuff
*
* Revision 1.9 95/03/02 03:44:44 berezaw
* using GNU regex library
* rewrote recmp() as docgen_recmp()
* added GPL stuff to each file
* increase rev. to 0.1.9
*
* Revision 1.8 95/02/01 18:49:56 berezaw
*
* 0.1.6
*
* Revision 1.7 95/01/31 18:28:39 berezaw
*
* added 0.1.5 stuff
*
* Revision 1.6 95/01/30 13:32:19 berezaw
* added -F
*
* Revision 1.5 95/01/27 00:59:30 berezaw
* *** empty log message ***
*
* Revision 1.4 95/01/27 00:31:43 berezaw
* added '-x' option to hide methods beginning with '_'
*
* Revision 1.3 95/01/26 05:34:59 berezaw
* added -S and -e options
*
* Revision 1.2 94/11/28 12:08:33 berezaw
* *** empty log message ***
*
*
* $Id: getdocopts.c,v 1.16 96/01/07 01:29:56 berezaw Exp $
*/
#include "docgen.h"
extern char *optarg;
extern int optind;
int getdocopts(int argc, char *argv[], char **cdir, char **clib, char **hdir, char **formatName, char **userBundir)
{
register int c;
int errflg=0;
#ifndef NODEBUG
if(V_USELESS)
fprintf(stderr, "getdocopts(%d, char *argv[], char **, char **, char **)\n", argc);
#endif
*cdir=*clib=*hdir=*formatName=*userBundir=NULL;
while ((c = getopt(argc, argv, "?d:l:I:v:Rs:Dxe:SFCAf:B:ab")) != EOF)
switch (c) {
case 'a':
GLOB_after=yes;
break;
case 'b':
GLOB_before=yes;
break;
case 'B':
*userBundir=optarg;
break;
case 'f':
*formatName=optarg;
break;
case 'A':
GLOB_autodoc=!GLOB_autodoc;
break;
case 'C':
GLOB_firstcomm=!GLOB_firstcomm;
break;
case 'F':
GLOB_fancy=!GLOB_fancy;
break;
case 'x':
GLOB_undoc=!GLOB_undoc;
break;
case 'S':
GLOB_sort=!GLOB_sort;
break;
case 'e':
GLOB_decdir=optarg;
break;
case 's':
GLOB_sep=optarg;
break;
case 'd':
*cdir=optarg;
break;
case 'l':
*clib=optarg;
break;
case 'I':
*hdir=optarg;
break;
case 'v':
verbo=atoi(optarg);
if(verbo<0)
verbo=0;
break;
case 'R':
GLOB_recurs=!GLOB_recurs;
break;
case 'D':
GLOB_defaults=!GLOB_defaults;
break;
case '?':
default:
errflg++;
break;
}
if(!GLOB_before && !GLOB_after)
GLOB_after=yes;
#ifndef NODEBUG
if(V_USELESS)
fprintf(stderr, "getdocopts: returning with %d\n", errflg);
#endif
return errflg;
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.