aboutsummaryrefslogtreecommitdiff
path: root/devel/cflow
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2011-09-16 06:44:47 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2011-09-16 06:44:47 +0000
commit8c87909dcd3fb7cd779ec62ccad49072e9333f68 (patch)
treef56ea3eceb776fefa24d197bc8eda6f35a1968e4 /devel/cflow
parentd4b8e4e7a7cf3fb01956d67928fbd304c58c347c (diff)
downloadports-8c87909dcd3fb7cd779ec62ccad49072e9333f68.tar.gz
ports-8c87909dcd3fb7cd779ec62ccad49072e9333f68.zip
Notes
Diffstat (limited to 'devel/cflow')
-rw-r--r--devel/cflow/files/patch-ab55
-rw-r--r--devel/cflow/files/patch-prcc.c82
-rw-r--r--devel/cflow/files/patch-prcg.c84
-rw-r--r--devel/cflow/files/patch-prcg.prototypes.h15
4 files changed, 216 insertions, 20 deletions
diff --git a/devel/cflow/files/patch-ab b/devel/cflow/files/patch-ab
index 864b02cfd0be..f86a9b48aabe 100644
--- a/devel/cflow/files/patch-ab
+++ b/devel/cflow/files/patch-ab
@@ -1,20 +1,35 @@
-*** prcc.prototypes.h.orig Sun Oct 30 14:32:00 1994
---- prcc.prototypes.h Fri Sep 29 04:06:51 1995
-***************
-*** 16,23 ****
- static void per_file_init(void);
- static void per_file_cleanup(void);
- static BOOLEAN name_redefined(int isvar);
-! static void display_keywords(const char *type, char **words);
-! static void show_all_keywords(void);
- static BOOLEAN name_to_list(name_t **lp, char *lex_name);
- static BOOLEAN name_from_list(name_t **lp);
- static BOOLEAN name_in_list(name_t *l);
---- 16,22 ----
- static void per_file_init(void);
- static void per_file_cleanup(void);
- static BOOLEAN name_redefined(int isvar);
-! static void show_all_lists(void);
- static BOOLEAN name_to_list(name_t **lp, char *lex_name);
- static BOOLEAN name_from_list(name_t **lp);
- static BOOLEAN name_in_list(name_t *l);
+--- prcc.prototypes.h.orig 1994-10-31 03:32:00.000000000 +0800
++++ prcc.prototypes.h 2011-09-16 09:33:20.000000000 +0800
+@@ -1,23 +1,22 @@
+ /* prcc.c */
+ static void usage(void);
+-void main(int argc, char **argv);
++int main(int argc, char **argv);
+ static void ctags(void);
+ static void maketag(int scope, int iscall);
+-static tag_push(char *b);
+-static tag_pop(char *b);
+-static lex_gettoken(void);
+-static cpp_open(char *name);
+-static cpp_nonwhite(void);
+-static cpp_getc(void);
++static int tag_push(char *b);
++static int tag_pop(char *b);
++static int lex_gettoken(void);
++static int cpp_open(char *name);
++static int cpp_nonwhite(void);
++static int cpp_getc(void);
+ static int cpp_ungetc(int ch);
+ static int file_open(char *name);
+ static int file_getc(void);
+-static file_ungetc(int ch);
++static int file_ungetc(int ch);
+ static void per_file_init(void);
+ static void per_file_cleanup(void);
+ static BOOLEAN name_redefined(int isvar);
+-static void display_keywords(const char *type, char **words);
+-static void show_all_keywords(void);
++static void show_all_lists(void);
+ static BOOLEAN name_to_list(name_t **lp, char *lex_name);
+ static BOOLEAN name_from_list(name_t **lp);
+ static BOOLEAN name_in_list(name_t *l);
diff --git a/devel/cflow/files/patch-prcc.c b/devel/cflow/files/patch-prcc.c
new file mode 100644
index 000000000000..32972f609f7c
--- /dev/null
+++ b/devel/cflow/files/patch-prcc.c
@@ -0,0 +1,82 @@
+--- prcc.c.orig 1995-02-16 13:36:48.000000000 +0800
++++ prcc.c 2011-09-16 09:32:36.000000000 +0800
+@@ -13,6 +13,7 @@ static char *version = "$Revision: 1.4 $
+ #include <string.h>
+ #include <stdlib.h>
+ #include <assert.h>
++#include <unistd.h>
+
+ typedef enum { FALSE=0, TRUE=1 } BOOLEAN;
+
+@@ -66,7 +67,7 @@ static void usage(void)
+ exit(2);
+ }
+
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ extern int optind;
+ extern char *optarg;
+@@ -552,7 +553,7 @@ static char *tag_stack[TAG_STACKSIZE];
+ static int tag_sp = 0;
+
+ /* pushes buffer onto tag stack */
+-static tag_push(char *b)
++static int tag_push(char *b)
+ {
+ if (tag_sp < TAG_STACKSIZE
+ && (tag_stack[tag_sp] = (char *) malloc(strlen(b) + 1)) != NULL) {
+@@ -563,7 +564,7 @@ static tag_push(char *b)
+ }
+
+ /* pops value off tag stack to buffer */
+-static tag_pop(char *b)
++static int tag_pop(char *b)
+ {
+ if (tag_sp) {
+ strcpy(b, tag_stack[--tag_sp]);
+@@ -612,7 +613,7 @@ static tag_pop(char *b)
+ * NAME [a-z]+ (really any valid name that isn't reserved word) */
+
+ /* returns token of next item in input */
+-static lex_gettoken(void)
++static int lex_gettoken(void)
+ {
+ static int expanded = 0; /* boolean: ARGSEND expanded? */
+
+@@ -823,7 +824,7 @@ static int cpp_prevch; /* an ungotten c
+ static int cpp_refsok; /* boolean: can we echo characters out to "refs"? */
+
+ /* This function opens the file & resets variables */
+-static cpp_open(char *name)
++static int cpp_open(char *name)
+ /* name of source file to be opened */
+ {
+ /* use the lower-level file_open function to open the file */
+@@ -837,7 +838,7 @@ static cpp_open(char *name)
+ }
+
+ /* returns next nonwhite-space character */
+-static cpp_nonwhite(void)
++static int cpp_nonwhite(void)
+ {
+ int ch;
+ int next;
+@@ -865,7 +866,7 @@ static cpp_nonwhite(void)
+
+
+ /* This function returns the next character which isn't part of a directive */
+-static cpp_getc(void)
++static int cpp_getc(void)
+ {
+ int ch; /* the next input character */
+ int i = 0;
+@@ -992,7 +993,7 @@ static int file_getc(void)
+ }
+
+ /* This function ungets a character from the current source file */
+-static file_ungetc(int ch)
++static int file_ungetc(int ch)
+ /* character to be ungotten */
+ {
+ return file_prevch = ch;
diff --git a/devel/cflow/files/patch-prcg.c b/devel/cflow/files/patch-prcg.c
new file mode 100644
index 000000000000..ea5d2d748c2e
--- /dev/null
+++ b/devel/cflow/files/patch-prcg.c
@@ -0,0 +1,84 @@
+--- prcg.c.orig 1995-02-16 13:36:48.000000000 +0800
++++ prcg.c 2011-09-16 09:28:07.000000000 +0800
+@@ -14,6 +14,7 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <string.h>
++#include <unistd.h>
+
+ #include "prcg.prototypes.h"
+ #ifndef PATH_MAX
+@@ -100,6 +101,7 @@ static void usage(void)
+ exit(1);
+ }
+
++int
+ main(int argc, char **argv)
+ {
+
+@@ -198,6 +200,7 @@ char tail_name[NAME_MAX] = ""; /* previo
+ * `name1<tab>name2<tab>reference<newline>.' Return 1 if the tail of arc
+ * name1 --> name2 (i.e., name1) is the tail the previous arc,
+ * otherwise 0. */
++int
+ get_arc(char *buf, char **ip, char **rp)
+ {
+
+@@ -244,7 +247,7 @@ struct imm_node *
+ struct imm_node *ip;
+
+ /* name already on name list */
+- if (np = nlist_contains(s)) {
++ if ((np = nlist_contains(s))) {
+ /* arc tail node installed && arc reference realloc'd */
+ if ((ip = node_to_arc(np, (struct imm_node *) 0)) != 0
+ && (np->imm_ref = realloc(np->imm_ref, strlen(t) + 1)) != NULL) {
+@@ -352,6 +355,7 @@ static struct imm_node *
+
+ /* Preorder traverse the DCG, printing the names of nodes as they
+ * are visited. */
++void
+ print_dcg(int argc, char **argv)
+ {
+ register int c;
+@@ -362,7 +366,7 @@ print_dcg(int argc, char **argv)
+ /* restart argument list; print only specified names */
+ for (optind = 1; (c = getopt(argc, argv, arglist)) != EOF;) {
+ if (c == 'r')
+- if (root_p = nlist_contains(optarg))
++ if ((root_p = nlist_contains(optarg)))
+ print_name(root_p, 1);
+ else
+ (void) fprintf(stderr, "%s: not found: %s\n", progname, optarg);
+@@ -383,6 +387,7 @@ print_dcg(int argc, char **argv)
+ * While travering the DCG, maintain an active list of nodes in the current
+ * path. If an active node is revisited, terminate the path and print a
+ * `cycle' mark. */
++void
+ print_name(struct name_node *node, int tabc)
+ {
+ static long line = 0; /* line number */
+@@ -457,6 +462,7 @@ int active_p = 0; /* current path size
+ /* makeactive simply puts a pointer to the nameblock into a stack with
+ * maximum depth DEPTH_MAX. the error return only happens for stack
+ * overflow. */
++int
+ makeactive(struct name_node *node)
+ {
+ if (active_p < DEPTH_MAX) {
+@@ -468,6 +474,7 @@ makeactive(struct name_node *node)
+ }
+
+ /* backup removes an item from the active stack */
++void
+ backup(void)
+ {
+ if (active_p)
+@@ -476,6 +483,7 @@ backup(void)
+
+ /* active checks whether the pointer which is its argument has already
+ * occurred on the active list, and returns 1 if so. */
++int
+ active(struct name_node *node)
+ {
+ register int i;
diff --git a/devel/cflow/files/patch-prcg.prototypes.h b/devel/cflow/files/patch-prcg.prototypes.h
new file mode 100644
index 000000000000..23e3a5dbfa63
--- /dev/null
+++ b/devel/cflow/files/patch-prcg.prototypes.h
@@ -0,0 +1,15 @@
+--- prcg.prototypes.h.orig 1994-11-14 03:32:00.000000000 +0800
++++ prcg.prototypes.h 2011-09-16 09:27:00.000000000 +0800
+@@ -8,9 +8,9 @@ struct imm_node *link_arc_node(char *s,
+ struct name_node *name_to_nlist(char *s, char *t);
+ struct imm_node *node_to_arc(struct name_node *np, struct imm_node *ip);
+ static struct imm_node *get_imm_node(void);
+-int print_dcg(int argc, char **argv);
+-int print_name(struct name_node *node, int tabc);
++void print_dcg(int argc, char **argv);
++void print_name(struct name_node *node, int tabc);
+ int makeactive(struct name_node *node);
+-int backup(void);
++void backup(void);
+ int active(struct name_node *node);
+ struct name_node *nlist_contains(char *s);