--- config.h +++ config.h 2001/02/07 12:06:23 @@ -84,15 +84,15 @@ Note that most mail programs need a '-t' option to work this way, so you would change this to "/usr/ucb/Mail -t" on SunOs 4.x.x. */ -#define MAIL_PROGRAM "/usr/lib/sendmail -t" +#define MAIL_PROGRAM "/usr/sbin/sendmail -t" /* COMPRESS_PROGRAM is the program which compresses your files, usually this will be compress. On SunOS 4.x, use /usr/ucb/compress, on SunOS 5.x, use /usr/bin/compress. You could also use gzip, but then you should also change the extension below to "gz". */ -#define COMPRESS_PROGRAM "compress" -#define COMPRESS_EXTENSION "Z" +#define COMPRESS_PROGRAM "gzip" +#define COMPRESS_EXTENSION "gz" /* The following two defines set the initial number of articles in a newsgroup and the initial number of newsgroups. Xvnews will update --- guide/Imakefile +++ guide/Imakefile 2001/02/07 12:06:23 @@ -1,6 +1,6 @@ #include <Library.tmpl> -INCLUDES = -I.. -I. +INCLUDES = -I/usr/openwin/include -I.. -I. HEADERS = gcc.h gcc_ui.h gcm.h gdd.h gfm.h gfm_ui.h group.h \ group_impl.h gutil.h c_varieties.h --- guide/Imakefile.mdk Thu Sep 27 17:53:38 2001 +++ guide/Imakefile Thu Sep 27 17:52:34 2001 @@ -13,6 +13,6 @@ NormalLibraryTarget(guidexv,$(OBJS)) InstallLibrary(guidexv,$(USRLIBDIR)) -BuildIncludes($(HEADERS),$(HEADER_DEST),..) +BuildIncludes($(HEADERS),$(HEADER_DEST),.) DependTarget() --- guide/libguide/Imakefile.mdk Thu Sep 27 17:54:28 2001 +++ guide/libguide/Imakefile Thu Sep 27 17:53:10 2001 @@ -10,6 +10,6 @@ NormalLibraryTarget(guide,$(OBJS)) InstallLibrary(guide,$(USRLIBDIR)) -BuildIncludes($(HEADERS),$(HEADER_DEST),..) +BuildIncludes($(HEADERS),$(HEADER_DEST),.) DependTarget() --- guide/libguide/Imakefile +++ guide/libguide/Imakefile 2001/02/07 12:06:23 @@ -1,6 +1,6 @@ #include <Library.tmpl> -INCLUDES = -I.. +INCLUDES = -I.. -I/usr/openwin/include HEADERS = gio.h guide.h guide_actions.h SRCS = gio.c guide.c guide_actions.c gio_path.c --- guide/libguide/gio.c +++ guide/libguide/gio.c 2001/02/07 12:06:23 @@ -69,8 +69,8 @@ /* * File pointers. */ -static FILE *Inp = stdin; -static FILE *Outp = stdout; +static FILE *Inp = 0; +static FILE *Outp = 0; /* * Internal state variables. @@ -84,7 +84,9 @@ * System error message definitions. */ extern int sys_nerr; +#if !(defined __GLIBC__ && __GLIBC__ >=2) extern char *sys_errlist[]; +#endif /* * Internal function declarations. @@ -113,6 +115,8 @@ void gio_close_input() { + if (!Inp) Inp = stdin; + if (Inp != stdin) { fclose(Inp); @@ -126,6 +130,8 @@ void gio_close_output() { + if (!Outp) Outp = stdout; + if (Outp != stdout) { fflush(Outp); @@ -205,6 +211,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == EOF) @@ -221,6 +229,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == *gio_file_begin_string()) @@ -237,6 +247,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == *gio_file_end_string()) @@ -265,6 +277,8 @@ int lth; /* string length */ int c = 0; /* string count */ + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; ungetc(ch, Inp); @@ -348,6 +362,8 @@ int lth; /* string length */ int c; /* string count */ + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch != *gio_list_begin_string()) @@ -384,6 +400,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == *gio_list_begin_string()) @@ -400,6 +418,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == *gio_list_end_string()) @@ -593,6 +613,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == *gio_object_begin_string()) @@ -609,6 +631,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == *gio_object_end_string()) @@ -635,6 +659,8 @@ int lth; /* string length */ int c = 0; /* string count */ + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch != *gio_string_begin_string()) @@ -671,6 +697,8 @@ { int ch; + if (!Inp) Inp = stdin; + while (isspace(ch = fgetc(Inp))) ; if (ch == *gio_string_begin_string()) @@ -687,6 +715,8 @@ { int ch; + if (!Inp) Inp = stdin; + if ((ch = fgetc(Inp)) == *gio_string_end_string()) return TRUE; ungetc(ch, Inp); @@ -987,6 +1017,8 @@ { va_list args; + if (!Outp) Outp = stdout; + if (Newline) fputs(Indent, Outp); @@ -1012,6 +1044,8 @@ char c; #endif { + if (!Outp) Outp = stdout; + if (Newline) fputs(Indent, Outp); fputc(c, Outp); @@ -1030,6 +1064,8 @@ char *s; #endif { + if (!Outp) Outp = stdout; + if (Newline) fputs(Indent, Outp); fputs(s, Outp); @@ -1108,6 +1144,8 @@ char *newstr; char *p; + if (!Outp) Outp = stdout; + if (s && (s[0] == *gio_string_begin_string()) && (s[strlen(s)-1] == *gio_string_end_string())) { newstr = malloc(strlen(s) + 1); @@ -1242,6 +1280,8 @@ { register char *p; + if (!Outp) Outp = stdout; + if (s) for (p = s; *p; p++) { if (*p == *gio_string_end_string() || @@ -1348,6 +1388,8 @@ { int ch; int c = 0; /* character count */ + + if (!Inp) Inp = stdin; while (isspace(ch = fgetc(Inp))) ; --- xv_post.c +++ xv_post.c 2001/02/07 12:06:23 @@ -738,7 +738,7 @@ } else{ /* Get the domainname from the system */ -#ifdef linux +#if defined linux && !(defined __GLIBC__ && __GLIBC__ >= 2) strcpy(domain_long, utsbuf.domainname); #endif #ifdef SVR4 --- xv_regex.c +++ xv_regex.c 2001/02/07 12:06:23 @@ -55,6 +55,10 @@ #endif +#if defined __GLIBC__ && __GLIBC__ >= 2 +#define __alloca alloca +#endif + #if defined(POSIX_REGEX) #include <regex.h> #else --- Imakefile.old Sun Sep 25 20:17:35 1994 +++ Imakefile Wed Sep 19 15:54:58 2001 @@ -3,6 +3,8 @@ /**/# Imakefile for xvnews. /**/# If XView config files are not found, /**/# setenv IMAKEINCLUDE '-I`pwd`/config -I$OPENWINHOME/lib/config' +MANSRCSUFFIX = 1 +MANNEWSUFFIX = man #define IHaveSubdirs #define PassCDebugFlags @@ -18,17 +20,17 @@ MakeSubdirs($(SUBDIRS)) DEFINES = -INCLUDES = -I$(GUIDEXV) -I$(LIBGUIDE) -I$(TOP) -SYS_LIBRARIES = #-lintl +INCLUDES = -I/usr/openwin/include -I$(GUIDEXV) -I$(LIBGUIDE) -I$(TOP) +SYS_LIBRARIES = -lintl # Add -linn to the following line if you want to support nnrp.passwd -LOCAL_LIBRARIES = -L$(GUIDEXV) -lguidexv -L$(LIBGUIDE) -lguide -L$(XVIEWDIR) $(XVIEWLIB) +LOCAL_LIBRARIES = -L$(GUIDEXV) -lguidexv -L$(LIBGUIDE) -lguide -L$(XVIEWDIR) $(XVIEWLIB) -linn ICONS = news.icon HEADERS = xvnews.h codes.h utils.h xvnews_ui.h INFOFILES = xvnews.info -MANPAGES = xvnews.man +MANPAGES = xvnews.1 OBJS = getdate.o main.o server.o textsw_regexp.o xv_articles.o xv_err.o \ xv_getauthor.o xv_init.o xv_init_newsrc.o xv_newsrc.o \ xv_parse_newsrc.o xv_post.o xv_props.o xv_regex.o xv_search.o \ --- xv_articles.c.old Sun Nov 13 21:24:05 1994 +++ xv_articles.c Wed Sep 19 16:06:47 2001 @@ -39,6 +39,7 @@ #include <xview/text.h> #include <xview/notice.h> #include <gfm_ui.h> +#include <time.h> #include "xvnews_ui.h" #include "xvnews.h" @@ -668,9 +669,9 @@ strcpy(printcommand,(char *)xv_get(prp->print_text, PANEL_VALUE, NULL)); if (!strlen(printcommand)) { if (getenv("OPENWINHOME") == NULL) - sprintf(printcommand, "/usr/ucb/lpr"); + sprintf(printcommand, "/usr/bin/lpr"); else - sprintf(printcommand, "%s/bin/xview/mp|/usr/ucb/lpr", + sprintf(printcommand, "%s/bin/xview/mp|/usr/bin/lpr", getenv("OPENWINHOME")); } } else {