diff options
Diffstat (limited to 'manual/examples')
-rw-r--r-- | manual/examples/longopt.c | 10 | ||||
-rw-r--r-- | manual/examples/memstrm.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/manual/examples/longopt.c b/manual/examples/longopt.c index c679cd2..bf3857b 100644 --- a/manual/examples/longopt.c +++ b/manual/examples/longopt.c @@ -66,23 +66,23 @@ main (int argc, char **argv) break; case 'a': - puts ("option -a\n"); + puts ("option -a"); break; case 'b': - puts ("option -b\n"); + puts ("option -b"); break; case 'c': - printf ("option -c with value `%s'\n", optarg); + printf ("option -c with value '%s'\n", optarg); break; case 'd': - printf ("option -d with value `%s'\n", optarg); + printf ("option -d with value '%s'\n", optarg); break; case 'f': - printf ("option -f with value `%s'\n", optarg); + printf ("option -f with value '%s'\n", optarg); break; case '?': diff --git a/manual/examples/memstrm.c b/manual/examples/memstrm.c index 9ee6298..28be892 100644 --- a/manual/examples/memstrm.c +++ b/manual/examples/memstrm.c @@ -16,6 +16,7 @@ */ #include <stdio.h> +#include <stdlib.h> int main (void) @@ -31,6 +32,7 @@ main (void) fprintf (stream, ", world"); fclose (stream); printf ("buf = `%s', size = %zu\n", bp, size); + free (bp); return 0; } |