diff options
author | Haru <haru@dotalux.com> | 2014-10-18 21:33:11 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-10-18 21:33:11 +0200 |
commit | da9534fa2cd8b6f19896d0b7423abdfe7e3b4543 (patch) | |
tree | bccec345053390d7492f0e2e757a74e41e74363a | |
parent | 243f4a871690f53cb9c33406be0b00f9045fcec0 (diff) | |
download | hercules-da9534fa2cd8b6f19896d0b7423abdfe7e3b4543.tar.gz hercules-da9534fa2cd8b6f19896d0b7423abdfe7e3b4543.tar.bz2 hercules-da9534fa2cd8b6f19896d0b7423abdfe7e3b4543.tar.xz hercules-da9534fa2cd8b6f19896d0b7423abdfe7e3b4543.zip |
Renamed DeprecationWarning to DeprecationCaseWarning, since that's what it is about.
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | src/map/npc.c | 22 | ||||
-rw-r--r-- | src/map/script.c | 2 | ||||
-rw-r--r-- | src/map/script.h | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index a33db6b99..92b6ff117 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -4180,7 +4180,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) { p = npc->parse_function(w1, w2, w3, w4, p, buffer, filepath, &success); } else { #ifdef ENABLE_CASE_CHECK - if( strcasecmp(w1, "function") == 0 ) DeprecationWarning("npc_parsesrcfile", w1, "function", filepath, strline(buffer, p-buffer)); // TODO + if( strcasecmp(w1, "function") == 0 ) DeprecationCaseWarning("npc_parsesrcfile", w1, "function", filepath, strline(buffer, p-buffer)); // TODO #endif // ENABLE_CASE_CHECK p = npc->parse_script(w1,w2,w3,w4, p, buffer, filepath,runOnInit?NPO_ONINIT:NPO_NONE, &success); } @@ -4207,19 +4207,19 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) { else { #ifdef ENABLE_CASE_CHECK - if( strcasecmp(w2, "warp") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "warp", filepath, strline(buffer, p-buffer)); } // TODO - else if( strcasecmp(w2,"shop") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "shop", filepath, strline(buffer, p-buffer)); } // TODO - else if( strcasecmp(w2,"cashshop") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "cashshop", filepath, strline(buffer, p-buffer)); } // TODO - else if( strcasecmp(w2, "script") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "script", filepath, strline(buffer, p-buffer)); } // TODO - else if( strcasecmp(w2,"trader") == 0 ) DeprecationWarning("npc_parsesrcfile", w2, "trader", filepath, strline(buffer, p-buffer)) // TODO + if( strcasecmp(w2, "warp") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "warp", filepath, strline(buffer, p-buffer)); } // TODO + else if( strcasecmp(w2,"shop") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "shop", filepath, strline(buffer, p-buffer)); } // TODO + else if( strcasecmp(w2,"cashshop") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "cashshop", filepath, strline(buffer, p-buffer)); } // TODO + else if( strcasecmp(w2, "script") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "script", filepath, strline(buffer, p-buffer)); } // TODO + else if( strcasecmp(w2,"trader") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "trader", filepath, strline(buffer, p-buffer)); } // TODO else if( strncasecmp(w2, "duplicate", 9) == 0 ) { char temp[10]; safestrncpy(temp, w2, 10); - DeprecationWarning("npc_parsesrcfile", temp, "duplicate", filepath, strline(buffer, p-buffer)); // TODO + DeprecationCaseWarning("npc_parsesrcfile", temp, "duplicate", filepath, strline(buffer, p-buffer)); // TODO } - else if( strcasecmp(w2,"monster") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "monster", filepath, strline(buffer, p-buffer)); } // TODO: - else if( strcasecmp(w2,"boss_monster") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "boss_monster", filepath, strline(buffer, p-buffer)); } // TODO - else if( strcasecmp(w2, "mapflag") == 0 ) { DeprecationWarning("npc_parsesrcfile", w2, "mapflag", filepath, strline(buffer, p-buffer)); } // TODO + else if( strcasecmp(w2,"monster") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "monster", filepath, strline(buffer, p-buffer)); } // TODO: + else if( strcasecmp(w2,"boss_monster") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "boss_monster", filepath, strline(buffer, p-buffer)); } // TODO + else if( strcasecmp(w2, "mapflag") == 0 ) { DeprecationCaseWarning("npc_parsesrcfile", w2, "mapflag", filepath, strline(buffer, p-buffer)); } // TODO else #endif // ENABLE_CASE_CHECK ShowError("npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,p-buffer), w1, w2, w3, w4); @@ -4293,7 +4293,7 @@ void npc_read_event_script(void) script_event[i].event_count++; #ifdef ENABLE_CASE_CHECK } else if( p && strcasecmp(name, p) == 0 ) { - DeprecationWarning2("npc_read_event_script", p, name, config[i].event_name); // TODO + DeprecationCaseWarning2("npc_read_event_script", p, name, config[i].event_name); // TODO #endif // ENABLE_CASE_CHECK } } diff --git a/src/map/script.c b/src/map/script.c index e70c2e10a..32444b7b6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -526,7 +526,7 @@ int script_add_str(const char* p) } } if( existingentry ) { - DeprecationWarning2("script_add_str", p, existingentry, script->parser_current_file); // TODO + DeprecationCaseWarning2("script_add_str", p, existingentry, script->parser_current_file); // TODO } #endif // ENABLE_CASE_CHECK diff --git a/src/map/script.h b/src/map/script.h index 48abf1487..54b3835a7 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -26,9 +26,9 @@ struct eri; // TODO: Remove temporary code #define ENABLE_CASE_CHECK #define get_script_source(source) ((source) ? (source) : "Unknown (Possibly source or variables stored in database") -#define DeprecationWarning(func, bad, good, file, line) ShowError("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'.\n", (func), (bad), (good), get_script_source(file), (line)); -#define DeprecationWarning2(func, bad, good, where) ShowError("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s').\n", (func), (bad), (good), get_script_source(where)); -#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead).", (p)); +#define DeprecationCaseWarning(func, bad, good, file, line) ShowError("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'.\n", (func), (bad), (good), get_script_source(file), (line)) +#define DeprecationCaseWarning2(func, bad, good, where) ShowError("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s').\n", (func), (bad), (good), get_script_source(where)) +#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead).", (p)) #define NUM_WHISPER_VAR 10 |