mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
23 lines
467 B
Plaintext
23 lines
467 B
Plaintext
|
*** string.c.orig Fri Sep 23 18:34:06 1994
|
||
|
--- string.c Fri Sep 23 18:50:39 1994
|
||
|
***************
|
||
|
*** 4,9 ****
|
||
|
--- 4,20 ----
|
||
|
#define strchr index
|
||
|
#endif
|
||
|
|
||
|
+ 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
|
||
|
* ---------------------------------------------------------- */
|