Project

General

Profile

« Previous | Next » 

Revision e0597d49

Added by Pierre-Loïc Garoche over 7 years ago

_Bool are unsigned integer. The cast as a _Bool is delayed until the end of the function

View differences:

include/io_frontend.c
8 8
/* Standard Input procedures **************/
9 9
_Bool _get_bool(FILE* file, char* n){
10 10
   char b[512];
11
   _Bool r = 0;
11
   int r = 0;
12 12
   int s = 1;
13 13
   char c;
14 14
   do {
......
23 23
      if((c == '1') || (c == 't') || (c == 'T')) r = 1;
24 24
   } while((s != 1) || (r == -1));
25 25
   fprintf(file, "%i\n",r);
26
   return r;
26
   return (_Bool)r;
27 27
}
28 28

  
29 29
int _get_int(FILE* file, char* n){

Also available in: Unified diff