]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/gets.c
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / gets.c
index 4177522d42fa7fe65b864fb0c9143e429d3bd0c5..377e0ba537b4bf7055006cd62108088a7808a4a2 100644 (file)
 
 
 
-char* gets (char* s)
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+char* __fastcall__ gets (char* s)
 {
-    int i, c;
+    int c;
+    int i = 0;
 
-    i = 0;
     do {
 
                /* Get next character */
-               c = fgetc (stdin);
-               if (c == -1) {
+               if ((c = fgetc (stdin)) == EOF) {
                    /* Error or EOF */
                    s [i] = 0;
                    if (stdin->f_flags & _FERROR) {
@@ -50,3 +55,4 @@ char* gets (char* s)
 
 
 
+