- Timestamp:
- Dec 16, 2007, 3:29:19 PM (13 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/configure.ac
r2109 r2144 89 89 90 90 AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h dlfcn.h termios.h) 91 AC_CHECK_FUNCS(signal ioctl vsnprintf getenv putenv strcasecmp htons)91 AC_CHECK_FUNCS(signal ioctl snprintf vsnprintf getenv putenv strcasecmp htons) 92 92 AC_CHECK_FUNCS(usleep gettimeofday) 93 93 -
libcaca/trunk/cucul/figfont.c
r2111 r2144 304 304 /* Open font: if not found, try .tlf, then .flf */ 305 305 f = _cucul_file_open(path, "r"); 306 #if !defined __KERNEL__ && defined HAVE_SNPRINTF 306 307 if(!f) 307 308 { … … 316 317 f = _cucul_file_open(altpath, "r"); 317 318 } 319 #endif 318 320 if(!f) 319 321 { -
libcaca/trunk/cucul/file.c
r2109 r2144 20 20 #include "common.h" 21 21 22 #if !defined (__KERNEL__)22 #if !defined __KERNEL__ 23 23 # include <stdio.h> 24 24 # include <stdlib.h> … … 34 34 #include "cucul_internals.h" 35 35 36 #if defined HAVE_ZLIB_H36 #if !defined __KERNEL__ && defined HAVE_ZLIB_H 37 37 static int zipread(cucul_file_t *, void *, unsigned int); 38 38 #endif 39 39 40 #if !defined __KERNEL__ 40 41 struct cucul_file 41 42 { 42 # if defined HAVE_ZLIB_H43 # if defined HAVE_ZLIB_H 43 44 unsigned char read_buffer[READSIZE]; 44 45 z_stream stream; 45 46 gzFile gz; 46 47 int eof, zip; 47 # endif48 # endif 48 49 FILE *f; 49 50 }; 51 #endif 50 52 51 53 cucul_file_t *_cucul_file_open(char const *path, const char *mode) 52 54 { 55 #if defined __KERNEL__ 56 return NULL; 57 #else 53 58 cucul_file_t *fp = malloc(sizeof(*fp)); 54 59 55 # if defined HAVE_ZLIB_H60 # if defined HAVE_ZLIB_H 56 61 uint8_t buf[4]; 57 62 unsigned int skip_size = 0; … … 100 105 return NULL; 101 106 } 102 # else107 # else 103 108 fp->f = fopen(path, mode); 104 109 … … 108 113 return NULL; 109 114 } 110 # endif115 # endif 111 116 112 117 return fp; 118 #endif 113 119 } 114 120 115 121 int _cucul_file_close(cucul_file_t *fp) 116 122 { 117 #if defined HAVE_ZLIB_H 123 #if defined __KERNEL__ 124 return 0; 125 #elif defined HAVE_ZLIB_H 118 126 gzFile gz = fp->gz; 119 127 if(fp->zip) … … 130 138 int _cucul_file_eof(cucul_file_t *fp) 131 139 { 132 #if defined HAVE_ZLIB_H 140 #if defined __KERNEL__ 141 return 1; 142 #elif defined HAVE_ZLIB_H 133 143 return fp->zip ? fp->eof : gzeof(fp->gz); 134 144 #else … … 139 149 char *_cucul_file_gets(char *s, int size, cucul_file_t *fp) 140 150 { 141 #if defined HAVE_ZLIB_H 151 #if defined __KERNEL__ 152 return NULL; 153 #elif defined HAVE_ZLIB_H 142 154 if(fp->zip) 143 155 { … … 168 180 } 169 181 170 #if defined HAVE_ZLIB_H182 #if !defined __KERNEL__ && defined HAVE_ZLIB_H 171 183 static int zipread(cucul_file_t *fp, void *buf, unsigned int len) 172 184 { -
libcaca/trunk/kernel/kernel.c
r1462 r2144 213 213 } 214 214 215 char *strchr(const char *s, int c) 216 { 217 do 218 if(*s == c) 219 return (char *)(intptr_t)s; 220 while(*s++); 221 222 return NULL; 223 } 224 215 225 /* stdarg.h functions */ 216 226 int vsnprintf(char *str, size_t size, const char *format, va_list ap) -
libcaca/trunk/kernel/kernel.h
r1462 r2144 88 88 int memcmp(const void *s1, const void *s2, size_t n); 89 89 char *strdup(const char *s); 90 char *strchr(const char *s, int c); 90 91 91 92 /* stdarg.h functions */ -
libcaca/trunk/msvc/config.h
r2108 r2144 33 33 /* #undef HAVE_USLEEP */ 34 34 /* #undef HAVE_VSNPRINTF */ 35 #define HAVE_SNPRINTF 1 35 36 #define HAVE_WINDOWS_H 1 36 37 /* #undef HAVE_X11_XKBLIB_H */
Note: See TracChangeset
for help on using the changeset viewer.