pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

agm: Fixes C syntax



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Jul 27 22:00:28 2016 +0200
Changeset:	524c4e15c6d8940ecef728d759027cf01b52a2aa

Modified Files:
	agm/Makefile
	agm/distinfo
	agm/patches/patch-gobble.c
	agm/patches/patch-listfuncs.c
	agm/patches/patch-main.c
	agm/patches/patch-output.c
	agm/patches/patch-progress.c
	agm/patches/patch-sort.c
	agm/patches/patch-wordfuncs.c
Added Files:
	agm/patches/patch-agm.h

Log Message:
agm: Fixes C syntax

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=524c4e15c6d8940ecef728d759027cf01b52a2aa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 agm/Makefile                  |  1 +
 agm/distinfo                  | 15 +++++++-------
 agm/patches/patch-agm.h       | 12 +++++++++++
 agm/patches/patch-gobble.c    | 13 +++++++-----
 agm/patches/patch-listfuncs.c | 22 +++++++++++++++++----
 agm/patches/patch-main.c      | 14 ++++++++-----
 agm/patches/patch-output.c    | 21 ++++++++++++++++----
 agm/patches/patch-progress.c  | 23 ++++++++++++++++++----
 agm/patches/patch-sort.c      | 14 ++++++++-----
 agm/patches/patch-wordfuncs.c | 46 ++++++++++++++++++++++++++++++++++++++-----
 10 files changed, 142 insertions(+), 39 deletions(-)

diffs:
diff --git a/agm/Makefile b/agm/Makefile
index 3e655c6..1f81352 100644
--- a/agm/Makefile
+++ b/agm/Makefile
@@ -12,6 +12,7 @@ LICENSE=	generic-nonlicense
 SUBST_CLASSES+=		rcsids
 SUBST_MESSAGE.rcsids=	Strip RCS IDs as they cause problems when patching.
 SUBST_STAGE.rcsids=	pre-patch
+SUBST_FILES.rcsids+=	agm.h
 SUBST_FILES.rcsids+=	gobble.c
 SUBST_FILES.rcsids+=	listfuncs.c
 SUBST_FILES.rcsids+=	main.c
diff --git a/agm/distinfo b/agm/distinfo
index c72e3bb..1bbebd9 100644
--- a/agm/distinfo
+++ b/agm/distinfo
@@ -5,11 +5,12 @@ RMD160 (agm-1.3.1.tar.gz) = b348b99ef9ef58f474d7a0acff572c369bbaf55e
 SHA512 (agm-1.3.1.tar.gz) = 143c6c3a31e542f59bbb0fab4372a2747f78b299fff07b9f136b41c930423b27a56f1c9635efa1248caf05d0449f6e63a0c5ed86d136a1c3ffa6309d64297687
 Size (agm-1.3.1.tar.gz) = 420211 bytes
 SHA1 (patch-Makefile) = 49f935efd6da8434f746989128fd1b6574f27369
-SHA1 (patch-gobble.c) = 0bc20bca00ca3e2238e249fdca9fd1a69a40df0e
-SHA1 (patch-listfuncs.c) = 52eaa5fff55ba1177e24948bc4426f3cff22ba35
-SHA1 (patch-main.c) = c3f24508acaa013a70cda5d58151ddee885bdd91
-SHA1 (patch-output.c) = ee69671c4b873056a96cb35ab5f525f7f33f8c62
+SHA1 (patch-agm.h) = 532bc4877dd89f0ba8f74b7a1e98b5d772b38e03
+SHA1 (patch-gobble.c) = 553d6db718e8a327412337865c20a72f8f10cb88
+SHA1 (patch-listfuncs.c) = 1f373ab86980f1ea327815e5d732ee3dbebfb5a0
+SHA1 (patch-main.c) = 48bfcf7e7c8b3fba25ef2e88f635eaac1b229ba0
+SHA1 (patch-output.c) = c9563d602a621ea9e515b690162ea26d1532c312
 SHA1 (patch-process.c) = 1a6668a805a384d03569d6691359c7b0a31915fb
-SHA1 (patch-progress.c) = 395cb49258341b2cc0b24408fc8a2b78038e3dc9
-SHA1 (patch-sort.c) = 1f065a965a3a0b8bd6cb4c6c2702dfd77de66645
-SHA1 (patch-wordfuncs.c) = 607d46dc6a998b432ef616bb64b33311ad0a7a78
+SHA1 (patch-progress.c) = fb9eec5f49342bce1516943668a85e6ea43a2c67
+SHA1 (patch-sort.c) = 9f8c2f11ec9591ca237722072262f2a8d628dd47
+SHA1 (patch-wordfuncs.c) = 3a10e0f27e5b9fe91efb942986ca7f4c9c0ef13c
diff --git a/agm/patches/patch-agm.h b/agm/patches/patch-agm.h
new file mode 100644
index 0000000..8c227cc
--- /dev/null
+++ b/agm/patches/patch-agm.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- agm.h.orig	1998-03-18 01:02:29.000000000 +0000
++++ agm.h
+@@ -134,5 +134,5 @@ extern struct wnode *lstart, *lend;
+ extern char main_RCSid[], gobble_RCSid[], listfuncs_RCSid[], output_RCSid[],
+             process_RCSid[], sort_RCSid[], wordfuncs_RCSid[], progress_RCSid[];
+ 
+-extern void copysmall();
+-extern void arm_timer(), disarm_timer();
++extern void copysmall(char *, char *);
++extern void arm_timer(void), disarm_timer(void);
diff --git a/agm/patches/patch-gobble.c b/agm/patches/patch-gobble.c
index 64ad4d5..eedc16d 100644
--- a/agm/patches/patch-gobble.c
+++ b/agm/patches/patch-gobble.c
@@ -1,19 +1,22 @@
 $NetBSD$
 
---- gobble.c.orig	2016-07-27 09:01:17.572044212 +0000
+--- gobble.c.orig	2016-07-27 19:51:51.430466649 +0000
 +++ gobble.c
-@@ -22,6 +22,10 @@ char gobble_RCSid[] = "Revision: 1.4 $";
+@@ -22,8 +22,11 @@ char gobble_RCSid[] = "Revision: 1.4 $";
  
  #include "agm.h"
  
+-gobble_file (filename, command)
+-    char *filename, *command;
 +#include <stdlib.h>
 +#include <unistd.h>
 +
 +void
- gobble_file (filename, command)
-     char *filename, *command;
++gobble_file (char *filename, char *command)
  {
-@@ -81,4 +85,3 @@ gobble_file (filename, command)
+   FILE *fp;
+   int is_a_tty2 = 0;
+@@ -81,4 +84,3 @@ gobble_file (filename, command)
    }
    if (notquiet) printf (" %d words\n", wordcount - before_count);
  }
diff --git a/agm/patches/patch-listfuncs.c b/agm/patches/patch-listfuncs.c
index 41d00f4..56086e9 100644
--- a/agm/patches/patch-listfuncs.c
+++ b/agm/patches/patch-listfuncs.c
@@ -1,14 +1,28 @@
 $NetBSD$
 
---- listfuncs.c.orig	2016-07-27 09:01:17.575344491 +0000
+--- listfuncs.c.orig	2016-07-27 19:51:51.433931684 +0000
 +++ listfuncs.c
-@@ -18,6 +18,9 @@ char listfuncs_RCSid[] = "Revision: 1.3 
+@@ -18,8 +18,10 @@ char listfuncs_RCSid[] = "Revision: 1.3 
  
  #include "agm.h"
  
+-destroy_list (ls, le)
+-    struct wnode *ls, *le;
 +#include <stdlib.h>
 +
 +void
- destroy_list (ls, le)
-     struct wnode *ls, *le;
++destroy_list (struct wnode *ls, struct wnode *le)
  {
+   struct wnode *loop = ls, *last;
+ 
+@@ -30,9 +32,7 @@ destroy_list (ls, le)
+   }
+ }
+ 
+-int addword (word, ls, le)
+-    char *word;
+-    struct wnode **ls, **le;
++int addword (char *word, struct wnode **ls, struct wnode **le)
+ {
+   struct wnode *new;
+   int i;
diff --git a/agm/patches/patch-main.c b/agm/patches/patch-main.c
index 6bd42d1..6f6e97c 100644
--- a/agm/patches/patch-main.c
+++ b/agm/patches/patch-main.c
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- main.c.orig	2016-07-27 09:01:17.578668308 +0000
+--- main.c.orig	2016-07-27 19:51:51.437389107 +0000
 +++ main.c
 @@ -60,6 +60,7 @@ char main_RCSid[] = "Revision: 1.11 $";
  #include "agm.h"
@@ -10,11 +10,15 @@ $NetBSD$
  
  int listdict = FALSE; /* just output the final word dictionary */
  int hardmin = FALSE; /* hard minimums on words */
-@@ -86,6 +87,7 @@ struct wnode *lstart = NULL, *lend = NUL
+@@ -86,9 +87,8 @@ struct wnode *lstart = NULL, *lend = NUL
  
  int pct= 0, lastpct = -1; /* percentage complete counters */
  
+-main (argc, argv)
+-  int argc;
+-  char **argv;
 +int
- main (argc, argv)
-   int argc;
-   char **argv;
++main (int argc, char **argv)
+ {
+   int wordno; /* loops along argument list */
+   void matchwords ();
diff --git a/agm/patches/patch-output.c b/agm/patches/patch-output.c
index 1d6ac16..a51c6b0 100644
--- a/agm/patches/patch-output.c
+++ b/agm/patches/patch-output.c
@@ -1,12 +1,25 @@
 $NetBSD$
 
---- output.c.orig	2016-07-27 09:17:40.617570040 +0000
+--- output.c.orig	2016-07-27 19:51:51.440788492 +0000
 +++ output.c
-@@ -24,6 +24,7 @@ char output_RCSid[] = "Revision: 1.5 $";
+@@ -24,8 +24,8 @@ char output_RCSid[] = "Revision: 1.5 $";
  
  #include "agm.h"
  
+-print_prevs (percent)
+-     int percent;
 +void
- print_prevs (percent)
-      int percent;
++print_prevs (int percent)
  {
+   int loop;
+ 
+@@ -46,8 +46,7 @@ print_prevs (percent)
+   spos += totlen + prevcount + 1;
+ }
+ 
+-list_dictionary (p)
+-  struct wnode *p;
++list_dictionary (struct wnode *p)
+ {
+   while (p != NULL) {
+     puts (p->word);
diff --git a/agm/patches/patch-progress.c b/agm/patches/patch-progress.c
index 053c0f4..23ee18a 100644
--- a/agm/patches/patch-progress.c
+++ b/agm/patches/patch-progress.c
@@ -1,17 +1,23 @@
 $NetBSD$
 
---- progress.c.orig	2016-07-27 09:17:40.624147412 +0000
+--- progress.c.orig	2016-07-27 19:51:51.447604861 +0000
 +++ progress.c
-@@ -7,6 +7,8 @@ char progress_RCSid[] = "Revision: 1.1 $
+@@ -7,18 +7,20 @@ char progress_RCSid[] = "Revision: 1.1 $
  
  #include "agm.h"
  
+-void print_progress () {
 +#include <signal.h>
 +
- void print_progress () {
++void print_progress (void) {
    printf ("%02d\b\b", pct);
    fflush (stdout);
-@@ -18,7 +20,7 @@ void arm_timer ()
+ }
+ 
+-void arm_timer ()
++void arm_timer (void)
+ {
+   struct sigaction action;
    struct itimerval tmr;
  
    action.sa_handler = &print_progress;
@@ -20,6 +26,15 @@ $NetBSD$
    action.sa_flags = 0;
    sigaction (SIGALRM, &action, NULL);
    
+@@ -29,7 +31,7 @@ void arm_timer ()
+   setitimer (ITIMER_REAL, &tmr, NULL);
+ }
+ 
+-void disarm_timer ()
++void disarm_timer (void)
+ {
+   struct sigaction action;
+   struct itimerval tmr;
 @@ -41,7 +43,7 @@ void disarm_timer ()
    setitimer (ITIMER_REAL, &tmr, NULL);
  
diff --git a/agm/patches/patch-sort.c b/agm/patches/patch-sort.c
index b2fb00a..1fa116c 100644
--- a/agm/patches/patch-sort.c
+++ b/agm/patches/patch-sort.c
@@ -1,12 +1,16 @@
 $NetBSD$
 
---- sort.c.orig	2016-07-27 09:17:40.627432117 +0000
+--- sort.c.orig	2016-07-27 19:51:51.450998798 +0000
 +++ sort.c
-@@ -14,6 +14,7 @@ char sort_RCSid[] = "Revision: 1.2 $";
+@@ -14,9 +14,8 @@ char sort_RCSid[] = "Revision: 1.2 $";
  
  #include "agm.h"
  
+-merge_sort (start, length)
+-    struct wnode **start;
+-    int length;
 +void
- merge_sort (start, length)
-     struct wnode **start;
-     int length;
++merge_sort (struct wnode **start, int length)
+ {
+   struct wnode *p, *q, *s1, *s2;
+   int i, cmp;
diff --git a/agm/patches/patch-wordfuncs.c b/agm/patches/patch-wordfuncs.c
index de28c3b..dc13dce 100644
--- a/agm/patches/patch-wordfuncs.c
+++ b/agm/patches/patch-wordfuncs.c
@@ -1,13 +1,49 @@
 $NetBSD$
 
---- wordfuncs.c.orig	2016-07-27 09:17:40.630710048 +0000
+--- wordfuncs.c.orig	2016-07-27 19:51:51.454404538 +0000
 +++ wordfuncs.c
-@@ -14,6 +14,8 @@ char wordfuncs_RCSid[] = "Revision: 1.2 
+@@ -14,9 +14,9 @@ char wordfuncs_RCSid[] = "Revision: 1.2 
  
  #include "agm.h"
  
+-int contains (word, subword, length)
+-    char *word, *subword;
+-    unsigned int *length;
 +#include <stdlib.h>
 +
- int contains (word, subword, length)
-     char *word, *subword;
-     unsigned int *length;
++int contains (char *word, char *subword, unsigned int *length)
+ {
+   char copyword[WORDLEN];
+   char *cpos, *sloop;
+@@ -36,8 +36,7 @@ int contains (word, subword, length)
+   return TRUE;
+ }
+ 
+-int eliminate (word, subword, remains)
+-    char *word, *subword, *remains;
++int eliminate (char *word, char *subword, char *remains)
+ {
+   char copyword[WORDLEN];
+   char *remloop = remains, *copyloop = copyword;
+@@ -55,8 +54,8 @@ int eliminate (word, subword, remains)
+   *remloop = '\0';
+ }
+ 
+-minus_process (word, command)
+-    char *word, *command;
++void
++minus_process (char *word, char *command)
+ {
+   char *minus_pos, copy[WORDLEN];
+   unsigned int dummy;
+@@ -78,9 +77,7 @@ minus_process (word, command)
+   }
+ }
+ 
+-void copysmall (s1, s2)
+-  char
+-      *s1, *s2;
++void copysmall (char *s1, char *s2)
+ {
+   while (*s2 != '\0') {
+     if (*s2 >= 'A' && *s2 <= 'Z') {


Home | Main Index | Thread Index | Old Index