Changeset 640ffe6 in mainline for uspace/app/sbi/src/builtin/bi_textfile.c
- Timestamp:
- 2010-05-08T08:15:57Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4039c77
- Parents:
- 1317380 (diff), 051bc69a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/builtin/bi_textfile.c
r1317380 r640ffe6 71 71 "fun WriteLine(line : string), builtin;\n" 72 72 "\n" 73 "prop EOF : intis\n"73 "prop EOF : bool is\n" 74 74 "get is\n" 75 75 "return is_eof();\n" … … 77 77 "end\n" 78 78 "\n" 79 "fun is_eof() : int, builtin;\n"79 "fun is_eof() : bool, builtin;\n" 80 80 "end\n"); 81 81 … … 342 342 rdata_var_t *self_f_var; 343 343 344 int eof_flag;345 rdata_ int_t *eof_int;344 bool_t eof_flag; 345 rdata_bool_t *eof_bool; 346 346 rdata_var_t *eof_var; 347 347 rdata_value_t *eof_val; … … 362 362 /* Get status of EOF flag. */ 363 363 364 eof_flag = feof(file) ? 1 : 0;365 366 #ifdef DEBUG_RUN_TRACE 367 printf("Read EOF flag '% d'.\n", eof_flag);364 eof_flag = feof(file) ? b_true : b_false; 365 366 #ifdef DEBUG_RUN_TRACE 367 printf("Read EOF flag '%s'.\n", eof_flag ? "true" : "false"); 368 368 #endif 369 369 /* Construct return value. */ 370 eof_ int = rdata_int_new();371 bigint_init(&eof_int->value, eof_flag);372 373 eof_var = rdata_var_new(vc_ int);374 eof_var->u. int_v = eof_int;370 eof_bool = rdata_bool_new(); 371 eof_bool->value = eof_flag; 372 373 eof_var = rdata_var_new(vc_bool); 374 eof_var->u.bool_v = eof_bool; 375 375 eof_val = rdata_value_new(); 376 376 eof_val->var = eof_var;
Note:
See TracChangeset
for help on using the changeset viewer.