Changeset 3164 for trunk/src


Ignore:
Timestamp:
Mar 19, 2000, 12:04:17 PM (25 years ago)
Author:
sandervl
Message:

Fixed FS wrapper for _fdopen & others in file.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/odincrt/file.cpp

    r3150 r3164  
    1 /* $Id: file.cpp,v 1.2 2000-03-18 15:14:02 sandervl Exp $ */
     1/* $Id: file.cpp,v 1.3 2000-03-19 11:04:17 sandervl Exp $ */
    22/*
    33 * Project Odin Software License can be found in LICENSE.TXT
     
    1818
    1919        rc = fclose(fp);
     20        SetFS(sel);
    2021        return rc;
    2122}
     
    2728
    2829        rc = feof(fp);
     30        SetFS(sel);
    2931        return rc;
    3032}
     
    3537
    3638        rc = ferror(fp);
    37         return rc;
    38 }
     39        SetFS(sel);
     40        return rc;
     41}
     42
    3943int _LNK_CONV os2_fflush( FILE *fp )
    4044{
     
    4347
    4448        rc = fflush(fp);
    45         return rc;
    46 }
     49        SetFS(sel);
     50        return rc;
     51}
     52
    4753int _LNK_CONV os2_fgetc( FILE *fp )
    4854{
     
    5157
    5258        rc = fgetc(fp);
    53         return rc;
    54 }
     59        SetFS(sel);
     60        return rc;
     61}
     62
    5563int _LNK_CONV os2_fgetpos( FILE *fp, fpos_t *pos)
    5664{
     
    5967
    6068        rc = fgetpos(fp,pos);
    61         return rc;
    62 }
     69        SetFS(sel);
     70        return rc;
     71}
     72
    6373char *_LNK_CONV os2_fgets( char *buf, int size, FILE *fp )
    6474{
     
    6777
    6878        rc = fgets(buf, size, fp);
    69         return rc;
    70 }
     79        SetFS(sel);
     80        return rc;
     81}
     82
    7183FILE * _LNK_CONV os2_fopen( const char *name, const char *type)
    7284{
     
    7587
    7688        rc = fopen(name, type);
    77         return rc;
    78 }
     89        SetFS(sel);
     90        return rc;
     91}
     92
    7993int _LNK_CONV os2_fputc( int c, FILE *fp )
    8094{
     
    8397
    8498        rc = fputc(c, fp);
    85         return rc;
    86 }
     99        SetFS(sel);
     100        return rc;
     101}
     102
    87103int _LNK_CONV os2_fputs( const char *string, FILE *fp )
    88104{
     
    91107
    92108        rc = fputs(string, fp);
    93         return rc;
    94 }
     109        SetFS(sel);
     110        return rc;
     111}
     112
    95113size_t _LNK_CONV os2_fread( void *buf, size_t size, size_t elsize, FILE *fp )
    96114{
     
    99117
    100118        rc = fread(buf, size, elsize, fp);
    101         return rc;
    102 }
     119        SetFS(sel);
     120        return rc;
     121}
     122
    103123FILE *  _LNK_CONV os2_freopen( const char *name, const char *type, FILE *fp )
    104124{
     
    107127
    108128        rc = freopen(name, type, fp);
    109         return rc;
    110 }
     129        SetFS(sel);
     130        return rc;
     131}
     132
    111133int _LNK_CONV os2_fseek( FILE *fp, long int pos, int type)
    112134{
     
    115137
    116138        rc = fseek(fp, pos, type);
    117         return rc;
    118 }
     139        SetFS(sel);
     140        return rc;
     141}
     142
    119143int _LNK_CONV os2_fsetpos( FILE *fp, const fpos_t *pos)
    120144{
     
    123147
    124148        rc = fsetpos(fp, pos);
    125         return rc;
    126 }
     149        SetFS(sel);
     150        return rc;
     151}
     152
    127153long int _LNK_CONV os2_ftell( FILE *fp )
    128154{
     
    131157
    132158        rc = ftell(fp);
    133         return rc;
    134 }
     159        SetFS(sel);
     160        return rc;
     161}
     162
    135163size_t  _LNK_CONV os2_fwrite( const void *buf, size_t size, size_t elsize, FILE *fp )
    136164{
     
    139167
    140168        rc = fwrite(buf, size, elsize, fp);
    141         return rc;
    142 }
     169        SetFS(sel);
     170        return rc;
     171}
     172
    143173int _LNK_CONV os2_vfprintf( FILE *fp, const char *string, __va_list list )
    144174{
     
    147177
    148178        rc = vfprintf(fp, string, list);
    149         return rc;
    150 }
     179        SetFS(sel);
     180        return rc;
     181}
     182
    151183wint_t  _LNK_CONV os2_fgetwc(FILE *fp)
    152184{
     
    155187
    156188        rc = fgetwc(fp);
    157         return rc;
    158 }
     189        SetFS(sel);
     190        return rc;
     191}
     192
    159193wchar_t * _LNK_CONV os2_fgetws(wchar_t *buf, int size, FILE *fp)
    160194{
     
    163197
    164198        rc = fgetws(buf, size, fp);
    165         return rc;
    166 }
     199        SetFS(sel);
     200        return rc;
     201}
     202
    167203wint_t _LNK_CONV os2_fputwc(wchar_t character, FILE *fp)
    168204{
     
    171207
    172208        rc = fputwc(character, fp);
    173         return rc;
    174 }
     209        SetFS(sel);
     210        return rc;
     211}
     212
    175213int _LNK_CONV os2_fputws(const wchar_t *string, FILE *fp)
    176214{
     
    179217
    180218        rc = fputws(string, fp);
     219        SetFS(sel);
    181220        return rc;
    182221}
     
    188227
    189228        rc = _fdopen(a, bla);
    190         return rc;
    191 }
    192 
     229        SetFS(sel);
     230        return rc;
     231}
     232
Note: See TracChangeset for help on using the changeset viewer.