Browse code

tools: Wording and formatting cosmetics

Diego Biurrun authored on 2013/07/06 00:42:37
Showing 2 changed files
... ...
@@ -36,7 +36,7 @@
36 36
 
37 37
 static void usage(void)
38 38
 {
39
-    printf("Convert a libavfilter graph to a dot file\n");
39
+    printf("Convert a libavfilter graph to a dot file.\n");
40 40
     printf("Usage: graph2dot [OPTIONS]\n");
41 41
     printf("\n"
42 42
            "Options:\n"
... ...
@@ -133,7 +133,7 @@ int main(int argc, char **argv)
133 133
         infilename = "/dev/stdin";
134 134
     infile = fopen(infilename, "r");
135 135
     if (!infile) {
136
-        fprintf(stderr, "Impossible to open input file '%s': %s\n",
136
+        fprintf(stderr, "Failed to open input file '%s': %s\n",
137 137
                 infilename, strerror(errno));
138 138
         return 1;
139 139
     }
... ...
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
142 142
         outfilename = "/dev/stdout";
143 143
     outfile = fopen(outfilename, "w");
144 144
     if (!outfile) {
145
-        fprintf(stderr, "Impossible to open output file '%s': %s\n",
145
+        fprintf(stderr, "Failed to open output file '%s': %s\n",
146 146
                 outfilename, strerror(errno));
147 147
         return 1;
148 148
     }
... ...
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
175 175
     avfilter_register_all();
176 176
 
177 177
     if (avfilter_graph_parse(graph, graph_string, NULL, NULL, NULL) < 0) {
178
-        fprintf(stderr, "Impossible to parse the graph description\n");
178
+        fprintf(stderr, "Failed to parse the graph description\n");
179 179
         return 1;
180 180
     }
181 181
 
... ...
@@ -31,18 +31,18 @@
31 31
 #include <io.h>
32 32
 #endif
33 33
 
34
-#define FILENAME_BUF_SIZE 4096
35
-
36 34
 #include "libavutil/avstring.h"
37 35
 #include "libavutil/time.h"
38 36
 #include "libavformat/avformat.h"
39 37
 
38
+#define FILENAME_BUF_SIZE 4096
40 39
 #define PKTFILESUFF "_%08" PRId64 "_%02d_%010" PRId64 "_%06d_%c.bin"
41 40
 
42 41
 static int usage(int ret)
43 42
 {
44
-    fprintf(stderr, "dump (up to maxpkts) AVPackets as they are demuxed by libavformat.\n");
45
-    fprintf(stderr, "each packet is dumped in its own file named like `basename file.ext`_$PKTNUM_$STREAMINDEX_$STAMP_$SIZE_$FLAGS.bin\n");
43
+    fprintf(stderr, "Dump (up to maxpkts) AVPackets as they are demuxed by libavformat.\n");
44
+    fprintf(stderr, "Each packet is dumped in its own file named like\n");
45
+    fprintf(stderr, "$(basename file.ext)_$PKTNUM_$STREAMINDEX_$STAMP_$SIZE_$FLAGS.bin\n");
46 46
     fprintf(stderr, "pktdumper [-nw] file [maxpkts]\n");
47 47
     fprintf(stderr, "-n\twrite No file at all, only demux.\n");
48 48
     fprintf(stderr, "-w\tWait at end of processing instead of quitting.\n");
... ...
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
79 79
     if (strrchr(fntemplate, '.'))
80 80
         *strrchr(fntemplate, '.') = '\0';
81 81
     if (strchr(fntemplate, '%')) {
82
-        fprintf(stderr, "can't use filenames containing '%%'\n");
82
+        fprintf(stderr, "cannot use filenames containing '%%'\n");
83 83
         return usage(1);
84 84
     }
85 85
     if (strlen(fntemplate) + sizeof(PKTFILESUFF) >= sizeof(fntemplate) - 1) {