/*
 *
 * nroff  Version 0.0  23FEB84
 *
 * This is the Nroff text processing subtree.
 *
 */
/*
 * TNIX/UNIX Version
 * Keyshell Version Number 2
 */

nroff
{
	>
	>\kYes\e - Allows changes in the indenting, line length, and number of lines
	>              per page in the processed output.
	>
	>\kNo\e - Skip the prompting for changes in the output format.
	cmd (^nroff -ms ), msg (^Changes in the output format?%%), next;
	f1;Yes; {
		>
		>\kIndent\e - Change the overall position of the left margin.
		>
		>\kLin.lngth\e - Change the overall line length.
		>
		>\kPag.lngth\e - Change the number of lines per page.
		msg (^Output format changes%%), next;
		f1;Indent; {
			>
			>How many character spaces should the left margin be shifted to the right?
			cmd (-rO), msg (^How many character spaces? %P), break;
			f1;; hist;
			f2;; hist;
			f3;; hist;
			f4;; hist;
			f5;; hist;
			f6;; hist;
			f7;manual; man (ms);
			f8;done; cmd, msg, break (3);
		};
		f2;Lin.lngth; {
			>
			>What shall be the largest number of characters per line?
			cmd (-rW), msg (^How many character spaces? %P), break;
			f1;; hist;
			f2;; hist;
			f3;; hist;
			f4;; hist;
			f5;; hist;
			f6;; hist;
			f7;manual; man (ms);
			f8;done; cmd, msg, break (3);
		};
		f3;Pag.lngth; {
			>
			>What shall be the largest number of lines per page?
			cmd (-rL), msg (^How many lines? %P), break;
			f1;; hist;
			f2;; hist;
			f3;; hist;
			f4;; hist;
			f5;; hist;
			f6;; hist;
			f7;manual; man (ms);
			f8;done; cmd, msg, break (3);
		};
		f6;No more; next (2);
		f7;manual; man (ms);
		f8;done; cmd, msg, break (2);
	};
	f2;No; next;
	f7;manual; man (ms);
	f8;done; cmd, msg, break;
}, {
	>
	>Enter the name of your text file.
	>
	>\klistfiles\e - Show files in the current directory.
	msg (^Enter the name of your text file: %F), next;
	f1;; hist;
	f2;; hist;
	f3;; hist;
	f4;; hist;
	f5;; hist;
	f6;listfiles; call, cmd (^ls), exec, return, break (0);
	f7;manual; man (ms);
	f8;done; cmd, msg, break;
}, {
	>
	>\kfile\e - Send the formatted text to a file.
	>
	>\kscreen\e - List the formatted text on your terminal screen.
	>
	>\kfile+scrn\e - Send the formatted text to a file and also list it
	>              on your terminal.
	>
	>\kprinter\e - Print the formatted text on the line printer.
	>
	>\kfile+prnt\e - Send the formatted text to a file and also print it
	>              on the line printer.
	msg (^Send the output where?%%), next;
	f1;file; {
		>
		>Enter the name of the file to receive the formatted text.
		>
		>\klistfiles\e - Show files in the current directory.
		cmd (> ), msg (^Enter the name of the output file: %f), next (2);
		f1;; hist;
		f2;; hist;
		f3;; hist;
		f4;; hist;
		f5;; hist;
		f6;listfiles; call, cmd (^ls), exec, return, break (0);
		f7;manual; man (ms);
		f8;done; cmd, msg, break (2);
	};
	f2;screen; cmd (| more);
	f3;file+scrn; {
		>
		>Enter the name of the file to receive the formatted text.
		>
		>\klistfiles\e - Show files in the current directory.
		cmd (| tee ), msg (^Enter the name of the output file: %F), next;
		f1;; hist;
		f2;; hist;
		f3;; hist;
		f4;; hist;
		f5;; hist;
		f6;listfiles; call, cmd (^ls), exec, return, break (0);
		f7;manual; man (ms);
		f8;done; cmd, msg, break (2);
	}, {
		cmd (| more), next (2);
	};
	f4;printer;
#ifdef _TNIX
 		cmd (| lp1r);
#else
 		cmd (| lpr);
#endif
	f5;file+prnt; {
		>
		>Enter the name of the file to receive the formatted text.
		>
		>\klistfiles\e - Show files in the current directory.
		cmd (| tee ), msg (^Enter the name of the output file: %f), 
#ifdef _TNIX
 		cmd (| lp1r),
#else
 		cmd (| lpr),
#endif
		next (2);
		f1;; hist;
		f2;; hist;
		f3;; hist;
		f4;; hist;
		f5;; hist;
		f6;listfiles; call, cmd (^ls), exec, return, break (0);
		f7;manual; man (ms);
		f8;done; cmd, msg, break (2);
	};
	f7;manual; man (ms);
	f8;done; cmd, msg, break;
}, {
	msg (^Processing the text...), exec, break;
}
