Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/iostream.c

    r44574f2 r1e6e08de  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jan 25 13:09:28 2018
    13 // Update Count     : 467
     12// Last Modified On : Thu Dec 21 13:55:09 2017
     13// Update Count     : 427
    1414//
    1515
     
    1919#include <stdio.h>
    2020#include <stdbool.h>                                                                    // true/false
    21 //#include <string.h>                                                                           // strlen, strcmp
    22 extern int strcmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
    23 extern size_t strlen (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
     21#include <string.h>                                                                             // strlen
    2422#include <float.h>                                                                              // DBL_DIG, LDBL_DIG
    2523#include <complex.h>                                                                    // creal, cimag
     
    303301
    304302forall( dtype istype | istream( istype ) )
    305 istype & ?|?( istype & is, _Bool & b ) {
    306         char val[6];
    307         fmt( is, "%5s", val );
    308         if ( strcmp( val, "true" ) == 0 ) b = true;
    309         else if ( strcmp( val, "false" ) == 0 ) b = false;
    310         else {
    311                 fprintf( stderr, "invalid _Bool constant\n" );
    312                 abort();
    313         } // if
    314         return is;
    315 } // ?|?
    316 
    317 forall( dtype istype | istream( istype ) )
    318303istype & ?|?( istype & is, char & c ) {
    319304        fmt( is, "%c", &c );                                                            // must pass pointer through varg to fmt
     
    425410} // ?|?
    426411
    427 forall( dtype istype | istream( istype ) )
    428 istype & ?|?( istype & is, istype & (* manip)( istype & ) ) {
    429         return manip( is );
    430 } // ?|?
    431 
    432 forall( dtype istype | istream( istype ) )
    433 istype & endl( istype & is ) {
    434         fmt( is, "%*[ \t\f\n\r\v]" );                                           // ignore whitespace
    435         return is;
    436 } // endl
    437 
    438412_Istream_cstrUC cstr( char * str ) { return (_Istream_cstrUC){ str }; }
    439413forall( dtype istype | istream( istype ) )
Note: See TracChangeset for help on using the changeset viewer.