summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-02 13:18:39 -0200
committershennetsind <ind@henn.et>2013-12-02 13:18:39 -0200
commit95581cedd9a89d8eac918bdc77c1a98e017abc46 (patch)
tree2dec92f4a0a9913de607741bd7d7224d8241409c /src/map/script.h
parente46ca28bddd673f8217456297f596e0fe3c67609 (diff)
parent9f210e13ce08340fc4920311518187e8a03a636f (diff)
downloadhercules-95581cedd9a89d8eac918bdc77c1a98e017abc46.tar.gz
hercules-95581cedd9a89d8eac918bdc77c1a98e017abc46.tar.bz2
hercules-95581cedd9a89d8eac918bdc77c1a98e017abc46.tar.xz
hercules-95581cedd9a89d8eac918bdc77c1a98e017abc46.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/map/script.h b/src/map/script.h
index 75a57d82b..4d2c59d92 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -22,9 +22,9 @@ struct eri;
**/
// TODO: Remove temporary code
#define ENABLE_CASE_CHECK
-#define DeprecationWarning(func, bad, good, file, line) ShowWarning("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'. This will be a critical error in a near future.\n", (func), (bad), (good), (file), (line));
-#define DeprecationWarning2(func, bad, good, where) ShowWarning("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s'). This will become fatal in a near future.\n", (func), (bad), (good), (where));
-#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead). This will be a critical error in a near future.", (p));
+#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), (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), (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
@@ -443,6 +443,19 @@ struct script_syntax_data {
int index; // Number of the syntax used in the script
};
+struct casecheck_data {
+ struct str_data_struct *str_data;
+ int str_data_size; // size of the data
+ int str_num; // next id to be assigned
+ // str_buf holds the strings themselves
+ char *str_buf;
+ int str_size; // size of the buffer
+ int str_pos; // next position to be assigned
+ int str_hash[SCRIPT_HASH_SIZE];
+ bool (*add_str) (const char* p);
+ void (*clear) (void);
+};
+
/**
* Interface
**/
@@ -642,16 +655,9 @@ struct script_interface {
int (*run_func) (struct script_state *st);
const char *(*getfuncname) (struct script_state *st);
// for ENABLE_CASE_CHECK
- struct str_data_struct *local_casecheck_str_data;
- int local_casecheck_str_data_size; // size of the data
- int local_casecheck_str_num; // next id to be assigned
- // str_buf holds the strings themselves
- char *local_casecheck_str_buf;
- int local_casecheck_str_size; // size of the buffer
- int local_casecheck_str_pos; // next position to be assigned
- int local_casecheck_str_hash[SCRIPT_HASH_SIZE];
- bool (*local_casecheck_add_str) (const char* p, int h);
- void (*local_casecheck_clear) (void);
+ unsigned int (*calc_hash_ci) (const char *p);
+ struct casecheck_data local_casecheck;
+ struct casecheck_data global_casecheck;
// end ENABLE_CASE_CHECK
};