From a2d2cfbd7debbacab467fa5a7592f604b9bce447 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Sun, 17 Jul 2022 19:22:54 +0200 Subject: [PATCH] fixed multiple definition of global var error --- dicepwgen.c | 3 +++ dicepwgen.h | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dicepwgen.c b/dicepwgen.c index 158ed5a..cd284ba 100644 --- a/dicepwgen.c +++ b/dicepwgen.c @@ -42,6 +42,9 @@ int usage() { return 1; } +int WMIN, WMAX, humantoss, verbose, dontjump, symbols; + + int main (int argc, char **argv) { int count = 4; char *dictfile = NULL; diff --git a/dicepwgen.h b/dicepwgen.h index d214c70..e42d224 100644 --- a/dicepwgen.h +++ b/dicepwgen.h @@ -37,15 +37,15 @@ #define STRINGIZE(x) #x #define STRINGIZE_VALUE_OF(x) STRINGIZE(x) -#define VERSION "1.1" +#define VERSION "1.2" #define RLEN 1024 -int humantoss; -int verbose; -int dontjump; -int symbols; -int WMIN; -int WMAX; +extern int humantoss; +extern int verbose; +extern int dontjump; +extern int symbols; +extern int WMIN; +extern int WMAX; int usage(); int main (int argc, char **argv);