summaryrefslogtreecommitdiff
path: root/src/common/cbasetypes.h
AgeCommit message (Collapse)AuthorFilesLines
2015-05-20* Fixed a compile error.Michieru1-1/+1
Thanks to Haru
2015-05-19Fixed some issues reported by coverity scan [3/3]Haru1-0/+6
- Automatically zeroed variables are now zeroed in the correct size, regardless of padding. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2015-01-12Removed unused (re)definition of NBBY from cbasetypes.hHaru1-6/+0
Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-57/+56
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-08-07Corrected several format-string errors through the codeHaru1-0/+13
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Removed some c++ compatibility definitionsHaru1-36/+0
- Neither our code nor 3rdparty code is, (or will compile as) C++, regardless of those checks. - Special thanks to panikon. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Fixed reserved __identifier violationsHaru1-5/+5
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (sources)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-0/+6
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-6/+0
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-0/+6
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
2014-03-07Tweaked a platform check to support ARMv6+Haru1-0/+12
Signed-off-by: Haru <haru@dotalux.com>
2014-02-02Introducing HPM Datacheckshennetsind1-3/+3
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-23Compatibility fixes for NetBSD and SolarisHaru1-0/+5
- Fixed some warnings in NetBSD (5.x and 6.x) and Solaris (11) Signed-off-by: Haru <haru@dotalux.com>
2013-12-17Fixed several compiler warningsHaru1-0/+7
- Warnings detected thanks to Xcode's compiler settings (more strict by default) and clang, warnings mostly but not only related to data sizes on 64 bit systems, that were silenced until now by very lax compiler settings. - This also decreases by a great deal the amount of warnings produced by MSVC in x64 mode (for the adventurous ones who tried that) - Also fixed (or silenced in case of false positives) the potential issues pointed out by the (awesome) clang static analyzer. - Patch co-produced with Ind, I'm merging and committing in his place! Signed-off-by: Haru <haru@dotalux.com>
2013-12-17Added support for non-aborting assertionsHaru1-18/+1
- Added Assert_ret, Assert_retv, Assert_retb, Assert_retr, working similarly to the corresponding nullpo_ functions. - Moved Assert-related macros to nullpo.h, since they share some functions. Signed-off-by: Haru <haru@dotalux.com>
2013-11-19Sanitized and improved several macros through the codeHaru1-4/+6
- Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru <haru@dotalux.com>
2013-11-05cbasetypes.h updateshennetsind1-6/+6
partial usage of ea:15242 (ai4rei) -- will revisit the remaining. Signed-off-by: shennetsind <ind@henn.et>
2013-08-26Merged strtoll MSVC fix from Ind's ScriptEngineUpdateP1 branchHaru1-0/+1
Credits to Ind for the fix, thanks to Takkun for reporting it Signed-off-by: Haru <haru@dotalux.com>
2013-08-12Replaced own bool typedef with <stdbool.h> where availableHaru1-0/+12
Fixes bugreport:7645 http://hercules.ws/board/tracker/issue-7645-rev-12302-compiler-error-and-warnings-on-gcc-49 Special thanks to Takkun for VS2012 testing and info Signed-off-by: Haru <haru@dotalux.com>
2013-07-22Binary heap fix & improvement.Piotr Hałaczkiewicz1-0/+2
Fixed a bug when removing last element of binary heap (its parent would be removed instead if it had the same value). Binary heap now allows custom swapper function/macro. Added `swap_ptr` macro to swap two pointers in place (`swap` is not suitable for pointers). This allows to store pointers in binary heap.
2013-05-19Added new packets for 2013-05-15aRagexe (thanks to Shakto!).Matheus Macabu1-0/+18
Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-75/+72
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-72/+75
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-29* Merged eAthena changeset ea:15190. (bugreport:5138)eathenabot1-0/+14
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-10added mutex && cond var abstraction ( for pthread / winapi )blacksirius1-0/+24
added type 'sysint' to cbasetypes, which's the width of the platform the release gets compiled for. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16256 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-03fixed portability issue. (As long as we support other compilers than MSC/ICC ↵blacksirius1-1/+1
we have to check explicitly for compiler and not only on Platform ... ) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16218 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-02feature merge bs-coreoptimize->trunk: added some compiler abstractionsblacksirius1-1/+9
- forceinline -> will force the compiler to always inline the given method - ra_algin(n) -> align to (n) .. (see: http://msdn.microsoft.com/en-us/library/83ythb65(v=vs.80).aspx for more informations). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16215 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-08* Fix C++ compilation issues.flaviojs1-0/+29
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-07-10* Temporary fix for bugreport:4961 (unintended conversion from signed to ↵flaviojs1-0/+10
unsigned). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14896 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30Reimplemented integer typedefs in cbasetypes.h in terms of standard ones in ↵ultramage1-56/+33
stdint.h. Used the INT*_C() macro to give the MIN/MAX constants a proper size suffix. Merged the 64bit integers section with the main integer section. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14875 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30Added back intptr/uintptr typedefs for backwards compatibility.ultramage1-0/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14874 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30Replaced custom type 'intptr' with standard 'intptr_t'.ultramage1-24/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-21* Added msinttypes (rev. 26, http://msinttypes.googlecode.com/svn/trunk/) ↵ai4rei1-5/+8
portability framework for Visual C++ compilers (related bugreport:4059). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14478 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-20* Removed ; from INTPTR_* defines (since r13449).ai4rei1-5/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14472 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-15Added visual studio equivalent of libc's strtoull() - name redefine for ↵ultramage1-0/+3
newer VS versions, custom implementation for VS6 (I hope it works). This should fix the compilation error from r14242 (bugreport:4059). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-12* Took care of some warnings. (marionette formulas and *INTPTR_* macros)FlavioJS1-0/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13670 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-14* Added client login packets 0x01fa and 0x027c.FlavioJS1-0/+8
* Other minor cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13449 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-16* Made the socket limit not be set in cygwin, which has bogus behavior. ↵FlavioJS1-0/+4
(bugreport:1684) * Made the socket limit be set to the maximum allowed value when setting to FD_SETSIZE fails. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12839 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02Added a custom implementation of the va_copy macro for systems that don't ↵ultramage1-0/+11
provide it. Fixed varargs not being used correctly in foreach() calls in db.c (bugreport:551). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21* Added intptr/uintptr to cbasetypes.h (integers with the same size as a ↵FlavioJS1-0/+12
pointer). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12632 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-19* Nullpo's disabled on release builds.FlavioJS1-0/+12
* Added timestamps to the log of memory leaks. * Moved definition of __func__ to cbasetypes.h. * Configure script updated: - added option to select the memory manager - added option to enable MAPREGSQL - added option to enable DEBUG * common's Makefile deleting svnversion.h on 'clean' target. (run ./configure again to update your Makefile) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11760 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-13Wiped out every mention of RETCODE from /src.ultramage1-15/+0
The servers no longer save data using CRCRLF as line terminator on Windows. Closes bugreport:45. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-29Hopefully fixed the vsnprintf incompatibilityultramage1-0/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10645 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Removed the vsnprintf->_vsnprintf define for VS9. Ea compiles even without ↵ultramage1-1/+0
it (vs6, vs7, vs8). In VS9 this and similar functions were replaced by templates that instantiate using the output array's length. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10574 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-05* Removed the dependency on winsock.h for definitions, it's all winsock2.h now.FlavioJS1-0/+4
* Minor documentation/re-coding in chat.c. * More work on ticket #41. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-21- Removed the +25% mdef, -50% def effect from Freeze statusultramage1-3/+1
- Changed autocast skills, they now only work with normal attacks - Fixed a few spots where the attack_type flag was getting truncated - Hopefully fixed the cygwin + size_t problem (using stddef.h as source) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10298 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-20- Added ntows() to properly handle that client port number deficiencyultramage1-1/+1
- Adjusted the packet_db array for a more consistent look - Reorganized some entries in packet_db.txt - Fixed a small scripts_custom.conf typo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10296 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-16* Finally fixed mingw problems, managed to build both TXT and SQLultramage1-20/+1
* Fixed the uint32 platform problem (Microsoft failed so I removed it :) * Removed the cbasetypes.h dependency from the mapcache generator * Removed some random compilation warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09* Changed db key from 'unsigned char*' to 'const char*'.FlavioJS1-1/+2
* Defined out the dump function in util.h/c. Notes: saw some suspicious code in npc.c so kept the 'const char*' propagation to a minimum for now git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10193 54d463be-8e91-2dee-dedb-b68131a5f0ec