Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/fstream.c

    rb72bad4f r5d125e4  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // fstream.c -- 
     7// fstream.c --
    88//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr 27 18:20:30 2016
    13 // Update Count     : 187
     12// Last Modified On : Fri Jul 15 13:35:29 2016
     13// Update Count     : 188
    1414//
    1515
     
    7575        if ( fclose( (FILE *)(os->file) ) == EOF ) {
    7676                perror( IO_MSG "close output" );
    77         } // if 
     77        } // if
    7878} // close
    7979
     
    9292
    9393int prtfmt( ofstream * os, const char fmt[], ... ) {
    94     va_list args;
    95     va_start( args, fmt );
    96     int len = vfprintf( (FILE *)(os->file), fmt, args );
     94        va_list args;
     95        va_start( args, fmt );
     96        int len = vfprintf( (FILE *)(os->file), fmt, args );
    9797        if ( len == EOF ) {
    9898                if ( ferror( (FILE *)(os->file) ) ) {
     
    101101                } // if
    102102        } // if
    103     va_end( args );
     103        va_end( args );
    104104
    105105        sepReset( os );                                                                         // reset separator
     
    140140        if ( fclose( (FILE *)(is->file) ) == EOF ) {
    141141                perror( IO_MSG "close input" );
    142         } // if 
     142        } // if
    143143} // close
    144144
     
    155155        return is;
    156156} // read
    157  
     157
    158158ifstream *ungetc( ifstream * is, char c ) {
    159159        if ( fail( is ) ) {
     
    170170
    171171int scanfmt( ifstream * is, const char fmt[], ... ) {
    172     va_list args;
     172        va_list args;
    173173
    174     va_start( args, fmt );
    175     int len = vfscanf( (FILE *)(is->file), fmt, args );
     174        va_start( args, fmt );
     175        int len = vfscanf( (FILE *)(is->file), fmt, args );
    176176        if ( len == EOF ) {
    177177                if ( ferror( (FILE *)(is->file) ) ) {
     
    180180                } // if
    181181        } // if
    182     va_end( args );
     182        va_end( args );
    183183        return len;
    184184} // prtfmt
Note: See TracChangeset for help on using the changeset viewer.