]> git.pld-linux.org Git - packages/cdecl.git/blame - getline.patch
- fix redefinition of getline(3)
[packages/cdecl.git] / getline.patch
CommitLineData
c0dae42e
JR
1--- cdecl-2.5/cdecl.c~ 2016-10-18 19:39:15.000000000 +0200
2+++ cdecl-2.5/cdecl.c 2016-10-18 19:40:38.931448163 +0200
3@@ -91,7 +91,7 @@
4 #ifdef USE_READLINE
5 # include <readline/readline.h>
6 /* prototypes for functions related to readline() */
7- char * getline();
8+ char * cdecl_getline();
9 char ** attempt_completion(char *, int, int);
10 char * keyword_completion(char *, int);
11 char * command_completion(char *, int);
12@@ -375,7 +375,7 @@
13 static char *line_read = NULL;
14
15 /* Read a string, and return a pointer to it. Returns NULL on EOF. */
16-char * getline ()
17+char * cdecl_getline ()
18 {
19 /* If the buffer has already been allocated, return the memory
20 to the free pool. */
21@@ -887,7 +887,7 @@
22
23 if (!quiet) (void) printf("Type `help' or `?' for help\n");
24 ret = 0;
25- while ((line = getline())) {
26+ while ((line = cdecl_getline())) {
27 if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
28 free(line);
29 return ret;
This page took 0.029409 seconds and 4 git commands to generate.