mirror of
https://github.com/siemens-mobile-hacks/dc166-patch.git
synced 2026-11-25 19:37:24 +00:00
16 lines
294 B
C
16 lines
294 B
C
#include "dc166_stdio.h"
|
|
|
|
char *gets(char *string)
|
|
{
|
|
char *next = string;
|
|
int character = fgetc(stdin);
|
|
|
|
while (character != '\n' && character != EOF) {
|
|
*next++ = (char)character;
|
|
character = fgetc(stdin);
|
|
}
|
|
if (character == EOF)
|
|
return 0;
|
|
*next = 0;
|
|
return string;
|
|
}
|