summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2016-05-14Removed dead leftover code from some testing a while ago.Matheus Macabu1-18/+0
2016-05-08Removed some legacy checks for MSVC <= 2003Haru3-11/+7
Signed-off-by: Haru <haru@dotalux.com>
2016-05-08Removed 'temporary fix for bugreport:4961', no longer necessaryHaru1-10/+0
- The provided test cases return success on all currently supported FreeBSD versions (9 and 10) - Fixes #1283
2016-05-08Removed some old Subversion <=1.6 support codeHaru1-34/+0
Signed-off-by: Haru <haru@dotalux.com>
2016-05-08Removed some old MySQL 4 compatibility codeHaru1-15/+0
Long overdue, since MySQL 4.x was already unsupported for quite a while (to be fair, we're about to deprecate support for MySQL 5.0 and 5.1) Signed-off-by: Haru <haru@dotalux.com>
2016-05-08Fixed various issues pointed out by cppcheckHaru4-13/+10
Signed-off-by: Haru <haru@dotalux.com>
2016-05-01Merge pull request #1253 from HerculesWS/hpmhookingAndrei Karas5-38/+38
Hpmhooking improvements
2016-05-01Fix one issue found by gcc 6 with -O3.Andrei Karas1-0/+1
2016-04-30HPM Hooks UpdateHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Moved HPMHooking-related definitions to plugins/HPMHooking.hHaru4-37/+37
- Plugins that want to make use of the HPMHooking must now include "plugins/HPMHooking.h". Signed-off-by: Haru <haru@dotalux.com>
2016-04-27Add checks for wrong timer id. Some times in code it can be 0 and not -1.Andrei Karas1-2/+8
Now tid is illegal, and tid start counting from 1.
2016-04-25HPM Hooks UpdateHercules.ws1-0/+1
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2016-04-23HPM Hooks UpdateHaru1-0/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16HPM Hooks UpdateHaru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16HPM Hooks UpdateHaru1-0/+19
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16HPM Hooks UpdateHaru2-0/+12
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Rewrite client interface for login server (part 1)hemagx1-6/+1
Rewritten incoming/outgoing packet handlers to use structs instead of manipulating the WFIFO buffer bytes directly Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Added const qualifier to the input parameter of bin2hexHaru2-6/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Updated GNU Make build system to support private headersHaru1-14/+17
Signed-off-by: Haru <haru@dotalux.com>
2016-04-05Disabled some #pragma GCC diagnostic on versions that don't support themHaru2-3/+18
- Fixes compilation on gcc 4.4 for the brave ones who still want to use it (we recommend gcc 4.7 or newer) - Removes some warnings about unknown pragmas on MSVC Signed-off-by: Haru <haru@dotalux.com>
2016-04-04Merge pull request #1210 from HerculesWS/wcast_qualAndrei Karas11-629/+672
Added -Wcast-qual compiler flag
2016-03-21Update Max Zeny to official value 2,147,483,647hemagx1-1/+1
closes #1213
2016-03-20Added separate char* and const char* data types to union DBKeyHaru2-9/+12
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped the remaining (private) typedef in db.cHaru1-62/+62
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBMapHaru5-154/+161
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru3-45/+49
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru2-154/+154
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed typedefs from db-related enumsHaru2-154/+167
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Changed buffer argument of SQL->StmtBindParam() to constHaru2-6/+15
Parameters are supposed to be read-only Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru5-100/+107
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to some typecastsHaru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-03-09Corrected some issues in the item data saving functionHaru1-0/+4
- Unique ID could get duplicated (resulting in an apparent item duplication, while it's only unique ID corruption). Fixes #1191 - Removed duplicated code (char_inventory_to_sql, being an almost exact clone of char_memitemdata_to_sql) Signed-off-by: Haru <haru@dotalux.com>
2016-03-06Check allowed range for "View" field in item_db for weapon items.Andrei Karas1-1/+2
Also fix some array sizes.
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Corrected wrong variable type of struct status_change_data::tickHaru1-4/+6
- The variable should be signed, since it uses the value -1 to indicate infinite duration (and it's stored as signed in the database). - Added #define for the special value -1 (INFINITE_DURATION). - This fixes an issue causing status changes to fail being saved to database (thanks to Michi for reporting it). - Related to commit 8dc75721. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24HPM Hooks UpdateHercules.ws1-0/+2
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2016-02-24Modified RBUFP to return a const void *Haru1-1/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Modified the WBUF family of macros to ensure a non-const buffer is usedHaru1-1/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Changed RFIFO2PTR (and P2PTR) to return const void*Haru1-2/+2
- Also increased robustness of the macro Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Changed RFIFOP and WFIFOP to return const void * and void * respectivelyHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Implemented aStrndup()Haru2-0/+65
- aStrndup() behaves similarly to the POSIX function strdup(). It allocates sufficient memory for a copy of the passed string, copies it, and returns a pointer to the copy. A maximum number of characters is copied (and a NUL terminator is always appended after the end). Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Added const qualifier to the {RFIFO,RBUF}{B,W,L,Q} familiesHaru1-9/+9
A read FIFO/buffer should be, well, read-only. Signed-off-by: Haru <haru@dotalux.com>
2016-02-20Fixed some warnings in GCC 5.2Haru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-02-20Fixed compile warnings in clangHaru1-1/+1
- Fixed a -Wshorten-64-to-32 warning in case there's no thread-local-storage available - Disabled -Wcast-align for the time being Signed-off-by: Haru <haru@dotalux.com>
2016-02-20Added explicit c99 mode to CFLAGS in the configure scriptHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas6-24/+24
Add all missing -Wformat flags into configure.
2016-02-19Fix some cast discards 'const' qualifier from pointer target type warnings.Andrei Karas2-8/+8
Add -Wcast-qual into configure comment.
2016-02-17Replaced some now unnecessary includes with forward declarations in header filesHaru5-5/+8
Added some forgotten <stdio.h> and "common/conf.h" includes to .c files, that were previously masked by the above. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Removed unnecessary typedefs from libconfigHaru7-117/+120
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru4-10/+12
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>