home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource3 / 112_01 / nro.doc < prev    next >
Encoding:
Text File  |  1985-08-21  |  15.3 KB  |  331 lines

  1.  
  2.  
  3.      NRO (1)                    CP/M Version 2.2                    NRO (1)
  4.  
  5.  
  6.  
  7.  
  8.      NAME   
  9.      NAME 
  10.           nro - text processor 
  11.  
  12.  
  13.      SYNOPSIS   
  14.      SYNOPSIS 
  15.           nro   n    n    pxx    v    b    mmfile  ifile       ofile    
  16.           nro [-n] [+n] [-pxx] [-v] [-b] [-mmfile] ifile ... [>ofile] 
  17.  
  18.  
  19.      DESCRIPTION   
  20.      DESCRIPTION 
  21.           ___                                                           
  22.           NRO  is  a  text processor and formatter based on the design
  23.                         Software Tools                                   
  24.           provided in  "Software Tools" by Kernighan and Plauger.  The 
  25.                                           ________                      
  26.           text and commands found in the  ifile(s)  are  processed  to
  27.           generate formatted  text.  The output may be directed into a
  28.                                     _____                               
  29.           file or to the printer if ofile is present  in  the  command
  30.           line;   otherwise,  the  output  will  appear  at  the  user
  31.                                                                     P   
  32.           console.  Directing the output to the special filename,  $P,
  33.           will cause the output to be sent to the printer.  
  34.  
  35.  
  36.                _                                               _        
  37.           The +n  option  causes the output to start with page n.  The
  38.            _                                             _     
  39.           -n option causes the output to stop after page n.  
  40.  
  41.  
  42.                _                                                     
  43.           The -v option prints the version number to the console.  
  44.  
  45.  
  46.                _                                                        
  47.           The -p option causes the output to be shifted to  the  right
  48.              __                                           po             
  49.           by xx spaces.  This has the same effect as the .po command.  
  50.  
  51.  
  52.                _                                                         
  53.           The -b option allows backspaces to appear in the output text 
  54.           when underlining  or overstriking.  This has the same effect
  55.                   bs                                      
  56.           as the .bs command with a non-zero argument.  
  57.  
  58.  
  59.                 _                                  _____                
  60.           The  -m  option  processes  the   file   mfile   for   macro
  61.           definitions.   Note  that files processed in this way should
  62.           contain only macro definitions, no immediate  output  should
  63.           be generated from this file.  
  64.  
  65.  
  66.           Commands  typically  are distinguished by a period in column
  67.           one of the input followed by a  two  character  abbreviation
  68.           for the  command  funtion.    The  abbreviation  may then be
  69.           followed by an optional numeric or character argument.   The
  70.           numeric  argument  may  be an absolute value such as setting
  71.           the right margin to a particular column, or the argument may 
  72.           be preceded by a plus sign or a minus sign to indicate  that
  73.           the  parameter  should  be  modified  relative to a previous
  74.           setting.  The following commands are recognized: 
  75.  
  76.  
  77.           .bo - causes the following lines of text to appear in 
  78.                 boldface.  The optional argument specifies the number 
  79.                 of lines to be typed in boldface.  Boldface and 
  80.                 underlining are mutually exclusive features.  The 
  81.                 appearance of a boldface command will cause any 
  82.                 underlining to cease.  
  83.  
  84.  
  85.           .bp - causes succeeding text to appear at the top of a new 
  86.                 page.  The optional argument specifies the page number 
  87.                 for the new page.  The initial value is one and the 
  88.                 default value is one more than the previous page 
  89.                 number.  
  90.  
  91.  
  92.           .br - causes succeeding text to start on a new line at the 
  93.  
  94.  
  95.  
  96.                                       -1-
  97.  
  98.  
  99.  
  100.      NRO (1)                    CP/M Version 2.2                    NRO (1)
  101.  
  102.  
  103.  
  104.                 current left margin.  There is no numeric argument for 
  105.                 this command.  
  106.  
  107.  
  108.           .bs - enables or disables the appearance of backspaces in 
  109.                 the output text.  Underlining and boldface options are 
  110.                 implemented by inserting character - backspace - 
  111.                 character combinations into the output buffer.  This 
  112.                 is fine for devices which properly recognize the 
  113.                 backspace character.  Some printers, however, do not 
  114.                 recognize backspaces, so the option is provided to 
  115.                 overprint one line buffer with another.  The first 
  116.                 line buffer is terminated with just a carriage return 
  117.                 rather than the carriage return - linefeed 
  118.                 combination.  A zero argument or no argument to the 
  119.                 backspace command removes backspaces from the output.  
  120.                 A non-zero argument leaves them in the output.  The 
  121.                 default is to remove backspaces.  
  122.  
  123.  
  124.                             ___                                          
  125.           .cc - changes the NRO command character to that specified by 
  126.                 the character argument.  If no argument is provided, 
  127.                 the default is a period.  
  128.  
  129.  
  130.           .ce - causes the next line of text to appear centered on the 
  131.                 output.  The optional argument specifies if more than 
  132.                 one line is to be centered.  
  133.  
  134.  
  135.           .de - causes all text and commands following to be used to 
  136.                                                                     en   
  137.                 define a macro.  The definition is terminated by a .en 
  138.                 command.  The first two characters of the argument 
  139.                                de                                      
  140.                 following the .de command become the name of the new 
  141.                 command.  It should be noted that upper and lower case 
  142.                 arguments are considered different.  Thus, the 
  143.                           PP      pp                              
  144.                 commands .PP and .pp could define two different 
  145.                 macros.  Care should be exercised since existing 
  146.                 commands may be redefined.  
  147.  
  148.  
  149.                 A macro may contain up to ten arguments.  In the macro 
  150.                 definition, the placement of arguments is designated 
  151.                 by the two character sequences, $0, $1, ... $9.  When 
  152.                 the macro is invoked, each argument of the macro 
  153.                 command line is substituted for its corresponding 
  154.                 designator in the expansion.  The first argument of 
  155.                 the macro command is substituted for the $0 in the 
  156.                 expansion, the second argument for the $1, and so 
  157.                 forth.  Arguments are typically strings which do not 
  158.                 contain blanks or tabs.  If an argument is to contain 
  159.                 blanks, then it should be surrounded by either single 
  160.                 or double quotes.  
  161.  
  162.  
  163.           .cu - causes the next line(s) of text to be continuously 
  164.                                                                 ul    
  165.                 underlined.  Unlike the underline command (see .ul) 
  166.                 which underlines only alphanumerics, continuous 
  167.                 underlining underlines all printable characters.  The 
  168.                 optional argument specifies the number of lines of 
  169.                 text to underlined.  Any normal underlining or 
  170.                 boldface commands currently in effect will be 
  171.                 terminated.  
  172.  
  173.  
  174.  
  175.  
  176.                                       -2-
  177.  
  178.  
  179.  
  180.      NRO (1)                    CP/M Version 2.2                    NRO (1)
  181.  
  182.  
  183.  
  184.           .ef - specifies the text for the footer on even numbered 
  185.                 pages.  The format is the same as for the footer 
  186.                               fo      
  187.                 command (see .fo).  
  188.  
  189.  
  190.           .eh - specifies the text for the header on even numbered 
  191.                 pages.  The format is the same as for the footer 
  192.                               fo      
  193.                 command (see .fo).  
  194.  
  195.  
  196.           .en - designates the end of a macro definition.  
  197.  
  198.  
  199.           .fi - causes the input text to be rearranged or filled to 
  200.                 obtain the maximum word count possible between the 
  201.                 previously set left and right margins.  No argument is 
  202.                 expected.  
  203.  
  204.  
  205.           .fo - specifies text to be used for a footer.  The footer 
  206.                 text contains three strings seperated by a delimiter 
  207.                 character.  The first non-blank character following 
  208.                 the command is designated as the delimiter.  The first 
  209.                 text string is left justified to the current 
  210.                                                  in                 
  211.                 indentation value (specified by .in).  The second 
  212.                 string is centered between the current indentation 
  213.                 value and the current right margin value (specified by 
  214.                  rm                                                 
  215.                 .rm).  The third string is right justified to the 
  216.                 current right margin value.  The absence of footer 
  217.                 text will result in the footer being printed as one 
  218.                 blank line.  The presence of the page number character 
  219.                          pc                                              
  220.                 (set by .pc) in the footer text results in the current 
  221.                 page number being inserted at that position.  Multiple 
  222.                 occurrances of the page number character are allowed.  
  223.  
  224.  
  225.           .he - specifies text to be used for a header.  The format is 
  226.                                                  fo      
  227.                 the same as for the footer (see .fo).  
  228.  
  229.  
  230.           .in - indents the left margin to the column value specified 
  231.                 by the argument.  The default left margin is set to 
  232.                 zero.  
  233.  
  234.  
  235.           .ju - causes blanks to be inserted between words in a line 
  236.                 of output in order to align or justify the right 
  237.                 margin.  The default is to justify.  
  238.  
  239.  
  240.           .ls - sets the line spacing to the value specified by the 
  241.                 argument.  The default is for single spacing.  
  242.  
  243.  
  244.           .m1 - specifies the number of lines in the header margin.  
  245.                 This is the space from the physical top of page to and 
  246.                 including the header text.  A value of zero causes the 
  247.                 header to not be printed.  A value of one causes the 
  248.                 header to appear at the physical top of page.  Larger 
  249.                 argument values cause the appropriate number of blank 
  250.                 lines to appear before the header is printed.  
  251.  
  252.  
  253.           .m2 - specifies the number of blank lines to be printed 
  254.                 between the header line and the first line of the 
  255.                 processed text.  
  256.  
  257.  
  258.           .m3 - specifies the number of blank lines to be printed 
  259.  
  260.  
  261.  
  262.                                       -3-
  263.  
  264.  
  265.  
  266.      NRO (1)                    CP/M Version 2.2                    NRO (1)
  267.  
  268.  
  269.  
  270.                 between the last line of processed text and the footer 
  271.                 line.  
  272.  
  273.  
  274.           .m4 - specifies the number of lines in the footer margin.  
  275.                                                                   m1   
  276.                 This command affects the footer the same way the .m1 
  277.                 command affects the header.  
  278.  
  279.  
  280.           .ne - specifies a number of lines which should not be broken 
  281.                 across a page boundary.  If the number of lines 
  282.                 remaining on a page is less than the value needed, 
  283.                 then a new output page is started.  
  284.  
  285.  
  286.           .nf - specifies that succeeding text should be printed 
  287.                 without rearrangement, or with no fill.  No argument 
  288.                 is expected.  
  289.  
  290.  
  291.           .nj - specifies that no attempt should be made to align or 
  292.                 justify the right margin.  No argument is expected.  
  293.  
  294.  
  295.           .nr - causes the value of a number register to be set or 
  296.                 modified.  A total of twenty-six number registers are 
  297.                 available designated @na through @nz (either upper or 
  298.                 lower case is allowed).  When the sequence @nc is 
  299.                 imbedded in the text, the current value of number 
  300.                 register c replaces the sequence, thus, such things as 
  301.                 paragraph numbering can be accomplished with relative 
  302.                 ease.  
  303.  
  304.  
  305.           .of - specifies the text for the footer on odd numbered 
  306.                 pages.  The format is the same as the footer command 
  307.                       fo      
  308.                 (see .fo).  
  309.  
  310.  
  311.           .oh - specifies the text for the header on odd numbered 
  312.                 pages.  The format is the same as the footer command 
  313.                       fo      
  314.                 (see .fo).  
  315.  
  316.  
  317.           .pc - specifies the page number character to be used in 
  318.                 headers and footers.  The occurrance of this character 
  319.                 in the header or footer text results in the current 
  320.                 page number being printed.  The default for this 
  321.                 character is the hash mark (#).  
  322.  
  323.  
  324.           .pl - specifies the page lenght or the number of lines per 
  325.                 output page.  The default is sixty-six.  
  326.  
  327.  
  328.           .po - specifies a page offset value.  This allows the 
  329.                 formatted text to be shifted to the right by the 
  330.                 number of spaces specified.  This feature may also be 
  331.                 invoked by a switch on the command line.  
  332.  
  333.  
  334.           .rm - sets the column value for the right margin.  The 
  335.                 default is eighty.  
  336.  
  337.  
  338.           .so - causes input to be retrieved from the file specified 
  339.                 by the command's character string argument.  The 
  340.                 contents of the new file are inserted into the output 
  341.                 stream until an EOF is detected.  Processing of the 
  342.                 original file is then resumed.  Command nesting is 
  343.  
  344.  
  345.  
  346.                                       -4-
  347.  
  348.  
  349.  
  350.      NRO (1)                    CP/M Version 2.2                    NRO (1)
  351.  
  352.  
  353.  
  354.                 allowed.  
  355.  
  356.  
  357.           .sp - specifies a number of blank lines to be output before 
  358.                 printing the next line of text.  
  359.  
  360.  
  361.           .ti - temporarily alters the indentation or left margin 
  362.                 value for a single succeeding line of text.  
  363.  
  364.  
  365.           .ul - underlines the alphanumeric text in the following 
  366.                 line(s).  The optional argument specifies the number 
  367.                 of lines to be underlined.  Underlining and boldface 
  368.                 are mutually exclusive features.  The appearance of an 
  369.                 underline command cancels any existing boldface 
  370.                 operations.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.                                       -5-
  419.  
  420.  
  421.          stream until an EOF is d