Ignore:
Timestamp:
04/21/06 00:42:17 (15 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
d0906e7
Parents:
671566a
Message:

Rewrote libtrace's IO handling to use shim functions when needing to do
zlib io

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_helper.c

    rdd4b39b redb18ce  
    157157 * @internal
    158158 */
    159 LIBTRACE_FILE trace_open_file(libtrace_t *trace)
     159libtrace_io_t *trace_open_file(libtrace_t *trace)
    160160{
    161161        int fd;
    162         LIBTRACE_FILE ret;
     162        libtrace_io_t *ret;
    163163
    164164
    165165        if (strcmp(trace->uridata,"-")==0) {
    166                 ret=LIBTRACE_FDOPEN(fileno(stdin),"r");
     166                ret=libtrace_io_fdopen(fileno(stdin),"r");
    167167                return ret;
    168168        }
     
    176176                return 0;
    177177        }
    178         ret=LIBTRACE_FDOPEN(fd,"r");
     178        ret=libtrace_io_fdopen(fd,"r");
    179179        return ret;
    180180}
     
    183183 * @internal
    184184 */
    185 LIBTRACE_FILE trace_open_file_out(libtrace_out_t *trace,int level, int fileflag)
     185libtrace_io_t *trace_open_file_out(libtrace_out_t *trace,int level, int fileflag)
    186186{
    187187        int fd;
    188         LIBTRACE_FILE ret;
     188        libtrace_io_t *ret;
    189189        char filemode[4]; /* wb9\0 */
    190190        assert(level<10);
     
    197197
    198198        if (strcmp(trace->uridata,"-")==0) {
    199                 ret=LIBTRACE_FDOPEN(fileno(stdout),filemode);
     199                ret=libtrace_io_fdopen(fileno(stdout),filemode);
    200200                return ret;
    201201        }
     
    210210                return 0;
    211211        }
    212         ret=LIBTRACE_FDOPEN(fd,filemode);
     212        ret=libtrace_io_fdopen(fd,filemode);
    213213        if (!ret) {
    214214                printf("%s\n",filemode);
Note: See TracChangeset for help on using the changeset viewer.