Changeset 8565a42 in mainline for uspace/app/tester/stdio/stdio2.c
- Timestamp:
- 2018-03-02T20:34:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1a81f69, d5e5fd1
- Parents:
- 3061bc1 (diff), 34e1206 (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. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
- git-committer:
- GitHub <noreply@…> (2018-03-02 20:34:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/stdio/stdio2.c
r3061bc1 r8565a42 38 38 FILE *file; 39 39 const char *file_name = "/test"; 40 40 41 41 TPRINTF("Open file \"%s\" for writing...", file_name); 42 42 errno = 0; … … 47 47 } else 48 48 TPRINTF("OK\n"); 49 49 50 50 TPRINTF("Write to file..."); 51 51 fprintf(file, "integer: %u, string: \"%s\"", 42, "Hello!"); 52 52 TPRINTF("OK\n"); 53 53 54 54 TPRINTF("Close..."); 55 55 if (fclose(file) != 0) { … … 58 58 } else 59 59 TPRINTF("OK\n"); 60 60 61 61 TPRINTF("Open file \"%s\" for reading...", file_name); 62 62 file = fopen(file_name, "rt"); … … 66 66 } else 67 67 TPRINTF("OK\n"); 68 68 69 69 TPRINTF("File contains:\n"); 70 70 while (true) { … … 74 74 TPRINTF("%c", c); 75 75 } 76 76 77 77 TPRINTF("\nClose..."); 78 78 if (fclose(file) != 0) { … … 81 81 } else 82 82 TPRINTF("OK\n"); 83 83 84 84 return NULL; 85 85 }
Note:
See TracChangeset
for help on using the changeset viewer.