home *** CD-ROM | disk | FTP | other *** search
- *** Makefile.orig Mon May 11 14:43:33 1992
- --- Makefile Thu Sep 10 07:50:13 1992
- ***************
- *** 18,35 ****
-
- # This is where the install step puts it.
- #EXDIR=/site/bin
- ! EXDIR=/usr/local/bin
-
- # This is where the man page goes.
- ! #MANDIR=/usr/local/src/man/man1 # reno
- ! #MANEXT=1 # reno
- ! MANDIR=/usr/man/manl
- ! MANEXT=l
- MANMODE=644
-
- # This is where the library file (tutorial) goes.
- #LIBDIR=/usr/local/share/$(name) # reno
- ! LIBDIR=/usr/local/lib/$(name)
-
- # Set SIMPLE for lex.c if you don't want arrow keys or lex.c blows up
- SIMPLE=
- --- 18,35 ----
-
- # This is where the install step puts it.
- #EXDIR=/site/bin
- ! EXDIR=<installdir>/bin
-
- # This is where the man page goes.
- ! MANDIR=<installsharedir>/man/man1
- ! MANEXT=1
- ! #MANDIR=/usr/man/manl
- ! #MANEXT=l
- MANMODE=644
-
- # This is where the library file (tutorial) goes.
- #LIBDIR=/usr/local/share/$(name) # reno
- ! LIBDIR=<installsharedir>/<prefix>lib/$(name)
-
- # Set SIMPLE for lex.c if you don't want arrow keys or lex.c blows up
- SIMPLE=
- ***************
- *** 55,62 ****
- # System 5.3, SunOS 4.X, VMS, BSD4.4 (reno), and ANSI C Compliant systems
- # use: SIGVOID= for:
- # BSD systems (excluding reno, BSD4.4), and the UNIXPC 'cc'
- ! SIGVOID=-DSIGVOID
- ! #SIGVOID=
-
- # Set IEEE_MATH if you need setsticky() calls in your signal handlers
- #
- --- 55,62 ----
- # System 5.3, SunOS 4.X, VMS, BSD4.4 (reno), and ANSI C Compliant systems
- # use: SIGVOID= for:
- # BSD systems (excluding reno, BSD4.4), and the UNIXPC 'cc'
- ! #SIGVOID=-DSIGVOID
- ! SIGVOID=
-
- # Set IEEE_MATH if you need setsticky() calls in your signal handlers
- #
- ***************
- *** 67,84 ****
- # Set RINT= on/with (they have rint):
- # SunOS 4.0.3c compiler
- # BSD4.4 (reno)
- ! #RINT=
- ! RINT=-DRINT
-
- # Set RE_COMP if you have the re_comp/re_exec regular expression routines
- # (most BSD based systems do).
- ! #RE_COMP=-DRE_COMP
- ! RE_COMP=
-
- # Set REGCMP if you have the regcmp/regex regular expression routines
- # (most System V based systems do)
- ! REGCMP=-DREGCMP
- ! #REGCMP=
-
- # This is the name of a pager like "more".
- # "pg" may be appropriate for SYSV.
- --- 67,84 ----
- # Set RINT= on/with (they have rint):
- # SunOS 4.0.3c compiler
- # BSD4.4 (reno)
- ! RINT=
- ! #RINT=-DRINT
-
- # Set RE_COMP if you have the re_comp/re_exec regular expression routines
- # (most BSD based systems do).
- ! RE_COMP=-DRE_COMP
- ! #RE_COMP=
-
- # Set REGCMP if you have the regcmp/regex regular expression routines
- # (most System V based systems do)
- ! #REGCMP=-DREGCMP
- ! REGCMP=
-
- # This is the name of a pager like "more".
- # "pg" may be appropriate for SYSV.
- ***************
- *** 90,100 ****
-
- # path to crypt, do not define if you don't have crypt
- # most systems
- ! CRYPT=-DCRYPT_PATH=\"/bin/crypt\"
- # BSD
- #CRYPT=-DCRYPT_PATH=\"/usr/bin/crypt\"
- # other people?
- ! #CRYPT=-DCRYPT_PATH=\"/usr/local/bin/crypt\"
-
- # If you get errors about fmod being undefined when you try to
- # compile, then define NO_FMOD (most likely BSD4.3 and Mt Xinu).
- --- 90,100 ----
-
- # path to crypt, do not define if you don't have crypt
- # most systems
- ! #CRYPT=-DCRYPT_PATH=\"/bin/crypt\"
- # BSD
- #CRYPT=-DCRYPT_PATH=\"/usr/bin/crypt\"
- # other people?
- ! CRYPT=-DCRYPT_PATH=\"<installdir>/bin/crypt\"
-
- # If you get errors about fmod being undefined when you try to
- # compile, then define NO_FMOD (most likely BSD4.3 and Mt Xinu).
- ***************
- *** 133,140 ****
- # noticing the rows become 2, 3, 40, 41, 42... (etc).
- # Known systems/terminfos w/ curses problems:
- # {Esix Rev. D+, AT&T SysV3.2.1}:at386-m,xterm, HP-UX7.0:(not sure)
- ! IDLOKISBAD=-DIDLOKBAD
- ! #IDLOKISBAD=
-
- # If you don't have idlok() in your curses define NOIDLOK
- NO_IDLOK=
- --- 133,140 ----
- # noticing the rows become 2, 3, 40, 41, 42... (etc).
- # Known systems/terminfos w/ curses problems:
- # {Esix Rev. D+, AT&T SysV3.2.1}:at386-m,xterm, HP-UX7.0:(not sure)
- ! #IDLOKISBAD=-DIDLOKBAD
- ! IDLOKISBAD=
-
- # If you don't have idlok() in your curses define NOIDLOK
- NO_IDLOK=
- ***************
- *** 164,169 ****
- --- 164,171 ----
-
- #### SYSTEM DEFINES ####
-
- + CC=gcc
- +
- # Use this for system AIX V3.1
- #CFLAGS= -O -DSYSV2 -DCHTYPE=int -DNLS
- #LDFLAGS=
- ***************
- *** 178,188 ****
- #CFLAGS= -DSYSV2 -g -pipe -traditional
-
- # Use this for system V.3
- ! CFLAGS= -DSYSV3 -O
- ! LDFLAGS= -s
- #CFLAGS= -DSYSV3 -g
- #LDFLAGS= -g
- ! LIB=-lm -lcurses -lPW
- # with gcc also use:
- #CC=gcc
- #CFLAGS= -DSYSV3 -O -pipe -traditional
- --- 180,190 ----
- #CFLAGS= -DSYSV2 -g -pipe -traditional
-
- # Use this for system V.3
- ! #CFLAGS= -DSYSV3 -O
- ! #LDFLAGS= -s
- #CFLAGS= -DSYSV3 -g
- #LDFLAGS= -g
- ! #LIB=-lm -lcurses -lPW
- # with gcc also use:
- #CC=gcc
- #CFLAGS= -DSYSV3 -O -pipe -traditional
- ***************
- *** 221,229 ****
- #CFLAGS= -O -DBSD42 -pipe
-
- # Use this for BSD 4.3
- ! #CFLAGS= -O -DBSD43
- ! #LDFLAGS=
- ! #LIB=-lm -lcurses -ltermcap
-
- # Use this for SunOS 4.X if you have the System V package installed.
- # This will link with the System V curses which is preferable to the
- --- 223,231 ----
- #CFLAGS= -O -DBSD42 -pipe
-
- # Use this for BSD 4.3
- ! CFLAGS= -O -DBSD43
- ! LDFLAGS=
- ! LIB=-lm -lcurses -ltermcap
-
- # Use this for SunOS 4.X if you have the System V package installed.
- # This will link with the System V curses which is preferable to the
- ***************
- *** 268,273 ****
- --- 270,276 ----
-
- # Use this for SCO Unix 3.2.2 and ODT 1.1
- #CC=cc
- + #CC=gcc
- #CFLAGS= -O -DSYSV3
- #LDFLAGS=
- #LIB=-lm -lcurses -lPW -lmalloc -lc_s
- --- interp.c.orig Mon May 11 14:43:36 1992
- +++ interp.c Thu Dec 28 16:20:59 1995
- @@ -1039,9 +1039,9 @@
- #else /* VMS */
-
- char *
- -doext (command, value)
- +doexts (command, value)
- char *command;
- -double value;
- +char *value;
- {
- static char *prevstr = (char *)0; /* previous result */
- static unsigned prevlen = 0;
- @@ -1062,7 +1062,12 @@
- } else {
- FILE *pp;
-
- - (void) sprintf (buff, "%s %g", command, value); /* build cmd line */
- + if (value) {
- + (void) sprintf (buff, "%s %s", command, value); /* build cmd line */
- + free(value);
- + } else
- + strcpy( buff, command );
- +
- scxfree (command);
-
- error ("Running external function...");
- @@ -1102,6 +1107,17 @@
- return (strcpy(scxmalloc((unsigned)1), ""));
- }
-
- +char *
- +doext (command, value)
- +char *command;
- +double value;
- +{
- + char *buff;
- + buff = malloc( 40 );
- + sprintf( buff, "%g", value );
- + return doexts( command, buff );
- +}
- +
- #endif /* VMS */
-
-
- @@ -1268,7 +1284,8 @@
- if (minc>maxc) c = maxc, maxc = minc, minc = c;
- return dostindex(eval(se->e.o.left), minr, minc, maxr, maxc);
- }
- - case EXT: return(doext(seval(se->e.o.left), eval(se->e.o.right)));
- + case EXT: return(doext (seval(se->e.o.left), eval(se->e.o.right)));
- + case EXTS: return(doexts(seval(se->e.o.left),seval(se->e.o.right)));
- case SVAL: return(dosval(seval(se->e.o.left), eval(se->e.o.right)));
- case SUBSTR: return(dosubstr(seval(se->e.o.left),
- (int)eval(se->e.o.right->e.o.left) - 1,
- @@ -2077,6 +2094,7 @@
- && constant (e -> e.o.left)
- && constant (e -> e.o.right)
- && e -> op != EXT /* functions look like constants but aren't */
- + && e -> op != EXTS /* functions look like constants but aren't */
- && e -> op != NVAL
- && e -> op != SVAL
- && e -> op != NOW
- @@ -2278,6 +2296,7 @@
- case NVAL: two_arg("@nval(", e); break;
- case SVAL: two_arg("@sval(", e); break;
- case EXT: two_arg("@ext(", e); break;
- + case EXTS: two_arg("@exts(", e); break;
- case SUBSTR: three_arg("@substr(", e); break;
- case STINDEX: index_arg("@stindex(", e); break;
- case INDEX: index_arg("@index(", e); break;
- --- sc.h.orig Mon May 11 14:43:38 1992
- +++ sc.h Thu Dec 28 15:22:46 1995
- @@ -207,6 +207,7 @@
- #define LOWER OP_BASE + 56
- #define CAPITAL OP_BASE + 57
- #define NUMITER OP_BASE + 58
- +#define EXTS OP_BASE + 59
-
- /* flag values */
- #define is_valid 0001
- --- version.c.orig Mon May 11 14:43:39 1992
- +++ version.c Thu Dec 28 15:47:01 1995
- @@ -4,4 +4,4 @@
- * The part after the first colon, except the last char, appears on the screen.
- */
-
- -char *rev = "$Revision: 6.21 $";
- +char *rev = "$Revision: 6.21RTR $";
- --- gram.y.rtr Mon May 11 14:43:35 1992
- +++ gram.y Thu Dec 28 15:23:07 1995
- @@ -157,6 +157,7 @@
- %token K_ROWLIMIT
- %token K_COLLIMIT
- %token K_NUMITER
- +%token K_EXTS
-
- %left '?' ':'
- %left '|'
- @@ -356,6 +357,7 @@
- | '@' K_STINDEX '(' e ',' var_or_range ')'
- { $$ = new(STINDEX, $4, new_range(REDUCE | STINDEX, $6)); }
- | '@' K_EXT '(' e ',' e ')' { $$ = new(EXT, $4, $6); }
- + | '@' K_EXTS '(' e ',' e ')' { $$ = new(EXTS, $4, $6); }
- | '@' K_NVAL '(' e ',' e ')' { $$ = new(NVAL, $4, $6); }
- | '@' K_SVAL '(' e ',' e ')' { $$ = new(SVAL, $4, $6); }
- | '@' K_SUBSTR '(' e ',' e ',' e ')'
- --- help.c.orig Mon May 11 14:43:35 1992
- +++ help.c Sat Dec 30 11:48:52 1995
- @@ -433,17 +433,17 @@
- " ``the lazy dog'' if A0 is ``the la''.",
- " @substr(se,e1,e2) Extract characters e1 through e2 from the",
- " string expression se. For example,",
- -" ``@substr(\"Nice jacket\" 4, 7)'' yields ",
- -" ``e ja''.",
- +" ``@substr(\"Nice jacket\", 4, 7)'' yields ``e ja''.",
- " @fmt(se,e) Convert a number to a string using sprintf(3).",
- " For example, ``@fmt(\"*%6.3f*\",10.5)'' yields",
- " ``*10.500*''. Use formats are e, E, f, g, and G.",
- " @sval(se,e) Return the string value of a cell selected by name.",
- -" @ext(se,e) Call an external function (program or",
- -" script). Convert e to a string and append it",
- -" to the command line as an argument. @ext yields",
- -" a string: the first line printed to standard",
- -" output by the command.",
- +" @ext(se,e) Call an external function (program or script).",
- +" Convert e to a string and append it to the command",
- +" line as an argument. @ext yields a string: the first",
- +" line printed to standard output by the command. Use",
- +" @ston if you need to convert the result to a number.",
- +" @exts(se,se) Similar to @ext, but the 2nd argument is a string.",
- " @coltoa(e) Return the column letter(s) from the passed number",
- " @upper(e) @lower(e) Return the string in upper/lower case",
- " @capital(e) Return the string with words in upper case",
- --- sc.doc.orig Sat Dec 30 11:38:22 1995
- +++ sc.doc Sat Dec 30 11:53:51 1995
- @@ -215,14 +215,14 @@
- .B e
- External function execution.
- When disabled, external functions (see
- -.IR @ext ()
- +.IR @ext/@exts ()
- below) are not called.
- This saves a lot of time at each screen update.
- External functions are disabled by default.
- If disabled, and external functions are used anywhere,
- a warning is printed each time the screen is updated,
- and the result of
- -.IR @ext ()
- +.IR @ext/@exts ()
- is the value from the previous call, if any, or a null string.
- .\" ----------
- .TP
- @@ -2038,6 +2038,9 @@
- You can also "hide" the second argument by ending the command line
- (first argument) with `` #'' (shell comment).
- .\" ----------
- +.TP 18
- +.BR @exts (se,se)
- +Just like @ext, but the second argument is also a string.
- .TP 18
- .BR @coltoa (e)
- Returns a string name for a column from the numeric argument.
-