[ These diffs apply to the berkeley_yacc postings from comp.sources.unix, volume 21, to produce the amiga sources. ...tad ] diff -c -r unix/ACKNOWLEDGEMENTS amiga/ACKNOWLEDGEMENTS *** unix/ACKNOWLEDGEMENTS Sun Aug 19 16:20:36 1990 --- amiga/ACKNOWLEDGEMENTS Sat Jul 14 14:56:12 1990 *************** *** 11,16 **** --- 11,17 ---- Benson I. Margulies Dave Gentzel + Antoine Verheijen Peter S. Housel Dale Smith Ozan Yigit diff -c -r unix/Makefile amiga/Makefile *** unix/Makefile Sun Aug 19 16:20:37 1990 --- amiga/Makefile Sat Jul 14 17:58:33 1990 *************** *** 2,14 **** HDRS = defs.h ! CFLAGS = -O LDFLAGS = ! LIBS = ! LINKER = cc MAKEFILE = Makefile --- 2,14 ---- HDRS = defs.h ! CFLAGS = -cwus LDFLAGS = ! LIBS = lib:lc.lib lib:amiga.lib ! LINKER = blink MAKEFILE = Makefile *************** *** 45,86 **** all: $(PROGRAM) $(PROGRAM): $(OBJS) $(LIBS) ! @echo -n "Loading $(PROGRAM) ... " ! @$(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM) @echo "done" ! clean:; @rm -f $(OBJS) ! depend:; @mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST) ! index:; @ctags -wx $(HDRS) $(SRCS) install: $(PROGRAM) @echo Installing $(PROGRAM) in $(DEST) @install -s $(PROGRAM) $(DEST) ! listing:; @$(PRINT) Makefile $(HDRS) $(SRCS) | lpr ! lint:; @lint $(SRCS) program: $(PROGRAM) tags: $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS) - update: $(DEST)/$(PROGRAM) - - $(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) - @make -f $(MAKEFILE) DEST=$(DEST) install ### ! closure.o: defs.h ! error.o: defs.h ! lalr.o: defs.h ! lr0.c: defs.h ! main.o: defs.h ! mkpar.o: defs.h ! output.o: defs.h ! reader.o: defs.h ! skeleton.o: defs.h ! symtab.o: defs.h ! verbose.o: defs.h ! warshall.o: defs.h --- 45,90 ---- all: $(PROGRAM) $(PROGRAM): $(OBJS) $(LIBS) ! @echo "Loading $(PROGRAM) ... " ! @$(LINKER) to $(PROGRAM) from lib:c.o $(OBJS) lib $(LIBS) $(LDFLAGS) @echo "done" ! clean: ! @rm -f $(OBJS) ! clobber: ! @rm -f $(OBJS) $(PROGRAM) ! depend: ! @mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST) + index: + @ctags -wx $(HDRS) $(SRCS) + install: $(PROGRAM) @echo Installing $(PROGRAM) in $(DEST) @install -s $(PROGRAM) $(DEST) ! listing: ! @$(PRINT) Makefile $(HDRS) $(SRCS) | lpr ! lint: ! @lint $(SRCS) program: $(PROGRAM) tags: $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS) ### ! closure.o: closure.c defs.h ! error.o: error.c defs.h ! lalr.o: lalr.c defs.h ! lr0.o: lr0.c defs.h ! main.o: main.c defs.h ! mkpar.o: mkpar.c defs.h ! output.o: output.c defs.h ! reader.o: reader.c defs.h ! skeleton.o: skeleton.c defs.h ! symtab.o: symtab.c defs.h ! verbose.o: verbose.c defs.h ! warshall.o: warshall.c defs.h diff -c -r unix/defs.h amiga/defs.h *** unix/defs.h Sun Aug 19 16:20:40 1990 --- amiga/defs.h Sat Jul 14 17:41:52 1990 *************** *** 7,13 **** /* the following definitions are for the VAX */ /* they might have to be changed for other machines */ ! /* MAXCHAR is the largest character value */ /* MAXSHORT is the largest value of a C short */ /* MINSHORT is the most negative value of a C short */ /* MAXTABLE is the maximum table size */ --- 7,13 ---- /* the following definitions are for the VAX */ /* they might have to be changed for other machines */ ! /* MAXCHAR is the largest unsigned character value */ /* MAXSHORT is the largest value of a C short */ /* MINSHORT is the most negative value of a C short */ /* MAXTABLE is the maximum table size */ *************** *** 24,31 **** #define MAXTABLE 32500 #define BITS_PER_WORD 32 #define WORDSIZE(n) (((n)+(BITS_PER_WORD-1))/BITS_PER_WORD) ! #define BIT(r, n) ((((r)[(n) >> 5]) >> ((n) & 31)) & 1) ! #define SETBIT(r, n) ((r)[(n) >> 5] |= (1 << ((n) & 31))) /* character names */ --- 24,31 ---- #define MAXTABLE 32500 #define BITS_PER_WORD 32 #define WORDSIZE(n) (((n)+(BITS_PER_WORD-1))/BITS_PER_WORD) ! #define BIT(r, n) ((((r)[(n)>>5])>>((n)&31))&1) ! #define SETBIT(r, n) ((r)[(n)>>5]|=((unsigned)1<<((n)&31))) /* character names */ *************** *** 98,103 **** --- 98,104 ---- /* storage allocation macros */ + #define CALLOC(k,n) (calloc((unsigned)(k),(unsigned)(n))) #define FREE(x) (free((char*)(x))) #define MALLOC(n) (malloc((unsigned)(n))) #define NEW(t) ((t*)allocate(sizeof(t))) *************** *** 278,283 **** --- 279,289 ---- extern void free(); extern char *calloc(); + #ifdef AMIGA + extern void *malloc(); + extern void *realloc(); + #else extern char *malloc(); extern char *realloc(); + #endif extern char *strcpy(); diff -c -r unix/lr0.c amiga/lr0.c *** unix/lr0.c Sun Aug 19 16:20:47 1990 --- amiga/lr0.c Sat Jul 14 14:56:44 1990 *************** *** 12,17 **** --- 12,18 ---- int get_state(); core *new_state(); + static core **state_set; static core *this_state; static core *last_state; static shifts *last_shift; *************** *** 27,35 **** static short **kernel_end; static short *kernel_items; - static core **state_table; - allocate_itemsets() { register short *itemp; --- 28,34 ---- *************** *** 79,85 **** shiftset = NEW2(nsyms, short); redset = NEW2(nrules + 1, short); ! state_table = NEW2(nitems, core *); } --- 78,84 ---- shiftset = NEW2(nsyms, short); redset = NEW2(nrules + 1, short); ! state_set = NEW2(nitems, core *); } *************** *** 122,128 **** FREE(kernel_base); FREE(kernel_end); FREE(kernel_items); ! FREE(state_table); } --- 121,127 ---- FREE(kernel_base); FREE(kernel_end); FREE(kernel_items); ! FREE(state_set); } *************** *** 177,183 **** key = *isp1; assert(0 <= key && key < nitems); ! sp = state_table[key]; if (sp) { found = 0; --- 176,182 ---- key = *isp1; assert(0 <= key && key < nitems); ! sp = state_set[key]; if (sp) { found = 0; *************** *** 212,218 **** } else { ! state_table[key] = sp = new_state(symbol); } return (sp->number); --- 211,217 ---- } else { ! state_set[key] = sp = new_state(symbol); } return (sp->number); diff -c -r unix/main.c amiga/main.c *** unix/main.c Sun Aug 19 16:20:41 1990 --- amiga/main.c Sat Jul 14 17:35:01 1990 *************** *** 3,14 **** char dflag; char lflag; char tflag; char vflag; ! char *prefix = "y"; char *myname = "yacc"; char *temp_form = "yacc.XXXXXXX"; int lineno; int outline; --- 3,19 ---- char dflag; char lflag; + char rflag; char tflag; char vflag; ! char *file_prefix = "y"; char *myname = "yacc"; + #ifndef AMIGA char *temp_form = "yacc.XXXXXXX"; + #else + char *temp_form = "t:yacc"; + #endif int lineno; int outline; *************** *** 92,98 **** usage() { ! fprintf(stderr, "usage: %s [-dltv] [-b prefix] filename\n", myname); exit(1); } --- 97,103 ---- usage() { ! fprintf(stderr, "usage: %s [-dlrtv] [-b file_prefix] filename\n", myname); exit(1); } *************** *** 116,128 **** if (i + 1 < argc) usage(); return; ! case '_': ++i; goto no_more_options; case 'b': ! if (*++s || ++i >= argc) usage(); ! prefix = argv[i]; continue; case 'd': --- 121,137 ---- if (i + 1 < argc) usage(); return; ! case '-': ++i; goto no_more_options; case 'b': ! if (*++s) ! file_prefix = s; ! else if (++i < argc) ! file_prefix = argv[i]; ! else ! usage(); continue; case 'd': *************** *** 133,138 **** --- 142,151 ---- lflag = 1; break; + case 'r': + rflag = 1; + break; + case 't': tflag = 1; break; *************** *** 160,165 **** --- 173,182 ---- lflag = 1; break; + case 'r': + rflag = 1; + break; + case 't': tflag = 1; break; *************** *** 187,197 **** { register char *p; ! p = calloc((unsigned) 1, n); ! if (!p) no_space(); return (p); } create_file_names() { --- 204,230 ---- { register char *p; ! p = NULL; ! if (n) ! { ! p = CALLOC(1, n); ! if (!p) no_space(); ! } return (p); } + #ifdef AMIGA + char * + TmpFileName(template) + char *template; + { + static char Template[256]; + static unsigned short Idx; + + sprintf(Template, "%s%08lx.TMP", template, (long)FindTask(NULL) + Idx++); + return(Template); + } + #endif create_file_names() { *************** *** 198,210 **** --- 231,250 ---- int i, len; char *tmpdir; + #ifndef AMIGA tmpdir = getenv("TMPDIR"); if (tmpdir == 0) tmpdir = "/tmp"; + #else + if (tmpdir == 0) tmpdir = "t:"; + #endif len = strlen(tmpdir); i = len + 13; + + #ifndef AMIGA if (len && tmpdir[len-1] != '/') ++i; + #endif action_file_name = MALLOC(i); if (action_file_name == 0) no_space(); *************** *** 217,222 **** --- 257,263 ---- strcpy(text_file_name, tmpdir); strcpy(union_file_name, tmpdir); + #ifndef AMIGA if (len && tmpdir[len - 1] != '/') { action_file_name[len] = '/'; *************** *** 224,229 **** --- 265,271 ---- union_file_name[len] = '/'; ++len; } + #endif strcpy(action_file_name + len, temp_form); strcpy(text_file_name + len, temp_form); *************** *** 233,243 **** text_file_name[len + 5] = 't'; union_file_name[len + 5] = 'u'; mktemp(action_file_name); mktemp(text_file_name); mktemp(union_file_name); ! len = strlen(prefix); if (dflag) { /* the number 7 below is the size of ".tab.h"; sizeof is not used */ --- 275,291 ---- text_file_name[len + 5] = 't'; union_file_name[len + 5] = 'u'; + #ifndef AMIGA mktemp(action_file_name); mktemp(text_file_name); mktemp(union_file_name); + #else + strcpy(action_file_name, TmpFileName(action_file_name)); + strcpy(text_file_name, TmpFileName(text_file_name)); + strcpy(union_file_name, TmpFileName(union_file_name)); + #endif ! len = strlen(file_prefix); if (dflag) { /* the number 7 below is the size of ".tab.h"; sizeof is not used */ *************** *** 244,256 **** /* because of a C compiler that thinks sizeof(".tab.h") == 6 */ defines_file_name = MALLOC(len + 7); if (defines_file_name == 0) no_space(); ! strcpy(defines_file_name, prefix); strcpy(defines_file_name + len, DEFINES_SUFFIX); } output_file_name = MALLOC(len + 7); if (output_file_name == 0) no_space(); ! strcpy(output_file_name, prefix); strcpy(output_file_name + len, OUTPUT_SUFFIX); if (vflag) --- 292,304 ---- /* because of a C compiler that thinks sizeof(".tab.h") == 6 */ defines_file_name = MALLOC(len + 7); if (defines_file_name == 0) no_space(); ! strcpy(defines_file_name, file_prefix); strcpy(defines_file_name + len, DEFINES_SUFFIX); } output_file_name = MALLOC(len + 7); if (output_file_name == 0) no_space(); ! strcpy(output_file_name, file_prefix); strcpy(output_file_name + len, OUTPUT_SUFFIX); if (vflag) *************** *** 257,263 **** { verbose_file_name = MALLOC(len + 8); if (verbose_file_name == 0) no_space(); ! strcpy(verbose_file_name, prefix); strcpy(verbose_file_name + len, VERBOSE_SUFFIX); } } --- 305,311 ---- { verbose_file_name = MALLOC(len + 8); if (verbose_file_name == 0) no_space(); ! strcpy(verbose_file_name, file_prefix); strcpy(verbose_file_name + len, VERBOSE_SUFFIX); } } diff -c -r unix/manpage amiga/manpage *** unix/manpage Sun Aug 19 16:20:42 1990 --- amiga/manpage Sat Jul 14 14:56:37 1990 *************** *** 1,11 **** .\" %W% %R% (Berkeley) %E% .\" ! .TH YACC 1 "December 10, 1989" .UC 6 .SH NAME Yacc \- an LALR(1) parser generator .SH SYNOPSIS ! .B yacc [ -dltv ] [ -b .I prefix .B ] .I filename --- 1,11 ---- .\" %W% %R% (Berkeley) %E% .\" ! .TH YACC 1 "June 3, 1990" .UC 6 .SH NAME Yacc \- an LALR(1) parser generator .SH SYNOPSIS ! .B yacc [ -dlrtv ] [ -b .I prefix .B ] .I filename *************** *** 50,59 **** will not insert the \#line directives. \&\#line directives specified by the user will be retained. .TP .B -t The .B -t ! option will change the preprocessor directives generated by .I yacc so that debugging statements will be incorporated in the compiled code. .TP --- 50,74 ---- will not insert the \#line directives. \&\#line directives specified by the user will be retained. .TP + .B -r + The + .B -r + option causes + .I yacc + to produce separate files for code and tables. The code file + is named + .IR + y.code.c, + and the tables file is named + .IR y.tab.c. + (The + .B -r + option has not yet been implemented.) + .TP .B -t The .B -t ! option changes the preprocessor directives generated by .I yacc so that debugging statements will be incorporated in the compiled code. .TP diff -c -r unix/output.c amiga/output.c *** unix/output.c Sun Aug 19 16:20:49 1990 --- amiga/output.c Sat Jul 14 14:56:17 1990 *************** *** 511,519 **** newmax = maxtable; do { newmax += 200; } while (newmax <= loc); ! table = (short *) realloc(table, newmax*sizeof(short)); if (table == 0) no_space(); ! check = (short *) realloc(check, newmax*sizeof(short)); if (check == 0) no_space(); for (l = maxtable; l < newmax; ++l) { --- 511,519 ---- newmax = maxtable; do { newmax += 200; } while (newmax <= loc); ! table = (short *) REALLOC(table, newmax*sizeof(short)); if (table == 0) no_space(); ! check = (short *) REALLOC(check, newmax*sizeof(short)); if (check == 0) no_space(); for (l = maxtable; l < newmax; ++l) { *************** *** 807,812 **** --- 807,815 ---- symnam = (char **) MALLOC((max+1)*sizeof(char *)); if (symnam == 0) no_space(); + + /* Note that it is not necessary to initialize the element */ + /* symnam[max]. */ for (i = 0; i < max; ++i) symnam[i] = 0; for (i = ntokens - 1; i >= 2; --i) *************** *** 825,840 **** k = 7; while (*++s != '"') { if (*s == '\\') { k += 2; if (*++s == '\\') - k += 2; - else ++k; } - else - ++k; } j += k; if (j > 80) --- 828,840 ---- k = 7; while (*++s != '"') { + ++k; if (*s == '\\') { k += 2; if (*++s == '\\') ++k; } } j += k; if (j > 80) *************** *** 862,867 **** --- 862,868 ---- } else if (s[0] == '\'') { + fprintf(stderr, "s[0] = %c, s[1] = %c, s[2] = %c\n", s[0], s[1], s[2]); if (s[1] == '"') { j += 7; *************** *** 878,894 **** k = 5; while (*++s != '\'') { if (*s == '\\') { k += 2; - ++s; if (*++s == '\\') - k += 2; - else ++k; } ! else ! ++k; } j += k; if (j > 80) --- 879,893 ---- k = 5; while (*++s != '\'') { + fprintf(stderr, "k = %d, *s = %c\n", k, *s); + ++k; if (*s == '\\') { k += 2; if (*++s == '\\') ++k; } ! fprintf(stderr, "k = %d, *s = %c\n", k, *s); } j += k; if (j > 80) diff -c -r unix/reader.c amiga/reader.c *** unix/reader.c Sun Aug 19 16:20:52 1990 --- amiga/reader.c Sat Jul 14 14:56:22 1990 *************** *** 406,412 **** } } } - putc('/', f); need_newline = 1; goto loop; --- 406,411 ---- *************** *** 1105,1111 **** if (!last_was_action && plhs[nrules]->tag) { for (i = nitems - 1; pitem[i]; --i) continue; ! if (pitem[i+1]->tag != plhs[nrules]->tag) default_action_warning(); } --- 1104,1110 ---- if (!last_was_action && plhs[nrules]->tag) { for (i = nitems - 1; pitem[i]; --i) continue; ! if (pitem[i+1] == 0 || pitem[i+1]->tag != plhs[nrules]->tag) default_action_warning(); } *************** *** 1217,1223 **** c = *cptr; if (c == '$') { ! fprintf(f, "yyval.%s ", tag); ++cptr; FREE(d_line); goto loop; --- 1216,1222 ---- c = *cptr; if (c == '$') { ! fprintf(f, "yyval.%s", tag); ++cptr; FREE(d_line); goto loop; *************** *** 1226,1232 **** { i = get_number(); if (i > n) dollar_warning(d_lineno, i); ! fprintf(f, "yyvsp[%d].%s ", i - n, tag); FREE(d_line); goto loop; } --- 1225,1231 ---- { i = get_number(); if (i > n) dollar_warning(d_lineno, i); ! fprintf(f, "yyvsp[%d].%s", i - n, tag); FREE(d_line); goto loop; } *************** *** 1234,1240 **** { ++cptr; i = -get_number() - n; ! fprintf(f, "yyvsp[%d].%s ", i, tag); FREE(d_line); goto loop; } --- 1233,1239 ---- { ++cptr; i = -get_number() - n; ! fprintf(f, "yyvsp[%d].%s", i, tag); FREE(d_line); goto loop; } *************** *** 1247,1256 **** { tag = plhs[nrules]->tag; if (tag == 0) untyped_lhs(); ! fprintf(f, "yyval.%s ", tag); } else ! fprintf(f, "yyval "); cptr += 2; goto loop; } --- 1246,1255 ---- { tag = plhs[nrules]->tag; if (tag == 0) untyped_lhs(); ! fprintf(f, "yyval.%s", tag); } else ! fprintf(f, "yyval"); cptr += 2; goto loop; } *************** *** 1264,1270 **** unknown_rhs(i); tag = pitem[nitems + i - n - 1]->tag; if (tag == 0) untyped_rhs(i, pitem[nitems + i - n - 1]->name); ! fprintf(f, "yyvsp[%d].%s ", i - n, tag); } else { --- 1263,1269 ---- unknown_rhs(i); tag = pitem[nitems + i - n - 1]->tag; if (tag == 0) untyped_rhs(i, pitem[nitems + i - n - 1]->name); ! fprintf(f, "yyvsp[%d].%s", i - n, tag); } else { diff -c -r unix/skeleton.c amiga/skeleton.c *** unix/skeleton.c Sun Aug 19 16:20:48 1990 --- amiga/skeleton.c Sat Jul 14 14:56:05 1990 *************** *** 10,16 **** char *banner[] = { "#ifndef lint", ! "char yysccsid[] = \"@(#)yaccpar 1.4 (Berkeley) 02/25/90\";", "#endif", 0 }; --- 10,16 ---- char *banner[] = { "#ifndef lint", ! "char yysccsid[] = \"@(#)yaccpar 1.5 (Berkeley) 06/03/90\";", "#endif", 0 }; *************** *** 198,204 **** " yym = yylhs[yyn];", " if (yystate == 0 && yym == 0)", " {", ! "#ifdef YYDEBUG", " if (yydebug)", " printf(\"yydebug: after reduction, shifting from state 0 to\\", " state %d\\n\", YYFINAL);", --- 198,204 ---- " yym = yylhs[yyn];", " if (yystate == 0 && yym == 0)", " {", ! "#if YYDEBUG", " if (yydebug)", " printf(\"yydebug: after reduction, shifting from state 0 to\\", " state %d\\n\", YYFINAL);", *************** *** 228,234 **** " yystate = yytable[yyn];", " else", " yystate = yydgoto[yym];", ! "#ifdef YYDEBUG", " if (yydebug)", " printf(\"yydebug: after reduction, shifting from state %d \\", "to state %d\\n\", *yyssp, yystate);", --- 228,234 ---- " yystate = yytable[yyn];", " else", " yystate = yydgoto[yym];", ! "#if YYDEBUG", " if (yydebug)", " printf(\"yydebug: after reduction, shifting from state %d \\", "to state %d\\n\", *yyssp, yystate);", diff -c -r unix/test/error.tab.c amiga/test/error.tab.c *** unix/test/error.tab.c Sun Aug 19 16:20:43 1990 --- amiga/test/error.tab.c Mon Jun 4 00:42:01 1990 *************** *** 1,5 **** #ifndef lint ! char yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90"; #endif #define YYERRCODE 256 short yylhs[] = { -1, --- 1,5 ---- #ifndef lint ! char yysccsid[] = "@(#)yaccpar 1.5 (Berkeley) 06/03/90"; #endif #define YYERRCODE 256 short yylhs[] = { -1, *************** *** 214,220 **** yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { ! #ifdef YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state 0 to\ state %d\n", YYFINAL); --- 214,220 ---- yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { ! #if YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state 0 to\ state %d\n", YYFINAL); *************** *** 244,250 **** yystate = yytable[yyn]; else yystate = yydgoto[yym]; ! #ifdef YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state %d \ to state %d\n", *yyssp, yystate); --- 244,250 ---- yystate = yytable[yyn]; else yystate = yydgoto[yym]; ! #if YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state %d \ to state %d\n", *yyssp, yystate); diff -c -r unix/test/ftp.tab.c amiga/test/ftp.tab.c *** unix/test/ftp.tab.c Sun Aug 19 16:20:55 1990 --- amiga/test/ftp.tab.c Mon Jun 4 00:42:30 1990 *************** *** 1,5 **** #ifndef lint ! char yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90"; #endif #line 26 "ftp.y" --- 1,5 ---- #ifndef lint ! char yysccsid[] = "@(#)yaccpar 1.5 (Berkeley) 06/03/90"; #endif #line 26 "ftp.y" *************** *** 7,18 **** static char sccsid[] = "@(#)ftpcmd.y 5.20.1.1 (Berkeley) 3/2/89"; #endif /* not lint */ ! #include ! #include ! #include ! #include #include #include --- 7,18 ---- static char sccsid[] = "@(#)ftpcmd.y 5.20.1.1 (Berkeley) 3/2/89"; #endif /* not lint */ ! #include ! #include ! #include ! #include #include #include *************** *** 20,26 **** #include #include #include ! #include #include extern struct sockaddr_in data_dest; --- 20,26 ---- #include #include #include ! #include #include extern struct sockaddr_in data_dest; *************** *** 1495,1501 **** case 49: #line 493 "ftp.y" { ! *(char **)&(yyval ) = ""; } break; case 52: --- 1495,1501 ---- case 49: #line 493 "ftp.y" { ! *(char **)&(yyval) = ""; } break; case 52: *************** *** 1513,1531 **** case 53: #line 516 "ftp.y" { ! yyval = FORM_N; } break; case 54: #line 520 "ftp.y" { ! yyval = FORM_T; } break; case 55: #line 524 "ftp.y" { ! yyval = FORM_C; } break; case 56: --- 1513,1531 ---- case 53: #line 516 "ftp.y" { ! yyval = FORM_N; } break; case 54: #line 520 "ftp.y" { ! yyval = FORM_T; } break; case 55: #line 524 "ftp.y" { ! yyval = FORM_C; } break; case 56: *************** *** 1586,1622 **** case 64: #line 572 "ftp.y" { ! yyval = STRU_F; } break; case 65: #line 576 "ftp.y" { ! yyval = STRU_R; } break; case 66: #line 580 "ftp.y" { ! yyval = STRU_P; } break; case 67: #line 586 "ftp.y" { ! yyval = MODE_S; } break; case 68: #line 590 "ftp.y" { ! yyval = MODE_B; } break; case 69: #line 594 "ftp.y" { ! yyval = MODE_C; } break; case 70: --- 1586,1622 ---- case 64: #line 572 "ftp.y" { ! yyval = STRU_F; } break; case 65: #line 576 "ftp.y" { ! yyval = STRU_R; } break; case 66: #line 580 "ftp.y" { ! yyval = STRU_P; } break; case 67: #line 586 "ftp.y" { ! yyval = MODE_S; } break; case 68: #line 590 "ftp.y" { ! yyval = MODE_B; } break; case 69: #line 594 "ftp.y" { ! yyval = MODE_C; } break; case 70: *************** *** 1628,1641 **** * This is a valid reply in some cases but not in others. */ if (logged_in && yyvsp[0] && strncmp((char *) yyvsp[0], "~", 1) == 0) { ! *(char **)&(yyval ) = *glob((char *) yyvsp[0]); if (globerr != NULL) { reply(550, globerr); ! yyval = NULL; } free((char *) yyvsp[0]); } else ! yyval = yyvsp[0]; } break; case 72: --- 1628,1641 ---- * This is a valid reply in some cases but not in others. */ if (logged_in && yyvsp[0] && strncmp((char *) yyvsp[0], "~", 1) == 0) { ! *(char **)&(yyval) = *glob((char *) yyvsp[0]); if (globerr != NULL) { reply(550, globerr); ! yyval = NULL; } free((char *) yyvsp[0]); } else ! yyval = yyvsp[0]; } break; case 72: *************** *** 1660,1666 **** multby *= 8; dec /= 10; } ! yyval = ret; } break; case 73: --- 1660,1666 ---- multby *= 8; dec /= 10; } ! yyval = ret; } break; case 73: *************** *** 1667,1676 **** #line 647 "ftp.y" { if (logged_in) ! yyval = 1; else { reply(530, "Please login with USER and PASS."); ! yyval = 0; } } break; --- 1667,1676 ---- #line 647 "ftp.y" { if (logged_in) ! yyval = 1; else { reply(530, "Please login with USER and PASS."); ! yyval = 0; } } break; *************** *** 1682,1688 **** yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { ! #ifdef YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state 0 to\ state %d\n", YYFINAL); --- 1682,1688 ---- yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { ! #if YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state 0 to\ state %d\n", YYFINAL); *************** *** 1712,1718 **** yystate = yytable[yyn]; else yystate = yydgoto[yym]; ! #ifdef YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state %d \ to state %d\n", *yyssp, yystate); --- 1712,1718 ---- yystate = yytable[yyn]; else yystate = yydgoto[yym]; ! #if YYDEBUG if (yydebug) printf("yydebug: after reduction, shifting from state %d \ to state %d\n", *yyssp, yystate);