aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-12-09 12:00:52 +0000
committerMichael Mann <mmann78@netscape.net>2017-12-09 23:51:15 +0000
commitc79fb9d0285fbf51d6cdc3770396a8add08321ec (patch)
treecd15b2d9ad98aee59e3cc054cccde80587756703
parent514e607dd911d8bc5eabcadb8840b34fd238b745 (diff)
make-dissectors: Indent and cleanup #include
Change-Id: I395d0c168a6ba2fc8fad85598e6355493b897a7a Reviewed-on: https://code.wireshark.org/review/24748 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/make-dissectors.c58
1 files changed, 32 insertions, 26 deletions
diff --git a/epan/dissectors/make-dissectors.c b/epan/dissectors/make-dissectors.c
index 68bf37d..5da5ebb 100644
--- a/epan/dissectors/make-dissectors.c
+++ b/epan/dissectors/make-dissectors.c
@@ -11,7 +11,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <errno.h>
#include <glib.h>
#include <wsutil/glib-compat.h>
@@ -129,48 +128,55 @@ int main(int argc, char **argv)
s = g_string_sized_new(STRING_RESERVED_SIZE);
g_string_append(s,
- "/*\n"
- " * Do not modify this file. Changes will be overwritten.\n"
- " *\n"
- " * Generated automatically by the \"dissectors.c\" target using\n"
- " * \"make-dissectors\".\n"
- " */\n"
- "\n"
- "#include <dissectors.h>\n"
- "\n");
+ "/*\n"
+ " * Do not modify this file. Changes will be overwritten.\n"
+ " *\n"
+ " * Generated automatically using \"make-dissectors\".\n"
+ " */\n"
+ "\n"
+ "#include <dissectors.h>\n"
+ "\n");
g_string_append_printf(s,
- "const gulong dissector_reg_proto_count = %d;\n"
- "const gulong dissector_reg_handoff_count = %d;\n"
- "\n",
+ "const gulong dissector_reg_proto_count = %d;\n"
+ "const gulong dissector_reg_handoff_count = %d;\n"
+ "\n",
protos->len, handoffs->len);
for (i = 0; i < protos->len; i++) {
- g_string_append_printf(s, "void %s(void);\n", (char *)protos->pdata[i]);
+ g_string_append_printf(s,
+ "void %s(void);\n",
+ (char *)protos->pdata[i]);
}
g_string_append(s,
- "\n"
- "dissector_reg_t dissector_reg_proto[] = {\n");
+ "\n"
+ "dissector_reg_t dissector_reg_proto[] = {\n");
for (i = 0; i < protos->len; i++) {
- g_string_append_printf(s, " { \"%s\", %s },\n", (char *)protos->pdata[i], (char *)protos->pdata[i]);
+ g_string_append_printf(s,
+ " { \"%s\", %s },\n",
+ (char *)protos->pdata[i], (char *)protos->pdata[i]);
}
g_string_append(s,
- " { NULL, NULL }\n"
- "};\n"
- "\n");
+ " { NULL, NULL }\n"
+ "};\n"
+ "\n");
for (i = 0; i < handoffs->len; i++) {
- g_string_append_printf(s, "void %s(void);\n", (char *)handoffs->pdata[i]);
+ g_string_append_printf(s,
+ "void %s(void);\n",
+ (char *)handoffs->pdata[i]);
}
g_string_append(s,
- "\n"
- "dissector_reg_t dissector_reg_handoff[] = {\n");
+ "\n"
+ "dissector_reg_t dissector_reg_handoff[] = {\n");
for (i = 0; i < handoffs->len; i++) {
- g_string_append_printf(s, " { \"%s\", %s },\n", (char *)handoffs->pdata[i], (char *)handoffs->pdata[i]);
+ g_string_append_printf(s,
+ " { \"%s\", %s },\n",
+ (char *)handoffs->pdata[i], (char *)handoffs->pdata[i]);
}
g_string_append(s,
- " { NULL, NULL }\n"
- "};\n");
+ " { NULL, NULL }\n"
+ "};\n");
if (!g_file_set_contents(outfile, s->str, s->len, &err)) {
fprintf(stderr, "%s: %s\n", outfile, err->message);