ADDED mttroot/patches/p2c/p2c-1.21alpha2/lex.c.diff Index: mttroot/patches/p2c/p2c-1.21alpha2/lex.c.diff ================================================================== --- /dev/null +++ mttroot/patches/p2c/p2c-1.21alpha2/lex.c.diff @@ -0,0 +1,63 @@ +*** p2c-1.22/src/lex.c Tue Mar 16 09:28:20 1999 +--- p2c-1.22-dev/src/lex.c Tue Jan 30 16:57:23 2001 +*************** Static int skipflag; +*** 38,44 **** + Static char modulenotation; + Static short inputkind; + Static Strlist *instrlist; +! Static char inbuf[300]; + Static char *oldinfname, *oldctxname; + Static Strlist *endnotelist; + +--- 38,44 ---- + Static char modulenotation; + Static short inputkind; + Static Strlist *instrlist; +! Static char *inbuf; + Static char *oldinfname, *oldctxname; + Static Strlist *endnotelist; + +*************** void init_lex() +*** 411,416 **** +--- 411,417 ---- + inputkind = INP_FILE; + inf_lnum = 0; + inf_ltotal = 0; ++ inbuf = ALLOC(buffersize, char, strings); /* strings ? */ + *inbuf = 0; + inbufptr = inbuf; + keepingstrlist = NULL; +*************** void getline() +*** 1055,1061 **** + case INP_INCFILE: + inf_lnum++; + inf_ltotal++; +! if (fgets(inbuf, 300, inf)) { + cp = inbuf + strlen(inbuf); + if (*inbuf && cp[-1] == '\n') + cp[-1] = 0; +--- 1056,1062 ---- + case INP_INCFILE: + inf_lnum++; + inf_ltotal++; +! if (fgets(inbuf, buffersize, inf)) { + cp = inbuf + strlen(inbuf); + if (*inbuf && cp[-1] == '\n') + cp[-1] = 0; +*************** int p2c_only, starparen; +*** 1889,1895 **** + } + if (!isalpha(*cp)) + return 0; +! while ((isalnum(*cp) || *cp == '_') && cp2 < namebuf+300) + *cp2++ = toupper(*cp++); + if (cp[0] == '+' && cp[1] == '+' && + cp == inbufptr+1 && toupper(cp[-1]) == 'C') +--- 1890,1896 ---- + } + if (!isalpha(*cp)) + return 0; +! while ((isalnum(*cp) || *cp == '_') && cp2 < namebuf+buffersize) + *cp2++ = toupper(*cp++); + if (cp[0] == '+' && cp[1] == '+' && + cp == inbufptr+1 && toupper(cp[-1]) == 'C') ADDED mttroot/patches/p2c/p2c-1.21alpha2/loc.p2crc Index: mttroot/patches/p2c/p2c-1.21alpha2/loc.p2crc ================================================================== --- /dev/null +++ mttroot/patches/p2c/p2c-1.21alpha2/loc.p2crc @@ -0,0 +1,12 @@ + +# Store public p2crc commands local to your system here, so that +# you can grab a new version of sys.p2crc without losing your changes. + +BufferSize=1000000. + +LineWidth=1000000. +MaxLineWidth=1000000. + +OverWidePenalty=0. +OverWideExtraPenalty=0. + ADDED mttroot/patches/p2c/p2c-1.21alpha2/parse.c.diff Index: mttroot/patches/p2c/p2c-1.21alpha2/parse.c.diff ================================================================== --- /dev/null +++ mttroot/patches/p2c/p2c-1.21alpha2/parse.c.diff @@ -0,0 +1,19 @@ +*** p2c-1.22/src/parse.c Tue Mar 16 09:28:20 1999 +--- p2c-1.22-dev/src/parse.c Tue Jan 30 16:30:40 2001 +*************** int p_search(fname, ext, need) +*** 5477,5483 **** + char *fname, *ext; + int need; + { +! char infnbuf[300]; + FILE *fp; + Meaning *mod; + int savesysprog, savecopysource; +--- 5477,5483 ---- + char *fname, *ext; + int need; + { +! char infnbuf[buffersize]; + FILE *fp; + Meaning *mod; + int savesysprog, savecopysource; ADDED mttroot/patches/p2c/p2c-1.21alpha2/sys.p2crc.diff Index: mttroot/patches/p2c/p2c-1.21alpha2/sys.p2crc.diff ================================================================== --- /dev/null +++ mttroot/patches/p2c/p2c-1.21alpha2/sys.p2crc.diff @@ -0,0 +1,13 @@ +*** p2c-1.22/src/sys.p2crc Tue Mar 16 09:28:20 1999 +--- p2c-1.22-dev/src/sys.p2crc Tue Jan 30 17:01:14 2001 +*************** MinSpacingThresh # If spe +*** 455,460 **** +--- 455,462 ---- + + # LINE BREAKING + ++ BufferSize # Maximum input line length; default=300. ++ + LineWidth # Target max output line width; default=78. + + MaxLineWidth # Absolute max output line width; default=90. ADDED mttroot/patches/p2c/p2c-1.21alpha2/trans.h.diff Index: mttroot/patches/p2c/p2c-1.21alpha2/trans.h.diff ================================================================== --- /dev/null +++ mttroot/patches/p2c/p2c-1.21alpha2/trans.h.diff @@ -0,0 +1,22 @@ +*** p2c-1.22/src/trans.h Tue Mar 16 09:28:21 1999 +--- p2c-1.22-dev/src/trans.h Tue Jan 30 17:25:33 2001 +*************** extern int sizeof_char, sizeof_short, si +*** 1133,1138 **** +--- 1133,1139 ---- + extern short size_t_long; + extern int setbits, defaultsetsize, seek_base, integerwidth, realwidth; + extern short quoteincludes, expandincludes, collectnest; ++ extern const int buffersize; + extern int phystabsize, intabsize, linewidth, maxlinewidth; + extern int majorspace, minorspace, declspace, functionspace, minfuncspace; + extern int casespacing, caselimit; +*************** struct rcstruct { +*** 1351,1356 **** +--- 1352,1358 ---- + 'I', 'R', "MINSPACINGTHRESH",(anyptr) &minspacingthresh, -1, + + /* LINE BREAKING */ ++ 'I', 'R', "BUFFERSIZE", (anyptr) &buffersize, 300, + 'I', 'R', "LINEWIDTH", (anyptr) &linewidth, 78, + 'I', 'R', "MAXLINEWIDTH", (anyptr) &maxlinewidth, 90, + 'R', 'V', "OVERWIDEPENALTY", (anyptr) &overwidepenalty, 2500,