home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-05 | 73.1 KB | 2,035 lines |
- Newsgroups: comp.sources.unix
- From: greg@brooktree.com (Gregory Santos)
- Subject: v27i031: conv123 - convert ASCII files to Lotus-123 format, Part01/02
- Message-id: <1.747292168.20241@gw.home.vix.com>
- Sender: unix-sources-moderator@gw.home.vix.com
- Approved: vixie@gw.home.vix.com
-
- Submitted-By: greg@brooktree.com (Gregory Santos)
- Posting-Number: Volume 27, Issue 31
- Archive-Name: conv123/part01
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 2)."
- # Contents: MANIFEST Makefile README conv123.1 conv123.doc grph123.1
- # grph123.doc int2s.c lotus.h s2int.c swapb.c swapb.h
- # Wrapped by vixie@gw.home.vix.com on Sun Sep 5 22:08:56 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(530 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X MANIFEST 1
- X Makefile 1
- X README 1
- X conv123.1 1
- X conv123.c 2
- X conv123.doc 1
- X grph123.1 1
- X grph123.c 2
- X grph123.doc 1
- X int2s.c 1
- X lotus.h 1
- X s2int.c 1
- X swapb.c 1
- X swapb.h 1
- END_OF_FILE
- if test 530 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(760 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- XBINDIR = /usr/local/bin
- XMANDIR = /usr/local/man/man1
- XOBJECTS1 = conv123.o int2s.o s2int.o
- XOBJECTS2 = grph123.o int2s.o s2int.o
- XCFLAGS = -O
- XLDFLAGS =
- X
- Xall: c123 g123
- X
- Xc123: $(OBJECTS1)
- X cc $(CFLAGS) $(OBJECTS1) -o conv123 $(LDFLAGS)
- X chmod 755 ./conv123
- X
- Xg123: $(OBJECTS2)
- X cc $(CFLAGS) $(OBJECTS2) -o grph123 $(LDFLAGS)
- X chmod 755 ./grph123
- X
- Xclean:
- X rm -f ./conv123.o
- X rm -f ./grph123.o
- X rm -f ./int2s.o
- X rm -f ./s2int.o
- X rm -f ./conv123
- X rm -f ./grph123
- X
- Xinstall:
- X cp ./conv123 $(BINDIR)
- X cp ./grph123 $(BINDIR)
- X cp ./conv123.1 $(MANDIR)
- X cp ./grph123.1 $(MANDIR)
- X
- Xuninstall:
- X rm -f $(BINDIR)/conv123
- X rm -f $(BINDIR)/grph123
- X rm -f $(MANDIR)/conv123.1
- X rm -f $(MANDIR)/grph123.1
- X
- X$(OBJECTS1): conv123.c int2s.c s2int.c
- X$(OBJECTS2): grph123.c int2s.c s2int.c
- END_OF_FILE
- if test 760 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(1955 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X
- Xconv123, grph123 9 Aug 1993 -- gss
- X
- Xconv123 is a utility for creating a binary-ready spreadsheet
- Xthat can be read in directly by Lotus/123(TM) or programs
- Xthat can read Lotus/123(TM) spreadsheets. It grew out of
- Xthe need to take our corporate data and deliver it as a
- Xkind of inexpensive "executive information system" to
- Xmicro-computers that had been networked together, when it
- Xwas realized that the standard "import" function used to
- Xread ASCII data files was too restricting.
- X
- XIt is hoped that the straightforward ASCII input file format,
- Xdesigned for use with a report writer, will be suitable for
- Xmost data-generating methods, including 3rd and 4th generation
- Xlanguages.
- X
- XThis distribution also includes grph123, which produces a Lotus(TM)
- X"named graph" file. Although requiring a different input file
- Xformat, this utility can be quite useful, permitting as it does
- Xthe creation of pre-formatted graph instructions for Lotus/123(TM),
- Xand also for those programs capable of interpreting such information
- X(e.g., Excel(TM)).
- X
- XThe utilities are fairly simple, currently supporting no options, and
- Xafter unpacking, should just require a simple "make" to create.
- XYou may want to edit the Makefile for compiler flags, or for target
- Xdirectory information ("BINDIR" and "MANDIR" variables) if you intend
- Xto "make install."
- X
- Xconv123 can be used as a filter (i.e., stdin or stdout redirected),
- Xalthough grph123 can re-direct only stdout. They have been tested
- Xonly on HP-UX 8.0x (series 700 machines), AIX 3.2, and SunOS 4.x. We
- Xreally don't feel much like enhancing them right now, but feel free to
- Xmail bugs reports (in any form) to greg@brooktree.com.
- X
- XBy the way: if you really must run this program on an Intel processor,
- Xbe sure to alter the "swapb" macro to do no swapping. It is not
- Ximagined that there would be much need for this, as most Intel-based
- Xoperating systems should have utilities such as conv123 readily and
- Xinexpensively available.
- END_OF_FILE
- if test 1955 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'conv123.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conv123.1'\"
- else
- echo shar: Extracting \"'conv123.1'\" \(10097 characters\)
- sed "s/^X//" >'conv123.1' <<'END_OF_FILE'
- X.TH CONV123 1 "6 Aug 1993" "123 Utilities"
- X.SH NAME
- Xconv123 \- The ASCII to Lotus(TM) spreadsheet converter
- X
- X.SH SYNOPSIS
- X.B conv123
- X[inputfile] [outputfile]
- X
- X.SH DESCRIPTION
- X
- X.I conv123
- Xis a utility for reading a specially-formatted flat
- XASCII file and converting it into a Lotus/123(TM) ".wk1" file.
- XEach specially-formatted ASCII file creates one entire spreadsheet.
- XThis spreadsheet file is in its final, directly-readable
- Xbinary form, and need undergo no further translation before being
- Xread directly by Lotus/123(TM). This feature makes
- X.I conv123
- Xespecially
- Xsuited to networked environments, where report writers or programs
- Xrunning on transaction processing machines can easily and directly
- Xcreate spreadsheet output, instantly ready for copying, downloading,
- Xor direct access in the MS-DOS(TM) or Macintosh(TM) environments.
- XIn addition to individual data values, certain common aggregate
- Xfunctions (formulas) may be specified (sum,min,max,variance,std
- Xdeviation, and average), and five binary functions (addition,
- Xsubtraction, multiplication, division, and percentage) may also
- Xbe specified.
- X
- XThe input file format has been optimized for generation by a
- Xsimple top-down, left-to-right report generator,
- Xand is human-readable. The input logic has been made fairly intelligent,
- Xautomatically discerning numeric and non-numeric values,
- Xcalculating formula ranges, and calculating the maximum number
- Xof decimal places in a row or column.
- X
- X.SH OPTIONS
- XThere are currently no command-line options for
- X.I conv123.
- X
- X
- X.SH PARAMETERS
- XThe only parameters are the input and output file names, both
- Xof which are optional;
- X.I conv123
- Xcan act as a filter, and by
- Xdefault accepts its input from stdin and sends its output to
- Xstdout.
- X
- X.SH INPUT FILE FORMAT
- XThe major feature of the input file format is a "definition"
- Xline, consisting of all dashes (-) and spaces. Each string of
- Xcontiguous dashes on the "definition" line will become a column
- Xin Lotus/123(TM), the width of that column being determined by the
- Xnumber of dashes. Characters in the input file that fall outside
- Xthese "column definitions" are ignored. In addition, up to two
- Xlines above the "definition" line can be used for header information,
- Xthough this is not required. There may not be any white space before
- Xthe first dash on the definition line; in other words, the definition
- Xline MUST begin in the first column of the input file.
- X
- XFollowing is an example input file, followed by a more detailed
- Xexplanation of its contents:
- X
- X Jan Feb Mar Qtr
- X Product Sales Sales Sales Total
- X --------- ----------- ----------- ----------- -----------
- X widget-1 45000.87 54390.9 75947.12 @RSUM
- X widget-2 47000.78 64550.0 73647.77 @RSUM
- X widget-3 47800.11 67830.5 54536.37 @RSUM
- X widget-4 33003.30 76530.7 98653.83 @RSUM
- X widget-5 12000.44 64836.7 27637.91 @RSUM
- X
- X @CSUM @CSUM @CSUM @CSUM
- X
- XThis is a fairly simple spreadsheet with ten rows and five
- Xcolumns. The fifth column is actually made of formulas
- X("row sums"), as is the last row ("column sums").
- X.I conv123
- Xis
- Xsmart enough to know that each data value in the first column
- Xis non-numeric, and creates the formulas in the fifth column
- Xaccordingly, i.e., the "row sums" are sums of the values in
- Xthe second through the fourth columns. In addition, since
- X.I conv123
- Xkeeps track of the maximum number of decimal places
- Xused in a given row or column, the number of decimal places
- Xdisplayed in Lotus/123(TM) will be two (2) for all formulas,
- Xwith the exception of the CSUM in the third column, which will
- Xdisplay with one (1) decimal place. Note also that the position
- Xof the number or formula code in each column is not significant,
- Xas long as the entire values fits under the dashed-line column
- Xdefinition(s). Also, most spreadsheet programs will re-position
- Xthe values within each cell as the values are displayed.
- X
- X
- X.SH FORMULA CODES
- XAs has been shown in the above example, cell contents may be
- Xdecimal numbers or character values, with the width of the cell
- Xdetermined by the width of the contiguous dashes in the "definition"
- Xline. Cell contents may also be formula codes. A formula code is
- Xa contiguous set of characters, always beginning with a commercial
- X"at" sign (@). There are three types: row, column and both. The
- Xtype indicator is a single upper case letter, one of "R" (row), "C"
- X(column) or "B" (both), immediately following the "@" ("at" sign).
- XThe formula function immediately follows the type indicator, and may
- Xbe an aggregate function or a binary function. The range for an
- Xaggregate function is calculated automatically, being the range from
- Xthe earliest available cell -- i.e., the cell farthest "above" for
- Xcolumns, or farthest to the "left" for rows -- to the cell immediately
- Xadjacent to the formula definition. Note that this "farthest" cell
- Xlocation is re-adjusted when a non-numeric cell definition is
- Xencountered, being set to begin at the next numeric cell (this does
- Xnot include non-cells, i.e., positions within the spreadsheet with
- Xno value). The automatic range start position may be overridden for
- X"row" functions by placing a numeric value at the end of the formula
- Xcode (still contiguous). A numeric value at the end of a formula code
- Xis treated as an absolute column number, with the first column
- Xdefined as column one (1).
- X
- XThe range for a binary function is simply the last two adjacent
- Xcells "above" the formula definition for column functions, and
- X"left" of the formula definition for row functions. The adjacent
- Xcell is always used in the calculation; an override number after
- Xthe function code in a row function is treated as an absolute
- Xcolumn number overriding the penultimate cell. For commutative
- Xfunctions (addition and multiplication), order is not significant.
- XFor non-commutative functions (subtraction and division), the
- Xdefinition is a - b, or a/b, where a is the penultimate cell, and b
- Xis the immediately adjacent cell. If there is an override column
- Xnumber, THIS ORDER IS REVERSED -- i.e., b - a and b/a, where a is
- Xthe overriding column number and b is the immediately adjacent cell.
- XThis situation is made clearer in the examples below.
- X
- XFollowing is a summary of the available functions, which MUST be in
- Xupper case where applicable:
- X
- X SUM -- Performs addition on a range of cells.
- X AVG -- Takes the average value on a range of cells.
- X MIN -- Extracts the minimum value on a range of cells.
- X MAX -- Extracts the minimum value on a range of cells.
- X VAR -- Calculates the variance on a range of cells.
- X STD -- Calculates the standard deviation on a range of cells.
- X + -- Adds two cells.
- X - -- Subtracts two cells.
- X * -- Multiplies two cells.
- X / -- Divides two cells.
- X % -- Divides two cells, and multiplies the result by 100.
- X NUL -- This is actually not a function, but performs the task
- X of a "placeholder", preventing the "resetting" of auto-
- X matically calculated numeric ranges without creating
- X cell contents. This function is most frequently used to
- X extend the row range of aggregate column functions.
- X
- X
- X.SH FORMULA EXAMPLES
- X Here are some sample input lines, with result following.
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @RSUM
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 600.00
- X
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @R+
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 500.00
- X
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @R/
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 0.67
- X
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @R/3
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 1.50
- X
- X Note in the above example that the order of divisor/dividend as
- X regards the immediately adjacent cell is the reverse of the
- X previous example.
- X
- X
- X input:
- X --------- -------- -------- -------- ---------- ------- ----------
- X widget-1 100.00 200.00 @RSUM 300.00 400.0 @RSUM
- X widget-2 100.00 100.00 @RSUM 100.00 200.0 @RSUM4
- X @NUL
- X @CSUM @BSUM @CSUM
- X
- X result:
- X --------- -------- -------- -------- ----------- ------- ----------
- X widget-1 100.00 200.00 300.00 300.00 400.0 700.00
- X widget-2 100.00 100.00 200.00 100.00 200.0 500.00
- X
- X 200.00 500.00 0.00
- X
- X
- X
- X.SH SPECIAL CONSIDERATIONS
- X
- XThe dashed-line definitions must begin at the first character
- Xof the line in which they occur.
- X
- XOutput files are basically in Lotus(TM) ".WK1" format, and output
- Xfiles should be named with this extension to provide maximum
- Xinformation to spreadsheet programs.
- X
- XBinary functions in column formula codes are allowed, but rarely
- Xmake much sense.
- X
- XThe program is simple by design, and makes no attempt to incorporate
- Xuseful, more complex features such as absolute cell positioning,
- Xgeneral-purpose formulae, macros, etc. It also has not undergone
- Xa complete test suite.
- X
- X
- X.SH BUGS
- X
- XThe maximum number of columns is currently hard-coded into the
- Xprogram at 124; memory should be dynamically allocated to support
- Xan arbitrary spreadsheet size.
- X
- XOptimizations could be applied at several points.
- X
- XStarting/ending points for formulae should be arbitrarily
- Xspecifiable.
- END_OF_FILE
- if test 10097 -ne `wc -c <'conv123.1'`; then
- echo shar: \"'conv123.1'\" unpacked with wrong size!
- fi
- # end of 'conv123.1'
- fi
- if test -f 'conv123.doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conv123.doc'\"
- else
- echo shar: Extracting \"'conv123.doc'\" \(10474 characters\)
- sed "s/^X//" >'conv123.doc' <<'END_OF_FILE'
- X
- X
- XNAME
- X convert 123 - The ASCII to Lotus/123(TM) spreadsheet converter
- X
- XSYNOPSIS
- X conv123 [inputfile] [outputfile]
- X
- XINTRODUCTION
- X conv123 is a utility for reading a specially-formatted flat
- X ASCII file and converting it into a Lotus/123(TM) ".wk1" file.
- X Each specially-formatted ASCII file creates one entire spread-
- X sheet. This spreadsheet file is in its final, directly-readable
- X binary form, and need undergo no further translation before being
- X read directly by Lotus/123(TM). This feature makes conv123 especially
- X suited to networked environments, where report writers or programs
- X running on transaction processing machines can easily and directly
- X create spreadsheet output, instantly ready for copying, downloading,
- X or direct access in the MS-DOS(TM) or Macintosh(TM) environments.
- X In addition to individual data values, certain common aggregate
- X functions (formulas) may be specified (sum,min,max,variance,std
- X deviation, and average), and five binary functions (addition,
- X subtraction, multiplication, division, and percentage) may also
- X be specified.
- X
- X The input file format has been optimized for generation by a
- X simple top-down, left-to-right report generator, and is human
- X readable. The input logic has been made fairly intelligent,
- X automatically discerning between numeric and non-numeric values,
- X calculating formula ranges, and calculating the maximum number
- X of decimal places in a row or column.
- X
- XOPTIONS
- X There are currently no command-line options for conv123.
- X
- XPARAMETERS
- X The only parameters are the input and output file names, both
- X of which are optional; conv123 can act as a filter, and by
- X default accepts its input from stdin and sends its output to
- X stdout.
- X
- XINPUT FILE FORMAT
- X The major feature of the input file format is a "definition"
- X line, consisting of all dashes (-) and spaces. Each string of
- X contiguous dashes on the "definition" line will become a column
- X in Lotus/123(TM), the width of that column being determined by the
- X number of dashes. Characters in the input file that fall outside
- X these "column definitions" are ignored. In addition, up to two (2)
- X lines above the "definition" line can be used for header information,
- X though this is not required. There may not be any white space before
- X the first dash on the definition line; in other words, the definition
- X line MUST begin in the first column of the input file.
- X
- X Following is an example input file, followed by a more detailed
- X explanation of its contents:
- X
- X Jan Feb Mar Qtr
- X Product Sales Sales Sales Total
- X --------- ----------- ----------- ----------- -----------
- X widget-1 45000.87 54390.9 75947.12 @RSUM
- X widget-2 47000.78 64550.0 73647.77 @RSUM
- X widget-3 47800.11 67830.5 54536.37 @RSUM
- X widget-4 33003.30 76530.7 98653.83 @RSUM
- X widget-5 12000.44 64836.7 27637.91 @RSUM
- X
- X @CSUM @CSUM @CSUM @CSUM
- X
- X This is a fairly simple spreadsheet with ten rows and five
- X columns. The fifth column is actually made of formulas
- X ("row sums"), as is the last row ("column sums"). conv123 is
- X smart enough to know that each data value in the first column
- X is non-numeric, and creates the formulas in the fifth column
- X accordingly, i.e., the "row sums" are sums of the values in
- X the second through the fourth columns. In addition, since
- X conv123 keeps track of the maximum number of decimal places
- X used in a given row or column, the number of decimal places
- X displayed in Lotus/123(TM) will be two (2) for all formulas,
- X with the exception of the CSUM in the third column, which will
- X display with one (1) decimal place. Note also that the position
- X of the number or formula code in each column is not significant,
- X as long as the entire values fits under the dashed-line column
- X definition(s). Also, most spreadsheet programs will re-position
- X the values within each cell as the values are displayed.
- X
- X
- XFORMULA CODES
- X As has been shown in the above example, cell contents may be
- X decimal numbers or character values, with the width of the cell
- X determined by the width of the contiguous dashes in the "definition"
- X line. Cell contents may also be formula codes. A formula code is
- X a contiguous set of characters, always beginning with a commercial
- X "at" sign (@). There are three types: row, column and both. The
- X type indicator is a single upper case letter, one of "R" (row), "C"
- X (column) or "B" (both), immediately following the "@" ("at" sign).
- X The formula function immediately follows the type indicator, and may
- X be and aggregate function or a binary function. The range for an
- X aggregate function is calculated automatically, being the range from
- X the earliest available cell -- i.e., the cell farthest "above" for
- X columns, or farthest to the "left" for rows -- to the cell immediately
- X adjacent to the formula definition. Note that this "farthest" cell
- X location is re-adjusted when a non-numeric cell definition is
- X encountered, being set to begin at the next numeric cell (this does
- X not include non-cells, i.e., positions within the spreadsheet with
- X no value). The automatic range start position may be overridden for
- X "row" functions by placing a numeric value at the end of the formula
- X code (still contiguous). A numeric value at the end of a formula code
- X is treated as an absolute starting column number, with the first column
- X defined as column one (1).
- X
- X The range for a binary function is simply the last two adjacent
- X cells "above" the formula definition for column functions, and
- X "left" of the formula definition for row functions. The adjacent
- X cell is always used in the calculation; an override number after
- X the function code in a row function is treated as an absolute
- X column number overriding the penultimate cell. For commutative
- X functions (addition and multiplication), order is not significant.
- X For non-commutative functions (subtraction and division), the
- X definition is a - b, or a/b, where a is the penultimate cell, and b
- X is the immediately adjacent cell. If there is an override column
- X number, THIS ORDER IS REVERSED -- i.e., b - a and b/a, where a is
- X the overriding column number and b is the immediately adjacent cell.
- X This situation is made clearer in the examples below.
- X
- X Following is a summary of the available functions, which MUST be in
- X upper case where applicable:
- X
- X SUM -- Performs addition on a range of cells.
- X AVG -- Takes the average value on a range of cells.
- X MIN -- Extracts the minimum value on a range of cells.
- X MAX -- Extracts the minimum value on a range of cells.
- X VAR -- Calculates the variance on a range of cells.
- X STD -- Calculates the standard deviation on a range of cells.
- X + -- Adds two cells.
- X - -- Subtracts two cells.
- X * -- Multiplies two cells.
- X / -- Divides two cells.
- X % -- Divides two cells, and multiplies the result by 100.
- X NUL -- This is actually not a function, but performs the task
- X of a "placeholder", preventing the "resetting" of auto-
- X matically calculated numeric ranges without creating
- X cell contents. This function is most frequently used to
- X extend the row range of aggregate column functions.
- X
- X
- XFORMULA EXAMPLES
- X Here are some sample input lines, with result following.
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @RSUM
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 600.00
- X
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @R+
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 500.00
- X
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @R/
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 0.67
- X
- X
- X input:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 @R/3
- X
- X result:
- X --------- ----------- ----------- ----------- -----------
- X widget-1 100.00 200.00 300.00 1.50
- X
- X Note in the above example that the order of divisor/dividend as
- X regards the immediately adjacent cell is the reverse of the
- X previous example.
- X
- X
- X input:
- X --------- --------- --------- --------- ----------- ------- ----------
- X widget-1 100.00 200.00 @RSUM 300.00 400.0 @RSUM
- X widget-2 100.00 100.00 @RSUM 100.00 200.0 @RSUM4
- X @NUL
- X @CSUM @BSUM @CSUM
- X
- X result:
- X --------- --------- --------- --------- ----------- ------- ----------
- X widget-1 100.00 200.00 300.00 300.00 400.0 700.00
- X widget-2 100.00 100.00 200.00 100.00 200.0 500.00
- X
- X 200.00 500.00 0.00
- X
- X
- X
- XSPECIAL CONSIDERATIONS
- X
- X The dashed-line definitions must begin at the first character
- X of the line in which they occur.
- X
- X Output files are basically in Lotus(TM) .WK1 format, and output
- X files should be named with this extension to provide maximum
- X information to spreadsheet programs.
- X
- X Binary functions in column formula codes are allowed, but rarely
- X make much sense.
- X
- X The program is simple by design, and makes no attempt to incorporate
- X useful, more complex features such as absolute cell positioning,
- X general-purpose formulae, macros, etc.
- X
- X
- XBUGS
- X
- X The maximum number of columns is currently hard-coded into the
- X program at 124; memory should be dynamically allocated to support
- X an arbitrary spreadsheet size.
- X
- X Optimizations could be applied at several points.
- X
- X Starting/ending points for formulae should be arbitrarily
- X specifiable.
- END_OF_FILE
- if test 10474 -ne `wc -c <'conv123.doc'`; then
- echo shar: \"'conv123.doc'\" unpacked with wrong size!
- fi
- # end of 'conv123.doc'
- fi
- if test -f 'grph123.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'grph123.1'\"
- else
- echo shar: Extracting \"'grph123.1'\" \(14404 characters\)
- sed "s/^X//" >'grph123.1' <<'END_OF_FILE'
- X.TH GRPH123 1 "6 Aug 1993" "123 Utilities"
- X.SH NAME
- Xgrph123 \- The ASCII to Lotus(TM) named-graph spreadsheet converter
- X
- X.SH SYNOPSIS
- X.B grph123
- Xinputfile [outputfile]
- X
- X.SH DESCRIPTION
- X
- X.I grph123
- Xis a utility for reading a specially-formatted flat
- XASCII file and converting it into a Lotus/123(TM) ".WK1" file.
- XEach set of specially-formatted ASCII data creates one "named
- Xgraph" record, and stores the data for the named graph in a
- Xspreadsheet file, which may therefore contain multiple named
- Xgraphs. This spreadsheet file is in its final, directly-readable
- Xbinary form, and need undergo no further translation
- Xor conversion before being read directly by Lotus/123(TM). This
- Xfeature makes
- X.I grph123
- Xespecially suited to networked environments,
- Xwhere report writers or programs running on transaction processing
- Xmachines can easily and directly create spreadsheet/graph output,
- Xinstantly ready for copying, downloading, or direct access in the
- XMS-DOS(TM) or Macintosh(TM) environments. Control of most of
- Xthe Lotus(TM) named graph features is allowed. Familiarity with
- Xthe graph function of Lotus/123(TM) will help greatly in understanding
- Xthis utility.
- X
- X.SH OPTIONS
- XThere are currently no command-line options for
- X.I grph123.
- X
- X.SH PARAMETERS
- XThe only parameters are the input file name (required) and an
- Xoptional output file name. If the output file name is not
- Xsupplied, output is sent to stdout, and may therefore be re-directed.
- X.I grph123
- Xcannot currently be used as a filter, i.e.,
- Xhave its input "piped" to it.
- X
- X.SH INPUT FILE FORMAT
- XEach line of the input file has a one-character "type" at the
- Xstart of the line, followed by the data values suitable for that
- X"type" of line. Each graph entry must have an "n"-type record,
- Xat least one "d"-type record, and an "e"-type record, in that
- Xorder. All "d" (data)-type records for each graph should be
- Xtogether, each "L"-type record must follow the associated "d"-type
- Xrecord, and all records for each graph must be contiguous.
- XBesides these restrictions (easy ones for report writers to
- Xmeet), record order is not significant to the utility. This
- Xcan be an advantage if, for example, you wish to place the
- Xrecord controlling the x-axis or y-axis scale
- X.I after
- Xthe data,
- Xwhen you most conveniently know the minimum and maximum values.
- X
- X.I grph123
- Xattempts to understand each input line as well as it can,
- Xand ignores blank or null records, and white space at the beginning
- Xor end of a record, or in-between data values. Input records that
- Xhave incorrect or insufficient data are ignored, and the Lotus/123(TM)
- Xdefaults are used (see DEFAULTS section below). If string values
- Xhave embedded blanks, they must be surrounded by double quotes
- X("like this").
- X
- XFollowing is a description of each record type, followed by some
- Xexamples. The "record type" is the letter that must be the first
- Xfield of each input record. "Max size" is the maximum size (in
- Xbytes) of the field following. If more than the maximum number
- Xof characters is supplied,
- X.I grph123
- Xusually truncates the input.
- X
- X Record Max
- X Type Size Meaning
- X ------ ---- --------------------------------------------------
- X n 15 This is the "name" record type, and is one of the
- X required types. The string value following is
- X placed into the Lotus/123(TM) graph record as
- X its name, which means that it appears on the
- X circular menu after the Graph/Name/Use sequence.
- X
- X Example: n "Durable Ships"
- X
- X
- X T 39 This the "main title" of the graph, and appears at
- X the top of the graph, above the subtitle (if any).
- X
- X Example: T "SHIPMENTS OF DURABLE GOODS"
- X
- X
- X t 39 This the "subtitle" of the graph, and appears at
- X the top of the graph, below the main title.
- X
- X Example: t "Monthly for 1991"
- X
- X
- X b 39 This the "bottom title" of the graph, and appears at
- X the bottom of the graph, below the x-axis values
- X on a non-pie chart.
- X
- X Example: b "Month"
- X
- X
- X s 39 This the "side title" of the graph, and appears
- X 90-degrees rotated at the side of a non-pie chart,
- X to the left of the y-axis.
- X
- X Example: s "Dollars"
- X
- X
- X g The "g" type record is an important one, and could
- X be thought of as the "g)raph control" record. Up to
- X four fields may be specified on this record, which
- X must be IN THIS ORDER (i.e., if you wish to specify
- X the fourth field, the first three MUST ALSO be
- X specified):
- X
- X g [graph type] [grid control] [color control] [skip factor]
- X
- X [graph type] is one of L)INE, B)AR, P)IE, S)TACKED-BAR,
- X or X)Y. Note that only the first letter of each field
- X is actually significant and required, and that case is
- X ignored. This makes the examples: g line, g L, and
- X g loquat equivalent expressions; the first example is
- X preferred for clarity. The default graph type is LINE.
- X
- X [grid control] is one of n)one, h)orizonal, v)ertical, or
- X b)oth. The default grid control is NONE, or no grid.
- X
- X [color control] is either of b)lack&white or c)olor. If
- X c)olor is specified, and the monitor being used is a
- X color monitor, then each individual data range will be
- X displayed in a different color. The default color
- X control is B)&W, or no color.
- X
- X [skip factor] is an integer from 1 to 256, and is the
- X number of values to skip between labeled data points.
- X The default is (usually) no skipping.
- X
- X Example: g line horizontal color 2
- X
- X
- X f The "f" type record is the line f)ormat record, and
- X is used to control the appearance of the line displayed
- X on each of the six ranges allowed by Lotus/123(TM).
- X There are, therefore, up to six values allowed on
- X the record, controlling the appearance of lines on
- X a LINE or XY graph. The format of the "f"-type
- X record is as follows:
- X
- X f [line format]... [line format] (up to 6 times)
- X
- X [line format] is one of n)one, l)ine, s)ymbol, or
- X b)oth line and symbol. The line format will be
- X carried to the legend. Here is an example of a
- X line format record controlling three data ranges:
- X
- X Example: f line line both
- X
- X
- X l 19 The "l" type record is the l)egend record, and is
- X is used to define the text labeling displayed for
- X each line example of the six ranges allowed by
- X Lotus/123(TM). There are, therefore, up to six
- X string values allowed on the record, each a maxi-
- X mum of 19 characters.
- X The format of the "l"-type record is as follows:
- X
- X l [legend string]... [legend string] (up to 6)
- X
- X [legend string] is a delimited string of up to
- X 19 characters.
- X
- X Example: l "30 days" "60 days" "90 days"
- X
- X
- X L The "L"-type record is the L)abel record, and is
- X is used to define the text labeling displayed for
- X each data line of the six ranges allowed by
- X Lotus/123(TM). There are, therefore, up to six
- X string values allowed on the record. Each of these
- X values is actually placed in the spreadsheet, so
- X they may be of arbitrary length; however, they will
- X be placed in the data row at the end of the y-axis
- X data in columns of default length, so they may not
- X be entirely visible when the spreadsheet is viewed.
- X (See the "a"-type record below for information on
- X how to orient the values around the data point(s)
- X on the actual graph.)
- X
- X It is possible to label EVERY data point on a graph.
- X Each "L"-type record MUST follow the associated
- X data record. "L"-type records out of order will be
- X ignored. Each string value on the line matches
- X the corresponding data point on the previous data
- X record; therefore, if the earlier values (the ones
- X toward the left of the line) are not to be labeled,
- X their places must be held by a null string, represented
- X by contiguous double quotes ("").
- X
- X The format of the "L"-type record is as follows:
- X
- X L [label string]... [label string] (up to 6)
- X
- X [label string] is a delimited string, and must have
- X double quotes surrounding the value if there are
- X embedded blanks.
- X
- X Example: L 14.5 "" "not known" "15.90"
- X
- X
- X a The "a" type record is the label a)lignment record, and
- X is used to control the position of the labels created
- X by the "L"-type record for line or XY graphs. Up to six
- X values are allowed, each value controlling the display
- X position of a data label range.
- X
- X The format of the "a"-type record is as follows:
- X
- X a [alignment]... [alignment] (up to 6 times)
- X
- X [alignment] is one of c)enter, l)eft, r)ight, a)bove,
- X or b)elow.
- X
- X Example: a above below
- X
- X
- X d The "d" type record is the d)ata record, and is
- X one of the required types. Each line of this
- X record should contain a minimum of two values, an
- X x-axis value and a y-axis value (independent and
- X dependent variables). Since Lotus/123(TM) allows
- X up to six "data ranges" (dependent variables), each
- X data record may contain up to seven values, one
- X x-axis value and up to six y-axis values.
- X
- X The format of the "d"-type record is as follows:
- X
- X d [x-axis value] [y-axis value]... (up to 6 y-axis values)
- X
- X The x-axis values are string values for all types of
- X graphs except the XY graph, where x-axis values are
- X numeric. X-axis string values follow the same rules
- X as other string values, but should not exceed about
- X 12 characters or so, as they will start to crowd the
- X visual output (you may wish to experiment with the
- X skip factor in those cases).
- X
- X Example: d "Jan" 5000000.00 7300000.00
- X
- X
- X p The "p" type record is the decimal p)laces record, and
- X is used to control the numer of decimal places in each
- X dependent data range created by the "d"-type record. Up
- X to six integer values are allowed.
- X
- X The format of the "p"-type record is as follows:
- X
- X p [decimal places]... (up to 6 times)
- X
- X [decimal places] is a decimal integer in the range 0
- X to 6. Integers below 0 or above six will be set at
- X 0 and 6 respectively.
- X
- X Example: p 3 3
- X
- X
- X y The "y" type record is the y)-axis min/max record, and
- X is used to control the "scale" of the graph when the
- X automatic scaling is insufficient or too inconsistent.
- X There are two numeric values expected.
- X
- X The format of the "y"-type record is as follows:
- X
- X y [min value] [max value]
- X
- X [min value] and [max value] are decimal numbers.
- X
- X Example: y 2000000.0 15000000
- X
- X
- X x The "x" type record is the x)-axis min/max record, and
- X is used to control the "scale" of the graph when the
- X automatic scaling is insufficient or too inconsistent.
- X There are two numeric values expected. Use some
- X caution when specifying x-axis min and max values
- X on non-XY graphs.
- X
- X The format of the "x"-type record is as follows:
- X
- X x [min value] [max value]
- X
- X [min value] and [max value] are decimal numbers.
- X
- X Example: x 10.0 45.0
- X
- X
- X e The "e" type record is an important and required one,
- X as it triggers actual graph record creation. It MUST
- X appear after all other graph information, and will
- X reset internal flags in preparation for the next set
- X of graph information.
- X
- X Example: e
- X
- X
- X # The "#" type record is a comment record; any values
- X may follow up to the end-of-line.
- X
- X Example: # This is a comment record
- X
- X
- X.SH MISSING VALUES
- XFor the purposes of this utility, a missing value may be defined by
- Xany value less than or equal to -2000000000.00 (minus two thousand
- Xmillion).
- X
- X.SH SPECIAL CONSIDERATIONS FOR PIE CHARTS
- XAlthough
- X.I grph123
- Xwill accept multiple data ranges for pie graphs,
- XLotus/123 makes use of only the A and B data ranges, with the
- XB data range controlling shading (or color if the color flag is
- Xon and a color monitor is used) and explosion. The X-axis
- Xvalues are used as labels, and percentages are displayed
- Xautomatically. The bottom and side titles are not used.
- X
- X.SH FILE EXAMPLE
- XHere is an example of a file that defines two graphs. The first is
- Xa line graph, and the second is a pie graph. Note that in the first
- Xgraph example, the first x-axis value is in double quotes, and the
- Xfollowing ones are not; both are interpreted exactly the same way,
- Xsince there are no embedded blanks. In addition, there are two
- X"data ranges" (dependent variables) in the first graph example,
- Xand all values are displayed with two decimal places, regardless
- Xof input format.
- X
- XIn the second (pie chart) example, the five slices of the pie are
- Xshaded in colors 1 through 5, with slice three exploded.
- X
- X # First, a line graph
- X n "30-60-90 graph1"
- X T "SUMMARY BACKLOG BY WEEK"
- X t "30-60-90 days"
- X b "Manufacturing Wk"
- X s "Dollar"
- X g line horizontal b&w 2
- X f both both
- X l "30 day" "60 day"
- X a above above
- X d "9039" 6533515.10 14500000
- X L 6.53 14.5
- X d 9040 6229610.10 14220000
- X L labelit "label it"
- X d 9042 7685293.90 14500000
- X d 9043 10008108.35 15800000
- X p 2 2
- X y 5000000 18000000
- X e
- X #
- X # Now, a pie graph
- X #
- X n "Sales by Terr"
- X T "SALES BY TERRITORY"
- X t "August 1992"
- X g PIE none color
- X d widgets 45000 1
- X d loffles 53000 2
- X d scouse 50000.17 103
- X d framjits 63000 4
- X d gopples 77342 5
- X p 2 0
- X e
- X
- X.SH BUGS
- X.I grph123
- Xshould be able to run as a filter.
- X
- XTabs as delimiters do not behave consistently.
- END_OF_FILE
- if test 14404 -ne `wc -c <'grph123.1'`; then
- echo shar: \"'grph123.1'\" unpacked with wrong size!
- fi
- # end of 'grph123.1'
- fi
- if test -f 'grph123.doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'grph123.doc'\"
- else
- echo shar: Extracting \"'grph123.doc'\" \(15182 characters\)
- sed "s/^X//" >'grph123.doc' <<'END_OF_FILE'
- X
- X
- XNAME
- X graph 123 - The ASCII to Lotus/123(TM) named graph converter
- X
- XSYNOPSIS
- X grph123 filename [outputfile]
- X
- XINTRODUCTION
- X grph123 is a utility for reading a specially-formatted flat
- X ASCII file and converting it into a Lotus/123(TM) ".WK1" file.
- X Each set of specially-formatted ASCII data creates one "named
- X graph" record, and stores the data for the named graph in a
- X spreadsheet file, which may therefore contain multiple named
- X graphs. This spreadsheet file is in its final, directly-
- X readable binary form, and need undergo no further translation
- X or conversion before being read directly by Lotus/123(TM). This
- X feature makes grph123 especially suited to networked environments,
- X where report writers or programs running on transaction processing
- X machines can easily and directly create spreadsheet/graph output,
- X instantly ready for copying, downloading, or direct access in the
- X MS-DOS(TM) or Macintosh(TM) environments. Control of most of
- X the Lotus(TM) named graph features is allowed. Familiarity with
- X the graph function of Lotus/123(TM) will help greatly in under-
- X standing this utility.
- X
- XOPTIONS
- X There are currently no command-line options for grph123.
- X
- XPARAMETERS
- X The only parameters are the input file name (required) and an
- X optional output file name. If the output file name is not
- X supplied, output is sent to stdout, and may therefore be re-
- X directed. grph123 cannot currently be used as a filter, i.e.,
- X have its input "piped" to it.
- X
- XINPUT FILE FORMAT
- X Each line of the input file has a one-character "type" at the
- X start of the line, followed by the data values suitable for that
- X "type" of line. Each graph entry must have an "n"-type record,
- X at least one "d"-type record, and an "e"-type record, in that
- X order. All "d" (data)-type records for each graph should be
- X together, each "L"-type record must follow the associated "d"-type
- X record, and all records for each graph must be contiguous.
- X Besides these restrictions (easy ones for report writers to
- X meet), record order is not significant to the utility. This
- X can be an advantage if, for example, you wish to place the
- X record controlling the x-axis or y-axis scale _after_ the data,
- X when you most conveniently know the minimum and maximum values.
- X
- X grph123 attempts to understand each input line as well as it can,
- X and ignores blank or null records, and white space at the beginning
- X or end of a record, or in-between data values. Input records that
- X have incorrect or insufficient data are ignored, and the Lotus/123(TM)
- X defaults are used (see DEFAULTS section below). If string values
- X have embedded blanks, they must be surrounded by double quotes
- X ("like this").
- X
- X Following is a description of each record type, followed by some
- X examples. The "record type" is the letter that must be the first
- X field of each input record. "Max size" is the maximum size (in
- X bytes) of the field following. If more than the maximum number
- X of characters is supplied, grph123 usually truncates the input.
- X
- X Record Max
- X Type Size Meaning
- X ------ ---- --------------------------------------------------
- X n 15 This is the "name" record type, and is one of the
- X required types. The string value following is
- X placed into the Lotus/123(TM) graph record as
- X its name, which means that it appears on the
- X circular menu after the Graph/Name/Use sequence.
- X
- X Example: n "Durable Ships"
- X
- X
- X T 39 This the "main title" of the graph, and appears at
- X the top of the graph, above the subtitle (if any).
- X
- X Example: T "SHIPMENTS OF DURABLE GOODS"
- X
- X
- X t 39 This the "subtitle" of the graph, and appears at
- X the top of the graph, below the main title.
- X
- X Example: t "Monthly for 1991"
- X
- X
- X b 39 This the "bottom title" of the graph, and appears at
- X the bottom of the graph, below the x-axis values
- X on a non-pie chart.
- X
- X Example: b "Month"
- X
- X
- X s 39 This the "side title" of the graph, and appears
- X 90-degrees rotated at the side of a non-pie chart,
- X to the left of the y-axis.
- X
- X Example: s "Dollars"
- X
- X
- X g The "g" type record is an important one, and could
- X be thought of as the "g)raph control" record. Up to
- X four fields may be specified on this record, which
- X must be IN THIS ORDER (i.e., if you wish to specify
- X the fourth field, the first three MUST ALSO be
- X specified):
- X
- X g [graph type] [grid control] [color control] [skip factor]
- X
- X [graph type] is one of L)INE, B)AR, P)IE, S)TACKED-BAR, or
- X X)Y. Note that only the first letter of each field is
- X actually significant and required, and that case is ignored.
- X This makes the examples: g line, g L, and g loquat
- X equivalent expressions; the first example is preferred
- X for clarity. The default graph type is LINE.
- X
- X [grid control] is one of n)one, h)orizonal, v)ertical, or
- X b)oth. The default grid control is NONE, or no grid.
- X
- X [color control] is either of b)lack&white or c)olor. If
- X c)olor is specified, and the monitor being used is a
- X color monitor, then each individual data range will be
- X displayed in a different color. The default color control
- X is B)&W, or no color.
- X
- X [skip factor] is an integer from 1 to 256, and is the
- X number of values to skip between labeled data points.
- X The default is (usually) no skipping.
- X
- X Example: g line horizontal color 2
- X
- X
- X f The "f" type record is the line f)ormat record, and
- X is used to control the appearance of the line displayed
- X on each of the six ranges allowed by Lotus/123(TM).
- X There are, therefore, up to six values allowed on
- X the record, controlling the appearance of lines on
- X a LINE or XY graph. The format of the "f"-type
- X record is as follows:
- X
- X f [line format]... [line format] (up to 6 times)
- X
- X [line format] is one of n)one, l)ine, s)ymbol, or
- X b)oth line and symbol. The line format will be
- X carried to the legend. Here is an example of a
- X line format record controlling three data ranges:
- X
- X Example: f line line both
- X
- X
- X l 19 The "l" type record is the l)egend record, and is
- X is used to define the text labeling displayed for
- X each line example of the six ranges allowed by
- X Lotus/123(TM). There are, therefore, up to six
- X string values allowed on the record, each a maxi-
- X mum of 19 characters.
- X The format of the "l"-type record is as follows:
- X
- X l [legend string]... [legend string] (up to 6)
- X
- X [legend string] is a delimited string of up to
- X 19 characters.
- X
- X Example: l "30 days" "60 days" "90 days"
- X
- X
- X L The "L"-type record is the L)abel record, and is
- X is used to define the text labeling displayed for
- X each data line of the six ranges allowed by
- X Lotus/123(TM). There are, therefore, up to six
- X string values allowed on the record. Each of these
- X values is actually placed in the spreadsheet, so
- X they may be of arbitrary length; however, they will
- X be placed in the data row at the end of the y-axis
- X data in columns of default length, so they may not
- X be entirely visible when the spreadsheet is viewed.
- X (See the "a"-type record below for information on
- X how to orient the values around the data point(s)
- X on the actual graph.)
- X
- X It is possible to label EVERY data point on a graph.
- X Each "L"-type record MUST follow the associated
- X data record. "L"-type records out of order will be
- X ignored. Each string value on the line matches
- X the corresponding data point on the previous data
- X record; therefore, if the earlier values (the ones
- X toward the left of the line) are not to be labeled,
- X their places must be held by a null string, represented
- X by contiguous double quotes ("").
- X
- X The format of the "L"-type record is as follows:
- X
- X L [label string]... [label string] (up to 6)
- X
- X [label string] is a delimited string, and must have
- X double quotes surrounding the value if there are
- X embedded blanks.
- X
- X Example: L 14.5 "" "not known" "15.90"
- X
- X
- X a The "a" type record is the label a)lignment record, and
- X is used to control the position of the labels created
- X by the "L"-type record for line or XY graphs. Up to six
- X values are allowed, each value controlling the display
- X position of a data label range.
- X
- X The format of the "a"-type record is as follows:
- X
- X a [alignment]... [alignment] (up to 6 times)
- X
- X [alignment] is one of c)enter, l)eft, r)ight, a)bove,
- X or b)elow.
- X
- X Example: a above below
- X
- X
- X d The "d" type record is the d)ata record, and is
- X one of the required types. Each line of this
- X record should contain a minimum of two values, an
- X x-axis value and a y-axis value (independent and
- X dependent variables). Since Lotus/123(TM) allows
- X up to six "data ranges" (dependent variables), each
- X data record may contain up to seven values, one
- X x-axis value and up to six y-axis values.
- X
- X The format of the "d"-type record is as follows:
- X
- X d [x-axis value] [y-axis value]... (up to 6 y-axis values)
- X
- X The x-axis values are string values for all types of
- X graphs except the XY graph, where x-axis values are
- X numeric. X-axis string values follow the same rules
- X as other string values, but should not exceed about
- X 12 characters or so, as they will start to crowd the
- X visual output (you may wish to experiment with the
- X skip factor in those cases).
- X
- X Example: d "Jan" 5000000.00 7300000.00
- X
- X
- X p The "p" type record is the decimal p)laces record, and
- X is used to control the numer of decimal places in each
- X dependent data range created by the "d"-type record. Up
- X to six integer values are allowed.
- X
- X The format of the "p"-type record is as follows:
- X
- X p [decimal places]... (up to 6 times)
- X
- X [decimal places] is a decimal integer in the range 0
- X to 6. Integers below 0 or above six will be set at
- X 0 and 6 respectively.
- X
- X Example: p 3 3
- X
- X
- X y The "y" type record is the y)-axis min/max record, and
- X is used to control the "scale" of the graph when the
- X automatic scaling is insufficient or too inconsistent.
- X There are two numeric values expected.
- X
- X The format of the "y"-type record is as follows:
- X
- X y [min value] [max value]
- X
- X [min value] and [max value] are decimal numbers.
- X
- X Example: y 2000000.0 15000000
- X
- X
- X x The "x" type record is the x)-axis min/max record, and
- X is used to control the "scale" of the graph when the
- X automatic scaling is insufficient or too inconsistent.
- X There are two numeric values expected. Use some
- X caution when specifying x-axis min and max values
- X on non-XY graphs.
- X
- X The format of the "x"-type record is as follows:
- X
- X x [min value] [max value]
- X
- X [min value] and [max value] are decimal numbers.
- X
- X Example: x 10.0 45.0
- X
- X
- X e The "e" type record is an important and required one,
- X as it triggers actual graph record creation. It MUST
- X appear after all other graph information, and will
- X reset internal flags in preparation for the next set
- X of graph information.
- X
- X Example: e
- X
- X
- X # The "#" type record is a comment record; any values
- X may follow up to the end-of-line.
- X
- X Example: # This is a comment record
- X
- X
- XMISSING VALUES
- X For the purposes of this utility, a missing value may be defined by
- X any value less than or equal to -2000000000.00 (minus two thousand
- X million).
- X
- XSPECIAL CONSIDERATIONS FOR PIE CHARTS
- X Although grph123 will accept multiple data ranges for pie graphs,
- X Lotus/123 makes use of only the A and B data ranges, with the
- X B data range controlling shading (or color if the color flag is
- X on and a color monitor is used) and explosion. The X-axis
- X values are used as labels, and percentages are displayed auto-
- X matically. The bottom and side titles are not used.
- X
- XFILE EXAMPLE
- X Here is an example of a file that defines two graphs. The first is
- X a line graph, and the second is a pie graph. Note that in the first
- X graph example, the first x-axis value is in double quotes, and the
- X following ones are not; both are interpreted exactly the same way,
- X since there are no embedded blanks. In addition, there are two
- X "data ranges" (dependent variables) in the first graph example,
- X and all values are displayed with two decimal places, regardless
- X of input format.
- X
- X In the second (pie chart) example, the five slices of the pie are
- X shaded in colors 1 through 5, with slice three exploded.
- X
- X# First, a line graph
- Xn "30-60-90 graph1"
- XT "SUMMARY BACKLOG BY WEEK"
- Xt "30-60-90 days"
- Xb "Manufacturing Wk"
- Xs "Dollar"
- Xg line horizontal b&w 2
- Xf both both
- Xl "30 day" "60 day"
- Xa above above
- Xd "9039" 6533515.10 14500000
- XL 6.53 14.5
- Xd 9040 6229610.10 14220000
- XL labelit "label it"
- Xd 9042 7685293.90 14500000
- Xd 9043 10008108.35 15800000
- Xp 2 2
- Xy 5000000 18000000
- Xe
- X#
- X# Now, a pie graph
- X#
- Xn "Sales by Terr"
- XT "SALES BY TERRITORY"
- Xt "August 1992"
- Xg PIE none color
- Xd widgets 45000 1
- Xd loffles 53000 2
- Xd scouse 50000.17 103
- Xd framjits 63000 4
- Xd gopples 77342 5
- Xp 2 0
- Xe
- X
- XBUGS
- Xgrph123 should be able to run as a filter.
- XTabs as delimiters do not behave consistently.
- END_OF_FILE
- if test 15182 -ne `wc -c <'grph123.doc'`; then
- echo shar: \"'grph123.doc'\" unpacked with wrong size!
- fi
- # end of 'grph123.doc'
- fi
- if test -f 'int2s.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'int2s.c'\"
- else
- echo shar: Extracting \"'int2s.c'\" \(151 characters\)
- sed "s/^X//" >'int2s.c' <<'END_OF_FILE'
- X
- Xvoid
- Xint2s(i,ptr)
- Xint i;
- Xchar *ptr;
- X{
- X short si;
- X char *p;
- X
- X si = i;
- X p = (char *)(&si);
- X *ptr++ = *p++;
- X *ptr = *p;
- X
- X return;
- X}
- END_OF_FILE
- if test 151 -ne `wc -c <'int2s.c'`; then
- echo shar: \"'int2s.c'\" unpacked with wrong size!
- fi
- # end of 'int2s.c'
- fi
- if test -f 'lotus.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lotus.h'\"
- else
- echo shar: Extracting \"'lotus.h'\" \(13529 characters\)
- sed "s/^X//" >'lotus.h' <<'END_OF_FILE'
- X/* @(#) $Revision: 1.0 */
- X
- X/*
- X * Definitions for .wks types of records, as structures
- X * All elements are type char, even when numeric...
- X * That's because they must be byte-aligned (and, by the
- X * way, byte-swapped) in the .wks file.
- X */
- X
- Xtypedef struct {
- X char opcode[2]; /* 02h (02d) */
- X char record_length[2]; /* 2d */
- X char ff_version[2]; /* file format version (0404h,1028d) */
- X} BOF;
- X
- Xtypedef struct {
- X char opcode[2]; /* 06h (06d) */
- X char record_length[2]; /* 8d */
- X char start_column[2];
- X char start_row[2];
- X char end_column[2];
- X char end_row[2];
- X} RANGE;
- X
- Xtypedef struct {
- X char opcode[2]; /* 96h (150d) */
- X char record_length[2]; /* variable */
- X char column_number[2];
- X char lowest_row[2]; /* lowest row number of active cell */
- X char highest_row[2]; /* highest row number of active cell */
- X} CPI;
- X
- Xtypedef struct {
- X char opcode[2]; /* 2Fh (47d) */
- X char record_length[2]; /* 1d */
- X char iteration_count[1];
- X} CALCCOUNT;
- X
- Xtypedef struct {
- X char opcode[2]; /* 02h (02d) */
- X char record_length[2]; /* 1d */
- X char recalculation[1]; /* 00h is manual, FFh is automatic */
- X} CALCMODE;
- X
- Xtypedef struct {
- X char opcode[2]; /* 03h (03d) */
- X char record_length[2]; /* 1d */
- X char calc_order[1]; /* 00h is natural recalc order */
- X /* 01h is recalculation by column */
- X /* FFh is recalculation by row */
- X} CALCORDER;
- X
- Xtypedef struct {
- X char opcode[2]; /* 04h (04d) */
- X char record_length[2]; /* 1d */
- X char window_split[1]; /* 00h is not split */
- X /* 01h is vertical split */
- X /* FFh is horizontal split */
- X} SPLIT;
- X
- Xtypedef struct {
- X char opcode[2]; /* 05h (05d) */
- X char record_length[2]; /* 1d */
- X char window_sync[1]; /* 00h is not synchronized */
- X /* FFh is window synchronized */
- X} SYNC;
- X
- Xtypedef struct {
- X char opcode[2]; /* 07h (07d) */
- X char record_length[2]; /* 32d */
- X char cc_column[2]; /* current cursor column */
- X char cc_row[2]; /* current cursor row */
- X char cell_format[1];
- X char unused1[1]; /* must be 00h ? */
- X char column_width[2];
- X char ncol_on_screen[2]; /* number of columns on screen */
- X char nrow_on_screen[2]; /* number of rows on screen */
- X char leftmost_column[2];
- X char top_row[2];
- X char ntitle_col[2]; /* number of title columns */
- X char ntitle_row[2]; /* number of title rows */
- X char ltitle_col[2]; /* left title column */
- X char ttitle_row[2]; /* top title row */
- X char borderwd_col[2]; /* border width column */
- X char borderwd_row[2]; /* border width row */
- X char window_width[2];
- X char unused2[1]; /* must be 00h */
- X char unused3[1]; /* this spot was undocumented */
- X} WINDOW1;
- X
- Xtypedef struct {
- X char opcode[2]; /* 08h (08d) */
- X char record_length[2]; /* 3d */
- X char column_number[2];
- X char column_width[1];
- X} COLW1;
- X
- Xtypedef struct {
- X char opcode[2]; /* 31h (49d) */
- X char record_length[2]; /* 1d */
- X char cursor_window[1]; /* 01h is cursor in window 1 */
- X /* 02h is cursor in window 2 */
- X} CURSORW12;
- X
- Xtypedef struct {
- X char opcode[2]; /* 0Bh (11d) */
- X char record_length[2]; /* 24d */
- X char range_name[16];
- X char start_column[2];
- X char start_row[2];
- X char end_column[2];
- X char end_row[2];
- X} RNAME;
- X
- Xtypedef struct {
- X char y_start_col[2]; /* y-range start column */
- X char y_start_row[2]; /* y-range start row */
- X char y_end_col[2]; /* y-range end column */
- X char y_end_row[2]; /* y-range end row */
- X} grange;
- X
- Xtypedef struct {
- X char opcode[2]; /* 2Eh (45d) */
- X char record_length[2]; /* 453d */
- X char graph_name[16]; /* null-terminated */
- X char x_start_col[2]; /* x-range start column */
- X char x_start_row[2]; /* x-range start row */
- X char x_end_col[2]; /* x-range end column */
- X char x_end_row[2]; /* x-range end row */
- X grange yd_range[6]; /* y-range structures (data) */
- X grange yl_range[6]; /* y-range structures (labels) */
- X char graph_type[1]; /* 0=XY, 1=bar, 2=pie, 3=unused, */
- X /* 4=line, 5=stacked bar */
- X char grid[1]; /* 0=none, 1=horizontal, 2=vertical */
- X /* 3=both */
- X char color[1]; /* 0=b&w, FFh=color */
- X char y_lformat[6]; /* y-range line formats */
- X /* 0=none, 1=line, 2=symbol, */
- X /* 3=line-symbol */
- X char y_dlalign[6]; /* y-range data label alignment */
- X /* 0=center, 1=right, 2=below, */
- X /* 3=left, 4=above */
- X char x_scale[1]; /* 0=auto, 1=manual */
- X char x_low_limit[8]; /* x-range lower limit (real) */
- X char x_up_limit[8]; /* x-range upper limit (real) */
- X char y_scale[1]; /* 0=auto, 1=manual */
- X char y_low_limit[8]; /* y-range lower limit (real) */
- X char y_up_limit[8]; /* y-range upper limit (real) */
- X char first_title[40]; /* top of the graph */
- X char second_title[40]; /* just below the first */
- X char x_title[40]; /* bottom of the graph */
- X char y_title[40]; /* side of the graph */
- X char y_legend[6][20];
- X char x_format[1];
- X char y_format[1];
- X char skip_factor[2];
- X char unknown[2];
- X} NGRAPH;
- X
- Xtypedef struct {
- X char opcode[2]; /* 18h (24d) */
- X char record_length[2]; /* 25d */
- X char table_ind[1]; /* 00h is no table */
- X /* 01h is table 1 */
- X /* 02h is table 2 */
- X char table_start_column[2];
- X char table_start_row[2];
- X char table_end_column[2];
- X char table_end_row[2];
- X char cell1_start_column[2];
- X char cell1_start_row[2];
- X char cell1_end_column[2];
- X char cell1_end_row[2];
- X char cell2_start_column[2];
- X char cell2_start_row[2];
- X char cell2_end_column[2];
- X char cell2_end_row[2];
- X} TABLE;
- X
- Xtypedef struct {
- X char opcode[2]; /* 19h (25d) */
- X char record_length[2]; /* 25d */
- X char input_start_column[2];
- X char input_start_row[2];
- X char input_end_column[2];
- X char input_end_row[2];
- X char output_start_column[2];
- X char output_start_row[2];
- X char output_end_column[2];
- X char output_end_row[2];
- X char criteria_start_column[2];
- X char criteria_start_row[2];
- X char criteria_end_column[2];
- X char criteria_end_row[2];
- X char command[1]; /* 00h is no command */
- X /* 01h is find */
- X /* 02h is extract */
- X /* 03h is delete */
- X /* 04h is unique */
- X} QRANGE; /* query range */
- X
- Xtypedef struct {
- X char opcode[2]; /* 1Ah (26d) */
- X char record_length[2]; /* 8d */
- X char start_column[2];
- X char start_row[2];
- X char end_column[2];
- X char end_row[2];
- X} PRANGE; /* print range */
- X
- Xtypedef struct {
- X char opcode[2]; /* h (d) */
- X char record_length[2]; /* d */
- X} FORMAT;
- X
- Xtypedef struct {
- X char opcode[2]; /* 1Ch (28d) */
- X char record_length[2]; /* 8d */
- X char start_column[2];
- X char start_row[2];
- X char end_column[2];
- X char end_row[2];
- X} FRANGE; /* fill range */
- X
- Xtypedef struct {
- X char opcode[2]; /* 1Bh (27d) */
- X char record_length[2]; /* 8d */
- X char start_column[2];
- X char start_row[2];
- X char end_column[2];
- X char end_row[2];
- X} SRANGE; /* sort range */
- X
- Xtypedef struct {
- X char opcode[2]; /* 1Dh (29d) */
- X char record_length[2]; /* 9d */
- X char start_column[2];
- X char start_row[2];
- X char end_column[2];
- X char end_row[2];
- X char sort_order[1]; /* 00h is descending, FFh ascending */
- X} KRANGE; /* primary sort key range */
- X
- Xtypedef struct {
- X char opcode[2]; /* 23h (35d) */
- X char record_length[2]; /* 9d */
- X char start_column[2];
- X char start_row[2];
- X char end_column[2];
- X char end_row[2];
- X char sort_order[1]; /* 00h is descending, FFh ascending */
- X} KRANGE2; /* secondary sort key range */
- X
- X
- Xtypedef struct {
- X char opcode[2]; /* 67h (103d) */
- X char record_length[2]; /* 25d */
- X char depvar_start_column[2];
- X char depvar_start_row[2];
- X char depvar_end_column[2];
- X char depvar_end_row[2];
- X char indvar_start_column[2];
- X char indvar_start_row[2];
- X char invdar_end_column[2];
- X char indvar_end_row[2];
- X char output_start_column[2];
- X char output_start_row[2];
- X char output_end_column[2];
- X char output_end_row[2];
- X char zero_intercept[1]; /* 00h is not forced */
- X /* -1 is forced intercept at origin */
- X} RRANGES; /* linear regression ranges */
- X
- Xtypedef struct {
- X char opcode[2]; /* 20h (32d) */
- X char record_length[2]; /* 16d */
- X char values_start_column[2];
- X char values_start_row[2];
- X char values_end_column[2];
- X char values_end_row[2];
- X char bin_start_column[2];
- X char bin_start_row[2];
- X char bin_end_column[2];
- X char bin_end_row[2];
- X} HRANGE; /* distribution range */
- X
- Xtypedef struct {
- X char opcode[2]; /* 24h (36d) */
- X char record_length[2]; /* 1d */
- X char protection[1]; /* 00h is global off, 01h is on */
- X} PROTECT; /* global protection */
- X
- Xtypedef struct {
- X char opcode[2]; /* 25h (37d) */
- X char record_length[2]; /* 242d */
- X char footer_string[242]; /* NULL terminated ASCII */
- X} FOOTER; /* print footer */
- X
- Xtypedef struct {
- X char opcode[2]; /* 26h (38d) */
- X char record_length[2]; /* 242d */
- X char header_string[242]; /* NULL terminated ASCII */
- X} HEADER; /* print header */
- X
- Xtypedef struct {
- X char opcode[2]; /* 27h (39d) */
- X char record_length[2]; /* 40d */
- X char setup_string[40]; /* NULL terminated ASCII */
- X} SETUP; /* print setup string */
- X
- Xtypedef struct {
- X char opcode[2]; /* 28h (40d) */
- X char record_length[2]; /* 10d */
- X char left_margin[2];
- X char right_margin[2];
- X char page_length[2];
- X char top_margin[2];
- X char bottom_margin[2];
- X} MARGINS;
- X
- Xtypedef struct {
- X char opcode[2]; /* 29h (41d) */
- X char record_length[2]; /* 1d */
- X char label_alignment[1]; /* 27h is left */
- X /* 22h is right */
- X /* 5Eh is center */
- X} LABELFMT;
- X
- Xtypedef struct {
- X char opcode[2]; /* 2Ah (42d) */
- X char record_length[2]; /* 16d */
- X char border_start_column[2];
- X char border_start_row[2];
- X char border_end_column[2];
- X char border_end_row[2];
- X char col_start_column[2];
- X char col_start_row[2];
- X char col_end_column[2];
- X char col_end_row[2];
- X} TITLES; /* print borders */
- X
- X/***********************************************/
- X/* Cell definitions */
- X/***********************************************/
- X
- Xtypedef struct {
- X char opcode[2]; /* 0Ch (12d) */
- X char record_length[2]; /* 5d */
- X char format[1];
- X char column[2];
- X char row[2];
- X} BLANK; /* blank cell */
- X
- Xtypedef struct {
- X char opcode[2]; /* 0Dh (13d) */
- X char record_length[2]; /* 7d */
- X char format[1];
- X char column[2];
- X char row[2];
- X char value[2];
- X} INTEGER;
- X
- Xtypedef struct {
- X char opcode[2]; /* 0Eh (14d) */
- X char record_length[2]; /* 13d */
- X char format[1];
- X char column[2];
- X char row[2];
- X char value[8];
- X} NUMBER;
- X
- Xtypedef struct {
- X char opcode[2]; /* 0Fh (15d) */
- X char record_length[2]; /* variable */
- X char format[1];
- X char column[2];
- X char row[2];
- X char position[1];
- X char string[239]; /* NULL terminated ASCII */
- X} LABEL;
- X
- Xtypedef struct {
- X char opcode[2]; /* 10h (16d) */
- X char record_length[2]; /* variable to 2064 */
- X char format[1];
- X char column[2];
- X char row[2];
- X char value[8];
- X char formula_size[2];
- X char formula_code[256]; /* NOTE: Lotus allows up to 2048! */
- X} FORMULA;
- X
- X
- Xtypedef struct {
- X char opcode[2]; /* 01h (01d) */
- X char record_length[2]; /* 0d */
- X} LEOF; /* changed name to avoid using standard EOF */
- X
- X/**************************************/
- X/* opcode value definitions */
- X/**************************************/
- X
- X#define BOF_op ((unsigned short)0x00)
- X#define BOF_len ((unsigned short)2)
- X
- X#define LEOF_op ((unsigned short)0x01)
- X#define LEOF_len ((unsigned short)0)
- X
- X#define CALCMODE_op ((unsigned short)0x02)
- X#define CALCMODE_len ((unsigned short)1)
- X
- X#define CALCORDER_op ((unsigned short)0x03)
- X#define CALCORDER_len ((unsigned short)1)
- X
- X#define SPLIT_op ((unsigned short)0x04)
- X#define SPLIT_len ((unsigned short)1)
- X
- X#define SYNC_op ((unsigned short)0x05)
- X#define SYNC_len ((unsigned short)1)
- X
- X#define RANGE_op ((unsigned short)0x06)
- X#define RANGE_len ((unsigned short)8)
- X
- X#define WINDOW1_op ((unsigned short)0x07)
- X#define WINDOW1_len ((unsigned short)32)
- X
- X#define COLW1_op ((unsigned short)0x08)
- X#define COLW1_len ((unsigned short)3)
- X
- X#define NGRAPH_op ((unsigned short)0x2E)
- X#define NGRAPH_len ((unsigned short)455)
- X
- X#define RNAME_op ((unsigned short)0x0B)
- X#define RNAME_len ((unsigned short)24)
- X
- X#define BLANK_op ((unsigned short)0x0C)
- X#define BLANK_len ((unsigned short)5)
- X
- X#define INTEGER_op ((unsigned short)0x0D)
- X#define INTEGER_len ((unsigned short)7)
- X
- X#define NUMBER_op ((unsigned short)0x0E)
- X#define NUMBER_len ((unsigned short)13)
- X
- X#define LABEL_op ((unsigned short)0x0F)
- X/* #define LABEL_len ((unsigned short)) variable */
- X
- X#define FORMULA_op ((unsigned short)0x10)
- X/* #define FORMULA_len ((unsigned short)) variable */
- X
- X#define TABLE_op ((unsigned short)0x18)
- X#define TABLE_len ((unsigned short)25)
- X
- X#define QRANGE_op ((unsigned short)0x19)
- X#define QRANGE_len ((unsigned short)25)
- X
- X#define PRANGE_op ((unsigned short)0x1A)
- X#define PRANGE_len ((unsigned short)8)
- X
- X#define SRANGE_op ((unsigned short)0x1B)
- X#define SRANGE_len ((unsigned short)8)
- X
- X#define FRANGE_op ((unsigned short)0x1C)
- X#define FRANGE_len ((unsigned short)8)
- X
- X#define KRANGE_op ((unsigned short)0x1D)
- X#define KRANGE_len ((unsigned short)9)
- X
- X#define HRANGE_op ((unsigned short)0x20)
- X#define HRANGE_len ((unsigned short)16)
- X
- X#define PROTECT_op ((unsigned short)0x24)
- X#define PROTECT_len ((unsigned short)1)
- X
- X#define FOOTER_op ((unsigned short)0x25)
- X#define FOOTER_len ((unsigned short)242)
- X
- X#define HEADER_op ((unsigned short)0x26)
- X#define HEADER_len ((unsigned short)242)
- X
- X#define SETUP_op ((unsigned short)0x27)
- X#define SETUP_len ((unsigned short)40)
- X
- X#define MARGINS_op ((unsigned short)0x28)
- X#define MARGINS_len ((unsigned short)10)
- X
- X#define LABELFMT_op ((unsigned short)0x29)
- X#define LABELFMT_len ((unsigned short)1)
- X
- X#define TITLES_op ((unsigned short)0x2A)
- X#define TITLES_len ((unsigned short)16)
- X
- X#define CALCCOUNT_op ((unsigned short)0x2F)
- X#define CALCCOUNT_len ((unsigned short)1)
- X
- X#define UNFORMATTED_op ((unsigned short)0x30)
- X#define UNFORMATTED_len ((unsigned short)1)
- X
- X#define CURSORW12_op ((unsigned short)0x31)
- X#define CURSORW12_len ((unsigned short)1)
- END_OF_FILE
- if test 13529 -ne `wc -c <'lotus.h'`; then
- echo shar: \"'lotus.h'\" unpacked with wrong size!
- fi
- # end of 'lotus.h'
- fi
- if test -f 's2int.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'s2int.c'\"
- else
- echo shar: Extracting \"'s2int.c'\" \(133 characters\)
- sed "s/^X//" >'s2int.c' <<'END_OF_FILE'
- X
- Xint
- Xs2int(ptr)
- Xchar *ptr;
- X{
- X union {
- X short i;
- X char c[2];
- X } u;
- X
- X u.c[0] = *ptr++;
- X u.c[1] = *ptr;
- X
- X return(u.i);
- X}
- END_OF_FILE
- if test 133 -ne `wc -c <'s2int.c'`; then
- echo shar: \"'s2int.c'\" unpacked with wrong size!
- fi
- # end of 's2int.c'
- fi
- if test -f 'swapb.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'swapb.c'\"
- else
- echo shar: Extracting \"'swapb.c'\" \(152 characters\)
- sed "s/^X//" >'swapb.c' <<'END_OF_FILE'
- X# include <stdio.h>
- X# include "swapb.h"
- X
- Xmain()
- X{
- X int j;
- X unsigned short i;
- X
- X scanf("%x",&j);
- X i = (int)j;
- X printf("i = %4.4x\n",swapb(i));
- X return;
- X}
- END_OF_FILE
- if test 152 -ne `wc -c <'swapb.c'`; then
- echo shar: \"'swapb.c'\" unpacked with wrong size!
- fi
- # end of 'swapb.c'
- fi
- if test -f 'swapb.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'swapb.h'\"
- else
- echo shar: Extracting \"'swapb.h'\" \(64 characters\)
- sed "s/^X//" >'swapb.h' <<'END_OF_FILE'
- X# define swapb(i) ((i & 0377) * 256) + ((i & 0177400) / 256)
- X
- END_OF_FILE
- if test 64 -ne `wc -c <'swapb.h'`; then
- echo shar: \"'swapb.h'\" unpacked with wrong size!
- fi
- # end of 'swapb.h'
- fi
- echo shar: End of archive 1 \(of 2\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked both archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-