home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 264_01 / nro.doc < prev    next >
Encoding:
Text File  |  1979-12-31  |  15.6 KB  |  331 lines

  1.  
  2.  
  3.      NRO (1)                   MS-DOS Version 3.2                   NRO (1)
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.      NAME   
  11.      NAME 
  12.  
  13.           nro - text processor 
  14.  
  15.  
  16.  
  17.      SYNOPSIS   
  18.      SYNOPSIS 
  19.  
  20.           nro   n    n    pxx    v    b    mmfile  ifile       ofile    
  21.           nro [-n] [+n] [-pxx] [-v] [-b] [-mmfile] ifile ... [>ofile] 
  22.  
  23.  
  24.  
  25.      DESCRIPTION   
  26.      DESCRIPTION 
  27.  
  28.           ___                                                           
  29.           NRO  is  a  text processor and formatter based on the design
  30.  
  31.                         Software Tools                                   
  32.           provided in  "Software Tools" by Kernighan and Plauger.  The 
  33.  
  34.                                           ________                      
  35.           text and commands found in the  ifile(s)  are  processed  to
  36.  
  37.           generate formatted  text.  The output may be directed into a
  38.  
  39.                                     _____                               
  40.           file or to the printer if ofile is present  in  the  command
  41.  
  42.           line;   otherwise,  the  output  will  appear  at  the  user
  43.  
  44.                                                                     P   
  45.           console.  Directing the output to the special filename,  $P,
  46.  
  47.           will cause the output to be sent to the printer.  
  48.  
  49.  
  50.  
  51.                _                                               _        
  52.           The +n  option  causes the output to start with page n.  The
  53.  
  54.            _                                             _     
  55.           -n option causes the output to stop after page n.  
  56.  
  57.  
  58.  
  59.                _                                                     
  60.           The -v option prints the version number to the console.  
  61.  
  62.  
  63.  
  64.                _                                                        
  65.           The -p option causes the output to be shifted to  the  right
  66.  
  67.              __                                           po             
  68.           by xx spaces.  This has the same effect as the .po command.  
  69.  
  70.  
  71.  
  72.                _                                                         
  73.           The -b option allows backspaces to appear in the output text 
  74.  
  75.           when underlining  or overstriking.  This has the same effect
  76.  
  77.                   bs                                      
  78.           as the .bs command with a non-zero argument.  
  79.  
  80.  
  81.  
  82.                 _                                  _____                
  83.           The  -m  option  processes  the   file   mfile   for   macro
  84.  
  85.           definitions.   Note  that files processed in this way should
  86.  
  87.           contain only macro definitions, no immediate  output  should
  88.  
  89.           be generated from this file.  
  90.  
  91.  
  92.  
  93.           Commands  typically  are distinguished by a period in column
  94.  
  95.           one of the input followed by a  two  character  abbreviation
  96.  
  97.           for the  command  funtion.    The  abbreviation  may then be
  98.  
  99.           followed by an optional numeric or character argument.   The
  100.  
  101.           numeric  argument  may  be an absolute value such as setting
  102.  
  103.           the right margin to a particular column, or the argument may 
  104.  
  105.           be preceded by a plus sign or a minus sign to indicate  that
  106.  
  107.           the  parameter  should  be  modified  relative to a previous
  108.  
  109.           setting.  The following commands are recognized: 
  110.  
  111.  
  112.  
  113.           .bo - causes the following lines of text to appear in 
  114.  
  115.                 boldface.  The optional argument specifies the number 
  116.  
  117.                 of lines to be typed in boldface.  Boldface and 
  118.  
  119.                 underlining are mutually exclusive features.  The 
  120.  
  121.                 appearance of a boldface command will cause any 
  122.  
  123.                 underlining to cease.  
  124.  
  125.  
  126.  
  127.           .bp - causes succeeding text to appear at the top of a new 
  128.  
  129.                 page.  The optional argument specifies the page number 
  130.  
  131.                 for the new page.  The initial value is one and the 
  132.  
  133.                 default value is one more than the previous page 
  134.  
  135.                 number.  
  136.  
  137.  
  138.  
  139.           .br - causes succeeding text to start on a new line at the 
  140.  
  141.  
  142.  
  143.  
  144.                                       -1-
  145.  
  146.  
  147.  
  148.  
  149.  
  150.      NRO (1)                   MS-DOS Version 3.2                   NRO (1)
  151.  
  152.  
  153.  
  154.  
  155.                 current left margin.  There is no numeric argument for 
  156.  
  157.                 this command.  
  158.  
  159.  
  160.  
  161.           .bs - enables or disables the appearance of backspaces in 
  162.  
  163.                 the output text.  Underlining and boldface options are 
  164.  
  165.                 implemented by inserting character - backspace - 
  166.  
  167.                 character combinations into the output buffer.  This 
  168.  
  169.                 is fine for devices which properly recognize the 
  170.  
  171.                 backspace character.  Some printers, however, do not 
  172.  
  173.                 recognize backspaces, so the option is provided to 
  174.  
  175.                 overprint one line buffer with another.  The first 
  176.  
  177.                 line buffer is terminated with just a carriage return 
  178.  
  179.                 rather than the carriage return - linefeed 
  180.  
  181.                 combination.  A zero argument or no argument to the 
  182.  
  183.                 backspace command removes backspaces from the output.  
  184.  
  185.                 A non-zero argument leaves them in the output.  The 
  186.  
  187.                 default is to remove backspaces.  
  188.  
  189.  
  190.  
  191.                             ___                                          
  192.           .cc - changes the NRO command character to that specified by 
  193.  
  194.                 the character argument.  If no argument is provided, 
  195.  
  196.                 the default is a period.  
  197.  
  198.  
  199.  
  200.           .ce - causes the next line of text to appear centered on the 
  201.  
  202.                 output.  The optional argument specifies if more than 
  203.  
  204.                 one line is to be centered.  
  205.  
  206.  
  207.  
  208.           .de - causes all text and commands following to be used to 
  209.  
  210.                                                                     en   
  211.                 define a macro.  The definition is terminated by a .en 
  212.  
  213.                 command.  The first two characters of the argument 
  214.  
  215.                                de                                      
  216.                 following the .de command become the name of the new 
  217.  
  218.                 command.  It should be noted that upper and lower case 
  219.  
  220.                 arguments are considered different.  Thus, the 
  221.  
  222.                           PP      pp                              
  223.                 commands .PP and .pp could define two different 
  224.  
  225.                 macros.  Care should be exercised since existing 
  226.  
  227.                 commands may be redefined.  
  228.  
  229.  
  230.  
  231.                 A macro may contain up to ten arguments.  In the macro 
  232.  
  233.                 definition, the placement of arguments is designated 
  234.  
  235.                 by the two character sequences, $0, $1, ... $9.  When 
  236.  
  237.                 the macro is invoked, each argument of the macro 
  238.  
  239.                 command line is substituted for its corresponding 
  240.  
  241.                 designator in the expansion.  The first argument of 
  242.  
  243.                 the macro command is substituted for the $0 in the 
  244.  
  245.                 expansion, the second argument for the $1, and so 
  246.  
  247.                 forth.  Arguments are typically strings which do not 
  248.  
  249.                 contain blanks or tabs.  If an argument is to contain 
  250.  
  251.                 blanks, then it should be surrounded by either single 
  252.  
  253.                 or double quotes.  
  254.  
  255.  
  256.  
  257.           .cu - causes the next line(s) of text to be continuously 
  258.  
  259.                                                                 ul    
  260.                 underlined.  Unlike the underline command (see .ul) 
  261.  
  262.                 which underlines only alphanumerics, continuous 
  263.  
  264.                 underlining underlines all printable characters.  The 
  265.  
  266.                 optional argument specifies the number of lines of 
  267.  
  268.                 text to underlined.  Any normal underlining or 
  269.  
  270.                 boldface commands currently in effect will be 
  271.  
  272.                 terminated.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.                                       -2-
  280.  
  281.  
  282.  
  283.  
  284.  
  285.      NRO (1)                   MS-DOS Version 3.2                   NRO (1)
  286.  
  287.  
  288.  
  289.  
  290.           .ef - specifies the text for the footer on even numbered 
  291.  
  292.                 pages.  The format is the same as for the footer 
  293.  
  294.                               fo      
  295.                 command (see .fo).  
  296.  
  297.  
  298.  
  299.           .eh - specifies the text for the header on even numbered 
  300.  
  301.                 pages.  The format is the same as for the footer 
  302.  
  303.                               fo      
  304.                 command (see .fo).  
  305.  
  306.  
  307.  
  308.           .en - designates the end of a macro definition.  
  309.  
  310.  
  311.  
  312.           .fi - causes the input text to be rearranged or filled to 
  313.  
  314.                 obtain the maximum word count possible between the 
  315.  
  316.                 previously set left and right margins.  No argument is 
  317.  
  318.                 expected.  
  319.  
  320.  
  321.  
  322.           .fo - specifies text to be used for a footer.  The footer 
  323.  
  324.                 text contains three strings seperated by a delimiter 
  325.  
  326.                 character.  The first non-blank character following 
  327.  
  328.                 the command is designated as the delimiter.  The first 
  329.  
  330.                 text string is left justified to the current 
  331.  
  332.                                                  in                 
  333.                 indentation value (specified by .in).  The second 
  334.  
  335.                 string is centered between the current indentation 
  336.  
  337.                 value and the current right margin value (specified by 
  338.  
  339.                  rm                                                 
  340.                 .rm).  The third string is right justified to the 
  341.  
  342.                 current right margin value.  The absence of footer 
  343.  
  344.                 text will result in the footer being printed as one 
  345.  
  346.                 blank line.  The presence of the page number character 
  347.  
  348.                          pc                                              
  349.                 (set by .pc) in the footer text results in the current 
  350.  
  351.                 page number being inserted at that position.  Multiple 
  352.  
  353.                 occurrances of the page number character are allowed.  
  354.  
  355.  
  356.  
  357.           .he - specifies text to be used for a header.  The format is 
  358.  
  359.                                                  fo      
  360.                 the same as for the footer (see .fo).  
  361.  
  362.  
  363.  
  364.           .in - indents the left margin to the column value specified 
  365.  
  366.                 by the argument.  The default left margin is set to 
  367.  
  368.                 zero.  
  369.  
  370.  
  371.  
  372.           .ju - causes blanks to be inserted between words in a line 
  373.  
  374.                 of output in order to align or justify the right 
  375.  
  376.                 margin.  The default is to justify.  
  377.  
  378.  
  379.  
  380.           .ls - sets the line spacing to the value specified by the 
  381.  
  382.                 argument.  The default is for single spacing.  
  383.  
  384.  
  385.  
  386.           .m1 - specifies the number of lines in the header margin.  
  387.  
  388.                 This is the space from the physical top of page to and 
  389.  
  390.                 including the header text.  A value of zero causes the 
  391.  
  392.                 header to not be printed.  A value of one causes the 
  393.  
  394.                 header to appear at the physical top of page.  Larger 
  395.  
  396.                 argument values cause the appropriate number of blank 
  397.  
  398.                 lines to appear before the header is printed.  
  399.  
  400.  
  401.  
  402.           .m2 - specifies the number of blank lines to be printed 
  403.  
  404.                 between the header line and the first line of the 
  405.  
  406.                 processed text.  
  407.  
  408.  
  409.  
  410.           .m3 - specifies the number of blank lines to be printed 
  411.  
  412.  
  413.  
  414.  
  415.                                       -3-
  416.  
  417.  
  418.  
  419.  
  420.  
  421.      NRO (1)                   MS-DOS Version 3.2                   NRO (1)
  422.  
  423.  
  424.  
  425.  
  426.                 between the last line of processed text and the footer 
  427.  
  428.                 line.  
  429.  
  430.  
  431.  
  432.           .m4 - specifies the number of lines in the footer margin.  
  433.  
  434.                                                                   m1   
  435.                 This command affects the footer the same way the .m1 
  436.  
  437.                 command affects the header.  
  438.  
  439.  
  440.  
  441.           .ne - specifies a number of lines which should not be broken 
  442.  
  443.                 across a page boundary.  If the number of lines 
  444.  
  445.                 remaining on a page is less than the value needed, 
  446.  
  447.                 then a new output page is started.  
  448.  
  449.  
  450.  
  451.           .nf - specifies that succeeding text should be printed 
  452.  
  453.                 without rearrangement, or with no fill.  No argument 
  454.  
  455.                 is expected.  
  456.  
  457.  
  458.  
  459.           .nj - specifies that no attempt should be made to align or 
  460.  
  461.                 justify the right margin.  No argument is expected.  
  462.  
  463.  
  464.  
  465.           .nr - causes the value of a number register to be set or 
  466.  
  467.                 modified.  A total of twenty-six number registers are 
  468.  
  469.                 available designated @na through @nz (either upper or 
  470.  
  471.                 lower case is allowed).  When the sequence @nc is 
  472.  
  473.                 imbedded in the text, the current value of number 
  474.  
  475.                 register c replaces the sequence, thus, such things as 
  476.  
  477.                 paragraph numbering can be accomplished with relative 
  478.  
  479.                 ease.  
  480.  
  481.  
  482.  
  483.           .of - specifies the text for the footer on odd numbered 
  484.  
  485.                 pages.  The format is the same as the footer command 
  486.  
  487.                       fo      
  488.                 (see .fo).  
  489.  
  490.  
  491.  
  492.           .oh - specifies the text for the header on odd numbered 
  493.  
  494.                 pages.  The format is the same as the footer command 
  495.  
  496.                       fo      
  497.                 (see .fo).  
  498.  
  499.  
  500.  
  501.           .pc - specifies the page number character to be used in 
  502.  
  503.                 headers and footers.  The occurrance of this character 
  504.  
  505.                 in the header or footer text results in the current 
  506.  
  507.                 page number being printed.  The default for this 
  508.  
  509.                 character is the hash mark (#).  
  510.  
  511.  
  512.  
  513.           .pl - specifies the page lenght or the number of lines per 
  514.  
  515.                 output page.  The default is sixty-six.  
  516.  
  517.  
  518.  
  519.           .po - specifies a page offset value.  This allows the 
  520.  
  521.                 formatted text to be shifted to the right by the 
  522.  
  523.                 number of spaces specified.  This feature may also be 
  524.  
  525.                 invoked by a switch on the command line.  
  526.  
  527.  
  528.  
  529.           .rm - sets the column value for the right margin.  The 
  530.  
  531.                 default is eighty.  
  532.  
  533.  
  534.  
  535.           .so - causes input to be retrieved from the file specified 
  536.  
  537.                 by the command's character string argument.  The 
  538.  
  539.                 contents of the new file are inserted into the output 
  540.  
  541.                 stream until an EOF is detected.  Processing of the 
  542.  
  543.                 original file is then resumed.  Command nesting is 
  544.  
  545.  
  546.  
  547.  
  548.                                       -4-
  549.  
  550.  
  551.  
  552.  
  553.  
  554.      NRO (1)                   MS-DOS Version 3.2                   NRO (1)
  555.  
  556.  
  557.  
  558.  
  559.                 allowed.  
  560.  
  561.  
  562.  
  563.           .sp - specifies a number of blank lines to be output before 
  564.  
  565.                 printing the next line of text.  
  566.  
  567.  
  568.  
  569.           .ti - temporarily alters the indentation or left margin 
  570.  
  571.                 value for a single succeeding line of text.  
  572.  
  573.  
  574.  
  575.           .ul - underlines the alphanumeric text in the following 
  576.  
  577.                 line(s).  The optional argument specifies the number 
  578.  
  579.                 of lines to be underlined.  Underlining and boldface 
  580.  
  581.                 are mutually exclusive features.  The appearance of an 
  582.  
  583.                 underline command cancels any existing boldface 
  584.  
  585.                 operations.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.                                       -5-
  636.  
  637.  
  638.  
  639.