Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9081 → Rev 9080

/programs/develop/ktcc/trunk/libc.obj/source/stdlib/strtol.c
2,6 → 2,11
#include <stdio.h>
#include <ctype.h>
 
#define LONG_MIN (-2147483647L-1)
#define LONG_MAX (2147483647L)
#define ULONG_MAX (4294967295UL)
 
 
int getdigit(char ch, int base)
{
if (isdigit(ch)) ch-= '0';
/programs/develop/ktcc/trunk/libc.obj/source/stdio/gets.c
11,10 → 11,6
errno = EIO;
return NULL;
}
int str_len = strlen(str);
if(str[str_len-1]=='\n'){
str[str_len-1]='\0';
}
str[strlen(str)-1]='\0';
return str;
}
}
/programs/develop/ktcc/trunk/libc.obj/source/stdio/fgets.c
11,8 → 11,14
return NULL;
}
i = fread(str, n-1, sizeof(char), stream);
while (i<n-1){
sym_code = fgetc(stream);
if(sym_code =='\n' || sym_code == EOF){ break; }
str[i]=(char)sym_code;
i++;
}
if(i<1){ return NULL; }
return str;
}