diff options
Diffstat (limited to 'devel/cdecl/files/patch-cdecl.c')
-rw-r--r-- | devel/cdecl/files/patch-cdecl.c | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/devel/cdecl/files/patch-cdecl.c b/devel/cdecl/files/patch-cdecl.c index 8a79078dad97..1d593bb88054 100644 --- a/devel/cdecl/files/patch-cdecl.c +++ b/devel/cdecl/files/patch-cdecl.c @@ -1,5 +1,5 @@ ---- ./cdecl.c.orig 1996-01-16 04:54:46.000000000 +0100 -+++ ./cdecl.c 2013-06-10 00:06:29.231069167 +0200 +--- cdecl.c.orig 1996-01-16 03:54:46 UTC ++++ cdecl.c @@ -59,14 +59,22 @@ */ @@ -24,7 +24,16 @@ #else # ifndef NOVARARGS # include <varargs.h> -@@ -124,7 +132,6 @@ +@@ -90,7 +98,7 @@ void free(), exit(), perror(); + #ifdef USE_READLINE + # include <readline/readline.h> + /* prototypes for functions related to readline() */ +- char * getline(); ++ char * get_line(); + char ** attempt_completion(char *, int, int); + char * keyword_completion(char *, int); + char * command_completion(char *, int); +@@ -124,7 +132,6 @@ char real_prompt[MAX_NAME+3]; #if __STDC__ char *ds(char *), *cat(char *, ...), *visible(int); @@ -32,35 +41,44 @@ int main(int, char **); int yywrap(void); int dostdin(void); -@@ -138,7 +145,9 @@ +@@ -138,7 +145,9 @@ char real_prompt[MAX_NAME+3]; void docast(char*, char*, char*, char*); void dodexplain(char*, char*, char*, char*); void docexplain(char*, char*, char*, char*); -+#if __FreeBSD_version < 430001 || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500019) ++#if !defined __FreeBSD__ && !defined __DragonFly__ void setprogname(char *); +#endif int dotmpfile(int, char**), dofileargs(int, char**); #else char *ds(), *cat(), *visible(); -@@ -148,7 +157,9 @@ +@@ -148,7 +157,9 @@ char real_prompt[MAX_NAME+3]; void unsupp(), notsupported(); void yyerror(); void doset(), dodeclare(), docast(), dodexplain(), docexplain(); -+#if __FreeBSD_version < 430001 || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500019) ++#if !defined __FreeBSD__ && !defined __DragonFly__ void setprogname(); +#endif int dotmpfile(), dofileargs(); #endif /* __STDC__ */ FILE *tmpfile(); -@@ -802,6 +813,7 @@ +@@ -375,7 +386,7 @@ char *options[] = { + static char *line_read = NULL; + + /* Read a string, and return a pointer to it. Returns NULL on EOF. */ +-char * getline () ++char * get_line () + { + /* If the buffer has already been allocated, return the memory + to the free pool. */ +@@ -802,6 +813,7 @@ void prompt() #endif } -+#if __FreeBSD_version < 430001 || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500019) ++#if !defined __FreeBSD__ && !defined __DragonFly__ /* Save away the name of the program from argv[0] */ void setprogname(argv0) char *argv0; -@@ -841,6 +853,7 @@ +@@ -841,6 +853,7 @@ char *argv0; real_prompt[len+2] = '\0'; } } @@ -68,3 +86,12 @@ /* Run down the list of keywords to see if the */ /* program is being called named as one of them */ +@@ -887,7 +900,7 @@ int dostdin() + + if (!quiet) (void) printf("Type `help' or `?' for help\n"); + ret = 0; +- while ((line = getline())) { ++ while ((line = get_line())) { + if (!strcmp(line, "quit") || !strcmp(line, "exit")) { + free(line); + return ret; |