X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Flibc%2Fstring.h;h=5a81cb843b75549c43decd57097f6cde8468da72;hb=11c798e50e505657d9b1680f28c1754f75442310;hp=fb146c029fa65e4bcc7293e15e0ffed9cf5b1a6f;hpb=626595465a2c6987606a6bc697df65130ad8c2d3;p=palacios.releases.git diff --git a/palacios/include/libc/string.h b/palacios/include/libc/string.h index fb146c0..5a81cb8 100644 --- a/palacios/include/libc/string.h +++ b/palacios/include/libc/string.h @@ -1,7 +1,7 @@ /* * String library * Copyright (c) 2001,2004 David H. Hovemeyer - * $Revision: 1.1 $ + * $Revision: 1.3 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -12,6 +12,20 @@ #include +/* Definition of the control structure for streams +*/ +typedef struct file_struct { + short level; /* fill/empty level of buffer */ + unsigned flags; /* File status flags */ + char fd; /* File descriptor */ + unsigned char hold; /* Ungetc char if no buffer */ + short bsize; /* Buffer size */ + unsigned char *buffer; /* Data transfer buffer */ + unsigned char *curp; /* Current active pointer */ + unsigned istemp; /* Temporary file indicator */ + short token; /* Used for validity checking */ +} FILE; + void* memset(void* s, int c, size_t n); void* memcpy(void *dst, const void* src, size_t n); void *memmove(void *dst, const void *src, size_t n); @@ -28,10 +42,22 @@ int atoi(const char *buf); char *strchr(const char *s, int c); char *strrchr(const char *s, int c); char *strpbrk(const char *s, const char *accept); +char *strncat(char *s1, const char *s2, size_t limit); +int fprintf(FILE *file, char *fmt, ...); +//int fflush(FILE *file); + + + +void abort (void) __attribute__ ((__noreturn__)); +#define _tolower(c) ((c) + 'a' - 'A') + +int tolower(int ch); /* Note: The ISO C standard puts this in , but we don't * have that header in GeekOS (yet). */ int snprintf(char *s, size_t size, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); + #endif /* STRING_H */ +