DECUS C LANGUAGE SYSTEM Tool Library Reference Manual by Martin Minow This document describes a number of tools, written in C. Most of these do not require any knowlege of, or interest in, the language C itself. DECUS Structured Languages SIG Version of 20-Oct-81 NOTE This software is made available without any support whatsoever. The person responsible for an implementation of this system should expect to have to understand and modify the source code if any problems are encountered in implementing or maintaining the compiler or its run-time library. The DECUS 'Structured Languages Special Interest Group' is the primary focus for communication among users of this software. UNIX is a trademark of Bell Telephone Laboratories. RSX, RSTS/E, RT11 and VMS are trademarks of Digital Equipment Corporation. 1.0 General Considerations With few exceptions, all Decus C tools use a Unix-like method of passing parameters to the program, allowing for redirection of the "standard" input-output devices. This section describes overall tool installation and the parameter passing mechanism. 1.1 Installing the Tools The tools are compiled and linked with the C run-time library. The resulting executable program (.TSK, .SAV, or .EXE) may be copied to a convenient directory. The following conventions are used: 1. On RSTS/E, the tools are copied to the account named in the system-wide logical "PUB:". In order to use the supplied command files, the system manager must have defined this account as a "system-wide logical". Decus C programs can be run using the RSTS/E consise command (CCL) facility. If the system manager does not wish to install all programs as CCL commands, the CRUN program may be compiled and installed. You may then run a tool (or any Decus C program) by a command such as CRUN Disk:[P,Pn]file argument list where "Disk[P,Pn]" indicates the disk and account where the executable program is stored. CRUN chains to the program, passing the argument list in a common area. It is very specific to RSTS/E. 2. On VMS, the tool build process writes the executable image to the user-defined logical "BIN:". Tools are "installed" by the foreign command definition: $ TOOLNAME :== $BIN:TOOL.EXE 3. On RSX, tools may be installed as known images. There is no equivalent of the CRUN program currently available. 4. On RT11, tools are RUN. There is no (supported) way to pass a command line to C programs. When specifically RUN (rather than executed via a command), (most) tools will prompt for a command line, using a prompt such as: Argv> The user types the command line which is parsed and passed to the tool's main program. The specific prompt varies from system to system. If known, the name of the tool will be used. 1.2 Argument Lists If a tool is invoked using an argument list as in: tool arg1 arg2 "argument three" The main program will be passed the arguments as strings. Note the following: 1. Some operating systems will merge all non-quoted arguments to upper-case. 2. Argument strings may be quoted using "..." or '...'. Within a quoted string, the other quote character may be used. 3. Within an argument, the backslash '\' character will quote the next character: tool don\'t ... 4. As will be described, the '<' and '>' characters may be used to specify i/o redirection. 1.3 I/O Redirection Normally, tools read from and write to the user's command terminal. Most tools allow the specific file to be redefined, allowing tools to be combined into larger entities. I/O redirection is done as follows: 1. If any (non-quoted) argument begins with the '<' character, the argument will define a file to be used for command input. 2. If any (non-quoted) argument begins with the '>' character, the argument will define a file to receive normal output. If the argument begins with '>>', output will be appended to the file (if supported by the operating system). 2.0 text file archiver ____ ____ ________ ****** * ar * ****** NAME: ar -- text file archiver SYNOPSIS: ar [-options] [-z logfile] archive_name file[s] DESCRIPTION: Ar manages archives (libraries) of source files, allowing a large number of small files to be stored without using excessive system resources. The following options may be specified: c Force creation of new archive d Delete file from archive. i Insert, same as update p Print files on standard output r Replace, same as update l List archive (directory) contents u Update, same as replace x Extract named files v Verbose z Write verbose log to indicated file The file name arguments may contain '*' and '?' wildcards, where '*' matches any string of characters, and '?' matches one character. ('%' may be used as a synonym for '?'.) There is a slight, but suble difference on the way wild cards are processed for the various commands: directory, delete, and extract Match ('*' and '?') against the files named in the archive, performing the operation on all files that match. Except for delete, "no argument" matches all files in the archive. insert, replace, and update Expand the wild-card arguments against the files stored on the operating system -- eliminating all wild cards. Then, match against the Tool Library Reference Manual Page 5 ar text file archiver archived files. Those that match are replaced by the file on the operating system. After replacement, any additional files are appended to the archive. Files in the archive that are not in the directory are unchanged. Currently, insert, replace, and update work the same. If it seems reasonable, the program may be extended as follows: insert Add files new only Adds new files (not present in the archive) but does not modify files currently in the archive. It would be an error to try modifying a currently archived file. replace Modify existing files only Modify files present in the archive, but do not add new files to the archive. update Modify existing, add new This is simple to do, but would seem to be a rich source of user error. ARCHIVE FILE FORMAT: Archive files are "standard" text files, each archive element is preceeded by a line of the format: -h- file.name date true_name Note that there is no line or byte count. To prevent problems, a '-' at the beginning of a record within a user file will be "quoted" by doubling it. The date and true filename fields are ignored. DIAGNOSTICS: Diagnostic messages should be self-explanatory AUTHOR: Martin Minow BUGS: Tool Library Reference Manual Page 6 build Build compilation command files 3.0 Build compilation command files _____ ___________ _______ _____ ********* * build * ********* NAME: build -- Build compilation command files SYNOPSIS: build -options files DESCRIPTION: Build is used to create command files for C programs and libraries. It reads the program source files to determine dependencies and writes a command file for the operating system indirect command processor. The following options are defined: -a Set protection codes on the output file (program or library) so that all users may access the file. -b Build (as a program) even if the "/*)BUILD" comment is not seen. -d Do not delete .obj files after build. -h header A header command file is copied to the output file before all processing. -l library An object library of C programs is built. library is the (fully-qualified) name of the output file. (Note that the $(BIN) model is not appended). If unspecified, the filetype will be .OBJ for RT11 and .ODL for RSX and VAX libraries. Note that, on VAX/VMS, if you build both the RSX and native library, you must select different library names as they will generally have the same filetype. -m modelfile Command files are built by expanding macros in built-in model strings. The model file allows the user to specify Tool Library Reference Manual Page 7 build Build compilation command files default definitions for model strings. -o output The output file is be changed from stdout to this file. -s source This string is pre-pended to all source file references (and include copy operations are not commented out). -t trailer A trailer command file is copied to the output file after all processing. -v Verbose -- log files as they are processed. -x system Specify the operating system on which the command file is to be run. If not specified, your current operating system is used. -z Used to build a test datastream. Programs are compiled using "[x]cc" and "newcc" and the outputs, named .ols and .s, are passed through diff. Programs are neither assembled nor linked. The .ols and .s files are deleted. This option presupposes that the new compiler is named "newcc" (or, on rsx, "newxcc") and that diff has already been defined. It is intended to simplify debugging the Decus C compiler. There is no provision for testing native C. If the -x option is not specified, the output file will be built for the current operating system. The following operating systems are known: vaxnative, vaxrsx, vaxboth, vax Vaxnative generates a command file that uses the Vax-11 C compiler only; vaxrsx uses Decus-C only, while vax writes a command file that can be used for either compiler. rstsrt11, rstsrsx, rsts Rsts defaults to rstsrt11. rsxnative rt11native These are native-mode command files and may be abbreviated "rsx" and "rt11" respectively. Tool Library Reference Manual Page 8 build Build compilation command files When specifing an operating system, a non-ambiguous string is required. Thus, "rstsrt11" may be abbreviated to "rstsrt". For example, note the following examples: build -l c:cu -s src: *.c >vxcubl.com build *.c -x rt11 >ttool.com The first builds the utility library for the current operating system, while the second builds tools for rt11 native mode. HEADER AND TRAILER FILE FORMAT: These files are written to the output file before (header) and after (trailer) the generated command files. They may be used to establish compilation defaults. C SOURCE FILE FORMAT: To generate the command file, build reads each source file, searching for a build command. This appears as a comment (beginning in column 1) in the C source: /*)BUILD arguments */ If a library is being built, build searches for "/*)LIBRARY". Thus libraries and programs may coexist in the same directory. Note that "/*)BUILD" or "/*)LIBRARY" must appear in upper-case at the beginning of a line. Also, the terminating "*/" must be the first non white-space characters on a line. A '#' outside of a model argument will cause the rest of the source line to be ignored, allowing comments in model strings. If no build arguments are given, the current file will be compiled. Arguments may be given to override model (or built-in) definitions. The format for an argument is as follows: $X = Y where X may be either a single letter or a string enclosed in either parentheses or braces and Y may be Tool Library Reference Manual Page 9 build Build compilation command files either a single word or a string (which may contain blanks, newlines, etc.) bounded by braces. For example: /*)BUILD $(PROGRAM) = kwik $(STACK) = 2000 $(FILES) = { kwik sortc } */ Within model definitions, the '$' character may appear as itself if it is doubled "$$" or followed by a blank "$ ". The following may be specified in build arguments or model files: $(DTOA) This program requires the floating-point conversion routines. This should be written as: $(DTOA) = 1 $(SRC) The account where the sources are. This overrides any -s option value. $(BIN) The account where the image goes. $(FILES) The list of files to be built. If not specified, the current file name is used. $(FILES) may be specified for programs and libraries. $(MP) To preprocess program source files by the MP macro pre-processor, define this as: $(MP) = 1 As the MP preprocessor does not have a default filetype, the build command will append ".C" to any source file that does not have an explicit filetype. This may be overridden by providing the filetype in the $(FILES) command: $(FILES) = { prog.txt } $(INCLUDE) The list of files to be included. If not specified, no include files will be copied. The copy is supressed if neither $(SRC) nor $(COPYINCLUDE) have Tool Library Reference Manual Page 10 build Build compilation command files been redefined as the file would be copyied from the current disk/account to itself. These files are not deleted after compilation, even if they were copied. $(INCLUDE) may be specified for programs or libraries. $(PROGRAM) The name of the program image to be generated. $(STACK) A value for the RT11 /B[OTTOM] link specifier. If not specified, "$(STACK) = 2000" will be used. $(TKBOPTIONS) RSX task builder options (stack, units, task name, etc.) are specified by this argument as follows: $(TKBOPTIONS) = { STACK = 1500 TASK = ...FOO ; ... etc } $(OBJS) A string naming the actual object files. If specified, it overrides the default use of the files just compiled. $(LIBS) A string naming additional libraries to be searched (before searching the C runtime library). $(UTLIB) A utility library: "C:VAXLIB/LIB" on vax native, nothing on other operating systems. $(SUPORT) The RT11 runtime support routine: "C:SUPORT.OBJ". $(??LIB) The C runtime library. By default: $(VXLIB) The VAX/VMS native runtime library, by default "SYS$LIBRARY:CRTLIB/LIB" $(RXLIB) The RSX runtime library. The default depends on the operating system: on VAX/VMS and RSTS, it is "C:C/LB", while on native RSX-11M, it is "LB:[1,1]C/LB". $(RTLIB) The RT11 runtime library. The default is "C:SUPORT,C:CLIB". $(ODL) = {...} An RSX overlay description. If Tool Library Reference Manual Page 11 build Build compilation command files specified, a temporary file will be created (and subsequently deleted) containing a configured overlay file. Note that you should reference the run-time library by using $(RXLIB) to obtain the correct library designation. If $(ODL) is specified, $(OBJS) is ignored and $(LIBS) and $(RXLIB) will be processed only if present in the $(ODL) model. For example: $(ODL) = { .ROOT MAIN1-MAIN2-$(RXLIB)-*(OVR1,OVR2) ; OVR1 .FCTR SUB1-SUB1L SUB1L .FCTR $(RXLIB):FWILD:FG ETNA:RTIME ; OVR2 .FCTR SUB2-SUB2L SUB2L .FCTR $(RXLIB):ASL$$LI # really asl$li ; .END } Note the use of $(RXLIB):XXX to select modules from the C library and the doubling of the '$' in referencing subroutine ASL$LI. $(OVR) = {...} An RT11 overlay description. If specified, $(OBJS) is ignored. For example: $(OVR) = { root1,root2,$(SUPORT),$(RTLIB) over1/o:1 over2/o:2 } $(COMMENT) A string that will comment a command line for the target operating system. $(PREFIX) This model is expanded at the start of every compilation. The default is a comment suitable for the particular operating system. $(POSTFIX) This model is expanded after every program build. On VAX/VMS, the default defines the program as an external command. On other systems, the default Tool Library Reference Manual Page 12 build Build compilation command files does nothing. $(FIRST) This model is expanded before the first program is built. By default, it does nothing. It may be defined by a user-specified model file. $(LAST) This model is expanded after the last program is built. By default, it does nothing. It may be defined by a user-specified model file. For example, /*)BUILD */ This is a "normal" build for e.g., grep or echo, signalling build that this file is a program, rather than a subroutine. /*)BUILD $(PROGRAM) = xrf $(INCLUDE) = xrf.h $(FILES) = { xrf0 xrf1 xrf2 xrf3 xrfi xrfd } $(TKBOPTIONS) = { TASK = ...XRF } $(ODL) = { .ROOT XRF0-XRF2-XRFD-$(RXLIB)-*(X1,X2,X3) ; X1: .FCTR XRFI-X1L X1L: .FCTR $(RXLIB):CONCAT:CTIME:FWILD ; X2: .FCTR XRF1-X2L X2L: .FCTR $(RXLIB):ASL$$I ; X3: .FCTR XRF3-X3L X3L: .FCTR $(RXLIB):CPYSTR .END } $(OVR) = { xrf0,xrf2,xrfd,c:suport,c:clib xrfi,c:clib/o:1 xrf1,c:clib/o:1 xrf3,c:clib/o:1 } */ This slightly more complex build shows specification of an include file, the creation of a program whose name is different from its component files, task-builder Tool Library Reference Manual Page 13 build Build compilation command files options, and overlay files, including library module selection. /*)LIBRARY $(INCLUDE) = chrtab.h */ This library build file shows the naming of an include file. MODEL FILE FORMAT: Model files consist of strings of macros and their definitions. Each definition is separated by one or more blanks, tabs, or newlines. Definitions are in the same format as their )BUILD parameter counterparts. A model will (re)define defaults for the entire build. For example, the model file: $(SRC) = DK1:[6,1] # source files $(BIN) = SY:[1,3] # image output Causes all program source to be taken from DK1:[6,1] and all compiled programs to be written to SY:[1,3]. Model file definitions replace operating-system specific defaults. Anything more elaborate than redefinition of, say, $(SRC) or $(BIN), will probably require understanding of the inner logic of the build program. You should be especially cautious of changing a link or library build string. BUGS: It will never replace make. It's not supposed to, anyways. The problem that build was written to solve is the extrordinary proliferation of tiny files -- each tool program requiring five or six command files: one or two for each operating system. AUTHOR: Martin Minow Tool Library Reference Manual Page 14 comm Compare Files for Equality 4.0 Compare Files for Equality _______ _____ ___ ________ ******** * comm * ******** NAME: comm -- Compare Files for Equality SYNOPSIS: comm [- [123]] file_1 file_2 [out_file] DESCRIPTION: Comm prints lines which are common to two files. Lines which are only in file 1 are printed in the leftmost column; those which are only in file 2 are printed indented by one tab; those in both files are printed indented by two tabs. Specifing flags 1, 2, or 3 supress printing of the indicated column: comm -12 prints only lines common to both files. comm -23 prints lines present in the first file, but not in the second. comm -123 does nothing. If the output file argument is not present, output is written to the standard output. DIAGNOSTICS: No argument Unknown flag Two input files needed Cannot open input file AUTHOR: Martin Minow Tool Library Reference Manual Page 15 comm Compare Files for Equality BUGS: Tool Library Reference Manual Page 16 diff Differential File Comparison 5.0 Differential File Comparison ____________ ____ __________ ******** * diff * ******** NAME: diff -- Differential File Comparison SYNOPSIS: diff [option] file1 file2 DESCRIPTION: Diff compares two files, showing what must be changed to make them identical. Either file1 or file2 (but not both) may refer to directories. If that is the case, a file in the directory whose name is the same as the other file argument will be used. The standard input may be used for one of the files by replacing the argument by "-". Except for the standard input, both files must be on a disk device. Options: -b Remove trailing whitespace (blanks and tabs) and compress all other strings of whitespace to a single blank. -c Print some context -- matching lines before and after the non-match section. Mark non-matched sections with "|". -e Output is in an "editor script" format which is compatible with the Unix 'ed' editor. All information needed to compare the files is maintained in main memory. This means that very large files (or fairly large files with many differences) will cause the program to abort with an "out of space" message. Main memory requirements (in words) are approximately: 2 * (length of file1 + length of file2) + 3 * (number of changes) (Where "length" is the number of lines of data in each file.) Tool Library Reference Manual Page 17 diff Differential File Comparison The algorithm reads each file twice, once to build hash tables and once to check for fortuitous matches (two lines that are in fact different, but which have the same hash value). CPU time requirements include sorting the hash tables and randomly searching memory tables for equivalence classes. For example, on a time-shared VAX-11/780, comparing two 1000 line files required about 30 seconds (elapsed clock time) and about 10,000 bytes of working storage. About 90 per-cent of the time was taken up by file i/o. DIAGNOSTICS: Warning, bad option 'x' The option is ignored. Usage ... Two input files were not specified. Can't open input file "filename". Can't continue. Out of space The program ran out of memory while comparing the two files. Can't read line nnn at xxx in file[A/B] This indicates an I/O error when seeking to the specific line. It should not happen. Spurious match, output is not optimal. Two lines that were different yielded the same hash value. This is harmless except that the difference output is not the minimum set of differences between the two files. For example, instead of the output: lines 1 to 5 were changed to ... the program will print lines 1 to 3 were changed to ... lines 4 to 5 were changed to ... The program uses a CRC16 hash code. The likelihood of this error is quite small. AUTHOR: Tool Library Reference Manual Page 18 diff Differential File Comparison The diff algorithm was developed by J. W. Hunt and M. D. McIlroy, using a central algorithm defined by H. S. Stone. It was published in: Hunt, J. W., and McIlroy, M. D., An Algorithm for Differential File Comparison, Computing Science Technical Report #41, Bell Laboratories, Murray Hill, NJ 07974 BUGS: Tool Library Reference Manual Page 19 echo Echo Arguments to Standard Output 6.0 Echo Arguments to Standard Output ____ _________ __ ________ ______ ******** * echo * ******** NAME: echo -- Echo Arguments to Standard Output SYNOPSIS: echo [argument list] DESCRIPTION: Echo writes its arguments, one per line, on the standard output file. It was primarily used to debug the Decus library. AUTHOR: Martin Minow BUGS: Except as a test of the library, echo is not useful. Tool Library Reference Manual Page 20 fixdoc Fix runoff output files 7.0 Fix runoff output files ___ ______ ______ _____ ********** * fixdoc * ********** NAME: fixdoc -- Fix runoff output files SYNOPSIS: fixdoc outfile DESCRIPTION: Because of bugs in RSTS/E RNO.TSK and VMS "Standard Runoff", this filter must be applied to C library documentation. It is executed as fixdoc outfile It is specific to the Decus C documentation standards (left margin 8, right margin 72, page size 80 columns). On VMS, the title lines are output "text...". AUTHOR: Martin Minow Tool Library Reference Manual Page 21 getcmd Build command files for Decus C 8.0 Build command files for Decus C _____ _______ _____ ___ _____ _ ********** * getcmd * ********** NAME: getcmd -- Build command files for Decus C SYNOPSIS: getcmd >result -options pattern file_list DESCRIPTION: Getcmd was written to aid in maintaining the Decus C compiler. It is used to generate command files for building the run-time library, for example. It is probably of limited use in other areas. The following options are defined: -c Macro command file, (for run-time library build. This prevents compiling RSX.MAC and RT11.MAC. -d Enable debug code. -m model "model" replaces '?' in a pattern string. -r For RT11, preface the output file with "R MACRO" and end it with "^C". If no pattern is present, patterns and wild-card descriptions will be read from the standard input. The input format is: output_file pattern input_spec. If the pattern begins with a blank, the current output_file (or stdout) will be used. If the pattern contains blanks, enclose it in quotes. If no input_spec is present, the line is copied to the output with no changes other than substitution for the model string. Within a pattern, the following strings have special Tool Library Reference Manual Page 22 getcmd Build command files for Decus C meaning: ? Replaced by the last model string *.* Replaced by the filename + extension * Replaced by the filename only Note that the disk and [UIC,PPN] is never output. Unflagged arguments are wild-card file specifications. For example: getcmd >rilbas.cmd -c OBJ:*,LST:*=SRC:RT11,SRC:* *.MAC The above command line builds the assembly command file for the I/O library in RT11 mode. getcmd >tov.cmd VAX::[C.OTSIO]*.*/VA=[5,5]*.* [5,5]*.* The above command generates an indirect command file for RSTS/E DECnet. BUGS: getcmd was written to aid in maintaining the Decus C run-time library. It is fairly useless in other situations. The build program may be more generally useful. AUTHOR: Martin Minow Tool Library Reference Manual Page 23 getkwk Build Keyword Index 9.0 Build Keyword Index _____ _______ _____ ********** * getkwk * ********** NAME: getkwk -- Build Keyword Index SYNOPSIS: getkwk [-w -c] >output.fil file_list DESCRIPTION: Getkwk scans library (macro) files for "; index" lines, building the input to kwik. It runs only on the decus compiler. The format of the library files is described in getrno.c. The -w and -c options are as described for getrno: -w Wizard -c C source, rather than Macro To build an index to the Decus C runtime library: getkwk >index.tmp [5,4]*.mac [5,5]*.mac kwik -t 16 -w 64 index.out pip index.rno=indhed.rno,index.out/fa rno index=index AUTHOR: Martin Minow Tool Library Reference Manual Page 24 getrno Build Documentation Source 10.0 Build Documentation Source _____ _____________ ______ ********** * getrno * ********** NAME: getrno -- Build Documentation Source SYNOPSIS: getrno [-options] -o output -h header input_files DESCRIPTION: getrno reads a list of files, compiling comments to runoff source. Switches are: -d Debugging -c C source files, rather than macro -r RSTS/E title hack flag. See below -u Usage -- output an abbreviated documentation containing only the information between "Usage" and "Description". (Note: ignored if -c option selected.) -w Wizard: output package internal calls, too. -o file Write output to "file", rather than stdout. -h file Prepend the contents of "file" to the output. There is an error in the RSTS/E V7.0 runoff (RNO.TSK) such that title lines do not get correct page numbers. If the -r flag is set, .t lines in the header program will be marked for the fixdoc.c program. Note, for a title to be recognized, it must have the exact form: .t Anything (or .t ########Anything) Getrno will change it to: .t [[Anything]] And fixdoc.c will look for same for post processing. Tool Library Reference Manual Page 25 getrno Build Documentation Source MACRO SOURCE FILE FORMAT: The macro input MUST have the following syntax: .title name Title line ; ;+ (Start of commentary) ; ; Index Short description for kwik index ; Index (Another short description) ; ; Usage (Start of usage information) ; ; Usage information, output, starting in column 1 ; exactly as it is written (rno .nf mode). The ; leading semicolon is not output, but the tab (or ; spaces) is. ; ; Description ; ; Description, output, starting in column 8 in ; runoff .fill mode, except that any line starting ; with ";" will be output in ; .no fill mode. The leading ";" will not be ; output. ; ; A line consisting of just ";" will generate a ; runoff .space while a line consisting of ; ";text" will generate ".indent -8 ;text". ; ;- (End of commentary) If the wizard flag (-w) is not given, a Macro source line of the format: ; Internal may be used to signal the start of package-internal information. If "Internal" preceeds "Usage", no information will be output for this file. If it follows "Usage" or "Description", text following (up to the next section initiator) will not be output. C SOURCE FILE FORMAT: C source must have the following format: #ifdef DOCUMENTATION title tool_name header_text index index text section_head text for the section #endif Tool Library Reference Manual Page 26 getrno Build Documentation Source Note that the comment leadin must be #ifdefDOCUMENTATION Section heads begin in column 1. They will be left-justified and printed in upper case with a trailing ':'. All text will start in column 8. Note: text may contain runoff commands (the first char in col. 8 is '.', but it is your responsibililty to maintain alignment and to quote runoff-specific characters on lines which have a '.' in column 1. For example: diagnostics .lm +8 .s.i-8;bad file _& other stuff .s.i-8;something else .lm -8 author ... Note: blank lines will not be passed to runoff: if one is needed, use the runoff .space command. HEADER FILE FORMAT: The header file is assumed to be in runoff format. It should start as follows: .comment Set top-of-form at 4 lines .comment below perforation. .ps 58,80 ! 58 lines per page, 80 columns. .lm 8 ! left margin at 8 .rm 72 ! right margin at 72 .hd Mixed ! Mixed case headings Because the left margin is set to 8, titles and subtitles should be written as: .t ########Title .st ########Subtitle The wizard flag may be used to select parts of the header file: .comment wizard *** For wizards only *** .comment else *** For non-wizards only *** .comment mundane *** Exit wizard section *** Tool Library Reference Manual Page 27 getrno Build Documentation Source The format of the comments is EXACTLY ".commentargument" One space only. WORKFILE FORMAT: Each file builds one or more records (lines) in the workfile. The first has the title line, (information following .title). To allow building an index, this should be in the format: nameTitle information Following this are lines containing .rno text. The last line is followed by a record containing "!!" in the first two bytes. Records with "!" in the first byte may be used to communicate information between passes: they are not written to the output. This allows writing Usage information as a seperate file. Note that there is a bug in the RSTS RNO (as distributed with Version 7.0). Consequently, if your runoff source has chapter headings, You should not have explicit titles, or have page numbers.) BUGS: Wizard is ignored in C source mode. getrno was written to aid in documenting the Decus C libraries. It may not be particularily useful in other environments. (I.e., getrno and the library documentation are interdependent.) DIAGNOSTICS: A warning message is printed if a file does not have any documentation. There are many other messages, hopefully self-explanatory. AUTHOR: Martin Minow Tool Library Reference Manual Page 28 grep Get Regular Expression and Print 11.0 Get Regular Expression and Print ___ _______ __________ ___ _____ ******** * grep * ******** NAME: grep -- Get Regular Expression and Print SYNOPSIS: grep [options] regular_expression [ file ...] DESCRIPTION: Grep searches each specified file (if none are specified, it reads stdin) for lines matching the given pattern. Grep allows wild-card file names in the file list. The following options are recognized: -c Only print a count of matching lines. -f Print file name option, see below. -n Preceed each line by its line number. -v Print non-matching lines. The file name is normally printed if more than one file argument is given, or if a wild-card file name was specified. The "-f" flag reverses this action (print name if one file, not if more). The regular_expression defines the pattern to search for. Upper- and lower-case are not distinguished by grep. Blank lines never match. The regular_expression should be quoted. The regular_expression is built out of the following elements: x An ordinary character (not mentioned below) matches that character. '\' The backslash quotes any character. "\$" matches a dollar-sign. '^' A circumflex at the beginning of an expression matches the beginning of a line. Tool Library Reference Manual Page 29 grep Get Regular Expression and Print '$' A dollar-sign at the end of an expression matches the end of a line. '.' A period matches any character except "new-line". ':a' A colon matches a class of characters described ':d' by the following character. ":a" matches any ':n' alphabetic, ":d" matches digits. ":n" matches ': ' alphanumerics, and ": " matches spaces tabs, and other control characters, such as newline. '*' An expression followed by an asterisk matches zero or more occurrances of that expression: "fo*" matches "f", "fo" "foo", etc. '+' An expression followed by a plus sign matches one or more occurrances of that expression: "fo+" matches "fo", etc. '-' An expression followed by a minus sign optionally matches the expression. '[]' A string enclosed in square brackets matches any character in that string, but no others. If the first character in the string is a circumflex, the expression matches any character except "new-line" and the characters in the string. For example, "A[xyz]+B" matches "AxxB" and "AxyzzyB", while "A[^xyz]+B" matches "AbcB" but not "AxB". A range of characters may be specified by two characters separated by "-". Note that [a-z] matches alphabetics, while [z-a] never matches. The concatenation of regular expressions is a regular expression. DIAGNOSTICS: No arguments Unknown flag No pattern "file_name": cannot open Illegal occurrence operator ... An operator was found in an illegal context. Tool Library Reference Manual Page 30 grep Get Regular Expression and Print For example, the pattern "*foo" is illegal as the '*' operator must modify a previously specified pattern element. No : type A colon was followed by an unknown modifier. Class terminates badly A character class "[...]" was incorrectly terminated. For example, "[A-]" is incorrect. Unterminated class Character classes must be terminated by ']'. Class too large An internal buffer filled. Empty class A character class must designate something: "[]" is illegal. Pattern too complex An internal buffer filled. AUTHOR: David Conroy, Martin Minow. BUGS: Tool Library Reference Manual Page 31 kwik Keyword in Context Index 12.0 Keyword in Context Index _______ __ _______ _____ ******** * kwik * ******** NAME: kwik -- Keyword in Context Index SYNOPSIS: kwik [options] [file ...] DESCRIPTION: Kwik constructs a keyword in context (kwik) index using the data in the named files, writing the resulting index to the standard output. The standard input is read if no files are specified; kwik may be used as a filter. The following options are defined: -s The kwik index normally excludes common (stop) words. Specifing the '-s' option empties the stop list, thus including the following words: a by in to an for of the and from on with -r Make the index in reverse alphabetic order. -t offset This is used to build index tables. The input is entered in the following format: nameindex text The kwik index will be output with the name in the left hand column. The kwik'ed text then follows. The '-t' option takes a mandatory argument: the column at which the first byte of the kwik'ed text should be placed. For example, the index for the Decus library documentation was produced by the following command: Tool Library Reference Manual Page 32 kwik Keyword in Context Index kwik -t 16 -w 64 outfile -x file_name The named file contains a user-specified exclusion (stopword) list. The '-x' option may be repeated if multiple exclusion lists are needed. Note that the order of the '-s' and '-x' options is important: kwik -x file The file contains an exclusion list, one word per line. Append the contents of the file to the default list. kwik -s -x file Replace the default stoplist by the contents of the named file. kwik -x file -s After reading the exclusion file, the entire stop list is erased. (This is not a useful procedure.) -w width The output line width is normally 80 characters. The '-w' option changes it to a user-specified value. DIAGNOSTICS: Usage ... Illegal options cause an extensive "help" message to be printed. Bad (width | offset) ... An illegal or out-of-range number was given as a parameter to a '-w' or '-t' option. Can't open exclude file Illegal exclusion An exclude file text line began with a non-printing character. The line is ignored. Out of space in saveexclude Tool Library Reference Manual Page 33 kwik Keyword in Context Index The program ran out of main memory when building the stop list. No index for ... Kwik was invoked in '-t' mode. Unfortunately, the indicated line was not in the format "name##text". The line is ignored. Cannot create temp file The sorts subroutine could not create its file. Out of space The sorts subroutine filled the available disk space. AUTHOR: David Conroy, Martin Minow IMPLEMENTATION: Kwik is linked together with sorts.obj. The program must be linked with a large enough stack space so that the sorts routine can operate correctly. The following seems to work correctly: tkb kwik=kwik,sorts,c:c/lb / stack = 2048 // BUGS: Tool Library Reference Manual Page 34 lex A Lexical Analyser Generator 13.0 A Lexical Analyser Generator _ _______ ________ _________ ******* * lex * ******* NAME: lex -- A Lexical Analyser Generator SYNOPSIS: lex [-options] [-i grammar] [-o outfile] [-t table] DESCRIPTION: Lex compiles a lexical analyser from a grammar and description of actions. It is described more fully in lex.doc: only usage is described. The following options are available: -a ?? (Not really documented in the code). This seems to either enable or disable 7-bit Ascii recognition. Try it for yourself. -d Enable debugging code within lex. This is not needed for ordinary use. -i file Read the grammar from the file. If "-i" is not specified, input will be read from the standard input. -o file Write the output to the file. If "-o" is not specified, output will be written to file "lextab.c". -t table Name the recognizer "table" instead of the default "lextab". If -o is not given, output will be written to file "table.c". -v [file] Verify -- write internal tables to the indicated file. If "-v" is given without a file name argument, tables will be written to "lex.out". This is needed for debugging lex. DIAGNOSTICS: Tool Library Reference Manual Page 35 lex A Lexical Analyser Generator The following error messages may occur on invocation. See lex documentation for information on compilation errors. Can't create. Cannot open. Illegal option. Table name too long. The table name (argument to "-t") may not be longer than 8 bytes. Missing table name. Missing input file. AUTHOR: Charles Forsyth BUGS: Tool Library Reference Manual Page 36 mc Multi-column Filter 14.0 Multi-column Filter ____________ ______ ****** * mc * ****** NAME: mc -- Multi-column Filter SYNOPSIS: mc [-options] file__list DESCRIPTION: Mc converts its input files to a multi-column format, writing all output to the standard output. If no input files are specified, the standard input is read. The following options may be used to control mc: -c value ( 2) Number of columns to output. -h value ( 60) Height (lines per page). -w value (132) Width (columns per line). DIAGNOSTICS: Unreasonable -c (value) or -w (value). Bad (option) specification. (Filename): cannot open. AUTHOR: David Conroy BUGS: Tool Library Reference Manual Page 37 mp Macro Pre-processor 15.0 Macro Pre-processor _____ _____________ ****** * mp * ****** NAME: mp -- Macro Pre-processor SYNOPSIS: mp [files] DESCRIPTION: Mp is a general pre-processor for C programs. It implements the full C pre-processor syntax: #line Ignored (needed for communication with program generators such as lex. #if Conditional compilation. #ifdef Conditional compilation. #else Conditional compilation. #endif Conditional compilation. #message Writes a message on the user terminal. #define Define a symbol or macro. #include (nested) source files. See Kernighan and Ritchie for details of the C source file format. On Decus C, the compiler preprocessor phase may be supressed by invoking the compiler with the "-m" switch: MP file.c (writes file.mpc) XCC file.mpc -m DIAGNOSTICS: ... many, should be self-explanatory. Tool Library Reference Manual Page 38 mp Macro Pre-processor AUTHOR: Robert W. Harper, Jr. Mp was distributed via the Unix user's group. BUGS: Tool Library Reference Manual Page 39 nc Multi-column Output 16.0 Multi-column Output ____________ ______ ****** * nc * ****** NAME: nc -- Multi-column Output SYNOPSIS: nc ncol [-linelength] DESCRIPTION: Nc reads the standard input, writing it to the standard output in columns. ( should range from 1 to 9.) If is missing, five columns will be output. If the linelength option is missing, an 80 column line will be assumed. Each column is, of course, / bytes wide. DIAGNOSTICS: None AUTHOR: David Conroy, Martin Minow BUGS: Why are there two programs to do the same thing? Tool Library Reference Manual Page 40 nm Print Object Module Symbol Names 17.0 Print Object Module Symbol Names _____ ______ ______ ______ _____ ****** * nm * ****** NAME: nm -- Print Object Module Symbol Names SYNOPSIS: nm [-options] file[.obj] DESCRIPTION: Nm (NameList) reads through an object file or a TKB symbol table and prints a list of all the symbols it finds. This is a reasonable alternative to load maps and is useful in determining what global symbols are defined or referenced by an object module. It has dozens of options. They are: -1 Output names in one column, default is four columns per line. -b Include RSX-11M control block symbols. These are of the form "x.xxxx", "x$xxxx", "xx.xxx", and "xx$xxx". Normally, these are supressed by nm. -c Include C compiler internal symbols. These begin with a "." and contain only digits. Normally supressed. -d Differences. The symbol table is sorted by address and the symbol value printed is the difference between it and the next symbol. This may be used to see how large each module is. -f Print symbols in file order. No sort is performed. -g Print only global symbols. The default is to print both globals and internals. -m Map Radix-50 "." to underscore for C symbols. -r Reverse the direction of the sort. Tool Library Reference Manual Page 41 nm Print Object Module Symbol Names -u Print undefined symbols. These are normally supressed. -v Sort by value; the default is sort by name. -x Print an inter-module cross reference list of all symbols defined in all input files. nm accepts multiple input file names. Names may contain wildcards. Note that, if compiled under RT11, nm accepts only "RT11-style" object modules, while, if compiled under RSX, nm accepts only "RSX-style" object modules. Vax native has never been tested; it might read RSX (compatiblity) modules, however. DIAGNOSTICS: "file name": cannot open "Usage: ..." This message is printed on illegal flags or other command errors. "file name": bad file format The input file was not in the necessary object-module format. This could mean that the program was compiled by the wrong operating system. Too many symbols Too many sections All errors are fatal. AUTHOR: David Conroy, Martin Minow BUGS: Tool Library Reference Manual Page 42 od Octal Dump 18.0 Octal Dump _____ ____ ****** * od * ****** NAME: od -- Octal Dump SYNOPSIS: od [-options] [-f blocknumber] [-l blocknumber] file DESCRIPTION: Od dumps binary files in human-readable format. The following options are defined: -a Dump ASCII characters -b Dump octal bytes -f # Set first record, default is 0 -l # Set last record, default is EOF -u Dump by block, even if record-oriented -w Dump octal words -x Dump hexadecimal bytes -5 Dump radix 50 words. If no format options are selected, od dumps records by words "-w". On RSX, OD defaults to record mode dumps. Use the -u switch to force a block mode dump. DIAGNOSTICS: "File name": Cannot open Usage ... BUGS: Tool Library Reference Manual Page 43 od Octal Dump od cannot is heavily dependent on Decus C libraries. It will not compile on vax-11 C. AUTHOR: David Conroy Tool Library Reference Manual Page 44 pr Print File With Line Numbers 19.0 Print File With Line Numbers _____ ____ ____ ____ _______ ****** * pr * ****** NAME: pr -- Print File With Line Numbers SYNOPSIS: pr file_list DESCRIPTION: Each file in the argument is printed. Each line of the output is numbered. DIAGNOSTICS: Couldn't open "file name" AUTHOR: Martin Minow BUGS: Tool Library Reference Manual Page 45 scat Concatenate Files 20.0 Concatenate Files ___________ _____ ******** * scat * ******** NAME: scat -- Concatenate Files SYNOPSIS: scat file_list DESCRIPTION: Scat performs a wild-card lookup on all files in the argument list. It sorts these on ascending file name, copying them, in that order, to stdout. Scat removes trailing blanks, tabs, and other control characters from the end of each line. DIAGNOSTICS: Unknown switch - ... Illegal file name ... Can't reopen file ... Bad file name ... Duplicate file name ... Too many files ... After wild-card expansion, the file name buffer filled. No room The program ran out of memory for the file name strings. AUTHOR: Martin Minow BUGS: Tool Library Reference Manual Page 46 scat Concatenate Files All files must be on the current network node. Tool Library Reference Manual Page 47 sortc Sort Data Files 21.0 Sort Data Files ____ ____ _____ ********* * sortc * ********* NAME: sortc -- Sort Data Files SYNOPSIS: sortc [-nr] [-o outfile] [file ...] DESCRIPTION: Sortc sorts all of the named files together and writes the result to the standard output. The standard input is sorted if no file names are supplied; sort may be used as a filter. The "-o" option causes the sorted output to be written to the named output file instead of to the standard output. The output file may be the same as one of the input files. The sort key is the entire line. Default ordering is lexicographic in ASCII collating sequence with upper and lower case considered different. The "-n" option changes the ordering to ascending arithmetic on a leading numeric string consisting of digits and an optional sign. The "-r" option reverses the sense of the comparisons. FILES: sort.tmp DIAGNOSITCS: The following messages occur on a non-severe error. SORTC will exit with "error" status. "?SORT-F-Cannot create temp. file" The required temporary file cannot be created in the current directory. "?SORT-F-Cannot open input file." Tool Library Reference Manual Page 48 sortc Sort Data Files An input file cannot be accessed for reading. "?SORT-F-Cannot create output file." An output file cannot be created for writing. "?SORT-F-Out of space." There was insufficient memory space for the sort. Tool Library Reference Manual Page 49 sortc Sort Data Files The following messages occur on a severe error. SORT will exit with "severe error" status. Get help. "?SORT-U-Stack overflow" "?SORT-U-Unexpected end of file" "?SORT-U-Empty run" "?SORT-U-Cannot reopen temp. file" AUTHOR: David Conroy Tim Coad and Bob Denny (Quicksort and Heapsort algorithm changes) BUGS: There should be a way to specify dictionary ordering and (user specified) sort fields. Tool Library Reference Manual Page 50 sorts Sort Utility Subroutines 22.0 Sort Utility Subroutines ____ _______ ___________ ********* * sorts * ********* NAME: sorts -- Sort Utility Subroutines SYNOPSIS: sorta(record) char *record; sorto(buffer) char **buffer; DESCRIPTION: Sorta() and sorto() comprise a general-purpose C-callable sort utility. There are no restrictions on file or item size. The routines are used as follows: sorta(record) Add the named record to the data to be sorted. After adding the last record, execute "sorta(NULL)" to terminate the data. sorto(buffer) Sort output: move the next (sorted) record into the buffer. Return "buffer" or NULL when all records have been returned. The routines are meant to be used in the following manner: while (next_datum()) { sorta(datum); } sorta(NULL); while (sorto(buffer)) { process(buffer); } After sorto() returns NULL, sorta() may be called to start a new sort sequence. Tool Library Reference Manual Page 51 sorts Sort Utility Subroutines Data is normally sorted in ascending Ascii order, using the entire record as the key. If this is not satisfactory, the following global symbols may be used to modify the sort: extern int sort_l; This value defines the maximum record length. It may be changed before calling sorta() for the first time. extern int (*sort_c)(); This defines the comparison function which, by default, is strcmp(). To call a user-provided function, the main program should contain: extern int (*sort_c)(); ... main() { extern int myfun(); (*sort_c)() = _&myfun; ... } ... int myfun(record1, record2) char *record1, *record2; /* * Compare records, returning * -1 record1 < record2 * 0 record1 == record2 * +1 record1 > record2 */ { ... } extern int sort_r; This flag reverses the sense of the sort. Thus, to sort in reverse alphanumeric order, the main program should contain: extern int sort_r; ... main() { ... sort_r = 1; } extern char *sort_f; Tool Library Reference Manual Page 52 sorts Sort Utility Subroutines This names the sort work file and may be changed if, for example, the file should be written to a private disk. It is used as follows: extern char *sort_f; ... main() { ... sort_f = "myfile.tmp"; } DIAGNOSTICS: SORTS-E-cannot create temp. file "filename" The required file cannot be created in the current directory. SORTS-E-out of space The program ran out of main memory. SORTS-E-Error NNNNNN writing temp. file The indicated error occurred when writing the temp. file. It is probably "out of space on the disk". The specific error code is given in octal. SORTS-F-Can't reopen temp. file SORTS-F-Empty run SORTS-F-Unexpected eof All error are fatal. "-E" errors are probably correctable by the user. "-F" errors are serious problems. If the user program defined its own comparison function, that should be checked for consistancy. AUTHOR: David Conroy, Martin Minow Revised by Bob Denny and Tim Coad BUGS: Tool Library Reference Manual Page 53 t Type File on Video Screen 23.0 Type File on Video Screen ____ ____ __ _____ ______ ***** * t * ***** NAME: t -- Type File on Video Screen SYNOPSIS: t [+cols_per_line] [-lines_per_screen] [file_list] DESCRIPTION: T writes a file, one screen at a time, on the user's terminal. The argument list may contain wildcard file specifiers. The optional lines_per_screen may be given to shorten the screen from its default of 24 lines. The optional cols_per_line parameter may be given to change the screen from its default width of 80 columns. Setting cols__per__line to zero supresses line wrap-around. After each screen has been printed, T waits for the user to type a single-letter command: or To get the next screen. or or '^' To back up one screen. 'P' To get the next page. 'F' To return to the first screen. 'B' To skip to the last screen. 'S' To search for a regular expression. 'E' or CTRL/Z To exit the program. 'X' To exit the current file. If the "next screen," "next page," or "backup" commands are preceeded by a number, T will skip the requested Tool Library Reference Manual Page 54 t Type File on Video Screen number of screens or pages. Negative skips are allowed: "-P" moves back one page. Note that , 0, and 1 are equivalent. All other characters will be ignored. The 'P' command skips to the next page (as delimited by form-feeds). The 'B' command is equivalent to 32767. As T must scan the file byte-by-byte, the 'B' command may seem slow. Search arguments are regular expressions (as defined in the grep program). If you enter '?' when prompted for a search argument, a help screen will be printed. Backward searching is not possible. Note that T works only on video terminals. If no file_list is specified, T prompts for each file. If a file_list argument lacks an explicit extension, ".*" will be used; thus "T#X" is equivalent to "T X.*". The program will only backup to the built-in maximum of 100 screens. T will erase underline and boldface information from the text if it occurs in the following format (where 'X' is any character and '\b' is backspace): X\b_ for underline and X\bX... for boldface If an embedded carriage return (for line-overprint) is encountered, all text following the return will be ignored. T converts characters in the text file to "". This was done to defend against escape sequences triggering user terminal identification sequences (which could, for example, cause the program to backup one screen). DIAGNOSTICS: Sorry, t works only on video terminals. Can't open file "name". AUTHOR: Tool Library Reference Manual Page 55 t Type File on Video Screen Martin Minow BUGS: Neither input nor output may be redirected. T cannot be used as a filter. If a skip or backup command fails (for example, if the input file is not on a disk), the program will exit with an error message. When running T from a remote (DECnet) terminal, you should use to request the next page and or to request the previous page. Tool Library Reference Manual Page 56 today Date and Time in English 24.0 Date and Time in English ____ ___ ____ __ _______ ********* * today * ********* NAME: today -- Date and Time in English SYNOPSIS: today [-] [x] | [date] DESCRIPTION: Today prints the date, time, and phase of the moon in English. The following options are available: - or x Read date strings from the standard input file. date Print information for the indicated date. Date and time information is given in ISO numeric notation. For example, November 6, 1980 would be represented as "801106". If a time is needed, it would be appended to the date, using 24-hour notation: "801106110402" would be a time which is exact to the second. To specify the century, the two-digit century number may be prepended as "+18801106". Non-numeric separators between the various fields are permitted: "+1776.07.04-11:15:21". Note that the full two digit entry must be given. If no parameter is given, today outputs the current date and time. DIAGNOSTICS: Bad parameters or date out of range in ... An input date or time is incorrect. AUTHOR: Martin Minow BUGS: Tool Library Reference Manual Page 57 today Date and Time in English The algorithm is only valid for the Gregorian calender. Tool Library Reference Manual Page 58 uniq Print Unique Lines in a File 25.0 Print Unique Lines in a File _____ ______ _____ __ _ ____ ******** * uniq * ******** NAME: uniq -- Print Unique Lines in a File SYNOPSIS: uniq [-options] [-fields] [+letters] [ input [output] ] DESCRIPTION: Uniq reads an input file, writing each unique line. The following options are defined: -u Only print unique lines. -d Only print duplicate lines. -c Print the number of times each line occurred along with the line. -N Skip over the first N words before checking for uniqueness. +N Skip over the first N letters (in the indicated field). Note that fields are skipped before letters. N Compare only N letters. A word is defined as "optional spaces or tabs" followed by text up to the first space, tab, or end of line. If the output file is not specified, uniq will write to the standard output. If the input file is not specified, uniq will read from the standard input. For an on-line help message, execute: uniq ? DIAGNOSTICS: Can't open input file "name" Tool Library Reference Manual Page 59 uniq Print Unique Lines in a File Can't open output file "name" AUTHOR: Martin Minow BUGS: It would be nice if you could output all instances of duplicated lines -- especially if you skip fields. Tool Library Reference Manual Page 60 wc Word Count 26.0 Word Count ____ _____ ****** * wc * ****** NAME: wc -- Word Count SYNOPSIS: wc [name ...] DESCRIPTION: Count the number of bytes, words, and lines in one or more files. Wc accepts wild-card file name arguments. DIAGNOSTICS: "file name": cannot open "file name": illegal file name AUTHOR: Martin Minow BUGS: Tool Library Reference Manual Page 61 xrf Cross-Reference Lister for C Programs 27.0 Cross-Reference Lister for C Programs _______________ ______ ___ _ ________ ******* * xrf * ******* NAME: xrf -- Cross-Reference Lister for C Programs SYNOPSIS: xrf [-options] [-o outfile] [file ...] DESCRIPTION: Xrf prepares a cross-reference listing for C source programs. The following options are defined: -n Narrow output (80 columns). The default is 132 columns. -s Spool output to the default line printer. -o file Write output to the named file. The default is the first input file encountered with a filetype (extension) of ".x". Xrf accepts wild-card file input. DIAGNOSTICS: Trying to get too much. Internal error, get help. Not enough memory space. Xrf ran out of main memory space. Cannot open "file" Cannot open listing file "file" Usage ... AUTHOR: Robert B. Denny Tool Library Reference Manual Page 62 xrf Cross-Reference Lister for C Programs BUGS: APPENDIX A TOOL INDEX The following is a keyword in context index to the Decus C tools. The entry in the left-hand column is the title of the routine in the main library documentation. lex A Lexical Analyser Generator ar text file archiver echo Output Echo Arguments to Standard getkwk Build Keyword Index getcmd Decus C Build command files for build files Build compilation command wc Count Words, Lines, and Bytes in Files getcmd command files for Decus C Build xrf Lister for C Programs Cross-Reference mp Macro Pre-processor for C programs build Build compilation command files getcmd Build command files for Decus C getrno Format Convert Comments To Runoff Source comm Compare Files for Equality diff Differential File Comparison build Build compilation command files scat Concatenate Files kwik Keyword in Context Index getrno Source Format Convert Comments To Runoff wc Bytes in Files Count Words, Lines, and xrf C Programs Cross-Reference Lister for sortc Sort Data Files today Date and Time in English getcmd Build command files for Decus C diff Comparison Differential File od od Octal Dump echo Output Echo Arguments to Standard today Date and Time in English comm Compare Files for Equality grep Get Regular Expression and Print uniq Print Unique Lines in a File diff Differential File Comparison pr Print File With Line Numbers t Type File on Video Screen ar text file archiver C Compiler and Library Page A-2 Tool Index scat Concatenate Files wc Lines, and Bytes in Files Count Words, sortc Sort Data Files comm Compare Files for Equality build compilation command files Build fixdoc Fix runoff output files getcmd Build command files for Decus C mc Multi-column Filter fixdoc Fix runoff output files getrno To Runoff Source Format Convert Comments lex A Lexical Analyser Generator grep Print Get Regular Expression and getkwk Build Keyword Index kwik Keyword in Context Index getkwk Build Keyword Index kwik Keyword in Context Index lex A Lexical Analyser Generator pr Print File With Line Numbers uniq Print Unique Lines in a File wc Count Words, Lines, and Bytes in Files xrf Cross-Reference Lister for C Programs mp programs Macro Pre-processor for C nm nm Print Object Module Symbol Names mc Multi-column Filter nc Multi-column Output nm Object Module Symbol Names nm Print nm Symbol Names nm Print Object Module pr Print File With Line Numbers nm nm Print Object Module Symbol Names od od Octal Dump od od Octal Dump echo Arguments to Standard Output Echo nc Multi-column Output fixdoc Fix runoff output files mp programs Macro Pre-processor for C grep Regular Expression and Print Get pr Numbers Print File With Line nm Names nm Print Object Module Symbol uniq File Print Unique Lines in a xrf Lister for C Programs Cross-Reference mp Pre-processor for C programs Macro grep Print Get Regular Expression and getrno Convert Comments To Runoff Source Format fixdoc Fix runoff output files t Type File on Video Screen sortc Sort Data Files sorts Sort Utility Subroutines getrno Comments To Runoff Source Format Convert echo Echo Arguments to Standard Output sorts Sort Utility Subroutines nm nm Print Object Module Symbol Names ar text file archiver today Date and Time in English C Compiler and Library Page A-3 Tool Index t Type File on Video Screen uniq Print Unique Lines in a File sorts Sort Utility Subroutines t Type File on Video Screen wc Files Count Words, Lines, and Bytes in