Mercurial > hg > octave-nkf
comparison src/input.cc @ 1466:2f85a175308f
[project @ 1995-09-22 07:48:59 by jwe]
author | jwe |
---|---|
date | Fri, 22 Sep 1995 07:56:05 +0000 |
parents | b44fe7cf2a6b |
children | 89c587478067 |
comparison
equal
deleted
inserted
replaced
1465:3bb3848031a0 | 1466:2f85a175308f |
---|---|
52 #include <unistd.h> | 52 #include <unistd.h> |
53 #endif | 53 #endif |
54 | 54 |
55 // This must come before anything that includes iostream.h... | 55 // This must come before anything that includes iostream.h... |
56 // (This is apparently no longer true...) | 56 // (This is apparently no longer true...) |
57 extern "C" | 57 |
58 { | |
59 #include "readline/readline.h" | 58 #include "readline/readline.h" |
60 #include "readline/history.h" | 59 #include "readline/history.h" |
61 | |
62 extern void free_undo_list (); | |
63 | |
64 extern char *xmalloc (); | |
65 | 60 |
66 // Yes, this sucks, but it avoids a conflict with another readline | 61 // Yes, this sucks, but it avoids a conflict with another readline |
67 // function declared in iostream.h. | 62 // function declared in iostream.h. |
68 // (Apparently, there isn't one there now...) | 63 // (Apparently, there isn't one there now...) |
69 | 64 |
90 return line_from_stdin; | 85 return line_from_stdin; |
91 } | 86 } |
92 else | 87 else |
93 #endif | 88 #endif |
94 return readline (s); | 89 return readline (s); |
95 } | |
96 } | 90 } |
97 | 91 |
98 #include "defun.h" | 92 #include "defun.h" |
99 #include "dirfns.h" | 93 #include "dirfns.h" |
100 #include "error.h" | 94 #include "error.h" |
830 { | 824 { |
831 list_index++; | 825 list_index++; |
832 if (strncmp (name, hint, hint_len) == 0) | 826 if (strncmp (name, hint, hint_len) == 0) |
833 { | 827 { |
834 int len = 2 + prefix_len + strlen (name); | 828 int len = 2 + prefix_len + strlen (name); |
835 char *buf = (char *) xmalloc (len); | 829 char *buf = (char *) malloc (len); |
836 | 830 |
837 if (prefix) | 831 if (prefix) |
838 { | 832 { |
839 strcpy (buf, prefix); | 833 strcpy (buf, prefix); |
840 strcat (buf, "."); | 834 strcat (buf, "."); |