Printing the Memory Screen Contents

To print the character contents of a memory, use the memory screen print function, ms_print():

ms_print(msp)

SCRPTR msp;            /* Pointer to memory screen to print            */

The printer specifications are global variables. The default depends on the operating system. For PCDOS, the printer is set to "prn", using the "w" file mode. For UNIX and POSIX, "lpr" is used as the printer file, and "p" is the mode. For VMS, "SYS$PRINT" is used as the printer file, and "w" is the mode. You can change this with:

void se_printer(filename, dmode)
 
UCHAR *filename;
/* Printer file name
*/
UCHAR *dmode;
/* Disk mode for opening printer file
*/

The dmode parameter specifies whether the file is to be opened in the "w" mode, which overwrites the contents of the specified file, or "a" mode, which appends the copied information to the existing information in the file. For UNIX and POSIX systems, you can specify "p" to open a pipe to the shell command specified as the filename. These are the same arguments used in the fopen() call. See your compiler manual for more information.

When writing the window contents to the printer file, tabs are compressed based on the number of spaces between tab stops. This is a global variable initially set to 8. You can change this value with se_tabq().


Home Contents Previous Next