usr.bin/deroff
usr.bin/fgrep
usr.bin/file
+usr.bin/find/bigram
+usr.bin/find/code
+usr.bin/find/find
usr.bin/join
usr.bin/look
usr.bin/mesg
while (s != temp && s[-1] != '/')
s--;
(void)strcpy(s, "XXXXXX.c");
+#if 1 /* Nick */
+ char *__mktemp(char *template);
+ __mktemp(temp);
+#else
mktemp(temp);
+#endif
if (link(argv[i], temp) < 0)
(void)strcpy(temp, argv[i]);
}
static void
yaccError (msg)
-char *msg;
+const char *msg;
{
func_params = NULL;
put_error(); /* tell what line we're on, and what file */
break;
case '/':
if (lastc == '*') {
+#if 1 /* Nick */
+ if (curly)
+ return;
+#endif
if (cur_file->convert) {
if (func_params && cur_declarator) {
cur_declarator->begin_comment = cur_file->begin_comment;
} else {
comment_len = 0;
}
+#if 0 /* Nick */
+ /* note that the "comment" is actually the entire function body, usually */
+ /* from the opening brace to the closing brace inclusive, but may contain */
+ /* a comment before the opening brace (I think can only occur for ANSI) */
+ fprintf(stderr, "comment \"");
+ fwrite(comment, comment_len, 1, stderr);
+ fprintf(stderr, "\"\n");
+#endif
format = FMT_FUNC;
nestedParams = 0;
* Any way we define it, 'yyerror()' is a real function (that we provide,
* rather than use the one from a library).
*/
-static void yaccError ARGS((char *));
+static void yaccError ARGS((const char *));
#ifdef yyerror
static int compar ARGS((const void *a, const void *b));
#
DESTDIR=
CFLAGS=-O -DWORD32
-SRCS = Makefile dextern files yaccpar \
+SRCS = Makefile dextern.h files.h yaccpar \
y1.c y2.c y3.c y4.c \
yaccdiffs yaccnews
all: yacc
yacc: y1.o y2.o y3.o y4.o
- $(CC) -o yacc y?.o
-y1.o y2.o y3.o y4.o: dextern files
+ $(CC) -o yacc y1.o y2.o y3.o y4.o
+y1.o y2.o y3.o y4.o: dextern.h files.h
install:
install -s yacc $(DESTDIR)/usr/bin
install -c yaccpar $(DESTDIR)/usr/lib
--- /dev/null
+dextern.h math.h
+dextern.h sys/ttydev.h
+files.h math.h
+y1.c sys/ttydev.h
*/
# include <stdio.h>
# include <ctype.h>
-# include "files"
+# include "files.h"
/* MANIFEST CONSTANT DEFINITIONS */
--- /dev/null
+y1.c dextern.h
+y2.c dextern.h
+y3.c dextern.h
+y4.c dextern.h
static char sccsid[] = "@(#)y1.c 4.1 (Berkeley) 2/11/83";
#endif not lint
-# include "dextern"
+# include <varargs.h>
+# include "dextern.h"
/* variables used locally */
if( fdefine != NULL ) fclose( fdefine );
}
-/* VARARGS1 */
-error(s,a1) char *s; { /* write out error comment */
-
+error(s,va_alist) char *s; va_dcl { /* write out error comment */
+ va_list argp;
+
++nerrors;
fprintf( stderr, "\n fatal error: ");
- fprintf( stderr, s,a1);
+ va_start(argp);
+ vfprintf( stderr, s, argp);
+ va_end(argp);
fprintf( stderr, ", line %d\n", lineno );
if( !fatfl ) return;
summary();
static char sccsid[] = "@(#)y2.c 4.1 (Berkeley) 2/11/83";
#endif not lint
-# include "dextern"
+# include "dextern.h"
# define IDENTIFIER 257
# define MARK 258
# define TERM 259
static char sccsid[] = "@(#)y3.c 4.1 (Berkeley) 2/11/83";
#endif not lint
-# include "dextern"
+# include "dextern.h"
/* important local variables */
int lastred; /* the number of the last reduction of a state */
static char sccsid[] = "@(#)y4.c 4.1 (Berkeley) 2/11/83";
#endif not lint
-# include "dextern"
+# include "dextern.h"
# define a amem
# define mem mem0