--- ray/src/cv/mgflib/mgfilt.c 1995/05/11 21:48:40 1.4 +++ ray/src/cv/mgflib/mgfilt.c 2003/11/15 17:54:06 1.8 @@ -1,14 +1,12 @@ -/* Copyright (c) 1995 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: mgfilt.c,v 1.8 2003/11/15 17:54:06 schorsch Exp $"; #endif - /* * Filter MGF stream, removing entities that won't be understood */ #include +#include #include "parser.h" /* Number of entities for major versions */ @@ -16,9 +14,10 @@ short nentlist[MG_VMAJOR] = MG_NELIST; int -put_entity(ac, av) /* general output routine */ -register int ac; -register char **av; +put_entity( /* general output routine */ + register int ac, + register char **av +) { while (ac-- > 0) { fputs(*av++, stdout); @@ -28,9 +27,11 @@ register char **av; } -main(argc, argv) /* first argument is understood entities, comma-sep. */ -int argc; -char *argv[]; +int +main( /* first argument is understood entities, comma-sep. */ + int argc, + char *argv[] +) { char *cp1, *cp2; int i, en; @@ -43,13 +44,14 @@ char *argv[]; } if (isint(argv[1])) { i = atoi(argv[1]); - if (i < 1 | i > MG_VMAJOR) { + if ((i < 1) | (i > MG_VMAJOR)) { fprintf(stderr, "%s: bad version number: %d\n", argv[0], i); exit(1); } for (en = nentlist[i-1]; en--; ) mg_ehand[en] = put_entity; + mg_ehand[MG_E_INCLUDE] = NULL; /* expand include's */ } else for (cp1 = cp2 = argv[1]; *cp1; cp1 = cp2) { while (*cp2) {