Module: wine Branch: master Commit: 19c0b3ee4800d5f5566bd85c6462201126205a29 URL: http://source.winehq.org/git/wine.git/?a=commit;h=19c0b3ee4800d5f5566bd85c64...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Oct 2 14:52:17 2009 +0200
winedump: Use consistent prototypes for option callbacks.
---
tools/winedump/main.c | 26 +++++++++++++------------- tools/winedump/winedump.h | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/tools/winedump/main.c b/tools/winedump/main.c index 2aba30a..3524a1e 100644 --- a/tools/winedump/main.c +++ b/tools/winedump/main.c @@ -80,13 +80,13 @@ static void do_dump (const char *arg) }
-static void do_code (void) +static void do_code (const char *arg) { globals.do_code = 1; }
-static void do_trace (void) +static void do_trace (const char *arg) { globals.do_trace = 1; globals.do_code = 1; @@ -100,18 +100,18 @@ static void do_forward (const char *arg) globals.do_code = 1; }
-static void do_document (void) +static void do_document (const char *arg) { globals.do_documentation = 1; }
-static void do_cdecl (void) +static void do_cdecl (const char *arg) { globals.do_cdecl = 1; }
-static void do_quiet (void) +static void do_quiet (const char *arg) { globals.do_quiet = 1; } @@ -157,18 +157,18 @@ static void do_symfile (const char *arg) }
-static void do_verbose (void) +static void do_verbose (const char *arg) { globals.do_verbose = 1; }
-static void do_symdmngl (void) +static void do_symdmngl (const char *arg) { globals.do_demangle = 1; }
-static void do_dumphead (void) +static void do_dumphead (const char *arg) { globals.do_dumpheader = 1; } @@ -178,12 +178,12 @@ static void do_dumpsect (const char* arg) globals.dumpsect = arg; }
-static void do_rawdebug (void) +static void do_rawdebug (const char *arg) { globals.do_debug = 1; }
-static void do_dumpall(void) +static void do_dumpall(const char *arg) { globals.do_dumpheader = 1; globals.do_dump_rawdata = 1; @@ -195,7 +195,7 @@ struct my_option const char *name; Mode mode; int has_arg; - void (*func) (); + void (*func)(const char *arg); const char *usage; };
@@ -226,7 +226,7 @@ static const struct my_option option_table[] = { {NULL, NONE, 0, NULL, NULL} };
-void do_usage (void) +void do_usage (const char *arg) { const struct my_option *opt; printf ("Usage: winedump [-h | sym <sym> | spec <dll> | dump <file>]\n"); @@ -466,7 +466,7 @@ int main (int argc, char *argv[]) return 1; break; case NONE: - do_usage(); + do_usage(0); break; case DUMP: if (globals.input_name == NULL) diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index 4b89842..15a8cdb 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -268,10 +268,10 @@ void dump_frame_pointer_omission(unsigned long base, unsigned long len); FILE *open_file (const char *name, const char *ext, const char *mode);
#ifdef __GNUC__ -void do_usage (void) __attribute__ ((noreturn)); +void do_usage (const char *arg) __attribute__ ((noreturn)); void fatal (const char *message) __attribute__ ((noreturn)); #else -void do_usage (void); +void do_usage (const char *arg); void fatal (const char *message); #endif