Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

fallback.h

00001 
00002 #ifndef FISH_FALLBACK_H
00003 #define FISH_FALLBACK_H
00004 
00005 #include <stdio.h>
00006 #include <stdint.h>
00007 #include <stdarg.h>
00008 #include <wctype.h>
00009 #include <wchar.h>
00010 #include <limits.h>
00011 #include <sys/time.h>
00012 #include <sys/types.h>
00013 #include <signal.h>
00014 
00015 #ifndef WCHAR_MAX
00016 
00019 #define WCHAR_MAX INT_MAX
00020 #endif
00021 
00027 #if __STDC_VERSION__ < 199901L
00028 # if __GNUC__ >= 2
00029 #  define __func__ __FUNCTION__
00030 # else
00031 #  define __func__ "<unknown>"
00032 # endif
00033 #endif
00034 
00042 #ifdef NCURSES_VERSION
00043 typedef int tputs_arg_t;
00044 #else
00045 typedef char tputs_arg_t;
00046 #endif
00047 
00048 #ifndef SIGIO
00049 #define SIGIO SIGUSR1
00050 #endif
00051 
00052 #ifndef SIGWINCH
00053 #define SIGWINCH SIGUSR2
00054 #endif
00055 
00056 #ifndef HAVE_WINSIZE
00057 struct winsize 
00058 {
00059         unsigned short ws_row;  
00060         unsigned short ws_col;
00061 }
00062 ;
00063 
00064 #endif
00065 
00066 #ifdef TPUTS_KLUDGE
00067 
00072 int tputs(const char *str, int affcnt, int (*fish_putc)(tputs_arg_t));
00073 
00074 #endif
00075 
00076 #ifdef TPARM_SOLARIS_KLUDGE
00077 
00083 #define tparm tparm_solaris_kludge
00084 char *tparm_solaris_kludge( char *str, ... );
00085 
00086 #endif
00087 
00088 #ifndef HAVE_FWPRINTF
00089 
00097 int fwprintf( FILE *f, const wchar_t *format, ... );
00098 
00099 
00107 int swprintf( wchar_t *str, size_t l, const wchar_t *format, ... );
00108 
00116 int wprintf( const wchar_t *format, ... );
00117 
00125 int vwprintf( const wchar_t *filter, va_list va );
00126 
00134 int vfwprintf( FILE *f, const wchar_t *filter, va_list va );
00135 
00143 int vswprintf( wchar_t *out, size_t n, const wchar_t *filter, va_list va );
00144 
00145 #endif
00146 
00147 #ifndef HAVE_FGETWC
00148 
00151 wint_t fgetwc(FILE *stream);
00152 
00156 wint_t getwc(FILE *stream);
00157 
00158 #endif
00159 
00160 #ifndef HAVE_FPUTWC
00161 
00165 wint_t fputwc(wchar_t wc, FILE *stream);
00169 wint_t putwc(wchar_t wc, FILE *stream);
00170 
00171 #endif
00172 
00173 #ifndef HAVE_WCSTOK
00174 
00178 wchar_t *wcstok(wchar_t *wcs, const wchar_t *delim, wchar_t **ptr);
00179 
00180 #endif
00181 
00182 #ifndef HAVE_WCWIDTH
00183 
00195 int wcwidth( wchar_t c );
00196 
00197 #endif
00198 
00199 #ifndef HAVE_WCSDUP
00200 
00205 wchar_t *wcsdup(const wchar_t *in);
00206 
00207 #endif
00208 
00209 #ifndef HAVE_WCSLEN
00210 
00214 size_t wcslen(const wchar_t *in);
00215 
00216 #endif
00217 
00218 #ifndef HAVE_WCSCASECMP
00219 
00230 int wcscasecmp( const wchar_t *a, const wchar_t *b );
00231 
00232 #endif
00233 
00234 #ifndef HAVE_WCSNCASECMP
00235 
00247 int wcsncasecmp( const wchar_t *a, const wchar_t *b, int count );
00248 
00256 #endif
00257 
00258 #ifndef HAVE_WCSNDUP
00259 
00264 wchar_t *wcsndup( const wchar_t *in, int c );
00265 
00266 #endif
00267 
00273 long convert_digit( wchar_t d, int base );
00274 
00275 #ifndef HAVE_WCSTOL
00276 
00285 long wcstol(const wchar_t *nptr,
00286             wchar_t **endptr,
00287             int base);
00288 
00289 #endif
00290 #ifndef HAVE_WCSLCAT
00291 
00303 size_t wcslcat( wchar_t *dst, const wchar_t *src, size_t siz );
00304 
00305 #endif
00306 #ifndef HAVE_WCSLCPY
00307 
00316 size_t wcslcpy( wchar_t *dst, const wchar_t *src, size_t siz );
00317 
00318 #endif
00319 
00320 #ifdef HAVE_BROKEN_DEL_CURTERM
00321 
00325 #define del_curterm(oterm) OK
00326 #endif
00327 
00328 #ifndef HAVE_LRAND48_R
00329 
00333 struct drand48_data
00334 {
00338         unsigned int seed;
00339 }
00340 ;
00341 
00345 int lrand48_r( struct drand48_data *buffer, long int *result );
00346 
00350 int srand48_r( long int seedval, struct drand48_data *buffer );
00351 
00352 #endif
00353 
00354 #ifndef HAVE_FUTIMES
00355 
00356 int futimes( int fd, const struct timeval *times );
00357 
00358 #endif
00359 
00360 #ifndef HAVE_GETTEXT
00361 
00365 char * gettext( const char * msgid );
00366 
00370 char * bindtextdomain( const char * domainname, const char * dirname );
00371 
00375 char * textdomain( const char * domainname );
00376 
00377 #endif
00378 
00379 #ifndef HAVE_DCGETTEXT
00380 
00384 char * dcgettext ( const char * domainname, 
00385                    const char * msgid,
00386                    int category );
00387 
00388 #endif
00389 
00390 #ifndef HAVE__NL_MSG_CAT_CNTR
00391 
00397 extern int _nl_msg_cat_cntr;
00398 
00399 #endif
00400 
00401 
00402 #ifndef HAVE_KILLPG
00403 int killpg( int pgr, int sig );
00404 #endif
00405 
00406 
00407 #ifndef HAVE_WORKING_GETOPT_LONG
00408 
00409 struct option 
00410 {
00411         const char *name;
00412         int has_arg;
00413         int *flag;
00414         int val;        
00415 }
00416 ;
00417 
00418 #ifndef no_argument
00419 #define no_argument 0
00420 #endif
00421 
00422 #ifndef required_argument
00423 #define required_argument 1
00424 #endif
00425 
00426 #ifndef optional_argument
00427 #define optional_argument 2
00428 #endif
00429 
00430 int getopt_long(int argc, 
00431                 char * const argv[],
00432                 const char *optstring,
00433                 const struct option *longopts, 
00434                 int *longindex);
00435 
00436 #endif
00437 
00438 #ifndef HAVE_SYSCONF
00439 
00440 #define _SC_ARG_MAX 1
00441 long sysconf(int name);
00442 
00443 #endif
00444 
00445 #endif

Generated on Sun Jan 13 02:52:28 2008 for fish by  doxygen 1.4.4