--- Makefile
+++ Makefile    1996/02/03 03:17:59
@@ -19,9 +19,9 @@
# Use /lib/cpp or /usr/ccs/lib/cpp for CPP on Solaris or SVR4 machines.

CC =           gcc
-#CPP =         $(CC) -E
-CPP =          /lib/cpp
-CFLAGS =       -O2 # -g # -I/usr/local/lib/malloc-debug -DMALLOC_FUNC_CHECK
+CPP =          $(CC) -E
+#CPP =         /lib/cpp
+CFLAGS =       -O6 -fomit-frame-pointer -pipe
#-Wall -Wcomment \
#-Wtraditional -Wshadow \
#-Wpointer-arith -Wcast-qual -Wcast-align -Wconversion \
--- Makefile.Linux
+++ Makefile.Linux      1996/02/03 03:17:59
@@ -0,0 +1,11 @@
+config.h:
+       cp config.h-dist config.h
+       cp /usr/include/ncurses.h local_curses.h
+       patch -s -p0 < local_curses.h.diff
+
+compile: config.h
+       make
+
+install:
+       echo "Run ./inst manually and select 's', then 'q'.
+
--- articles.c
+++ articles.c  1996/02/03 03:17:59
@@ -13,6 +13,8 @@
#endif /* ART_GREP */

/* articles.c */
+article_number n_articles;
+article_header **articles;

static void new_thunk __APROTO((thunk *t, char *ptr, long size));
static int grep_article __APROTO((group_header *gh, article_header *ah, char *pattern, int (*fcn)()));
--- articles.h
+++ articles.h  1996/02/03 03:17:59
@@ -9,8 +9,8 @@

/* article headers */

-article_number n_articles;
-article_header         **articles;
+extern article_number  n_articles;
+extern article_header  **articles;


typedef struct thunk {
--- conf/s-template.h
+++ conf/s-template.h   1996/02/03 03:17:59
@@ -34,7 +34,7 @@
 *     (i.e. it does not use curses).
 */

-#define TERMLIB        -ltermlib
+#define TERMLIB        -lncurses

/*
 *     Define HAVE_STRCHR if strchr() and strrchr() are available
@@ -55,7 +55,7 @@
 *     are not available on this OS, but the m- file doesn't say so.
 */

-/* #define HAVE_VARARGS /* Ignore NO_VARARGS -- else default */
+#define HAVE_VARARGS /* Ignore NO_VARARGS -- else default */
/* #define NO_VARARGS /* */

/*
@@ -95,21 +95,21 @@
 *     Don't define either if system only has the standard alarm() call.
 */

-/* #define HAVE_UALARM                 /* BSD 4.3 */
+/* #define HAVE_UALARM */              /* BSD 4.3 */
/* #define MICRO_ALARM(n)      xxxx(n) /* */

/*
 *     Define if your system has BSD like job control (SIGTSTP works)
 */

-/* #define HAVE_JOBCONTROL                     /* */
+#define HAVE_JOBCONTROL                        /* */


/*
 *     Define if your system has a 4.3BSD like syslog library.
 */

-#undef HAVE_SYSLOG
+#define HAVE_SYSLOG

/*
 *     Define if your system provides the "directory(3X)" access routines
@@ -144,7 +144,7 @@
 *     (in config.h).
 */

-/* #define HAVE_GETHOSTNAME                    /* BSD systems */
+#define HAVE_GETHOSTNAME                       /* BSD systems */
/* #define HAVE_UNAME                          /* System V */
/* #define HOSTNAME_FILE "/etc/uucpname"       /* or another file */
/* #define HOSTNAME_WHOAMI                     /* in <whoami.h> */
@@ -159,7 +159,7 @@
 *     have a gid_t, but very few use it for getgroups()).
 */

-/* #define HAVE_MULTIGROUP     /* BSD */
+#define HAVE_MULTIGROUP        /* BSD */

/*
 *     Define DETATCH_TERMINAL to be a command sequence which
@@ -201,7 +201,7 @@
 *     Specify the default mailer to be invoked by nnmail
 */

-#define        MAILX           "/usr/bin/mailx"        /* SV */
+#define        MAILX           "/usr/bin/mail" /* SV */
/* #define     MAILX   "/usr/ucb/Mail"         /* BSD */

/*
@@ -242,13 +242,13 @@
 *     Define standard compiler flags here:
 */

-#define COMPILER_FLAGS
+#define COMPILER_FLAGS -O6 -fomit-frame-pointer -pipe

/*
 *     Define standard loader flags here:
 */

-#define LOADER_FLAGS
+#define LOADER_FLAGS -s -Wl,-warn-common

/*
 *     If your system requires other libraries when linking nn
--- config.h-dist
+++ config.h-dist       1996/02/03 03:17:59
@@ -32,7 +32,7 @@
#define NOV

/* Optional */
-#define NOV_DIRECTORY "/usr/spool/news"
+#define NOV_DIRECTORY "/var/spool/news/over.view"

/*********************** NETWORK DEPENDENT DEFINITIONS **********************
 *
@@ -69,7 +69,7 @@
 *     Consult the file NNTP for further information on the use of NNTP.
 */

-#undef NNTP
+#define NNTP

/*
 *     Define NNTP_SERVER to the name of a file containing the name of the
@@ -104,7 +104,7 @@
 *     be present, define NNTP_MINI_INEWS_HEADER below.
 */

-#define NNTP_MINI_INEWS_HEADER /* uses "broken" mini-inews */
+#undef NNTP_MINI_INEWS_HEADER  /* uses "broken" mini-inews */

/*
 *     Define NNTP_PATH_HOSTNAME to force a specific hostname into the
@@ -126,7 +126,7 @@
 *     conf/s-template.h as a starting point for writing you own.
 */

-#include "s-sys5-4.h"
+#include "s-template.h"

/*
 *     Define DEFAULT_PAGER as the initial value of the 'pager' variable.
@@ -141,8 +141,8 @@
 *     nn's :print command pipes text into this command.
 */

-#define DEFAULT_PRINTER                "lp -s"                 /* System V */
-/* #define DEFAULT_PRINTER     "lpr -p -JNEWS" */      /* bsd */
+/* #define DEFAULT_PRINTER             "lp -s"                 /* System V */
+#define DEFAULT_PRINTER        "lpr"           /* bsd */

/*
 *     Define RESIZING to make nn understand dynamic window-resizing.
@@ -152,7 +152,7 @@
 *     PLEASE DEFINE THIS IN YOUR conf/s-<os>.h FILE INSTEAD!!
 */

-/* #define RESIZING            */
+#define RESIZING

/*
 *     Include file configuration.  Most systems with an ANSI conformant C
@@ -164,19 +164,19 @@
 */

/* Do you have /usr/include/string.h */
-/* #define HAVE_STRING_H */
+#define HAVE_STRING_H

/* Do you have /usr/include/unistd.h */
-/* #define HAVE_UNISTD_H */
+#define HAVE_UNISTD_H

/* Do you have /usr/include/stdlib.h */
-/* #define HAVE_STDLIB_H */
+#define HAVE_STDLIB_H

/* Do you have /usr/include/memory.h */
-/* #define HAVE_MEMORY_H */
+#define HAVE_MEMORY_H

/* Do you have /usr/include/fcntl.h */
-/* #define HAVE_FCNTL_H */
+#define HAVE_FCNTL_H

/********************** MACHINE DEPENDENT DEFINITIONS **********************
 *
@@ -186,7 +186,7 @@
 *     conf/m-template.h as a starting point for writing you own.
 */

-#include "m-i80386.h"
+#include "m-template.h"


/***************************** OWNERSHIP ***************************
@@ -203,8 +203,8 @@
 *     Common choices are:  (news, news)  and   (your uid, your gid)
 */

-#define OWNER  "news"
-#define        GROUP   "news"
+#define OWNER  "root"
+#define        GROUP   "root"


/**************************** LOCALIZATION ****************************
@@ -237,8 +237,8 @@
 *                        (= LIB_DIRECTORY/Log if undefined).
 */

-#define BIN_DIRECTORY  "/usr/local/bin"
-#define LIB_DIRECTORY  "/usr/local/lib/nn"
+#define BIN_DIRECTORY  "/usr/bin"
+#define LIB_DIRECTORY  "/usr/lib/nn"


/**************************** DATABASE LOCATION **************************
@@ -292,10 +292,10 @@
 *                               Default: NEWS_LIB_DIR/{rm,del}group
 */

-#define NEWS_DIRECTORY         "/usr/spool/news"
+#define NEWS_DIRECTORY         "/var/spool/news"
#define NEWS_LIB_DIRECTORY     "/usr/lib/news"

-/* #define INEWS_PATH          "/usr/lib/news/inews"   */
+#define INEWS_PATH             "/usr/lib/news/inews"


/*
@@ -317,7 +317,7 @@
 */

/* #define REC_MAIL    "/usr/lib/news/recmail" */      /* non-sendmail */
-#define REC_MAIL       "/usr/lib/sendmail -t"          /* sendmail */
+#define REC_MAIL       "/usr/sbin/sendmail -t"         /* sendmail */


/*
@@ -471,7 +471,7 @@
 *     Defining this will make NN announce itself including the build number
 *     like "NN version 6.5.xx #12", rather than "NN version 6.5.xx".
 */
-#define CONFIG_NUM_IN_VERSION
+/* #define CONFIG_NUM_IN_VERSION */

/*
 *     NO_X_NEWSREADER
--- digest.c
+++ digest.c    1996/02/03 03:17:59
@@ -13,6 +13,7 @@
#include "debug.h"

/* digest.c */
+struct digest_header digest;

static char **dg_hdr_field __APROTO((register char *lp, int all));

--- global.c
+++ global.c    1996/02/03 03:17:59
@@ -68,7 +68,7 @@
#include <sys/param.h>
#endif
#ifndef GIDSET_TYPE
-#define GIDSET_TYPE int
+#define GIDSET_TYPE gid_t
#endif
static int ngroups;
static GIDSET_TYPE gidset[NGROUPS];
--- global.h
+++ global.h    1996/02/03 03:17:59
@@ -80,11 +80,13 @@
#define S_IFREG        0100000                 /* regular */
#endif

+#if 0
#ifndef O_RDONLY
#define        O_RDONLY        0
#define        O_WRONLY        1
#define        O_RDWR          2
#endif
+#endif

/* define types of library functions */

@@ -222,7 +224,7 @@
extern group_header *lookup();


-int l_g_index, s_g_first;
+extern int l_g_index, s_g_first;

#define        Loop_Groups_Number(num) \
    for (num = 0; num < master.number_of_groups; num++)
@@ -650,7 +652,7 @@
int    nntp_set_group          __APROTO((group_header *gh));
int    nntp_get_active         __APROTO((void));
FILE * nntp_get_newsgroups     __APROTO((void));
-struct novgroup *nntp_get_overview     __APROTO((group_header *gh, int low, int high));
+struct novgroup *nntp_get_overview     __APROTO((group_header *gh, article_number low, article_number high));
FILE * nntp_fopen_list         __APROTO((char *cmd));
char * nntp_fgets              __APROTO((char *buf, int size));
article_number *nntp_get_article_list  __APROTO((group_header *gh));
--- inst.sh
+++ inst.sh     1996/02/03 03:18:46
@@ -289,7 +289,7 @@

       for link in $BIN_LINK
       do
-               ln $BIN/nn $BIN/$link
+               ln -sf $BIN/nn $BIN/$link
               echo $link linked to nn
       done

--- local_curses.h.diff
+++ local_curses.h.diff 1996/02/03 03:17:59
@@ -0,0 +1,18 @@
+--- local_curses.h.orig        Tue Jan 16 01:07:48 1996
++++ local_curses.h     Tue Jan 16 01:11:24 1996
+@@ -32,7 +32,6 @@
+
+ #include <stdio.h>
+ #include <unctrl.h>
+-#include <stdarg.h>
+ #ifdef XPG4_EXTENDED
+ #include <stddef.h>   /* we want wchar_t */
+ #endif /* XPG4_EXTENDED */
+@@ -636,7 +635,6 @@
+ #ifdef XPG4_EXTENDED
+ extern int slk_wset(int, wchar_t *, int);             /* missing */
+ #endif /* XPG4_EXTENDED */
+-extern int standout(void);                            /* generated */
+ extern int standend(void);                            /* generated */
+ extern int start_color(void);                         /* implemented */
+ extern WINDOW *subpad(WINDOW *, int, int, int, int);  /* implemented */
--- news.c
+++ news.c      1996/02/03 03:17:59
@@ -9,6 +9,7 @@


/* news.c */
+struct news_header news;

static char **art_hdr_field __APROTO((register char *lp, int all));

--- news.h
+++ news.h      1996/02/03 03:17:59
@@ -43,7 +43,8 @@
       char    *ng_xlines;     /*   lines (from header)        */
       int     ng_lines;       /*   lines (decoded)            */
       char    *ng_comment;    /*   comment-to (rfmail)        */
-} news;
+};
+extern struct news_header news;


/*
@@ -61,7 +62,8 @@
       char    *dg_to;         /*   to                         */

       int     dg_lines;       /*   lines (pseudo field)       */
-} digest;
+};
+extern struct digest_header digest;


#define        NEWS_HEADER_BUFFER      2048
--- nn.c
+++ nn.c        1996/02/03 03:17:59
@@ -15,6 +15,8 @@
#include <malloc.h>
#endif

+int prompt_line, l_g_index, s_g_first;
+
/* nn.c */

static int nn_locked __APROTO((void));
--- nn_term.h
+++ nn_term.h   1996/02/03 03:17:59
@@ -67,7 +67,7 @@

extern void prompt();

-int prompt_line;       /* prompt line */
+extern int prompt_line;        /* prompt line */

#define        P_MOVE          (char *)1
#define P_REDRAW       (char *)5
--- nntp.c
+++ nntp.c      1996/02/03 03:17:59
@@ -750,7 +750,7 @@
nntp_check()
{
    char host[128];
-    char *server_real_name;
+    const char *server_real_name;

    if (nntp_local_server) return;

--- term.c
+++ term.c      1996/02/03 03:17:59
@@ -30,7 +30,7 @@
# ifdef HPUX80
# include <termio.h>
# endif /* HPUX80 */
-# include <curses.h>
+# include "local_curses.h"
# ifndef VINTR
#  include <termio.h>  /* some systems don't include this in curses.h */
# endif /* VINTR */
@@ -55,7 +55,7 @@
/* term.c */

#ifdef __STDC__
-static int outc __APROTO((char c));
+static int outc __APROTO((int c));
#else
static int outc __APROTO(());
#endif
@@ -163,10 +163,10 @@

#ifdef __STDC__
static int
-outc(char c)
+outc(int c)
#else
static int
-outc(c) char c;
+outc(c) int c;
#endif
{
    putchar(c);
@@ -915,6 +915,7 @@
#ifdef TERM_DEBUG
       if (term_debug) fprintf(stderr, " margin");
#endif
+#ifndef USE_TERMINFO
       if (auto_right_margin) {
           if (eat_newline_glitch) {
               putchar(CR);
@@ -925,6 +926,7 @@
               if (curxy_l >= 0) curxy_l++;
           }
       } else
+#endif
           curxy_c--;
    }