89 lines
1.8 KiB
Text
89 lines
1.8 KiB
Text
$NetBSD: patch-ad,v 1.2 2012/11/19 03:00:14 joerg Exp $
|
|
|
|
--- inews.c.orig 1994-08-11 21:37:50.000000000 +0000
|
|
+++ inews.c
|
|
@@ -16,7 +16,14 @@ static char *sccsid = "@(#)$Id: inews.c,
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
#include <ctype.h>
|
|
+#include <unistd.h>
|
|
+#ifdef USG
|
|
+#include <string.h>
|
|
+#else /* not USG */
|
|
+#include <strings.h>
|
|
+#endif /* not USG */
|
|
#include "config.h"
|
|
#include "nntp.h"
|
|
#include "nntpclnt.h"
|
|
@@ -27,11 +34,6 @@ extern struct passwd *getpwuid();
|
|
extern struct passwd *getpwnam();
|
|
#endif
|
|
#endif
|
|
-#ifdef USG
|
|
-#include <string.h>
|
|
-#else /* not USG */
|
|
-#include <strings.h>
|
|
-#endif /* not USG */
|
|
/* for gen_frompath() */
|
|
#define FROM 1
|
|
#define PATH 2
|
|
@@ -55,9 +57,14 @@ char *homedir;
|
|
char *fullname;
|
|
#endif
|
|
|
|
-main(argc, argv)
|
|
-int argc;
|
|
-char *argv[];
|
|
+void append_signature(void);
|
|
+int valid_header(char *);
|
|
+int postauth(char *, char *);
|
|
+void gen_frompath(int);
|
|
+int uname(char *uptr);
|
|
+
|
|
+int
|
|
+main(int argc, char *argv[])
|
|
{
|
|
char line[NNTP_STRLEN], s[NNTP_STRLEN];
|
|
int seen_fromline, in_header, seen_header, seen_pathline;
|
|
@@ -307,7 +314,8 @@ again:
|
|
* The rn-style DOTDIR environmental variable is used if present.
|
|
*/
|
|
|
|
-append_signature()
|
|
+void
|
|
+append_signature(void)
|
|
{
|
|
char line[256], sigfile[256];
|
|
char *cp;
|
|
@@ -390,8 +398,8 @@ append_signature()
|
|
* a From: line in it.
|
|
*/
|
|
|
|
-gen_frompath(which)
|
|
-int which;
|
|
+void
|
|
+gen_frompath(int which)
|
|
{
|
|
char *s;
|
|
char *cp;
|
|
@@ -460,7 +468,7 @@ int which;
|
|
putc(*cp, ser_wr_fp);
|
|
else { /* Stupid & hack. God damn it. */
|
|
putc(toupper(username[0]), ser_wr_fp);
|
|
- fprintf(ser_wr_fp, username+1);
|
|
+ fprintf(ser_wr_fp, "%s", username+1);
|
|
}
|
|
fprintf(ser_wr_fp, ")\r\n");
|
|
}
|
|
@@ -484,8 +492,7 @@ int which;
|
|
*
|
|
*/
|
|
|
|
-int valid_header(h)
|
|
-register char *h;
|
|
+int valid_header(char *h)
|
|
{
|
|
char *index();
|
|
char *colon, *space;
|