From 7020ebff4e0dc649365c81f03b4327fc4d121796 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sun, 6 May 2012 18:51:13 +0200 Subject: [PATCH] fex2bin: add verbose logs to stderr of detected entries --- fex2bin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fex2bin.c b/fex2bin.c index f6e8759..75a663c 100644 --- a/fex2bin.c +++ b/fex2bin.c @@ -124,8 +124,12 @@ static int parse_fex(FILE *in, const char *filename, struct script *script) } else if (pe > p+1 && *p == '"' && pe[-1] == '"') { /* string */ p++; *--pe = '\0'; - if (script_string_entry_new(last_section, key, pe-p, p)) + if (script_string_entry_new(last_section, key, pe-p, p)) { + errf("%s.%s = \"%.*s\"\n", + last_section->name, key, + (int)(pe-p), p); continue; + } perror("malloc"); } else if (memcmp("port:P", p, 6) == 0) { @@ -165,6 +169,8 @@ static int parse_fex(FILE *in, const char *filename, struct script *script) errf("E: %s:%zu: value out of range %lld.\n", filename, line, v); } else if (script_single_entry_new(last_section, key, v)) { + errf("%s.%s = %lld\n", + last_section->name, key, v); continue; } } else {