1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-02 01:20:54 +00:00
freebsd-ports/misc/mshell/files/patch-ae
2004-08-17 01:11:03 +00:00

31 lines
726 B
Plaintext

--- string.c~ Tue Aug 17 03:06:07 2004
+++ string.c Tue Aug 17 03:06:28 2004
@@ -4,6 +4,19 @@
#define strchr index
#endif
+char * strsave(char *);
+
+char *
+gets (char *s)
+{
+ char *x = fgets (s, WORDLEN, stdin);
+ if (x) {
+ char *p = strchr (x, '\n');
+ if (p)
+ *p = 0;
+ }
+ return x;
+}
/* function to find the position of sub_string in main_string
* ---------------------------------------------------------- */
@@ -260,7 +273,6 @@
/* if it has a multi-command delim, save rest for next time */
#define MULTI_CMD_DELIM ','
if (p = index(string, MULTI_CMD_DELIM)) {
- char *strsave();
struct inp_link *l;
*p++ = EOS;
if ((l=getnode(sizeof(*l))) && (l->input=strsave(p)))