Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 169 → Rev 219

/programs/develop/metcc/trunk/libc/include/ctype.h
0,0 → 1,31
/*
** All character classification functions except isascii().
** Integer argument (c) must be in ASCII range (0-127) for
** dependable answers.
*/
 
#define ALNUM 1
#define ALPHA 2
#define CNTRL 4
#define DIGIT 8
#define GRAPH 16
#define LOWER 32
#define PRINT 64
#define PUNCT 128
#define BLANK 256
#define UPPER 512
#define XDIGIT 1024
 
extern char _is[128];
 
#define isalnum(c)(_is[c] & ALNUM ) /* 'a'-'z', 'A'-'Z', '0'-'9' */
#define isalpha(c)(_is[c] & ALPHA ) /* 'a'-'z', 'A'-'Z' */
#define iscntrl(c)(_is[c] & CNTRL ) /* 0-31, 127 */
#define isdigit(c)(_is[c] & DIGIT ) /* '0'-'9' */
#define isgraph(c)(_is[c] & GRAPH ) /* '!'-'~' */
#define islower(c)(_is[c] & LOWER ) /* 'a'-'z' */
#define isprint(c)(_is[c] & PRINT ) /* ' '-'~' */
#define ispunct(c)(_is[c] & PUNCT ) /* !alnum && !cntrl && !space */
#define isspace(c)(_is[c] & BLANK ) /* HT, LF, VT, FF, CR, ' ' */
#define isupper(c)(_is[c] & UPPER ) /* 'A'-'Z' */
#define isxdigit(c)(_is[c] & XDIGIT) /* '0'-'9', 'a'-'f', 'A'-'F' */
/programs/develop/metcc/trunk/libc/include/mesys.h
2,9 → 2,16
#define mesys_h
#ifdef GNUC
#define stdcall __stdcall
#define cdecl __cdecl
#else
#define stdcall __attribute__ ((__stdcall))
#define cdecl __attribute__ ((__cdecl))
#endif
 
typedef unsigned long dword;
typedef unsigned char byte;
typedef unsigned short word;
 
extern void stdcall _msys_draw_window(int xcoord,int ycoord, int xsize,
int ysize,int workcolor,int type,
int captioncolor,int windowtype,int bordercolor);
95,4 → 102,8
extern void* malloc(int);
extern void free(void*);
extern void* realloc(void*,int);
 
extern dword* stdcall _msys_cofflib_load(char* name);
extern char* stdcall _msys_cofflib_getproc(void* exp,char* sz_name);
 
#endif
/programs/develop/metcc/trunk/libc/include/stdio.h
1,6 → 1,7
#ifndef stdio_h
#define stdio_h
#include "mesys.h"
#define NULL (void*)0
typedef struct {
char* buffer;
int buffersize;
/programs/develop/metcc/trunk/libc/include/stdlib.h
0,0 → 1,9
//#define isspace(c) ((c)==' ')
#define abs(i) (((i)<0)?(-(i)):(i))
 
extern int atoib(char *s,int b);
extern int atoi(char *s);
extern char tolower(char c);
extern char toupper(char c);
extern void itoab(int n,char* s,int b);
extern void itoa(int n,char* s);