diff options
Diffstat (limited to 'news/newsfetch')
-rw-r--r-- | news/newsfetch/Makefile | 3 | ||||
-rw-r--r-- | news/newsfetch/files/patch-newsfetch.1 | 6 | ||||
-rw-r--r-- | news/newsfetch/files/patch-newsfetch.c | 10 | ||||
-rw-r--r-- | news/newsfetch/files/patch-nntp.c | 210 | ||||
-rw-r--r-- | news/newsfetch/files/patch-opt.c | 6 | ||||
-rw-r--r-- | news/newsfetch/files/patch-util.c | 6 |
6 files changed, 121 insertions, 120 deletions
diff --git a/news/newsfetch/Makefile b/news/newsfetch/Makefile index 56178b3..2d33f2e 100644 --- a/news/newsfetch/Makefile +++ b/news/newsfetch/Makefile @@ -12,7 +12,8 @@ COMMENT= Download news articles from NNTP server MAKE_ENV= BINDIR="${PREFIX}/bin" MANDIR="${PREFIX}/man/man" -USES= uidfix +USES= dos2unix uidfix +DOS2UNIX_GLOB= *.c CFLAGS+= -Wno-return-type PLIST_FILES= bin/newsfetch \ man/man1/newsfetch.1.gz diff --git a/news/newsfetch/files/patch-newsfetch.1 b/news/newsfetch/files/patch-newsfetch.1 index 5f9b06c..57d9634 100644 --- a/news/newsfetch/files/patch-newsfetch.1 +++ b/news/newsfetch/files/patch-newsfetch.1 @@ -1,6 +1,6 @@ ---- newsfetch.1.orig Tue Apr 14 20:04:25 1998 -+++ newsfetch.1 Fri Jan 26 23:41:22 2001 -@@ -5,7 +5,7 @@ +--- newsfetch.1.orig 1998-04-14 11:04:25 UTC ++++ newsfetch.1 +@@ -5,7 +5,7 @@ newsfetch - Pull news from an NNTP serve .SH SYNOPSIS .B newsfetch .BI diff --git a/news/newsfetch/files/patch-newsfetch.c b/news/newsfetch/files/patch-newsfetch.c index 46a011a..ad82fa1 100644 --- a/news/newsfetch/files/patch-newsfetch.c +++ b/news/newsfetch/files/patch-newsfetch.c @@ -1,5 +1,5 @@ ---- newsfetch.c.orig Thu Jul 23 18:28:56 1998 -+++ newsfetch.c Fri Jan 26 23:41:22 2001 +--- newsfetch.c.orig 2016-06-20 15:59:53 UTC ++++ newsfetch.c @@ -7,6 +7,7 @@ @@ -8,7 +8,7 @@ #include <signal.h> #include <pwd.h> #include <sys/types.h> -@@ -28,6 +29,7 @@ +@@ -28,6 +29,7 @@ int terminate = 1; int wait_after_articles = 0, articles_fetched=0, last_than_current; int wait_for_time = 0, timeout=READ_TIMEOUT, article_fetching=0; int cleanup=1, max_article, news_target=0, first_article, only_list=0; @@ -16,7 +16,7 @@ char group[100], pipe_command[100]; FILE *rcfp, *rctmpfp, *socket_fp[2]; char lockfile[100]; -@@ -59,6 +61,16 @@ +@@ -59,6 +61,16 @@ if(argc < 2) getHomedir(homedir); strcpy(hostname,argv[1]); @@ -33,7 +33,7 @@ get_commandline(argc, argv, dirname, rcfile, &cleanup, &wait_after_articles, &wait_for_time, &command_flag, execute_command, -@@ -75,7 +87,7 @@ +@@ -75,7 +87,7 @@ if(argc < 2) generateProcmailrc(homedir, rcfile, dirname, pipe_command); } diff --git a/news/newsfetch/files/patch-nntp.c b/news/newsfetch/files/patch-nntp.c index 5505313..7cccade 100644 --- a/news/newsfetch/files/patch-nntp.c +++ b/news/newsfetch/files/patch-nntp.c @@ -1,106 +1,106 @@ ---- nntp.c.orig Thu Jul 23 12:03:11 1998 -+++ nntp.c Thu Jan 27 17:19:01 2005 -@@ -20,6 +20,7 @@ -
- char *header;
- #define MAXBUFSIZE 500
+--- nntp.c.orig 2016-06-20 15:59:53 UTC ++++ nntp.c +@@ -20,6 +20,7 @@ extern FILE *rcfp, *rctmpfp, *socket_fp[ + + char *header; + #define MAXBUFSIZE 500 +#define GROUP_FMT "%99s" - char command_buf[MAXBUFSIZE+1];
-
- readNNTPdata()
-@@ -33,7 +34,7 @@ - {
- /* dummy read to flush input */
- readNNTPdata();
-- fprintf(socket_fp[0],"MODE READER\n");
-+ fprintf(socket_fp[0],"MODE READER\r\n");
- readNNTPdata();
- return(get_error(command_buf));
- }
-@@ -140,7 +141,8 @@ - else
- fprintf(rctmpfp,"%s",command_buf);
- }
-- items_read=sscanf(command_buf,"%s %d %d", group, &first_article, &max_article);
-+ items_read=sscanf(command_buf,GROUP_FMT "%d %d", group, &first_article, &max_article);
-+ group[sizeof(group)-1] = '\0';
- if(items_read < 2)
- return(0);
- return(items_read);
-@@ -151,7 +153,7 @@ - int first_art, last_art, total_art, tmp ;
-
- fprintf(stderr,"%s: ",group);
-- fprintf(socket_fp[0],"GROUP %s\n",group);
-+ fprintf(socket_fp[0],"GROUP %s\r\n",group);
- readNNTPdata();
-
- #ifdef DEBUG
-@@ -180,7 +182,7 @@ - first_article = last_art - max_article + 1;
- }
-
-- fprintf(socket_fp[0],"STAT %d\n",first_article);
-+ fprintf(socket_fp[0],"STAT %d\r\n",first_article);
- readNNTPdata();
-
- while(!get_error1(command_buf))
-@@ -196,7 +198,7 @@ - return(0);
- }
-
-- fprintf(socket_fp[0],"STAT %d\n",first_article);
-+ fprintf(socket_fp[0],"STAT %d\r\n",first_article);
- readNNTPdata();
- }
- fprintf(stderr,"articles %d to %d\n",first_article,last_art);
-@@ -256,7 +258,7 @@ - fprintf(stderr," %c",0xd);
- }
-
-- fprintf(socket_fp[0],"ARTICLE\n");
-+ fprintf(socket_fp[0],"ARTICLE\r\n");
- readNNTPdata();
- if(!get_error(command_buf))
- return(0);
-@@ -275,7 +277,7 @@ - }
-
- /* Make it little fast */
-- fprintf(socket_fp[0],"NEXT\n");
-+ fprintf(socket_fp[0],"NEXT\r\n");
-
- article_fetching=1;
-
-@@ -329,17 +331,19 @@ - char groupname[100];
-
- fprintf(stderr, "\nList of NewsGroups:\n");
-- fprintf(socket_fp[0],"LIST\n");
-+ fprintf(socket_fp[0],"LIST\r\n");
- readNNTPdata();
- if(!get_error2(command_buf))
- exit(1);
- readNNTPdata();
-- sscanf(command_buf,"%s",groupname);
-+ sscanf(command_buf,GROUP_FMT,groupname);
-+ groupname[sizeof(groupname)-1] = '\0';
- while(command_buf[0] != '.' || command_buf[1] != 13 )/*|| command_buf[1] != 10)*/
- {
- fprintf(stderr,"%s\n",groupname);
- readNNTPdata();
-- sscanf(command_buf,"%s",groupname);
-+ sscanf(command_buf,GROUP_FMT,groupname);
-+ groupname[sizeof(groupname)-1] = '\0';
- }
- exit(1);
-
-@@ -348,7 +352,7 @@ - sendQuit()
- {
-
-- fprintf(socket_fp[0],"QUIT\n");
-+ fprintf(socket_fp[0],"QUIT\r\n");
- readNNTPdata();
- }
-
+ char command_buf[MAXBUFSIZE+1]; + + readNNTPdata() +@@ -33,7 +34,7 @@ setReaderMode() + { + /* dummy read to flush input */ + readNNTPdata(); +- fprintf(socket_fp[0],"MODE READER\n"); ++ fprintf(socket_fp[0],"MODE READER\r\n"); + readNNTPdata(); + return(get_error(command_buf)); + } +@@ -140,7 +141,8 @@ while(comment) + else + fprintf(rctmpfp,"%s",command_buf); + } +- items_read=sscanf(command_buf,"%s %d %d", group, &first_article, &max_article); ++ items_read=sscanf(command_buf,GROUP_FMT "%d %d", group, &first_article, &max_article); ++ group[sizeof(group)-1] = '\0'; + if(items_read < 2) + return(0); + return(items_read); +@@ -151,7 +153,7 @@ checkGroup() + int first_art, last_art, total_art, tmp ; + + fprintf(stderr,"%s: ",group); +- fprintf(socket_fp[0],"GROUP %s\n",group); ++ fprintf(socket_fp[0],"GROUP %s\r\n",group); + readNNTPdata(); + + #ifdef DEBUG +@@ -180,7 +182,7 @@ int first_art, last_art, total_art, tmp + first_article = last_art - max_article + 1; + } + +- fprintf(socket_fp[0],"STAT %d\n",first_article); ++ fprintf(socket_fp[0],"STAT %d\r\n",first_article); + readNNTPdata(); + + while(!get_error1(command_buf)) +@@ -196,7 +198,7 @@ int first_art, last_art, total_art, tmp + return(0); + } + +- fprintf(socket_fp[0],"STAT %d\n",first_article); ++ fprintf(socket_fp[0],"STAT %d\r\n",first_article); + readNNTPdata(); + } + fprintf(stderr,"articles %d to %d\n",first_article,last_art); +@@ -256,7 +258,7 @@ int check_header = 1; + fprintf(stderr," %c",0xd); + } + +- fprintf(socket_fp[0],"ARTICLE\n"); ++ fprintf(socket_fp[0],"ARTICLE\r\n"); + readNNTPdata(); + if(!get_error(command_buf)) + return(0); +@@ -275,7 +277,7 @@ int check_header = 1; + } + + /* Make it little fast */ +- fprintf(socket_fp[0],"NEXT\n"); ++ fprintf(socket_fp[0],"NEXT\r\n"); + + article_fetching=1; + +@@ -329,17 +331,19 @@ getGroupList() + char groupname[100]; + + fprintf(stderr, "\nList of NewsGroups:\n"); +- fprintf(socket_fp[0],"LIST\n"); ++ fprintf(socket_fp[0],"LIST\r\n"); + readNNTPdata(); + if(!get_error2(command_buf)) + exit(1); + readNNTPdata(); +- sscanf(command_buf,"%s",groupname); ++ sscanf(command_buf,GROUP_FMT,groupname); ++ groupname[sizeof(groupname)-1] = '\0'; + while(command_buf[0] != '.' || command_buf[1] != 13 )/*|| command_buf[1] != 10)*/ + { + fprintf(stderr,"%s\n",groupname); + readNNTPdata(); +- sscanf(command_buf,"%s",groupname); ++ sscanf(command_buf,GROUP_FMT,groupname); ++ groupname[sizeof(groupname)-1] = '\0'; + } + exit(1); + +@@ -348,7 +352,7 @@ exit(1); + sendQuit() + { + +- fprintf(socket_fp[0],"QUIT\n"); ++ fprintf(socket_fp[0],"QUIT\r\n"); + readNNTPdata(); + } + diff --git a/news/newsfetch/files/patch-opt.c b/news/newsfetch/files/patch-opt.c index a07d560..05111da 100644 --- a/news/newsfetch/files/patch-opt.c +++ b/news/newsfetch/files/patch-opt.c @@ -1,6 +1,6 @@ ---- opt.c.orig Wed Nov 19 19:01:47 2003 -+++ opt.c Wed Nov 19 19:01:47 2003 -@@ -192,8 +192,8 @@ +--- opt.c.orig 2016-06-20 15:59:53 UTC ++++ opt.c +@@ -192,8 +192,8 @@ opt_help(char *prog_name) { char *options= diff --git a/news/newsfetch/files/patch-util.c b/news/newsfetch/files/patch-util.c index b90dc04..fc262b6 100644 --- a/news/newsfetch/files/patch-util.c +++ b/news/newsfetch/files/patch-util.c @@ -1,6 +1,6 @@ ---- util.c.orig Wed Nov 19 19:01:47 2003 -+++ util.c Wed Nov 19 19:01:47 2003 -@@ -61,15 +61,15 @@ +--- util.c.orig 2016-06-20 15:59:53 UTC ++++ util.c +@@ -61,15 +61,15 @@ generateProcmailrc(char *homedir, char * FILE *fp, *fp1, *fp2; char *tmp, buf[200], group[180], filterfile[100], procmailrcfile[100]; int i,j; |