Article View: news.software.readers
Article #41684Re: [SLRN] using hooks to filter replies/posts/followups before editing
From: root
Date: Tue, 23 Jun 1998 00:00
Date: Tue, 23 Jun 1998 00:00
85 lines
2935 bytes
2935 bytes
On 23 Jun 1998 15:38:20 GMT, John E. Davis <davis@space.mit.edu> wrote:
>On 23 Jun 1998 15:28:56 GMT, John Klassa <klassa@aursgh.aur.alcatel.com>
>wrote:
>>The problem with this solution is that the file it [the script] gets has
>>already been munged by slrn. Is there some way to get at the *original*
>>article (untouched by slrn)?
>
>If you intend to use an external program to quote an article, then you
>might try using
>
> set quote_string ""
>
>in your .slrnrc file.
>--
>John E. Davis Center for Space Research/AXAF Science Center
Hi there. Thought you might be interested in the `sendmail' version of your
print.c code for slrn:
=============================================================================
#ifdef USE_WIN32_PRINT_CODE /*{{{*/
struct _Slrn_Print_Type
{
HANDLE h;
int error_status;
};
static char printer_name_buf [256];
int win32_close_printer (Slrn_Print_Type *p)
{
char cmd_buf[256];
if ((p == NULL) || (p->h == (HANDLE)NULL))
return 0;
slrn_fclose ((FILE *)(p->h));
/* sprintf should be in slrn_posix_system, not here: */
sprintf(cmd_buf, "start /m notepad /p %s", printer_name_buf);
slrn_posix_system (cmd_buf, 1);
remove(printer_name_buf);
slrn_free ((char *) p);
return 0;
}
Slrn_Print_Type *win32_open_printer (void)
{
HFILE h;
Slrn_Print_Type *p;
if (NULL == (p = (Slrn_Print_Type *) SLmalloc (sizeof (Slrn_Print_Type))))
return NULL;
memset ((char *) p, 0, sizeof(Slrn_Print_Type));
if ((HFILE)NULL ==
(h = (HFILE)slrn_open_tmpfile (printer_name_buf, "w")))
{
perror("fopen failed in win32_open_printer.");
slrn_free ((char *) p);
return NULL;
};
p->h = (HANDLE)h;
return p;
}
int win32_write_to_printer (Slrn_Print_Type *p, char *buf, unsigned int len)
{
if ((p == NULL) || (p->h == (HFILE)NULL) || (p->error_status != 0))
return -1;
if (fwrite(buf, len, 1, (FILE *)(p->h)) < 1)
{
p->error_status = 1;
perror("Write to printer failed.");
return -1;
};
return 0;
}
/*}}}*/
#endif /* USE_WIN32_PRINT_CODE */
Technical Details
Message-ID:
<6mpekr$7jg$1@news-1.news.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-mailReferences:
<6m9342$d0b$1@aurwww.aur.alcatel.com> <6maldk$16g$1@umrk.comnets.rwth-aachen.de> <6mohjo$2ae$1@aurwww.aur.alcatel.com> <slrn6oviva.ovk.davis@aluche.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <6mpekr$7jg$1@news-1.news.gte.net> Subject: Re: [SLRN] using hooks to filter replies/posts/followups before editing Date: Tue, 23 Jun 1998 00:00:00 +0000 From: root@gte.net () References: <6m9342$d0b$1@aurwww.aur.alcatel.com> <6maldk$16g$1@umrk.comnets.rwth-aachen.de> <6mohjo$2ae$1@aurwww.aur.alcatel.com> <slrn6oviva.ovk.davis@aluche.mit.edu> 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: 365473238 Organization: The Light X-Auth: C019910C079DD6974AC78491 Reply-To: vtailor@gte.net-nospam Newsgroups: news.software.readers