🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #41174

Re: Windows 16/32 printer code for slrn

#41174
From: root
Date: Wed, 27 May 1998 00:00
41 lines
2049 bytes
In article <6kefal$6pn$1@gte1.gte.net>, you say...
>
>The following sample code should work for Windows 3.x printing from
>the slrn program, and will even work for Windows 95/98 printing when
>used on a personal computer not connected to a network.  To use this
>code, insert it into slrn/src/print.c, with appropriate modifications:
>
>#ifdef USE_WIN16_PRINT_CODE /*{{{*/
>typedef struct _Slrn_Print_Type
>{
>   FILE *fp;
>   int error_status;
>} Slrn_Print_Type;
>static Slrn_Print_Type p;
>
There is a problem with defining a local variable and passing it
back to the calling functions, even when the variable is not static,
as defined here.  This is probably why the pipe to printer code uses
malloc to generate a pointer to the structure,

>Slrn_Print_Type *win16_open_printer (void)
>{
>   p.fp = fopen("prn", "w");
>   if (!p.fp)

Using prn, rather than specific printer port files like lpt1, might
just work on a PC connected to a network.  Does anyone have any
information about how the system interprets prn when the installed
printer is the network printer?

With the few changes indicated above, my experimental 16-bit version
of slrn.952 is communicating with my Lexmark printer, which, however,
isn't entirely happy doing buffered printing from fputc(), something
which I verified by writing a test program.

BTW, does anyone know where in the slrn code the information about
article numbers > 32KB (for integer variables) is stored?


Technical Details
Message-ID: <6ki8li$j57$1@gte2.gte.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <6kefal$6pn$1@gte1.gte.net>

Show Full Headers
Complete Article Headers
Message-ID: <6ki8li$j57$1@gte2.gte.net>
Subject: Re: Windows 16/32 printer code for slrn
Date: Wed, 27 May 1998 00:00:00 +0000
From: vtailor@gte.net (root)
References: <6kefal$6pn$1@gte1.gte.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 357124661
Organization: The Light
X-Auth: C01F88510086D6CA15978491
Newsgroups: news.software.readers