diff options
Diffstat (limited to 'winsup/mingw/samples/fmode/test.c')
-rw-r--r-- | winsup/mingw/samples/fmode/test.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/winsup/mingw/samples/fmode/test.c b/winsup/mingw/samples/fmode/test.c index f19e7e0ec..b0488b2ea 100644 --- a/winsup/mingw/samples/fmode/test.c +++ b/winsup/mingw/samples/fmode/test.c @@ -1,31 +1,31 @@ -/*
- * A sample program demonstrating how to use fmode to change the default
- * file opening mode to binary. NOTE: Does not change stdin, stdout or
- * stderr.
- *
- * THIS CODE IS IN THE PUBLIC DOMAIN.
- *
- * Colin Peters <colin@fu.is.saga-u.ac.jp>
- */
-
-#include <stdio.h>
-#include <fcntl.h> /* Required to get _fmode and _O_BINARY */
-
-main ()
-{
- char* sz = "This is line one.\nThis is line two.\n";
- FILE* fp;
-
- _fmode = _O_BINARY;
-
- printf (sz);
-
- /* Note how this fopen does NOT indicate "wb" to open the file in
- * binary mode. */
- fp = fopen ("test.out", "w");
-
- fprintf (fp, sz);
-
- fclose (fp);
-}
-
+/* + * A sample program demonstrating how to use fmode to change the default + * file opening mode to binary. NOTE: Does not change stdin, stdout or + * stderr. + * + * THIS CODE IS IN THE PUBLIC DOMAIN. + * + * Colin Peters <colin@fu.is.saga-u.ac.jp> + */ + +#include <stdio.h> +#include <fcntl.h> /* Required to get _fmode and _O_BINARY */ + +main () +{ + char* sz = "This is line one.\nThis is line two.\n"; + FILE* fp; + + _fmode = _O_BINARY; + + printf (sz); + + /* Note how this fopen does NOT indicate "wb" to open the file in + * binary mode. */ + fp = fopen ("test.out", "w"); + + fprintf (fp, sz); + + fclose (fp); +} + |