Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerb9 committed Jul 16, 2024
1 parent c03ae48 commit a1e2cb4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions foo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
main() {
FILE *fp;
fp = stdout;
if ( fp = fopen("text", "w") ) {
fprintf(fp, "foo\nbar\n");
fprintf(fp, "foo\012bar\012");
fprintf(fp, "foo\nbar\n");
fprintf(fp, "foo\012bar\012");
if ( fp = freopen(NULL, "wb", stdout) ) {
printf("foo\nbar\n");
printf("foo\012bar\012");
}
if ( fp = freopen("binary", "wb", fp) ) {
if ( fp = freopen("text", "w", fp) ) {
fprintf(fp, "foo\nbar\n");
fprintf(fp, "foo\012bar\012");
}
if ( fp = freopen("binaryplus", "wb+", fp) ) {
if ( fp = freopen("binary", "wb", fp) ) {
fprintf(fp, "foo\nbar\n");
fprintf(fp, "foo\012bar\012");
}
Expand Down

0 comments on commit a1e2cb4

Please sign in to comment.