Ignore:
Timestamp:
Jan 16, 2007, 3:36:33 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • Got rid of the *_load() functions. Now each diverted function is supposed to check that the *_orig() functions it calls are properly loaded.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/load-stream.c

    r1648 r1679  
    8888int            (*__srefill_orig) (FILE *fp);
    8989#endif
    90 
    91 
    92 void _zz_load_stream(void)
    93 {
    94     LOADSYM(fopen);
    95 #ifdef HAVE_FOPEN64
    96     LOADSYM(fopen64);
    97 #endif
    98     LOADSYM(freopen);
    99     LOADSYM(fseek);
    100 #ifdef HAVE_FSEEKO
    101     LOADSYM(fseeko);
    102 #endif
    103     LOADSYM(rewind);
    104     LOADSYM(fread);
    105     LOADSYM(getc);
    106     LOADSYM(fgetc);
    107 #ifdef HAVE__IO_GETC
    108     LOADSYM(_IO_getc);
    109 #endif
    110     LOADSYM(fgets);
    111     LOADSYM(ungetc);
    112     LOADSYM(fclose);
    113 #ifdef HAVE_GETLINE
    114     LOADSYM(getline);
    115 #endif
    116 #ifdef HAVE_GETDELIM
    117     LOADSYM(getdelim);
    118 #endif
    119 #ifdef HAVE___GETDELIM
    120     LOADSYM(__getdelim);
    121 #endif
    122 #ifdef HAVE_FGETLN
    123     LOADSYM(fgetln);
    124 #endif
    125 #ifdef HAVE___SREFILL
    126     LOADSYM(__srefill);
    127 #endif
    128 }
    12990
    13091/* Our function wrappers */
     
    356317
    357318    LOADSYM(fgets);
     319    LOADSYM(fgetc);
    358320    fd = fileno(stream);
    359321    if(!_zz_ready || !_zz_iswatched(fd))
     
    462424        int fd, finished = 0; \
    463425        LOADSYM(fn); \
     426        LOADSYM(getdelim); \
     427        LOADSYM(fgetc); \
    464428        fd = fileno(stream); \
    465429        if(!_zz_ready || !_zz_iswatched(fd)) \
     
    543507
    544508    LOADSYM(fgetln);
     509    LOADSYM(fgetc);
    545510    fd = fileno(stream);
    546511    if(!_zz_ready || !_zz_iswatched(fd))
Note: See TracChangeset for help on using the changeset viewer.