#include <sys/stat.h>\r
#include <sys/types.h>\r
#include <time.h>\r
+#include <Common/BuildVersion.h>\r
\r
#include "../dec/decode.h"\r
#include "../enc/encode.h"\r
return 0;\r
}\r
\r
+#define UTILITY_NAME "Brotli"\r
+#define UTILITY_MAJOR_VERSION 0\r
+#define UTILITY_MINOR_VERSION 5\r
+#define UTILITY_REVERSION 2\r
+\r
static void ParseArgv(int argc, char **argv,\r
char **input_path,\r
char **output_path,\r
}\r
*verbose = 1;\r
continue;\r
+ } else if (!strcmp("--version", argv[k])) {\r
+ fprintf(stderr,\r
+ "%s Version %d.%d.%d %s\n",\r
+ UTILITY_NAME,\r
+ UTILITY_MAJOR_VERSION,\r
+ UTILITY_MINOR_VERSION,\r
+ UTILITY_REVERSION,\r
+ __BUILD_VERSION);\r
+ exit(1);\r
}\r
if (k < argc - 1) {\r
if (!strcmp("--input", argv[k]) ||\r
fprintf(stderr,\r
"Usage: %s [--force] [--quality n] [--gap n] [--decompress]"\r
" [--input filename] [--output filename] [--repeat iters]"\r
- " [--verbose] [--window n] [--custom-dictionary filename]\n",\r
+ " [--verbose] [--window n] [--custom-dictionary filename]"\r
+ " [--version]\n",\r
argv[0]);\r
exit(1);\r
}\r