Changeset 63088cc1 in mainline for uspace/app/tester/stdio/stdio1.c
- Timestamp:
- 2008-12-29T13:30:19Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1c1002a
- Parents:
- 04b687b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/stdio/stdio1.c
r04b687b r63088cc1 40 40 char *file_name = "/readme"; 41 41 size_t n; 42 int c; 42 43 43 44 printf("Open file '%s'\n", file_name); … … 61 62 printf("Read string '%s'.\n", buf); 62 63 63 fclose(f); 64 printf("Seek to beginning.\n"); 65 if (fseek(f, 0, SEEK_SET) != 0) { 66 fclose(f); 67 return "Failed seeking."; 68 } 69 70 printf("Read using fgetc().\n"); 71 while (true) { 72 c = fgetc(f); 73 if (c == EOF) break; 74 75 printf("'%c'", c); 76 } 77 78 printf("[EOF]\n"); 79 printf("Closing.\n"); 80 81 if (fclose(f) != 0) 82 return "Failed closing."; 64 83 65 84 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.