NRO(1) NRO(1) NNAAMMEE nro - text processor SSYYNNOOPPSSIISS nro [-n] [+n] [-pxx] [-v] [-u] [-b] [-mmfile] ifile ... [>ofile] DDEESSCCRRIIPPTTIIOONN _N_R_O is a text processor and formatter based on the design provided in "Software Tools" by Kernighan and Plauger. The text and commands found in the _i_f_i_l_e_(_s_) are processed to generate formatted text. The output may be directed into a file or to the printer, otherwise, the output will appear at the user console. The _+_n option causes the output to start with page _n_. The _-_n option causes the output to stop after page _n_. The _-_v option prints the version number to the console. The _-_p option causes the output to be shifted to the right by _x_x spaces. This has the same effect as the .po com- mand. The _-_u option enables underlining and bold to appear in the output text. The _-_b option allows backspaces to be used when underlin- ing or overstriking. Otherwise a carriage return without linefeed is used. This has the same effect as the .bs command with a non-zero argument. The _-_m option processes the file _m_f_i_l_e for macro defini- tions. Note that files processed in this way should con- tain only macro definitions, no immediate output should be generated from this file. If to open the file fails, it is searched in the directory where the executable _N_R_O resides. There are commands that only differ if they work _c_o_n_t_i_n_u_- _o_u_s_l_y or not, e.g. .cb and .bo the non-continuous one effects only letters and digits. Both commands can be intermixed, they share the same counter of how many lines are to be effected, but the last command predicts, whether to work continuously or not; e.g.: .cb 4 1st continuous bold line 2nd continuous bold line .bo +1 1st non-continuous bold line 2nd non-continuous bold line 3rd non-continuous bold line Commands typically are distinguished by a period in column FreeDos Version 1 NRO(1) NRO(1) one of the input followed by a two character abbreviation for the command funtion. The abbreviation may then be fol- lowed by an optional numeric or character argument. The numeric argument may be an absolute value such as setting the right margin to a particular column, or the argument may be preceded by a plus sign or a minus sign to indicate that the parameter should be modified relative to a previ- ous setting. The following commands are recognized: .. - comment line. Lets _N_R_O ignore this line completely. .bo - causes the following lines of text to appear in bold- face. The optional argument specifies the number of lines to be typed in boldface. Only letters and num- bers are effected by this command. This command can- cels the effect of a previous .cb command. .bp - causes succeeding text to appear at the top of a new page. The optional argument specifies the page num- ber for the new page. The initial value is one and the default value is one more than the previous page number. .br - causes succeeding text to start on a new line at the current left margin. There is no numeric argument for this command. .bs - enables or disables the appearance of backspaces in the output text. Underlining and boldface options are implemented by inserting character - backspace - character combinations into the output buffer. This is fine for devices which properly recognize the backspace character. Some printers, however, do not recognize backspaces, so the option is provided to overprint one line buffer with another. The first line buffer is terminated with just a carriage return rather than the carriage return - linefeed combina- tion. A zero argument or no argument to the backspace command removes backspaces from the output. A non-zero argument leaves them in the output. The default is to remove backspaces. .cc - changes the _N_R_O command character to that specified by the character argument. If no argument is pro- vided, the default is a period. .cb - causes the following lines of text to appear in bold- face. The optional argument specifies the number of lines to be typed in boldface. In opposite to the .bo command all characters are effected. This com- mand cancels the effect of a previous .bo command. .ce - causes the next line of text to appear centered on the output. The optional argument specifies if more than .ev 1 .ds an-page-string 2 .if rX . if 2>0 . nr an-page-letter 2-0 . ds an-page- string 00 . .ie 0 . if o .tl ''FreeDos Version'1' . if .an-init .ev 1 .sp .5i .tl 'NRO(1)''NRO(1)' .sp |1i .ev .ns e .tl '1'FreeDos Version'' . .el .tl ''FreeDos Version'1' .ev one line is to be centered. .ct - concats the following word with the preceeding one. The remaining characters on the line will be inter- preted as normal text, thus, if the first character is the command character (see .cc end of a sentence, for example: This is a .cb *test* .ct . results in: This is a *test* But the dot itself remains in plain shape and is also not interpreted as the command character. .cu - causes the next line(s) of text to be continuously underlined. Unlike the underline command (see .ul all printable characters. The optional argument specifies the number of lines of text to underlined. This command cancels the effect of a previous .ul command. .de - causes all text and commands following to be used to define a macro. The definition is terminated by a .en command. The first two characters of the argu- ment following the .de command become the name of the new command. It should be noted that upper and lower case arguments are considered different. Thus, the commands .PP and .pp could define two different macros. Care should be exercised since existing com- mands may be redefined. A macro may contain up to ten arguments. In the macro definition, the placement of arguments is des- ignated by the two character sequences, $0, $1, ... $9. When the macro is invoked, each argument of the macro command line is substituted for its correspond- ing designator in the expansion. The first argument of the macro command is substituted for the $0 in the expansion, the second argument for the $1, and so forth. Arguments are typically strings which do not contain blanks or tabs. If an argument is to contain blanks, then it should be surrounded by either single or double quotes. .ef - specifies the text for the footer on even numbered pages. The format is the same as for the footer com- mand (see .fo .eh - specifies the text for the header on even numbered pages. The format is the same as for the footer com- mand (see .fo .en - designates the end of a macro definition. .fi - causes the input text to be rearranged or filled to obtain the maximum word count possible between the previously .ev 1 .ds an-page-string 3 .if rX . if 3>0 . nr an-page-letter 3-0 . ds an- page-string 00 . .ie 0 . if o .tl ''FreeDos Version'1' .an-init .ev 1 .sp .5i .tl 'NRO(1)''NRO(1)' .sp |1i .ev .ns . if e .tl '1'FreeDos Version'' . .el .tl ''FreeDos Version'1' .ev set left and right margins. No argument is expected. .fo - specifies text to be used for a footer. The footer text contains three strings seperated by a delimiter character. The first non-blank character following the command is designated as the delimiter. The first text string is left justified to the current indentation value (specified by .in and the current right margin value (specified by .rm ). The third string is right justified to the current right margin value. The absence of footer text will result in the footer being printed as one blank line. The presence of the page number character (set by .pc in the cur- rent page number being inserted at that position. Multiple occurrances of the page number character are allowed. .he - specifies text to be used for a header. The format is the same as for the footer (see .fo .in - indents the left margin to the column value specified by the argument. The default left margin is set to zero. .ju - causes blanks to be inserted between words in a line of output in order to align or justify the right mar- gin. The default is to justify. .ls - sets the line spacing to the value specified by the argument. The default is for single spacing. .m1 - specifies the number of lines in the header margin. This is the space from the physical top of page to and including the header text. A value of zero causes the header to not be printed. A value of one causes the header to appear at the physical top of page. Larger argument values cause the appropriate number of blank lines to appear before the header is printed. .m2 - specifies the number of blank lines to be printed between the header line and the first line of the processed text. .m3 - specifies the number of blank lines to be printed between the last line of processed text and the footer line. .m4 - specifies the number of lines in the footer margin. This command affects the footer the same way the .m1 command affects the header. .ne - specifies a number of lines which should not be bro- ken across a page boundary. If the number of lines remaining on a page is less than the value needed, then a new output page is started. .ev 1 .ds an-page-string 4 .if rX . if 4>0 . nr an-page-letter 4-0 . ds an-page- string 00 . .ie 0 . if o .tl ''FreeDos Version'1' . if .an-init .ev 1 .sp .5i .tl 'NRO(1)''NRO(1)' .sp |1i .ev .ns e .tl '1'FreeDos Version'' . .el .tl ''FreeDos Version'1' .ev .nf - specifies that succeeding text should be printed without rearrangement, or with no fill. No argument is expected. .nj - specifies that no attempt should be made to align or justify the right margin. No argument is expected. .nr - causes the value of a number register to be set or modified. A total of twenty-six number registers are available designated @@na through @@nz (either upper or lower case is allowed). When the sequence @@nc is imbedded in the text, the current value of number register c replaces the sequence, thus, such things as paragraph numbering can be accomplished with rela- tive ease. .of - specifies the text for the footer on odd numbered pages. The format is the same as the footer command (see .fo ). .oh - specifies the text for the header on odd numbered pages. The format is the same as the footer command (see .fo ). .pc - specifies the page number character to be used in headers and footers. The occurrance of this charac- ter in the header or footer text results in the cur- rent page number being printed. The default for this character is the hash mark (#). .pl - specifies the page lenght or the number of lines per output page. The default is sixty-six. .po - specifies a page offset value. This allows the for- matted text to be shifted to the right by the number of spaces specified. This feature may also be invoked by a switch on the command line. .rm - sets the column value for the right margin. The default is eighty. .so - causes input to be retrieved from the file specified by the command's character string argument. The con- tents of the new file are inserted into the output stream until an EOF is detected. Processing of the original file is then resumed. Command nesting is allowed. .sp - specifies a number of blank lines to be output before printing the next line of text. .tb - tabulate to the next tabstop or to a fixed column. If this command has no argument at all, the line is filled up to the next tabstop. If last character already stands onto a tabstop, the next one is choosen. If there is no tabstop available, at least the delimiter or one space will be inserted, but no line .ev 1 .ds an-page-string 5 .if rX . if 5>0 . nr an-page-letter 5-0 . ds an-page- string 00 . .ie 0 . if o .tl ''FreeDos Version'1' . if .an-init .ev 1 .sp .5i .tl 'NRO(1)''NRO(1)' .sp |1i .ev .ns e .tl '1'FreeDos Version'' . .el .tl ''FreeDos Version'1' .ev break is issued. Otherwise, the argument specifies the column to tabu- late to. The column is interpreted relative to the current .in value rather than as a absolute position or relative to the .ti value. Thus, the command .tb 0 means to tabulate to the column, where the normal text begins. If the last character already stands right of the desired column, at least the delimiter or one space will be inserted, but no line break is issued. For examples and the format of the argument see the .ts command. .ti - temporarily alters the indentation or left margin value for a single succeeding line of text. .ts - set the tabstops. There are three ways to define tabstops: 1) .ts - without any arguments. This will clear all tabstops and set a single tabstop at position 0 with no delimiter and left justify. 2) .ts * _* _t_h_a_t _e_a_c_h _c_o_l_u_m_n _o_f _t_h_e _t_a_b_l_e _i_s _# _c_h_a_r_a_c_- _t_e_r_s _w_i_d_e_. _T_h_e _d_e_l_i_m_i_t_e_r _d_o_e_s _n_o_t _c_o_u_n_t_. _A_l_l _t_a_b_s_t_o_p_s _r_e_c_e_i_v_e _t_h_e _s_a_m_e _d_e_l_i_m_i_t_e_r _c_h_a_r_a_c_t_e_r _? _a_n_d _t_h_e _t_y_p_e _o_f _t_h_e _j_u_s_t_i_f_y _& _3_) _._t_s _{ _+ _| _- _| _[ _& _I_f _t_h_e _f_i_r_s_t _a_r_g_u_m_e_n_t _d_o_e_s _n_e_i_- _t_h_e_r _s_t_a_r_t _w_i_t_h _t_h_e _+ _c_h_a_r_a_c_t_e_r _n_o_r _w_i_t_h _t_h_e _- _c_h_a_r_- _a_c_t_e_r_, _a_l_l _t_a_b_s_t_o_p_s _a_r_e _c_l_e_a_r_e_d _a_s _1_) _d_o_e_s_. _D_e_s_p_i_t_e _o_f _t_h_a_t_, _a_l_l _a_r_g_u_m_e_n_t_s _s_t_a_r_t_i_n_g _w_i_t_h _+ _a_r_e _i_g_n_o_r_e _c_o_m_p_l_e_t_e_l_y_. _T_h_e _- _c_h_a_r_a_c_t_e_r _o_r_d_e_r_s _t_o _d_e_l_e_t_e _t_h_e _t_a_b_- _s_t_o_p _a_t _c_o_l_u_m_n _# _E_a_c_h _t_a_b_s_t_o_p _c_a_n _h_a_v_e _a _t_y_p_e_. _I_n _t_h_e _a_b_o_v_e _s_y_n_o_p_- _s_i_s_e_s _i_t _i_s _m_a_r_k_e_d _w_i_t_h _# _N_R_O _h_o_w _t_o _j_u_s_t_i_f_y _t_h_e _t_e_x_t _l_e_f_t _o_f _t_h_i_s _t_a_b_s_t_o_p_. _T_h_e_r_e _a_r_e _t_h_e _f_o_l_l_o_w_i_n_g _t_y_p_e_s_: _a_) _> _r_i_g_h_t _j_u_s_t_i_f_y_. _T_h_e_r_e _w_i_l_l _b_e _f_i_l_l_e_d _i_n _a_s _m_a_n_y _s_p_a_c_e_s _i_n _f_r_o_n_t _o_f _t_h_e _t_e_x_t _t_h_a_t _t_h_e _l_a_s_t _c_h_a_r_a_c_t_e_r _s_t_a_n_d_s _i_n _t_h_e _c_o_l_u_m_n _o_f _t_h_e _t_a_b_s_t_o_p_. _b_) _| _c_e_n_t_e_r_. _T_h_e_r_e _w_i_l_l _b_e _f_i_l_l_e_d _i_n _a_s _m_a_n_y _s_p_a_c_e_s _i_n _f_r_o_n_t _o_f _a_n_d _b_e_h_i_n_d _t_h_e _t_e_x_t _t_h_a_t _t_h_e _c_o_l_u_m_n _o_f _t_h_e _t_a_b_s_t_o_p _h_a_s _b_e_e_n _r_e_a_c_h_e_d_. _I_n _s_o_m_e _c_a_s_e_s _o_n_e _s_p_a_c_e _i_s _i_n_s_e_r_t_e_d _m_o_r_e _i_n _f_r_o_n_t _o_f _t_h_a_n _b_e_h_i_n_d_. _c_) _= _f_i_l_l _i_n_. _T_h_e_r_e _w_i_l_l _b_e _i_n_s_e_r_t_e_d _o_n_e _s_p_a_c_e _i_n _f_r_o_n_t _o_f _a_n_d _o_n_e _s_p_a_c_e _b_e_h_i_n_d _t_h_e _t_e_x_t_, _t_h_e _r_e_m_a_i_n_i_n_g _r_o_o_m _i_s _f_i_l_l_e_d _i_n _b_e_t_w_e_e_n _a_l_l _w_o_r_d_s_. _d_) _o_t_h_e_r_w_i_s_e _l_e_f_t _j_u_s_t_i_f_y_. _T_h_e_r_e _w_i_l_l _b_e _a_p_p_e_n_e_d_e_d _a_s _m_a_n_y _s_p_a_c_e_s _t_h_a_t _t_h_e _l_a_s_t _s_p_a_c_e _s_t_a_n_d_s _o_n _t_h_e _c_o_l_u_m_n _o_f _t_h_e _t_a_b_s_t_o_p_. _I_f _n_o _t_y_p_e _i_s _g_i_v_e_n_, _i_t _d_e_f_a_u_l_t_s _t_o _l_e_f_t _j_u_s_t_i_f_y_. _T_h_e _d_e_l_i_m_i_t_e_r _c_h_a_r_a_c_t_e_r _i_s _m_a_r_k_e_d _w_i_t_h _? _i_n _t_h_e _s_y_n_- _o_p_s_i_s_e_s _a_b_o_v_e_. _T_h_i_s _c_h_a_r_a_c_t_e_r _w_i_l_l _b_e _i_m_m_e_d_i_a_t_e_l_y _a_p_p_e_n_d_e_d _t_o _t_h_e _f_i_l_l_e_d _t_e_x_t_, _i_f _p_r_e_s_e_n_t_. _T_h_u_s_, _i_f _t_h_e _t_a_b_l_e _w_i_d_t_h _i_s _5_, _t_h_e _f_i_r_s_t _d_e_l_i_m_i_t_e_r _i_s _p_l_a_c_e_d _i_n_t_o _c_o_l_u_m_n _6_. _I_f _t_h_e _/ _s_i_g_n _i_s _f_o_l_l_o_w_e_d _b_y _n_o_t_h_i_n_g _(_l_i_n_e _f_e_e_d_) _o_r _a _w_h_i_t_e_s_p_a_c_e_, _t_h_e _d_e_l_i_m_i_t_e_r _b_e_c_o_m_e_s _a _s_i_n_g_l_e _s_p_a_c_e_; _i_f _n_o _/ _s_i_g_n _i_s _p_r_e_s_e_n_t_, _n_o _d_e_l_i_m_i_t_e_r _i_s _i_n_s_e_r_t_e_d_; _o_t_h_e_r_w_i_s_e_, _t_h_e _f_i_r_s_t _c_h_a_r_a_c_t_e_r _b_e_h_i_n_d _t_h_e _/ _s_i_g_n _._e_v _1 _._d_s _a_n_-_p_a_g_e_-_s_t_r_i_n_g _6 _._i_f _r_X _. _i_f _6_>_0 _. _n_r _a_n_-_p_a_g_e_-_l_e_t_t_e_r _6_-_0 _. _d_s _a_n_-_p_a_g_e_- _s_t_r_i_n_g _0_0 _. _._i_e _0 _. _i_f _o _._t_l _'_'_F_r_e_e_D_o_s _V_e_r_s_i_o_n_'_1_' _. _i_f _._a_n_-_i_n_i_t _._e_v _1 _._s_p _._5_i _._t_l _'_N_R_O_(_1_)_'_'_N_R_O_(_1_)_' _._s_p _|_1_i _._e_v _._n_s _e _._t_l _'_1_'_F_r_e_e_D_o_s _V_e_r_s_i_o_n_'_' _. _._e_l _._t_l _'_'_F_r_e_e_D_o_s _V_e_r_s_i_o_n_'_1_' _._e_v _i_s _u_s_e_d_. _I_f _t_h_e _t_y_p_e _o_f _t_h_e _c_u_r_r_e_n_t _t_a_b_s_t_o_p _i_s _> _(_r_i_g_h_t _j_u_s_t_i_f_y_)_, _t_h_e _d_e_f_a_u_l_t_s _a_r_e _r_e_v_e_r_s_e_d_, _t_h_u_s_, _i_f _a _/ _s_i_g_n _i_s _p_r_e_s_e_n_t_, _i_t _d_e_f_a_u_l_t_s _t_o _n_o_t_h_i_n_g_; _i_f _n_o_n_e _i_s _p_r_e_s_e_n_t_, _i_t _d_e_f_a_u_l_t_s _t_o _a _s_i_n_g_l_e _s_p_a_c_e_. _A_t _d_e_f_a_u_l_t _t_h_e_r_e _i_s _a_l_w_a_y_s _a _t_a_b_s_t_o_p _a_t _p_o_s_i_t_i_o_n _0_, _w_h_a_t _i_s _t_h_e _l_e_f_t _m_a_r_g_i_n _c_o_n_t_r_o_l_l_e_d _b_y _t_h_e _._i_n _c_o_m_- _m_a_n_d_. _T_h_a_t _c_a_n _b_e _u_s_e_d _t_o _i_n_d_e_n_t _c_o_r_r_e_c_t_y _w_i_t_h_i_n _t_h_e _._I_P _c_o_m_m_a_n_d_: _._d_e _I_P _._s_p _._c_b _$_$_0 _._t_b _._e_n _T_h_e _r_e_m_a_i_n_i_n_g _t_e_x_t _w_i_l_l _e_i_t_h_e_r _s_t_a_r_t _a_t _t_h_e _._I_N _v_a_l_u_e _o_r _w_i_l_l _b_e _s_e_p_a_r_a_t_e_d _b_y _o_n_e _s_p_a_c_e _f_r_o_m _t_h_e _s_e_c_t_i_o_n _t_i_t_l_e_. _T_h_e _s_e_c_t_i_o_n _t_i_t_l_e _i_t_s_e_l_f _i_s _n_e_v_e_r _f_i_l_l_e_d_, _i_f _t_h_e _._j_u _c_o_m_m_a_n_d _i_s _e_n_a_b_l_e_d_, _b_e_c_a_u_s_e _o_f _t_h_e _._t_b _c_o_m_- _m_a_n_d_. _._u_l _- _u_n_d_e_r_l_i_n_e_s _t_h_e _a_l_p_h_a_n_u_m_e_r_i_c _t_e_x_t _i_n _t_h_e _f_o_l_l_o_w_i_n_g _l_i_n_e_(_s_)_. _T_h_e _o_p_t_i_o_n_a_l _a_r_g_u_m_e_n_t _s_p_e_c_i_f_i_e_s _t_h_e _n_u_m_b_e_r _o_f _l_i_n_e_s _t_o _b_e _u_n_d_e_r_l_i_n_e_d_. _T_h_i_s _c_o_m_m_a_n_d _c_a_n_c_e_l_s _t_h_e _e_f_f_e_c_t _o_f _a _p_r_e_v_i_o_u_s _._c_u _c_o_m_m_a_n_d_. _._z_z _- _p_r_a_g_m_a _s_t_a_t_e_m_e_n_t _o_f _N_R_O_. _T_h_i_s _c_o_m_m_a_n_d _a_l_l_o_w_s _t_o _e_a_s_- _i_l_y _a_d_d _n_e_w _f_e_a_t_u_r_e_s _t_o _f_u_t_u_r_e _v_e_r_s_i_o_n _o_f _N_R_O _w_i_t_h_o_u_t _t_h_a_t _e_l_d_e_r _v_e_r_s_i_o_n _c_o_m_p_l_a_i_n _a_b_o_u_t _t_h_a_t _n_e_w _s_t_u_f_f_. _O_f _c_o_u_r_s_e_, _t_o _a_d_d _n_e_w _c_o_m_m_a_n_d_s _t_h_a_t _w_a_y _i_s _n_o_t _v_e_r_y _a_p_p_r_o_p_r_i_a_t_e_. _C_u_r_r_e_n_t_l_y _a_c_c_e_p_t_e_d _p_r_a_g_m_a _c_o_m_m_a_n_d_s_: _l_e_t_t_e_r_s_= _s_p_e_c_i_f_i_e_s _l_e_t_t_e_r_s _o_t_h_e_r _t_h_a_n _A_-_Z _a_n_d _a_-_z_. _A_l_l _c_h_a_r_a_c_t_e_r_s _f_o_l_l_o_w_i_n_g _t_h_e _= _s_i_g_n _a_r_e _t_r_e_a_t_e_d _t_o _b_e _l_e_t_t_e_r_s_, _t_h_u_s_, _d_o_n_'_t _a_d_d _w_h_i_t_e_s_p_a_c_e_s _o_r _d_a_s_h_e_s _t_h_e_r_e_. NNEEWW FFEEAATTUURREESS o The font attributes "bold face" and "underline" may be used together. o Added the commands: continuous bold face .cb .. .zz .ov .cv and concatination .ct o Added tabstops controled by set tabstops .ts .tb .ev 1 .ds an-page-string 7 .if rX . if 7>0 . nr an-page-letter 7-0 . ds an-page-string 00 . .ie 0 . if o .tl ''FreeDos Version'1' . if e .tl '1'FreeDos .an-init .ev 1 .sp .5i .tl 'NRO(1)''NRO(1)' .sp |1i .ev .ns Version'' . .el .tl ''FreeDos Ver- sion'1' .ev .ev 1 .ds an-page-string 8 .if rX . if 8>0 . nr an-page-letter 8-0 . ds an-page- string 00 . .ie 0 . if o .tl ''FreeDos Version'1'