updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cdecl / fix-getline.patch
blob1fc3c047575c0db8310ff712bdbd5e4a10d2b229
1 diff -Naur cdecl-2.5/cdecl.c cdecl-2.5-new/cdecl.c
2 --- cdecl-2.5/cdecl.c 1996-01-15 21:54:46.000000000 -0600
3 +++ cdecl-2.5-new/cdecl.c 2010-09-04 03:12:43.000000000 -0500
4 @@ -90,7 +90,7 @@
5 #ifdef USE_READLINE
6 # include <readline/readline.h>
7 /* prototypes for functions related to readline() */
8 - char * getline();
9 + char * our_getline(void);
10 char ** attempt_completion(char *, int, int);
11 char * keyword_completion(char *, int);
12 char * command_completion(char *, int);
13 @@ -375,7 +375,7 @@
14 static char *line_read = NULL;
16 /* Read a string, and return a pointer to it. Returns NULL on EOF. */
17 -char * getline ()
18 +char * our_getline (void)
20 /* If the buffer has already been allocated, return the memory
21 to the free pool. */
22 @@ -887,7 +887,7 @@
24 if (!quiet) (void) printf("Type `help' or `?' for help\n");
25 ret = 0;
26 - while ((line = getline())) {
27 + while ((line = our_getline())) {
28 if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
29 free(line);
30 return ret;