From a8d3f90e0e217a3949e3bd2dc1b664f10bea33b3 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 3 Jun 1999 15:37:02 +0000 Subject: [PATCH] * base64.c: mapped fi and fo to stdin and stdout using actual code rather than assignment at declaration time (several users of Red Hat Linux 6.0 reported problems) --- citadel/ChangeLog | 5 +++++ citadel/base64.c | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 4c7189d7e..b4169858c 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 3 11:35:18 EDT 1999 Art Cancro + * base64.c: mapped fi and fo to stdin and stdout using + actual code rather than assignment at declaration time + (several users of Red Hat Linux 6.0 reported problems) + Fri May 21 20:05:00 EDT 1999 Art Cancro * Added function CtdlGetDynamicSymbol() for dynamic symbol allocation * server.h: Changed discrete #define's to enum's where appropriate diff --git a/citadel/base64.c b/citadel/base64.c index 5925f977a..ff69e3218 100644 --- a/citadel/base64.c +++ b/citadel/base64.c @@ -7,9 +7,13 @@ This program is in the public domain. +Revision date: 11th August 1997 + +Modified slightly for the Citadel/UX system, June 1999 +http://uncnsrd.mt-kisco.ny.us/citadel + */ -#define REVDATE "11th August 1997" #include #include @@ -23,8 +27,8 @@ typedef unsigned char byte; /* Byte type */ -static FILE *fi = stdin; /* Input file */ -static FILE *fo = stdout; /* Output file */ +FILE *fi; /* Input file */ +FILE *fo; /* Output file */ static byte iobuf[256]; /* I/O buffer */ static int iolen = 0; /* Bytes left in I/O buffer */ static int iocp = 256; /* Character removal pointer */ @@ -245,6 +249,9 @@ int main(int argc, char *argv[]) int i, f = 0, decoding = FALSE; char *cp, opt; + fi = stdin; + fo = stdout; + for (i = 1; i < argc; i++) { cp = argv[i]; if (*cp == '-') { -- 2.39.2