rgb@nscpdc.NSC.COM (Robert Bond) (01/06/87)
# This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #-----cut here-----cut here-----cut here-----cut here----- #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # vc.man # vc.1 # cvt.sed # This archive created: Mon Jan 5 21:41:01 1987 # By: Robert Bond (NSC Portland, Oregon) echo shar: extracting vc.man '(11422 characters)' sed 's/^XX//' << \SHAR_EOF > vc.man XX XX XX XX VC(1) UNIX 3.0 VC(1) XX XX XX XX NAME XX vc - spread sheet calculator ("visicalc-like") XX XX SYNOPSIS XX vc [ _f_i_l_e ] XX XX XX DESCRIPTION XX _V_c is a calculator that is based on rectangular tables, in XX much the same style as Visicalc or Lotus 123. When it is XX invoked it presents you with an empty table organised as XX rows and columns of cells. Each cell may have a label XX string associated with it and an expression. The expression XX may be a constant or it may compute something based on other XX entries. XX XX When _v_c is running, the screen is divided into four regions: XX the top line is for entering commands, the second line is XX for messages from _v_c, the third line and the first four XX columns show the row and column numbers, and the rest of the XX screen forms a window looking at the table. _v_c has two XX cursors: a cell cursor (indicated by a '<' on the screen) XX and a character cursor (indicated by the terminals hardware XX cursor). The cell and character cursors are often the same. XX They will differ when a long command is being typed on the XX top line. XX XX Commands which use the terminal's control key will work when XX either a long command is being typed or in "normal" mode. XX XX The cursor control commands and the row, column commands can XX be prefixed by a numeric argument indicating how many times XX the command is to be executed. "^U" can be used before the XX number if the cursor movement is to take place while a XX command is being typed into the command line. XX XX Cursor control commands: XX XX XX ^N Move the cell cursor to the next row. XX XX XX ^P Move the cell cursor to the previous row. XX XX XX ^F Move the cell cursor forward one column. XX XX XX ^B Move the cell cursor backward one column. XX XX XX ^H Backspace one character. XX XX XX XX Page 1 (printed 1/5/87) XX XX XX XX XX XX XX VC(1) UNIX 3.0 VC(1) XX XX XX XX h, j, k, l XX Alternate cursor controls (left, down, up, right). XX XX XX 0 Move the cell cursor to column 0 of the current row. XX XX XX $ Move the cell cursor to the last valid column in the XX current row. XX XX XX Cell entry and editing commands: XX XX XX = Prompts for an expression which will be evaluated XX dynamically to produce a value for the cell pointed at XX by the cell cursor. This may be used in conjunction XX with ^V to make one entries value be dependent on XX anothers. XX XX XX " Enter a label for the current cell. XX XX XX < Enter a label that will be flushed left against the XX left edge of the cell. XX XX XX > Enter a label that will be flushed right against the XX right edge of the cell. XX XX XX x Clears the current cell. XX XX XX e Edit the value associated with the current cell. This XX is identical to '=' except that the command line starts XX out containing the old value or expression associated XX with the cell. XX XX XX E Edit the string associated with the current cell. This XX is the same as either "leftstring", "rightstring", or XX "label", with the additional fact that the command line XX starts out with the old string. XX XX XX m Mark a cell to be used as the source for the copy XX command. XX XX XX c Copy the last marked cell to the current cell, updating XX XX XX XX Page 2 (printed 1/5/87) XX XX XX XX XX XX XX VC(1) UNIX 3.0 VC(1) XX XX XX XX the row and column references. XX XX XX ^T Toggle cell display. The current cell's contents are XX displayed in line one when no command being entered or XX edited. ^T turns the display on or off. XX XX XX File operations XX XX XX G Get a new database from a file. XX XX XX P Put the current database into a file. XX XX XX W Write a listing of the current database in a form that XX matches its appearance on the screen. This differs XX from the "put" command in that "put"s files are XX intended to be reloaded with "get", while "write" XX produces a file for people to look at. XX XX XX T Write a listing of the current database to a file, but XX put ":"s between each field. This is useful for XX tables that will be further formatted by the _t_b_l XX preprocessor of _n_r_o_f_f. XX XX XX M Merges the database from the named file into the XX current database. Values, expressions and names XX defined in the named file are written into the current XX file, overwriting the existing entries at those XX locations. XX XX XX Row and Column operations. Members of this class of XX commands can be used on either rows or columns. The second XX letter of the command is either a column designator (one of XX the characters c, j, k, ^N, ^p) or a row designator (one of XX r, l, h, ^B, ^F). Commands which move or copy cells also XX modify the variable references in affected cell expressions. XX Variable references may be frozen by using the "fixed" XX operator. XX XX XX ar, ac XX Creates a new row (column) immediately following the XX current row (column). It is initialized to be a copy XX of the current one. XX XX XX XX XX Page 3 (printed 1/5/87) XX XX XX XX XX XX XX VC(1) UNIX 3.0 VC(1) XX XX XX XX dr, dc XX Delete this row (column). XX XX XX pr, pc, pm XX Pull deleted rows (columns) back into the spread sheet. XX The last deleted set of cells is put back into the XX spread sheet at the current location. _P_r inserts XX enough rows to hold the data. _P_c inserts enough XX columns to hold the data. _P_m (merge) does not insert XX rows or columns, but overwrites the cells beginning at XX the current cursor location. XX XX XX ir, ic XX Insert a new row (column) by moving the row (column) XX containing the cell cursor, and all following, down XX (right) one. The new position will be empty. XX XX XX zr, zc XX Hide ("zap") the current row (column). This keeps a XX row or column from being displayed but keeps it in the XX data base. XX XX XX vr, vc XX Removes expressions from the affected rows (columns), XX leaving only the values which were in the cells before XX the command was executed. XX XX XX sr, sc XX Show hidden rows (columns). Type in a range of rows or XX columns to be revealed. The command default is the XX first range of rows or columns currently hidden. XX XX XX f Sets the output format to be used for printing the XX numbers in each cell in the current column. Type in XX two numbers which will be the width in characters of a XX column and the number of digits which will follow the XX decimal point. Note that this command has only a XX column version and does have a second letter. XX XX XX Miscellaneous commands: XX XX XX ^C Exit from _v_c. If you were editing a named file, and XX you modified it, then it will ask about saving before XX exiting. XX XX XX XX Page 4 (printed 1/5/87) XX XX XX XX XX XX XX VC(1) UNIX 3.0 VC(1) XX XX XX XX q Alternate exit command. XX XX XX ? Types a brief helpful message. XX XX XX / Copy a region to the area specified by the current XX cell. XX XX XX ^G or ESC XX Abort the current long command. XX XX XX ^R Redraw the screen. XX XX XX ^V Types, in the long command line, the name of the cell XX being pointed at by the cell cursor. This is used when XX typing in expressions to refer to entries in the table. XX XX XX ^E Types, in the long command line, the expression of the XX cell being pointed at by the cell cursor. XX XX XX ^A Types, in the long command line, the value of the cell XX being pointed at by the cell cursor. XX XX XX Expressions that are used with the '=' and 'e' commands have XX a fairly conventional syntax. Terms may be variable names XX (from the ^V command), parenthesised expressions, negated XX terms, and constants. Rectangular regions of the screen may XX be operated upon with '@' functions such as sum (@sum), XX average (@avg) and product (@prod). Terms may be combined XX using many binary operators. Their precedences (from XX highest to lowest) are: *,/; +,-; <,=,>,<=,>=; &; |; ?. XX XX XX e+e Addition. XX XX XX e-e Subtraction. XX XX XX e*e Multiplication. XX XX XX e/e Division. XX XX XX XX XX XX Page 5 (printed 1/5/87) XX XX XX XX XX XX XX VC(1) UNIX 3.0 VC(1) XX XX XX XX @sum(v:v) Sum all valid (nonblank) entries in the XX region whose two corners are defined by the XX two variable (cell) names given. XX XX XX @avg(v:v) Average all valid (nonblank) entries in the XX region whose two corners are defined by the XX two variable (cell) names given. XX XX XX @prod(v:v) Multiply together all valid (nonblank) XX entries in the region whose two corners are XX defined by the two variable (cell) names XX given. XX XX XX e?e:e Conditional: If the first expression is true XX then the value of the second is returned, XX otherwise the value of the third is. XX XX XX <,=,>,<=,>= Relationals: true iff the indicated relation XX holds. XX XX XX &,| Boolean connectives. XX XX XX fixed To make a variable not change automatically XX when a cell moves, put the word fixed in XX front of the reference. I.e. B1*fixed C3 XX XX XX XX SEE ALSO XX bc(1), dc(1) XX XX XX BUGS XX Expression reevaluation is done in the same top-to-bottom, XX left-to-right manner as is done in other spread sheet XX calculators. This is silly. A proper following of the XX dependency graph with (perhaps) recourse to relaxation XX should be implemented. XX XX At most 200 rows and 40 columns. XX XX XX XX XX XX XX XX XX XX Page 6 (printed 1/5/87) XX XX XX SHAR_EOF if test 11422 -ne "`wc -c vc.man`" then echo shar: error transmitting vc.man '(should have been 11422 characters)' fi echo shar: extracting vc.1 '(8235 characters)' sed 's/^XX//' << \SHAR_EOF > vc.1 XX.TH VC 1 XX.SH NAME XXvc \- spread sheet calculator ("visicalc-like") XX.SH SYNOPSIS XX.B vc XX[ XX.I file XX] XX XX.SH DESCRIPTION XX.I Vc XXis a calculator that is based on rectangular tables, in much the same style XXas Visicalc or Lotus 123. When it is invoked it presents you with an empty XXtable organised as rows and columns of cells. Each cell may have a label XXstring associated with it and an expression. The expression may be a XXconstant or it may compute something based on other entries. XX XXWhen \fIvc\fR is running, the screen is divided into four regions: the top XXline is for entering commands, the second line is for messages from XX\fIvc\fR, XXthe third line and the first four columns show the row and column numbers, XXand the rest of the screen forms a window looking at the table. XX\fIvc\fR has two XXcursors: a cell cursor (indicated by a '<' on the screen) and a character XXcursor (indicated by the terminals hardware cursor). The cell and XXcharacter cursors are often the same. They will differ when a long command XXis being typed on the top line. XX XXCommands which use the terminal's control key will work when either a long XXcommand is being typed or in "normal" mode. XX XXThe cursor control commands and the row, column commands can be XXprefixed by a numeric argument indicating how many times the command XXis to be executed. "^U" can be used before the number if XXthe cursor movement is to take place while a command is being typed XXinto the command line. XX XXCursor control commands: XX XX.IP ^N XXMove the cell cursor to the next row. XX XX.IP ^P XXMove the cell cursor to the previous row. XX XX.IP ^F XXMove the cell cursor forward one column. XX XX.IP ^B XXMove the cell cursor backward one column. XX XX.IP ^H XXBackspace one character. XX XX.IP "h, j, k, l" XXAlternate cursor controls (left, down, up, right). XX XX.IP 0 XXMove the cell cursor to column 0 of the current row. XX XX.IP $ XXMove the cell cursor to the last valid column in the current row. XX XX.PP XXCell entry and editing commands: XX XX.IP = XXPrompts for an expression which will be evaluated dynamically to produce a XXvalue for the cell pointed at by the cell cursor. This may be used in XXconjunction with ^V to make one entries value be dependent on anothers. XX XX.IP """ XXEnter a label for the current cell. XX XX.IP < XXEnter a label that will be flushed left against the XXleft edge of the cell. XX XX.IP > XXEnter a label that will be flushed right against the XXright edge of the cell. XX XX.IP x XXClears the current cell. XX XX.IP e XXEdit the value associated with the current cell. This is identical to '=' XXexcept that the command line starts out containing the old value or XXexpression associated with the cell. XX XX.IP E XXEdit the string associated with the current cell. This is the same as XXeither "leftstring", "rightstring", or "label", with the additional XXfact that the command line starts out with the old string. XX XX.IP m XXMark a cell to be used as the source for the copy command. XX XX.IP c XXCopy the last marked cell to the current cell, updating the row and XXcolumn references. XX XX.IP ^T XXToggle cell display. The current cell's contents are displayed in line XXone when no command being entered or edited. ^T turns the XXdisplay on or off. XX XX.PP XXFile operations XX XX.IP G XXGet a new database from a file. XX XX.IP P XXPut the current database into a file. XX XX.IP W XXWrite a listing of the current database in a form that matches its XXappearance on the screen. This differs from the "put" command in that XX"put"s files are intended to be reloaded with "get", while "write" produces XXa file for people to look at. XX XX.IP T XXWrite a listing of the current database to a file, but put ":"s between XXeach field. This is useful for tables that will be further formatted XXby the XX.I tbl XXpreprocessor of XX.I nroff. XX XX.IP M XXMerges the database from the named file into the current database. Values, XXexpressions and names defined in the named file are written into the current XXfile, overwriting the existing entries at those locations. XX XX.PP XXRow and Column operations. Members of this class of commands can be used XXon either rows or columns. The second letter of the command is either XXa column designator (one of the characters c, j, k, ^N, ^p) or a XXrow designator (one of r, l, h, ^B, ^F). XXCommands which move or copy cells also modify the variable references XXin affected cell expressions. XXVariable references may be frozen by using the "fixed" operator. XX XX.IP "ar, ac" XXCreates a new row (column) immediately following the current row (column). XXIt is initialized XXto be a copy of the current one. XX XX.IP "dr, dc" XXDelete this row (column). XX XX.IP "pr, pc, pm" XXPull deleted rows (columns) back into the spread sheet. The last deleted XXset of cells is put back into the spread sheet at the current location. XX.I Pr XXinserts enough rows to hold the data. XX.I Pc XXinserts enough columns to hold the data. XX.I Pm XX(merge) does not insert rows or columns, but overwrites the cells XXbeginning at the current cursor location. XX XX.IP "ir, ic" XXInsert a new row (column) by moving the row (column) containing the cell XXcursor, and all XXfollowing, down (right) one. The new position will be empty. XX XX.IP "zr, zc" XXHide ("zap") the current row (column). This keeps a row or column from being XXdisplayed but keeps it in the data base. XX XX.IP "vr, vc" XXRemoves expressions from the affected rows (columns), leaving only XXthe values which were in the cells before the command XXwas executed. XX XX.IP "sr, sc" XXShow hidden rows (columns). Type in a range of rows or columns XXto be revealed. The command default is the first range of rows or XXcolumns currently hidden. XX XX.IP f XXSets the output format to be used for printing the numbers in each cell in XXthe current column. Type in two numbers which will be the width in XXcharacters of a column and the number of digits which will follow the XXdecimal point. Note that this command has only a column version and XXdoes have a second letter. XX XX.PP XXMiscellaneous commands: XX XX.IP ^C XXExit from \fIvc\fR. If you were editing a named file, and you modified XXit, then it will ask about saving before exiting. XX XX.IP q XXAlternate exit command. XX XX.IP ? XXTypes a brief helpful message. XX XX.IP / XXCopy a region to the area specified by the current cell. XX XX.IP "^G or ESC" XXAbort the current long command. XX XX.IP ^R XXRedraw the screen. XX XX.IP ^V XXTypes, in the long command line, the name of the cell being pointed at by XXthe cell cursor. This is used when typing in expressions to refer to XXentries in the table. XX XX.IP ^E XXTypes, in the long command line, the expression of the cell being pointed at XXby the cell cursor. XX XX.IP ^A XXTypes, in the long command line, the value of the cell being pointed at XXby the cell cursor. XX XX.PP XXExpressions that are used with the '=' and 'e' commands have a fairly XXconventional syntax. Terms may be variable names (from the ^V command), XXparenthesised expressions, negated terms, and constants. XXRectangular regions of the screen may be operated upon with '@' functions XXsuch as sum (@sum), average (@avg) and product (@prod). XXTerms may be combined using many binary XXoperators. Their precedences (from highest to lowest) are: *,/; +,-; XX<,=,>,<=,>=; &; |; ?. XX XX.TP 15 XXe+e XXAddition. XX XX.TP 15 XXe-e XXSubtraction. XX XX.TP 15 XXe*e XXMultiplication. XX XX.TP 15 XXe/e XXDivision. XX XX.TP 15 XX@sum(v:v) XXSum all valid (nonblank) entries in the region whose two corners are defined XXby the two variable (cell) names given. XX XX.TP 15 XX@avg(v:v) XXAverage all valid (nonblank) entries in the region whose two corners are defined XXby the two variable (cell) names given. XX XX.TP 15 XX@prod(v:v) XXMultiply together all valid (nonblank) entries in the region whose two XXcorners are defined by the two variable (cell) names given. XX XX.TP 15 XXe?e:e XXConditional: If the first expression is true then the value of the second is XXreturned, otherwise the value of the third is. XX XX.TP 15 XX<,=,>,<=,>= XXRelationals: true iff the indicated relation holds. XX XX.TP 15 XX&,| XXBoolean connectives. XX XX.TP 15 XXfixed XXTo make a variable not change automatically when a cell moves, XXput the word \*(lqfixed\*(rq in front of the reference. I.e. XXB1*fixed C3 XX XX XX.SH SEE ALSO XXbc(1), dc(1) XX XX.SH BUGS XX XXExpression reevaluation is done in the same top-to-bottom, left-to-right XXmanner as is done in other spread sheet calculators. This is silly. A XXproper following of the dependency graph with (perhaps) recourse to XXrelaxation should be implemented. XX XXAt most 200 rows and 40 columns. SHAR_EOF if test 8235 -ne "`wc -c vc.1`" then echo shar: error transmitting vc.1 '(should have been 8235 characters)' fi echo shar: extracting cvt.sed '(1420 characters)' sed 's/^XX//' << \SHAR_EOF > cvt.sed XXs!+/\(r.*c.*:r.*c[0-9]*\)!@sum(\1)! XXs/\(r[0-9]*\)\(c[0-9]*\)/\2\1/g XXs/c10/k/g XXs/c11/l/g XXs/c12/m/g XXs/c13/n/g XXs/c14/o/g XXs/c15/p/g XXs/c16/q/g XXs/c17/r/g XXs/c18/s/g XXs/c19/t/g XXs/c20/u/g XXs/c21/v/g XXs/c22/w/g XXs/c23/x/g XXs/c24/y/g XXs/c25/z/g XXs/c26/aa/g XXs/c27/ab/g XXs/c28/ac/g XXs/c29/ad/g XXs/c30/ae/g XXs/c31/af/g XXs/c32/ag/g XXs/c33/ah/g XXs/c34/ai/g XXs/c35/aj/g XXs/c36/ak/g XXs/c37/al/g XXs/c38/am/g XXs/c39/an/g XXs/c0/a/g XXs/c1/b/g XXs/c2/c/g XXs/c3/d/g XXs/c4/e/g XXs/c5/f/g XXs/c6/g/g XXs/c7/h/g XXs/c8/i/g XXs/c9/j/g XXs/r\([0-9][0-9]*\)/\1/g XXs/format 10/format k/g XXs/format 11/format l/g XXs/format 12/format m/g XXs/format 13/format n/g XXs/format 14/format o/g XXs/format 15/format p/g XXs/format 16/format q/g XXs/format 17/format r/g XXs/format 18/format s/g XXs/format 19/format t/g XXs/format 20/format u/g XXs/format 21/format v/g XXs/format 22/format w/g XXs/format 23/format x/g XXs/format 24/format y/g XXs/format 25/format z/g XXs/format 26/format aa/g XXs/format 27/format ab/g XXs/format 28/format ac/g XXs/format 29/format ad/g XXs/format 30/format ae/g XXs/format 31/format af/g XXs/format 32/format ag/g XXs/format 33/format ah/g XXs/format 34/format ai/g XXs/format 35/format aj/g XXs/format 36/format ak/g XXs/format 37/format al/g XXs/format 38/format am/g XXs/format 39/format an/g XXs/format 0/format a/g XXs/format 1/format b/g XXs/format 2/format c/g XXs/format 3/format d/g XXs/format 4/format e/g XXs/format 5/format f/g XXs/format 6/format g/g XXs/format 7/format h/g XXs/format 8/format i/g XXs/format 9/format j/g SHAR_EOF if test 1420 -ne "`wc -c cvt.sed`" then echo shar: error transmitting cvt.sed '(should have been 1420 characters)' fi # End of shell archive exit 0 -- Robert Bond ihnp4!nsc!nscpdc!rgb National Semiconductor tektronix!nscpdc!rgb