diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 85a4676df5..7703410662 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,10 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2006/12/21 + * Fixed "warning: comparison is always false due to limited range of data type" + by restricting script words to ASCII characters only. + * Moved md5calc to common. [FlavioJS] 2006/12/20 * Fixed ISSPACE and ISALPHA casting their returned value to a char, which can really mess up the scripting engine when the returned value is true, diff --git a/Makefile b/Makefile index 2135a0f67c..f1f292ceaf 100644 --- a/Makefile +++ b/Makefile @@ -1,249 +1,249 @@ - -CACHED = $(shell ls | grep Makefile.cache) -ifeq ($(findstring Makefile.cache,$(CACHED)), Makefile.cache) -MKDEF = $(shell cat Makefile.cache) -else - -CC = gcc -pipe -# CC = g++ --pipe - -MAKE = make -# MAKE = gmake - -OPT = -g -OPT += -O2 -# OPT += -O3 -# OPT += -mmmx -# OPT += -msse -# OPT += -msse2 -# OPT += -msse3 -# OPT += -rdynamic -OPT += -ffast-math -# OPT += -fbounds-checking -# OPT += -fstack-protector -# OPT += -fomit-frame-pointer -OPT += -Wall -Wno-sign-compare -# Uncomment this one if you are using GCC 4.X -# OPT += -Wno-unused-parameter -Wno-pointer-sign -# Makes map-wide script variables be saved to SQL instead of TXT files. -# OPT += -DMAPREGSQL -# Turbo is an alternate socket access implementation which should be faster. -# DO NOT ENABLE YET as it isn't quite ready for general usage. -# OPT += -DTURBO -# Enable the perl regular expression support for scripts -# OPT += -DPCRE_SUPPORT -# OPT += -DGCOLLECT -# OPT += -DMEMWATCH -# OPT += -DDMALLOC -DDMALLOC_FUNC_CHECK -# OPT += -DBCHECK - -# LIBS += -lgc -# LIBS += -ldmalloc -# LIBS += -L/usr/local/lib -lpcre - -PLATFORM = $(shell uname) - -ifeq ($(findstring Linux,$(PLATFORM)), Linux) - LIBS += -ldl -endif - -ifeq ($(findstring SunOS,$(PLATFORM)), SunOS) - LIBS += -lsocket -lnsl -ldl - MAKE = gmake -endif - -ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD) - MAKE = gmake - OS_TYPE = -D__FREEBSD__ -endif - -ifeq ($(findstring NetBSD,$(PLATFORM)), NetBSD) - MAKE = gmake - OS_TYPE = -D__NETBSD__ -endif - -ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN) - OPT += -DFD_SETSIZE=4096 - ifeq ($(findstring mingw,$(shell gcc --version)), mingw) - IS_MINGW = 1 - OS_TYPE = -DMINGW - LIBS += -L../.. -lwsock32 - else - OS_TYPE = -DCYGWIN - endif -endif - -CFLAGS = $(OPT) -I../common $(OS_TYPE) - -ifdef SQLFLAG - ifdef IS_MINGW - CFLAGS += -I../mysql - LIBS += -lmysql - else - MYSQLFLAG_CONFIG = $(shell which mysql_config) - ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /) - MYSQLFLAG_VERSION = $(shell $(MYSQLFLAG_CONFIG) --version | sed s:\\..*::) - ifeq ($(findstring 5,$(MYSQLFLAG_VERSION)), 5) - MYSQLFLAG_CONFIG_ARGUMENT = --include - else - MYSQLFLAG_CONFIG_ARGUMENT = --cflags - endif - CFLAGS += $(shell $(MYSQLFLAG_CONFIG) $(MYSQLFLAG_CONFIG_ARGUMENT)) - LIBS += $(shell $(MYSQLFLAG_CONFIG) --libs) - else - CFLAGS += -I/usr/local/include/mysql - LIBS += -L/usr/local/lib/mysql -lmysqlclient - endif - endif -endif - -ifneq ($(findstring -lz,$(LIBS)), -lz) - LIBS += -lz -endif -ifneq ($(findstring -lm,$(LIBS)), -lm) - LIBS += -lm -endif - -MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" LIB_S="$(LIBS)" - -endif - -.PHONY: txt sql common login login_sql char char_sql map map_sql ladmin converters \ - addons plugins tools webserver clean zlib depend - -txt : Makefile.cache conf common login char map ladmin - -ifdef SQLFLAG -sql: Makefile.cache conf common login_sql char_sql map_sql -else -sql: - $(MAKE) SQLFLAG=1 $@ -endif - -conf: - cp -r conf-tmpl conf - rm -rf conf/.svn conf/*/.svn - cp -r save-tmpl save - rm -rf save/.svn - -common: src/common/GNUmakefile - $(MAKE) -C src/$@ $(MKDEF) - -login: src/login/GNUmakefile common - $(MAKE) -C src/$@ $(MKDEF) txt - -char: src/char/GNUmakefile common - $(MAKE) -C src/$@ $(MKDEF) txt - -map: src/map/GNUmakefile common - $(MAKE) -C src/$@ $(MKDEF) txt - -login_sql: src/login_sql/GNUmakefile common - $(MAKE) -C src/$@ $(MKDEF) sql - -char_sql: src/char_sql/GNUmakefile common - $(MAKE) -C src/$@ $(MKDEF) sql - -map_sql: src/map/GNUmakefile common - $(MAKE) -C src/map $(MKDEF) sql - -ladmin: src/ladmin/GNUmakefile common - $(MAKE) -C src/$@ $(MKDEF) - -plugins addons: src/plugins/GNUmakefile common - $(MAKE) -C src/plugins $(MKDEF) - -webserver: - $(MAKE) -C src/$@ $(MKDEF) - -tools: - $(MAKE) -C src/tool $(MKDEF) - -ifdef SQLFLAG -converters: src/txt-converter/GNUmakefile common - $(MAKE) -C src/txt-converter $(MKDEF) -else -converters: - $(MAKE) SQLFLAG=1 $@ -endif - -zlib: - $(MAKE) -C src/$@ $(MKDEF) - -clean: src/common/GNUmakefile src/login/GNUmakefile src/login_sql/GNUmakefile \ - src/char/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile \ - src/ladmin/GNUmakefile src/plugins/GNUmakefile src/txt-converter/GNUmakefile - rm -f Makefile.cache - $(MAKE) -C src/common $@ - $(MAKE) -C src/login $@ - $(MAKE) -C src/login_sql $@ - $(MAKE) -C src/char $@ - $(MAKE) -C src/char_sql $@ - $(MAKE) -C src/map $@ - $(MAKE) -C src/ladmin $@ - $(MAKE) -C src/plugins $@ - $(MAKE) -C src/zlib $@ - $(MAKE) -C src/txt-converter $@ - -depend: src/common/GNUmakefile src/login/GNUmakefile src/login_sql/GNUmakefile \ - src/char/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile \ - src/ladmin/GNUmakefile src/plugins/GNUmakefile src/txt-converter/GNUmakefile - cd src/common; makedepend -fGNUmakefile -pobj/ -Y. *.c; cd ../..; - cd src/login; makedepend -DTXT_ONLY -fGNUmakefile -Y. -Y../common *.c; cd ../..; - cd src/login_sql; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..; - cd src/char; makedepend -DTXT_ONLY -fGNUmakefile -Y. -Y../common *.c; cd ../..; - cd src/char_sql; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..; - cd src/map; makedepend -DTXT_ONLY -fGNUmakefile -ptxtobj/ -Y. -Y../common *.c; cd ../..; - cd src/map; makedepend -fGNUmakefile -a -psqlobj/ -Y. -Y../common *.c; cd ../..; - cd src/ladmin; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..; - cd src/txt-converter; makedepend -DTXT_SQL_CONVERT -fGNUmakefile -Y. -Y../common *.c; cd ../..; - $(MAKE) -C src/plugins $@ - -Makefile.cache: - printf "$(subst ",\",$(MKDEF))" > Makefile.cache - -src/%/GNUmakefile: src/%/Makefile - sed -e 's/$$>/$$^/' $< > $@ - -src/common/GNUmakefile: src/common/Makefile -src/login/GNUmakefile: src/login/Makefile -src/login_sql/GNUmakefile: src/login_sql/Makefile -src/char/GNUmakefile: src/char/Makefile -src/char_sql/GNUmakefile: src/char_sql/Makefile -src/map/GNUmakefile: src/map/Makefile -src/plugins/GNUmakefile: src/plugins/Makefile -src/ladmin/GNUmakefile: src/ladmin/Makefile -src/txt-converter/GNUmakefile: src/txt-converter/Makefile - -install: conf/%.conf conf/%.txt - $(shell mkdir -p /opt/eathena/bin/) - $(shell mkdir -p /opt/eathena/etc/eathena/) - $(shell mkdir -p /opt/eathena/var/log/eathena/) - $(shell mv save /opt/eathena/etc/eathena/save) - $(shell mv db /opt/eathena/etc/eathena/db) - $(shell mv conf /opt/eathena/etc/eathena/conf) - $(shell mv npc /opt/eathena/etc/eathena/npc) - $(shell mv log/* /opt/eathena/var/log/eathena/) - $(shell cp *-server* /opt/eathena/bin/) - $(shell cp ladmin /opt/eathena/bin/) - $(shell ln -s /opt/eathena/etc/eathena/save/ /opt/eathena/bin/) - $(shell ln -s /opt/eathena/etc/eathena/db/ /opt/eathena/bin/) - $(shell ln -s /opt/eathena/etc/eathena/conf/ /opt/eathena/bin/) - $(shell ln -s /opt/eathena/etc/eathena/npc/ /opt/eathena/bin/) - $(shell ln -s /opt/eathena/var/log/eathena/ /opt/eathena/bin/log) - -bin-clean: - $(shell rm /opt/eathena/bin/login-server*) - $(shell rm /opt/eathena/bin/char-server*) - $(shell rm /opt/eathena/bin/map-server*) - $(shell rm /opt/eathena/bin/ladmin) - -uninstall: - bin-clean - $(shell rm /opt/eathena/bin/save) - $(shell rm /opt/eathena/bin/db) - $(shell rm /opt/eathena/bin/conf) - $(shell rm /opt/eathena/bin/npc) - $(shell rm /opt/eathena/bin/log) - $(shell rm -rf /opt/eathena/etc/eathena) - $(shell rm -rf /opt/eathena/var/log/eathena) + +CACHED = $(shell ls | grep Makefile.cache) +ifeq ($(findstring Makefile.cache,$(CACHED)), Makefile.cache) +MKDEF = $(shell cat Makefile.cache) +else + +CC = gcc -pipe +# CC = g++ --pipe + +MAKE = make +# MAKE = gmake + +OPT = -g +OPT += -O2 +# OPT += -O3 +# OPT += -mmmx +# OPT += -msse +# OPT += -msse2 +# OPT += -msse3 +# OPT += -rdynamic +OPT += -ffast-math +# OPT += -fbounds-checking +# OPT += -fstack-protector +# OPT += -fomit-frame-pointer +OPT += -Wall -Wno-sign-compare +# Uncomment this one if you are using GCC 4.X +# OPT += -Wno-unused-parameter -Wno-pointer-sign +# Makes map-wide script variables be saved to SQL instead of TXT files. +# OPT += -DMAPREGSQL +# Turbo is an alternate socket access implementation which should be faster. +# DO NOT ENABLE YET as it isn't quite ready for general usage. +# OPT += -DTURBO +# Enable the perl regular expression support for scripts +# OPT += -DPCRE_SUPPORT +# OPT += -DGCOLLECT +# OPT += -DMEMWATCH +# OPT += -DDMALLOC -DDMALLOC_FUNC_CHECK +# OPT += -DBCHECK + +# LIBS += -lgc +# LIBS += -ldmalloc +# LIBS += -L/usr/local/lib -lpcre + +PLATFORM = $(shell uname) + +ifeq ($(findstring Linux,$(PLATFORM)), Linux) + LIBS += -ldl +endif + +ifeq ($(findstring SunOS,$(PLATFORM)), SunOS) + LIBS += -lsocket -lnsl -ldl + MAKE = gmake +endif + +ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD) + MAKE = gmake + OS_TYPE = -D__FREEBSD__ +endif + +ifeq ($(findstring NetBSD,$(PLATFORM)), NetBSD) + MAKE = gmake + OS_TYPE = -D__NETBSD__ +endif + +ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN) + OPT += -DFD_SETSIZE=4096 + ifeq ($(findstring mingw,$(shell gcc --version)), mingw) + IS_MINGW = 1 + OS_TYPE = -DMINGW + LIBS += -L../.. -lwsock32 + else + OS_TYPE = -DCYGWIN + endif +endif + +CFLAGS = $(OPT) -I../common $(OS_TYPE) + +ifdef SQLFLAG + ifdef IS_MINGW + CFLAGS += -I../mysql + LIBS += -lmysql + else + MYSQLFLAG_CONFIG = $(shell which mysql_config) + ifeq ($(findstring /,$(MYSQLFLAG_CONFIG)), /) + MYSQLFLAG_VERSION = $(shell $(MYSQLFLAG_CONFIG) --version | sed s:\\..*::) + ifeq ($(findstring 5,$(MYSQLFLAG_VERSION)), 5) + MYSQLFLAG_CONFIG_ARGUMENT = --include + else + MYSQLFLAG_CONFIG_ARGUMENT = --cflags + endif + CFLAGS += $(shell $(MYSQLFLAG_CONFIG) $(MYSQLFLAG_CONFIG_ARGUMENT)) + LIBS += $(shell $(MYSQLFLAG_CONFIG) --libs) + else + CFLAGS += -I/usr/local/include/mysql + LIBS += -L/usr/local/lib/mysql -lmysqlclient + endif + endif +endif + +ifneq ($(findstring -lz,$(LIBS)), -lz) + LIBS += -lz +endif +ifneq ($(findstring -lm,$(LIBS)), -lm) + LIBS += -lm +endif + +MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" LIB_S="$(LIBS)" + +endif + +.PHONY: txt sql common login login_sql char char_sql map map_sql ladmin converters \ + addons plugins tools webserver clean zlib depend + +txt : Makefile.cache conf common login char map ladmin + +ifdef SQLFLAG +sql: Makefile.cache conf common login_sql char_sql map_sql +else +sql: + $(MAKE) SQLFLAG=1 $@ +endif + +conf: + cp -r conf-tmpl conf + rm -rf conf/.svn conf/*/.svn + cp -r save-tmpl save + rm -rf save/.svn + +common: src/common/GNUmakefile + $(MAKE) -C src/$@ $(MKDEF) + +login: src/login/GNUmakefile common + $(MAKE) -C src/$@ $(MKDEF) txt + +char: src/char/GNUmakefile common + $(MAKE) -C src/$@ $(MKDEF) txt + +map: src/map/GNUmakefile common + $(MAKE) -C src/$@ $(MKDEF) txt + +login_sql: src/login_sql/GNUmakefile common + $(MAKE) -C src/$@ $(MKDEF) sql + +char_sql: src/char_sql/GNUmakefile common + $(MAKE) -C src/$@ $(MKDEF) sql + +map_sql: src/map/GNUmakefile common + $(MAKE) -C src/map $(MKDEF) sql + +ladmin: src/ladmin/GNUmakefile common + $(MAKE) -C src/$@ $(MKDEF) + +plugins addons: src/plugins/GNUmakefile common + $(MAKE) -C src/plugins $(MKDEF) + +webserver: + $(MAKE) -C src/$@ $(MKDEF) + +tools: + $(MAKE) -C src/tool $(MKDEF) + +ifdef SQLFLAG +converters: src/txt-converter/GNUmakefile common + $(MAKE) -C src/txt-converter $(MKDEF) +else +converters: + $(MAKE) SQLFLAG=1 $@ +endif + +zlib: + $(MAKE) -C src/$@ $(MKDEF) + +clean: src/common/GNUmakefile src/login/GNUmakefile src/login_sql/GNUmakefile \ + src/char/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile \ + src/ladmin/GNUmakefile src/plugins/GNUmakefile src/txt-converter/GNUmakefile + rm -f Makefile.cache + $(MAKE) -C src/common $@ + $(MAKE) -C src/login $@ + $(MAKE) -C src/login_sql $@ + $(MAKE) -C src/char $@ + $(MAKE) -C src/char_sql $@ + $(MAKE) -C src/map $@ + $(MAKE) -C src/ladmin $@ + $(MAKE) -C src/plugins $@ + $(MAKE) -C src/zlib $@ + $(MAKE) -C src/txt-converter $@ + +depend: src/common/GNUmakefile src/login/GNUmakefile src/login_sql/GNUmakefile \ + src/char/GNUmakefile src/char_sql/GNUmakefile src/map/GNUmakefile \ + src/ladmin/GNUmakefile src/plugins/GNUmakefile src/txt-converter/GNUmakefile + cd src/common; makedepend -fGNUmakefile -pobj/ -Y. *.c; cd ../..; + cd src/login; makedepend -DTXT_ONLY -fGNUmakefile -Y. -Y../common *.c; cd ../..; + cd src/login_sql; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..; + cd src/char; makedepend -DTXT_ONLY -fGNUmakefile -Y. -Y../common *.c; cd ../..; + cd src/char_sql; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..; + cd src/map; makedepend -DTXT_ONLY -fGNUmakefile -ptxtobj/ -Y. -Y../common *.c; cd ../..; + cd src/map; makedepend -fGNUmakefile -a -psqlobj/ -Y. -Y../common *.c; cd ../..; + cd src/ladmin; makedepend -fGNUmakefile -Y. -Y../common *.c; cd ../..; + cd src/txt-converter; makedepend -DTXT_SQL_CONVERT -fGNUmakefile -Y. -Y../common *.c; cd ../..; + $(MAKE) -C src/plugins $@ + +Makefile.cache: + printf "$(subst ",\",$(MKDEF))" > Makefile.cache + +src/%/GNUmakefile: src/%/Makefile + sed -e 's/$$>/$$^/' $< > $@ + +src/common/GNUmakefile: src/common/Makefile +src/login/GNUmakefile: src/login/Makefile +src/login_sql/GNUmakefile: src/login_sql/Makefile +src/char/GNUmakefile: src/char/Makefile +src/char_sql/GNUmakefile: src/char_sql/Makefile +src/map/GNUmakefile: src/map/Makefile +src/plugins/GNUmakefile: src/plugins/Makefile +src/ladmin/GNUmakefile: src/ladmin/Makefile +src/txt-converter/GNUmakefile: src/txt-converter/Makefile + +install: conf/%.conf conf/%.txt + $(shell mkdir -p /opt/eathena/bin/) + $(shell mkdir -p /opt/eathena/etc/eathena/) + $(shell mkdir -p /opt/eathena/var/log/eathena/) + $(shell mv save /opt/eathena/etc/eathena/save) + $(shell mv db /opt/eathena/etc/eathena/db) + $(shell mv conf /opt/eathena/etc/eathena/conf) + $(shell mv npc /opt/eathena/etc/eathena/npc) + $(shell mv log/* /opt/eathena/var/log/eathena/) + $(shell cp *-server* /opt/eathena/bin/) + $(shell cp ladmin /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/save/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/db/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/conf/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/etc/eathena/npc/ /opt/eathena/bin/) + $(shell ln -s /opt/eathena/var/log/eathena/ /opt/eathena/bin/log) + +bin-clean: + $(shell rm /opt/eathena/bin/login-server*) + $(shell rm /opt/eathena/bin/char-server*) + $(shell rm /opt/eathena/bin/map-server*) + $(shell rm /opt/eathena/bin/ladmin) + +uninstall: + bin-clean + $(shell rm /opt/eathena/bin/save) + $(shell rm /opt/eathena/bin/db) + $(shell rm /opt/eathena/bin/conf) + $(shell rm /opt/eathena/bin/npc) + $(shell rm /opt/eathena/bin/log) + $(shell rm -rf /opt/eathena/etc/eathena) + $(shell rm -rf /opt/eathena/var/log/eathena) diff --git a/eAthena-7.1.sln b/eAthena-7.1.sln index fa7d3b3258..afd72f03f0 100644 --- a/eAthena-7.1.sln +++ b/eAthena-7.1.sln @@ -1,61 +1,61 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj-7.1\char-server_txt.vcproj", "{D356871D-58E1-450B-967A-E3E9646175AF}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-7.1\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-7.1\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-7.1\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj-7.1\login-server_txt.vcproj", "{D356871D-58E1-450B-967A-E2E9646175AF}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj-7.1\map-server_txt.vcproj", "{D356871D-58E1-450B-967A-E1E9646175AF}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {D356871D-58E1-450B-967A-E3E9646175AF}.Debug.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E3E9646175AF}.Debug.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E3E9646175AF}.Release.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E3E9646175AF}.Release.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E4E9646175AF}.Debug.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E4E9646175AF}.Debug.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E4E9646175AF}.Release.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E4E9646175AF}.Release.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E5E9646175AF}.Debug.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E5E9646175AF}.Debug.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E5E9646175AF}.Release.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E5E9646175AF}.Release.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E6E9646175AF}.Debug.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E6E9646175AF}.Debug.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E6E9646175AF}.Release.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E6E9646175AF}.Release.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Debug.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Debug.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Release.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Release.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E1E9646175AF}.Debug.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E1E9646175AF}.Debug.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E1E9646175AF}.Release.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E1E9646175AF}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj-7.1\char-server_txt.vcproj", "{D356871D-58E1-450B-967A-E3E9646175AF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-7.1\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-7.1\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-7.1\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj-7.1\login-server_txt.vcproj", "{D356871D-58E1-450B-967A-E2E9646175AF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj-7.1\map-server_txt.vcproj", "{D356871D-58E1-450B-967A-E1E9646175AF}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {D356871D-58E1-450B-967A-E3E9646175AF}.Debug.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E3E9646175AF}.Debug.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E3E9646175AF}.Release.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E3E9646175AF}.Release.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E4E9646175AF}.Debug.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E4E9646175AF}.Debug.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E4E9646175AF}.Release.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E4E9646175AF}.Release.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E5E9646175AF}.Debug.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E5E9646175AF}.Debug.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E5E9646175AF}.Release.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E5E9646175AF}.Release.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Debug.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Debug.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Release.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Release.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Debug.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Debug.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Release.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Release.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E1E9646175AF}.Debug.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E1E9646175AF}.Debug.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E1E9646175AF}.Release.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E1E9646175AF}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/eAthena-8.sln b/eAthena-8.sln index 7a0834d4de..f1799933e5 100644 --- a/eAthena-8.sln +++ b/eAthena-8.sln @@ -1,46 +1,46 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj-8\map-server_txt.vcproj", "{D356871D-58E1-450B-967A-E1E9646175AF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj-8\login-server_txt.vcproj", "{D356871D-58E1-450B-967A-E2E9646175AF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj-8\char-server_txt.vcproj", "{D356871D-58E1-450B-967A-E3E9646175AF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-8\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-8\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-8\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.Build.0 = Release|Win32 - {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E4E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E5E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 - {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 - {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 - {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj-8\map-server_txt.vcproj", "{D356871D-58E1-450B-967A-E1E9646175AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj-8\login-server_txt.vcproj", "{D356871D-58E1-450B-967A-E2E9646175AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj-8\char-server_txt.vcproj", "{D356871D-58E1-450B-967A-E3E9646175AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-8\char-server_sql.vcproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-8\login-server_sql.vcproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-8\map-server_sql.vcproj", "{D356871D-58E1-450B-967A-E6E9646175AF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.Build.0 = Release|Win32 + {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E4E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E5E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32 + {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/char/Makefile b/src/char/Makefile index 13dd1675b7..6282926f61 100644 --- a/src/char/Makefile +++ b/src/char/Makefile @@ -1,31 +1,31 @@ -all txt: char-server - -COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ - ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ - ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ - ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ - ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o -COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ - ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ - ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ - ../common/graph.h ../common/grfio.h ../common/mapindex.h - -%.o: %.c - $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $< - -char-server: char.o inter.o int_party.o int_guild.o int_status.o int_storage.o int_pet.o int_homun.o $(COMMON_OBJ) - $(CC) -o ../../$@ $> $(LIB_S) - -clean: - rm -f *.o ../../char-server - -# DO NOT DELETE - -char.o: char.c char.h inter.h int_pet.h $(COMMON_H) ../common/version.h -inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h char.h $(COMMON_H) -int_party.o: int_party.c int_party.h inter.h char.h $(COMMON_H) -int_guild.o: int_guild.c int_guild.h int_storage.h inter.h char.h $(COMMON_H) -int_storage.o: int_storage.c int_storage.h int_guild.h inter.h char.h $(COMMON_H) -int_status.o: int_status.c int_status.h char.h $(COMMON_H) -int_pet.o: int_pet.c int_pet.h inter.h char.h $(COMMON_H) -int_homun.o: int_homun.c int_homun.h inter.h char.h $(COMMON_H) +all txt: char-server + +COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ + ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ + ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ + ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ + ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o +COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ + ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ + ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ + ../common/graph.h ../common/grfio.h ../common/mapindex.h + +%.o: %.c + $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $< + +char-server: char.o inter.o int_party.o int_guild.o int_status.o int_storage.o int_pet.o int_homun.o $(COMMON_OBJ) + $(CC) -o ../../$@ $> $(LIB_S) + +clean: + rm -f *.o ../../char-server + +# DO NOT DELETE + +char.o: char.c char.h inter.h int_pet.h $(COMMON_H) ../common/version.h +inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h char.h $(COMMON_H) +int_party.o: int_party.c int_party.h inter.h char.h $(COMMON_H) +int_guild.o: int_guild.c int_guild.h int_storage.h inter.h char.h $(COMMON_H) +int_storage.o: int_storage.c int_storage.h int_guild.h inter.h char.h $(COMMON_H) +int_status.o: int_status.c int_status.h char.h $(COMMON_H) +int_pet.o: int_pet.c int_pet.h inter.h char.h $(COMMON_H) +int_homun.o: int_homun.c int_homun.h inter.h char.h $(COMMON_H) diff --git a/src/char_sql/Makefile b/src/char_sql/Makefile index 544ba82c01..651cec0027 100644 --- a/src/char_sql/Makefile +++ b/src/char_sql/Makefile @@ -1,28 +1,28 @@ -all sql: char-server_sql - -COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ - ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ - ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ - ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ - ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o -COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ - ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ - ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ - ../common/graph.h ../common/grfio.h ../common/mapindex.h - -char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o int_homun.o itemdb.o $(COMMON_OBJ) - $(CC) -o ../../$@ $^ $(LIB_S) - -clean: - rm -f *.o ../../char-server_sql - -# DO NOT DELETE - -char.o: char.c char.h ../common/strlib.h itemdb.h ../common/showmsg.h -inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h int_homun.h ../common/mmo.h char.h ../common/socket.h ../common/showmsg.h -int_party.o: int_party.c int_party.h inter.h ../common/mmo.h char.h ../common/socket.h ../common/timer.h ../common/db.h ../common/showmsg.h -int_guild.o: int_guild.c int_guild.h inter.h ../common/mmo.h char.h ../common/socket.h ../common/db.h ../common/showmsg.h -int_storage.o: int_storage.c int_storage.h char.h itemdb.h ../common/showmsg.h -int_pet.o: int_pet.c int_pet.h inter.h char.h ../common/mmo.h ../common/socket.h ../common/db.h ../common/showmsg.h -int_homun.o: int_homun.c int_homun.h inter.h char.h ../common/mmo.h ../common/socket.h ../common/db.h ../common/showmsg.h +all sql: char-server_sql + +COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ + ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ + ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ + ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ + ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o +COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ + ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ + ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ + ../common/graph.h ../common/grfio.h ../common/mapindex.h + +char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o int_homun.o itemdb.o $(COMMON_OBJ) + $(CC) -o ../../$@ $^ $(LIB_S) + +clean: + rm -f *.o ../../char-server_sql + +# DO NOT DELETE + +char.o: char.c char.h ../common/strlib.h itemdb.h ../common/showmsg.h +inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h int_homun.h ../common/mmo.h char.h ../common/socket.h ../common/showmsg.h +int_party.o: int_party.c int_party.h inter.h ../common/mmo.h char.h ../common/socket.h ../common/timer.h ../common/db.h ../common/showmsg.h +int_guild.o: int_guild.c int_guild.h inter.h ../common/mmo.h char.h ../common/socket.h ../common/db.h ../common/showmsg.h +int_storage.o: int_storage.c int_storage.h char.h itemdb.h ../common/showmsg.h +int_pet.o: int_pet.c int_pet.h inter.h char.h ../common/mmo.h ../common/socket.h ../common/db.h ../common/showmsg.h +int_homun.o: int_homun.c int_homun.h inter.h char.h ../common/mmo.h ../common/socket.h ../common/db.h ../common/showmsg.h itemdb.o: itemdb.c itemdb.h ../common/db.h ../common/mmo.h ../common/showmsg.h \ No newline at end of file diff --git a/src/common/Makefile b/src/common/Makefile index e601baae49..7c8f8065dd 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -1,60 +1,61 @@ -txt sql all: obj common - -obj: - mkdir obj - -common: obj/core.o obj/socket.o obj/timer.o obj/db.o obj/plugins.o obj/lock.o \ - obj/nullpo.o obj/malloc.o obj/showmsg.o obj/strlib.o obj/utils.o \ - obj/graph.o obj/grfio.o obj/minicore.o obj/minisocket.o obj/minimalloc.o \ - obj/mapindex.o obj/unz.o obj/ers.o - - -obj/%.o: %.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -obj/mini%.o: %.c - $(COMPILE.c) -DMINICORE $(OUTPUT_OPTION) $< - -obj/unz.o: - $(MAKE) -C ../zlib - @touch $@ - - -clean: - rm -rf *.o obj - -HAVESVN = $(shell which svnversion) - -ifeq ($(findstring /,$(HAVESVN)), /) -svnversion.h: - @printf "#define SVNVERSION " > svnversion.h - @svnversion . >> svnversion.h - @printf "\n" >> svnversion.h -else -svnversion.h: - @printf "\n" > svnversion.h -endif - -obj/minicore.o: core.c core.h -obj/minisocket.o: socket.c socket.h -obj/minimalloc.o: malloc.c malloc.h - -# DO NOT DELETE - -obj/core.o: core.c core.h showmsg.h svnversion.h -obj/socket.o: socket.c socket.h mmo.h showmsg.h plugins.h -obj/timer.o: timer.c timer.h showmsg.h -obj/ers.o: ers.c ers.h cbasetypes.h -obj/db.o: db.c db.h showmsg.h ers.h -obj/lock.o: lock.c lock.h showmsg.h -obj/grfio.o: grfio.c grfio.h -obj/graph.o: graph.c graph.h -obj/nullpo.o: nullpo.c nullpo.h showmsg.h -obj/malloc.o: malloc.c malloc.h showmsg.h -obj/plugins.o: plugins.c plugins.h plugin.h -obj/showmsg.o: showmsg.c showmsg.h -obj/strlib.o: strlib.c strlib.h utils.h -obj/mapindex.o: mapindex.c mapindex.h -obj/utils.o: utils.c utils.h malloc.h showmsg.h mmo.h -mmo.h: cbasetypes.h - @touch mmo.h +txt sql all: obj common + +obj: + mkdir obj + +common: obj/core.o obj/socket.o obj/timer.o obj/db.o obj/plugins.o obj/lock.o \ + obj/nullpo.o obj/malloc.o obj/showmsg.o obj/strlib.o obj/utils.o \ + obj/graph.o obj/grfio.o obj/minicore.o obj/minisocket.o obj/minimalloc.o \ + obj/mapindex.o obj/unz.o obj/ers.o obj/md5calc.o + + +obj/%.o: %.c + $(COMPILE.c) $(OUTPUT_OPTION) $< + +obj/mini%.o: %.c + $(COMPILE.c) -DMINICORE $(OUTPUT_OPTION) $< + +obj/unz.o: + $(MAKE) -C ../zlib + @touch $@ + + +clean: + rm -rf *.o obj GNUmakefile + +HAVESVN = $(shell which svnversion) + +ifeq ($(findstring /,$(HAVESVN)), /) +svnversion.h: + @printf "#define SVNVERSION " > svnversion.h + @svnversion . >> svnversion.h + @printf "\n" >> svnversion.h +else +svnversion.h: + @printf "\n" > svnversion.h +endif + +obj/minicore.o: core.c core.h +obj/minisocket.o: socket.c socket.h +obj/minimalloc.o: malloc.c malloc.h + +# DO NOT DELETE + +obj/core.o: core.c core.h showmsg.h svnversion.h +obj/socket.o: socket.c socket.h mmo.h showmsg.h plugins.h +obj/timer.o: timer.c timer.h showmsg.h +obj/ers.o: ers.c ers.h cbasetypes.h +obj/db.o: db.c db.h showmsg.h ers.h +obj/lock.o: lock.c lock.h showmsg.h +obj/grfio.o: grfio.c grfio.h +obj/graph.o: graph.c graph.h +obj/nullpo.o: nullpo.c nullpo.h showmsg.h +obj/malloc.o: malloc.c malloc.h showmsg.h +obj/plugins.o: plugins.c plugins.h plugin.h +obj/showmsg.o: showmsg.c showmsg.h +obj/strlib.o: strlib.c strlib.h utils.h +obj/mapindex.o: mapindex.c mapindex.h +obj/utils.o: utils.c utils.h malloc.h showmsg.h mmo.h +obj/md5calc.o: md5calc.c md5calc.h +mmo.h: cbasetypes.h + @touch mmo.h diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 3b5c69fbe6..c61424191c 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -291,5 +291,6 @@ typedef char bool; #define TOLOWER(c) ((char)tolower((unsigned char)(c))) #define ISSPACE(c) (isspace((unsigned char)(c))) #define ISALPHA(c) (isalpha((unsigned char)(c))) +#define ISALNUM(c) (isalnum((unsigned char)(c))) #endif /* _CBASETYPES_H_ */ diff --git a/src/login/md5calc.c b/src/common/md5calc.c similarity index 100% rename from src/login/md5calc.c rename to src/common/md5calc.c diff --git a/src/login/md5calc.h b/src/common/md5calc.h similarity index 100% rename from src/login/md5calc.h rename to src/common/md5calc.h diff --git a/src/ladmin/Makefile b/src/ladmin/Makefile index e383902c28..c5818404bb 100644 --- a/src/ladmin/Makefile +++ b/src/ladmin/Makefile @@ -1,19 +1,18 @@ -all txt sql: ladmin - -COMMON_OBJ = ../common/obj/minicore.o ../common/obj/minisocket.o ../common/obj/timer.o \ - ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o \ - ../common/obj/utils.o -COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ - ../common/version.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h \ - ../common/utils.h - -ladmin: ladmin.o md5calc.o $(COMMON_OBJ) - $(CC) -o ../../$@ ladmin.o md5calc.o $(COMMON_OBJ) $(LIB_S) - -clean: - rm -f *.o ../../ladmin - -# DO NOT DELETE - -ladmin.o: ladmin.c ladmin.h md5calc.h $(COMMON_H) -md5calc.o: md5calc.c md5calc.h +all txt sql: ladmin + +COMMON_OBJ = ../common/obj/minicore.o ../common/obj/minisocket.o ../common/obj/timer.o \ + ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o \ + ../common/obj/utils.o ../common/obj/md5calc.o +COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ + ../common/version.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h \ + ../common/utils.h ../common/md5calc.h + +ladmin: ladmin.o $(COMMON_OBJ) + $(CC) -o ../../$@ ladmin.o $(COMMON_OBJ) $(LIB_S) + +clean: + rm -f *.o ../../ladmin GNUmakefile + +# DO NOT DELETE + +ladmin.o: ladmin.c ladmin.h $(COMMON_H) diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c index 848c6f3de1..29f2ce404e 100644 --- a/src/ladmin/ladmin.c +++ b/src/ladmin/ladmin.c @@ -47,7 +47,7 @@ void Gettimeofday(struct timeval *timenow) #include "../common/mmo.h" #ifdef PASSWORDENC -#include "md5calc.h" +#include "../common/md5calc.h" #endif //-------------------------------INSTRUCTIONS------------------------------ diff --git a/src/ladmin/md5calc.c b/src/ladmin/md5calc.c deleted file mode 100644 index b50071ee34..0000000000 --- a/src/ladmin/md5calc.c +++ /dev/null @@ -1,239 +0,0 @@ -// (c) eAthena Dev Team - Licensed under GNU GPL -// For more information, see LICENCE in the main folder - -/*********************************************************** - * md5 calculation algorithm - * - * The source code referred to the following URL. - * http://www.geocities.co.jp/SiliconValley-Oakland/8878/lab17/lab17.html - * - ***********************************************************/ - -#include "md5calc.h" -#include -#include - -#ifndef UINT_MAX -#define UINT_MAX 4294967295U -#endif - -// Global variable -static unsigned int *pX; - -// Stirng Table -static const unsigned int T[] = { - 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, //0 - 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, //4 - 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, //8 - 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, //12 - 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, //16 - 0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, //20 - 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, //24 - 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, //28 - 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, //32 - 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, //36 - 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, //40 - 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, //44 - 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, //48 - 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, //52 - 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, //56 - 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 //60 -}; - -// ROTATE_LEFT The left is made to rotate x [ n-bit ]. This is diverted as it is from RFC. -#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) - -// The function used for other calculation -static unsigned int F(unsigned int X, unsigned int Y, unsigned int Z) -{ - return (X & Y) | (~X & Z); -} -static unsigned int G(unsigned int X, unsigned int Y, unsigned int Z) -{ - return (X & Z) | (Y & ~Z); -} -static unsigned int H(unsigned int X, unsigned int Y, unsigned int Z) -{ - return X ^ Y ^ Z; -} -static unsigned int I(unsigned int X, unsigned int Y, unsigned int Z) -{ - return Y ^ (X | ~Z); -} - -static unsigned int Round(unsigned int a, unsigned int b, unsigned int FGHI, - unsigned int k, unsigned int s, unsigned int i) -{ - return b + ROTATE_LEFT(a + FGHI + pX[k] + T[i], s); -} - -static void Round1(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, F(b,c,d), k, s, i); -} -static void Round2(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, G(b,c,d), k, s, i); -} -static void Round3(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, H(b,c,d), k, s, i); -} -static void Round4(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, I(b,c,d), k, s, i); -} - -static void MD5_Round_Calculate(const unsigned char *block, - unsigned int *A2, unsigned int *B2, unsigned int *C2, unsigned int *D2) -{ - //create X It is since it is required. - unsigned int X[16]; //512bit 64byte - int j,k; - - //Save A as AA, B as BB, C as CC, and and D as DD (saving of A, B, C, and D) - unsigned int A=*A2, B=*B2, C=*C2, D=*D2; - unsigned int AA = A,BB = B,CC = C,DD = D; - - //It is a large region variable reluctantly because of calculation of a round. . . for Round1...4 - pX = X; - - //Copy block(padding_message) i into X - for (j=0,k=0; j<64; j+=4,k++) - X[k] = ( (unsigned int )block[j] ) // 8byte*4 -> 32byte conversion - | ( ((unsigned int )block[j+1]) << 8 ) // A function called Decode as used in the field of RFC - | ( ((unsigned int )block[j+2]) << 16 ) - | ( ((unsigned int )block[j+3]) << 24 ); - - - //Round 1 - Round1(&A,B,C,D, 0, 7, 0); Round1(&D,A,B,C, 1, 12, 1); Round1(&C,D,A,B, 2, 17, 2); Round1(&B,C,D,A, 3, 22, 3); - Round1(&A,B,C,D, 4, 7, 4); Round1(&D,A,B,C, 5, 12, 5); Round1(&C,D,A,B, 6, 17, 6); Round1(&B,C,D,A, 7, 22, 7); - Round1(&A,B,C,D, 8, 7, 8); Round1(&D,A,B,C, 9, 12, 9); Round1(&C,D,A,B, 10, 17, 10); Round1(&B,C,D,A, 11, 22, 11); - Round1(&A,B,C,D, 12, 7, 12); Round1(&D,A,B,C, 13, 12, 13); Round1(&C,D,A,B, 14, 17, 14); Round1(&B,C,D,A, 15, 22, 15); - - //Round 2 - Round2(&A,B,C,D, 1, 5, 16); Round2(&D,A,B,C, 6, 9, 17); Round2(&C,D,A,B, 11, 14, 18); Round2(&B,C,D,A, 0, 20, 19); - Round2(&A,B,C,D, 5, 5, 20); Round2(&D,A,B,C, 10, 9, 21); Round2(&C,D,A,B, 15, 14, 22); Round2(&B,C,D,A, 4, 20, 23); - Round2(&A,B,C,D, 9, 5, 24); Round2(&D,A,B,C, 14, 9, 25); Round2(&C,D,A,B, 3, 14, 26); Round2(&B,C,D,A, 8, 20, 27); - Round2(&A,B,C,D, 13, 5, 28); Round2(&D,A,B,C, 2, 9, 29); Round2(&C,D,A,B, 7, 14, 30); Round2(&B,C,D,A, 12, 20, 31); - - //Round 3 - Round3(&A,B,C,D, 5, 4, 32); Round3(&D,A,B,C, 8, 11, 33); Round3(&C,D,A,B, 11, 16, 34); Round3(&B,C,D,A, 14, 23, 35); - Round3(&A,B,C,D, 1, 4, 36); Round3(&D,A,B,C, 4, 11, 37); Round3(&C,D,A,B, 7, 16, 38); Round3(&B,C,D,A, 10, 23, 39); - Round3(&A,B,C,D, 13, 4, 40); Round3(&D,A,B,C, 0, 11, 41); Round3(&C,D,A,B, 3, 16, 42); Round3(&B,C,D,A, 6, 23, 43); - Round3(&A,B,C,D, 9, 4, 44); Round3(&D,A,B,C, 12, 11, 45); Round3(&C,D,A,B, 15, 16, 46); Round3(&B,C,D,A, 2, 23, 47); - - //Round 4 - Round4(&A,B,C,D, 0, 6, 48); Round4(&D,A,B,C, 7, 10, 49); Round4(&C,D,A,B, 14, 15, 50); Round4(&B,C,D,A, 5, 21, 51); - Round4(&A,B,C,D, 12, 6, 52); Round4(&D,A,B,C, 3, 10, 53); Round4(&C,D,A,B, 10, 15, 54); Round4(&B,C,D,A, 1, 21, 55); - Round4(&A,B,C,D, 8, 6, 56); Round4(&D,A,B,C, 15, 10, 57); Round4(&C,D,A,B, 6, 15, 58); Round4(&B,C,D,A, 13, 21, 59); - Round4(&A,B,C,D, 4, 6, 60); Round4(&D,A,B,C, 11, 10, 61); Round4(&C,D,A,B, 2, 15, 62); Round4(&B,C,D,A, 9, 21, 63); - - // Then perform the following additions. (let's add) - *A2 = A + AA; - *B2 = B + BB; - *C2 = C + CC; - *D2 = D + DD; - - //The clearance of confidential information - memset(pX, 0, sizeof(X)); -} - -//------------------------------------------------------------------- -// The function for the exteriors - -/** output is the coded binary in the character sequence which wants to code string. */ -void MD5_String2binary(const char * string, char * output) -{ -//var - /*8bit*/ - unsigned char padding_message[64]; //Extended message 512bit 64byte - unsigned char *pstring; //The position of string in the present scanning notes is held. - -// unsigned char digest[16]; - /*32bit*/ - unsigned int string_byte_len, //The byte chief of string is held. - string_bit_len, //The bit length of string is held. - copy_len, //The number of bytes which is used by 1-3 and which remained - msg_digest[4]; //Message digest 128bit 4byte - unsigned int *A = &msg_digest[0], //The message digest in accordance with RFC (reference) - *B = &msg_digest[1], - *C = &msg_digest[2], - *D = &msg_digest[3]; - int i; - -//prog - //Step 3.Initialize MD Buffer (although it is the initialization; step 3 of A, B, C, and D -- unavoidable -- a head) - *A = 0x67452301; - *B = 0xefcdab89; - *C = 0x98badcfe; - *D = 0x10325476; - - //Step 1.Append Padding Bits (extension of a mark bit) - //1-1 - string_byte_len = strlen(string); //The byte chief of a character sequence is acquired. - pstring = (unsigned char *)string; //The position of the present character sequence is set. - - //1-2 Repeat calculation until length becomes less than 64 bytes. - for (i=string_byte_len; 64<=i; i-=64,pstring+=64) - MD5_Round_Calculate(pstring, A,B,C,D); - - //1-3 - copy_len = string_byte_len % 64; //The number of bytes which remained is computed. - strncpy((char *)padding_message, (char *)pstring, copy_len); //A message is copied to an extended bit sequence. - memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length. - padding_message[copy_len] |= 0x80; //The next of a message is 1. - - //1-4 - //If 56 bytes or more (less than 64 bytes) of remainder becomes, it will calculate by extending to 64 bytes. - if (56 <= copy_len) { - MD5_Round_Calculate(padding_message, A,B,C,D); - memset(padding_message, 0, 56); //56 bytes is newly fill uped with 0. - } - - - //Step 2.Append Length (the information on length is added) - string_bit_len = string_byte_len * 8; //From the byte chief to bit length (32 bytes of low rank) - memcpy(&padding_message[56], &string_bit_len, 4); //32 bytes of low rank is set. - - //When bit length cannot be expressed in 32 bytes of low rank, it is a beam raising to a higher rank. - if (UINT_MAX / 8 < string_byte_len) { - unsigned int high = (string_byte_len - UINT_MAX / 8) * 8; - memcpy(&padding_message[60], &high, 4); - } else - memset(&padding_message[60], 0, 4); //In this case, it is good for a higher rank at 0. - - //Step 4.Process Message in 16-Word Blocks (calculation of MD5) - MD5_Round_Calculate(padding_message, A,B,C,D); - - - //Step 5.Output (output) - memcpy(output,msg_digest,16); -// memcpy (digest, msg_digest, and 16); //8 byte*4 < - 32byte conversion A function called Encode as used in the field of RFC -/* sprintf(output, - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - digest[ 0], digest[ 1], digest[ 2], digest[ 3], - digest[ 4], digest[ 5], digest[ 6], digest[ 7], - digest[ 8], digest[ 9], digest[10], digest[11], - digest[12], digest[13], digest[14], digest[15]);*/ -} - -/** output is the coded character sequence in the character sequence which wants to code string. */ -void MD5_String(const char * string, char * output) -{ - unsigned char digest[16]; - - MD5_String2binary(string,(char*)digest); - sprintf(output, - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - digest[ 0], digest[ 1], digest[ 2], digest[ 3], - digest[ 4], digest[ 5], digest[ 6], digest[ 7], - digest[ 8], digest[ 9], digest[10], digest[11], - digest[12], digest[13], digest[14], digest[15]); -} - diff --git a/src/ladmin/md5calc.h b/src/ladmin/md5calc.h deleted file mode 100644 index ad46af760f..0000000000 --- a/src/ladmin/md5calc.h +++ /dev/null @@ -1,10 +0,0 @@ -// (c) eAthena Dev Team - Licensed under GNU GPL -// For more information, see LICENCE in the main folder - -#ifndef _MD5CALC_H_ -#define _MD5CALC_H_ - -void MD5_String(const char * string, char * output); -void MD5_String2binary(const char * string, char * output); - -#endif diff --git a/src/login/Makefile b/src/login/Makefile index 549d1f1700..7c7d74c464 100644 --- a/src/login/Makefile +++ b/src/login/Makefile @@ -1,25 +1,26 @@ -all txt: login-server - -COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ - ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ - ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ - ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ - ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o -COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ - ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ - ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ - ../common/graph.h ../common/grfio.h ../common/mapindex.h - -%.o: %.c - $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $< - -login-server: login.o md5calc.o $(COMMON_OBJ) - $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ) $(LIB_S) - -clean: - rm -f *.o ../../login-server - -# DO NOT DELETE - -login.o: login.c login.h md5calc.h $(COMMON_H) -md5calc.o: md5calc.c md5calc.h +all txt: login-server + +COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ + ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ + ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ + ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ + ../common/obj/mapindex.o ../common/obj/ers.o ../common/obj/md5calc.h \ + ../zlib/unz.o +COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ + ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ + ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ + ../common/graph.h ../common/grfio.h ../common/mapindex.h \ + ../common/md5calc.h + +%.o: %.c + $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $< + +login-server: login.o $(COMMON_OBJ) + $(CC) -o ../../$@ login.o $(COMMON_OBJ) $(LIB_S) + +clean: + rm -f *.o ../../login-server GNUmakefile + +# DO NOT DELETE + +login.o: login.c login.h $(COMMON_H) diff --git a/src/login/login.c b/src/login/login.c index e30b44f3ef..3c38c738c8 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -35,7 +35,7 @@ #include "login.h" #ifdef PASSWORDENC -#include "md5calc.h" +#include "../common/md5calc.h" #endif int account_id_count = START_ACCOUNT_NUM; diff --git a/src/login_sql/Makefile b/src/login_sql/Makefile index 2a54f680b3..2499340656 100644 --- a/src/login_sql/Makefile +++ b/src/login_sql/Makefile @@ -1,22 +1,23 @@ -all sql: login-server_sql - -COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ - ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ - ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ - ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ - ../common/obj/mapindex.o ../common/obj/ers.o ../zlib/unz.o -COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ - ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ - ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ - ../common/graph.h ../common/grfio.h ../common/mapindex.h - -login-server_sql: login.o md5calc.o $(COMMON_OBJ) - $(CC) -o ../../$@ $^ $(LIB_S) - -clean: - rm -f *.o ../../login-server_sql - -# DO NOT DELETE - -login.o: login.c login.h md5calc.h $(COMMON_H) -md5calc.o: md5calc.c md5calc.h +all sql: login-server_sql + +COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ + ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ + ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/utils.o \ + ../common/obj/strlib.o ../common/obj/graph.o ../common/obj/grfio.o \ + ../common/obj/mapindex.o ../common/obj/ers.o ../common/md5calc.o \ + ../zlib/unz.o +COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h \ + ../common/version.h ../common/db.h ../common/plugins.h ../common/lock.h \ + ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/strlib.h \ + ../common/graph.h ../common/grfio.h ../common/mapindex.h \ + ../common/md5calc.h + +login-server_sql: login.o $(COMMON_OBJ) + $(CC) -o ../../$@ $^ $(LIB_S) + +clean: + rm -f *.o ../../login-server_sql GNUmakefile + +# DO NOT DELETE + +login.o: login.c login.h $(COMMON_H) diff --git a/src/login_sql/login.c b/src/login_sql/login.c index c373296946..c6e159e276 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -41,7 +41,7 @@ #include "login.h" #ifdef PASSWORDENC -#include "md5calc.h" +#include "../common/md5calc.h" #endif #define J_MAX_MALLOC_SIZE 65535 diff --git a/src/login_sql/make.sh b/src/login_sql/make.sh deleted file mode 100644 index 3e43cd11f8..0000000000 --- a/src/login_sql/make.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - rsqlt=`rm -rf *.o` - gcc -c login.c -I/usr/local/include/mysql/ - gcc -c md5calc.c -I/usr/local/include/mysql/ - gcc -c strlib.c - gcc -o login-server login.o strlib.o md5calc.o ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o -L/usr/local/lib/mysql/ -lmysqlclient -lz diff --git a/src/login_sql/md5calc.c b/src/login_sql/md5calc.c deleted file mode 100644 index 09c59dd600..0000000000 --- a/src/login_sql/md5calc.c +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder - -/*********************************************************** - * md5 calculation algorithm - * - * The source code referred to the following URL. - * http://www.geocities.co.jp/SiliconValley-Oakland/8878/lab17/lab17.html - * - ***********************************************************/ - -#include "md5calc.h" -#include -#include - -#ifndef UINT_MAX -#define UINT_MAX 4294967295U -#endif - -// Global variable -static unsigned int *pX; - -// Stirng Table -static const unsigned int T[] = { - 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, //0 - 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, //4 - 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, //8 - 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, //12 - 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, //16 - 0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, //20 - 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, //24 - 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, //28 - 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, //32 - 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, //36 - 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, //40 - 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, //44 - 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, //48 - 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, //52 - 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, //56 - 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 //60 -}; - -// ROTATE_LEFT The left is made to rotate x [ n-bit ]. This is diverted as it is from RFC. -#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) - -// The function used for other calculation -static unsigned int F(unsigned int X, unsigned int Y, unsigned int Z) -{ - return (X & Y) | (~X & Z); -} -static unsigned int G(unsigned int X, unsigned int Y, unsigned int Z) -{ - return (X & Z) | (Y & ~Z); -} -static unsigned int H(unsigned int X, unsigned int Y, unsigned int Z) -{ - return X ^ Y ^ Z; -} -static unsigned int I(unsigned int X, unsigned int Y, unsigned int Z) -{ - return Y ^ (X | ~Z); -} - -static unsigned int Round(unsigned int a, unsigned int b, unsigned int FGHI, - unsigned int k, unsigned int s, unsigned int i) -{ - return b + ROTATE_LEFT(a + FGHI + pX[k] + T[i], s); -} - -static void Round1(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, F(b,c,d), k, s, i); -} -static void Round2(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, G(b,c,d), k, s, i); -} -static void Round3(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, H(b,c,d), k, s, i); -} -static void Round4(unsigned int *a, unsigned int b, unsigned int c, - unsigned int d,unsigned int k, unsigned int s, unsigned int i) -{ - *a = Round(*a, b, I(b,c,d), k, s, i); -} - -static void MD5_Round_Calculate(const unsigned char *block, - unsigned int *A2, unsigned int *B2, unsigned int *C2, unsigned int *D2) -{ - //create X It is since it is required. - unsigned int X[16]; //512bit 64byte - int j,k; - - //Save A as AA, B as BB, C as CC, and and D as DD (saving of A, B, C, and D) - unsigned int A=*A2, B=*B2, C=*C2, D=*D2; - unsigned int AA = A,BB = B,CC = C,DD = D; - - //It is a large region variable reluctantly because of calculation of a round. . . for Round1...4 - pX = X; - - //Copy block(padding_message) i into X - for (j=0,k=0; j<64; j+=4,k++) - X[k] = ( (unsigned int )block[j] ) // 8byte*4 -> 32byte conversion - | ( ((unsigned int )block[j+1]) << 8 ) // A function called Decode as used in the field of RFC - | ( ((unsigned int )block[j+2]) << 16 ) - | ( ((unsigned int )block[j+3]) << 24 ); - - - //Round 1 - Round1(&A,B,C,D, 0, 7, 0); Round1(&D,A,B,C, 1, 12, 1); Round1(&C,D,A,B, 2, 17, 2); Round1(&B,C,D,A, 3, 22, 3); - Round1(&A,B,C,D, 4, 7, 4); Round1(&D,A,B,C, 5, 12, 5); Round1(&C,D,A,B, 6, 17, 6); Round1(&B,C,D,A, 7, 22, 7); - Round1(&A,B,C,D, 8, 7, 8); Round1(&D,A,B,C, 9, 12, 9); Round1(&C,D,A,B, 10, 17, 10); Round1(&B,C,D,A, 11, 22, 11); - Round1(&A,B,C,D, 12, 7, 12); Round1(&D,A,B,C, 13, 12, 13); Round1(&C,D,A,B, 14, 17, 14); Round1(&B,C,D,A, 15, 22, 15); - - //Round 2 - Round2(&A,B,C,D, 1, 5, 16); Round2(&D,A,B,C, 6, 9, 17); Round2(&C,D,A,B, 11, 14, 18); Round2(&B,C,D,A, 0, 20, 19); - Round2(&A,B,C,D, 5, 5, 20); Round2(&D,A,B,C, 10, 9, 21); Round2(&C,D,A,B, 15, 14, 22); Round2(&B,C,D,A, 4, 20, 23); - Round2(&A,B,C,D, 9, 5, 24); Round2(&D,A,B,C, 14, 9, 25); Round2(&C,D,A,B, 3, 14, 26); Round2(&B,C,D,A, 8, 20, 27); - Round2(&A,B,C,D, 13, 5, 28); Round2(&D,A,B,C, 2, 9, 29); Round2(&C,D,A,B, 7, 14, 30); Round2(&B,C,D,A, 12, 20, 31); - - //Round 3 - Round3(&A,B,C,D, 5, 4, 32); Round3(&D,A,B,C, 8, 11, 33); Round3(&C,D,A,B, 11, 16, 34); Round3(&B,C,D,A, 14, 23, 35); - Round3(&A,B,C,D, 1, 4, 36); Round3(&D,A,B,C, 4, 11, 37); Round3(&C,D,A,B, 7, 16, 38); Round3(&B,C,D,A, 10, 23, 39); - Round3(&A,B,C,D, 13, 4, 40); Round3(&D,A,B,C, 0, 11, 41); Round3(&C,D,A,B, 3, 16, 42); Round3(&B,C,D,A, 6, 23, 43); - Round3(&A,B,C,D, 9, 4, 44); Round3(&D,A,B,C, 12, 11, 45); Round3(&C,D,A,B, 15, 16, 46); Round3(&B,C,D,A, 2, 23, 47); - - //Round 4 - Round4(&A,B,C,D, 0, 6, 48); Round4(&D,A,B,C, 7, 10, 49); Round4(&C,D,A,B, 14, 15, 50); Round4(&B,C,D,A, 5, 21, 51); - Round4(&A,B,C,D, 12, 6, 52); Round4(&D,A,B,C, 3, 10, 53); Round4(&C,D,A,B, 10, 15, 54); Round4(&B,C,D,A, 1, 21, 55); - Round4(&A,B,C,D, 8, 6, 56); Round4(&D,A,B,C, 15, 10, 57); Round4(&C,D,A,B, 6, 15, 58); Round4(&B,C,D,A, 13, 21, 59); - Round4(&A,B,C,D, 4, 6, 60); Round4(&D,A,B,C, 11, 10, 61); Round4(&C,D,A,B, 2, 15, 62); Round4(&B,C,D,A, 9, 21, 63); - - // Then perform the following additions. (let's add) - *A2 = A + AA; - *B2 = B + BB; - *C2 = C + CC; - *D2 = D + DD; - - //The clearance of confidential information - memset(pX, 0, sizeof(X)); -} - -//------------------------------------------------------------------- -// The function for the exteriors - -/** output is the coded binary in the character sequence which wants to code string. */ -void MD5_String2binary(const char * string, char * output) -{ -//var - /*8bit*/ - unsigned char padding_message[64]; //Extended message 512bit 64byte - unsigned char *pstring; //The position of string in the present scanning notes is held. - -// unsigned char digest[16]; - /*32bit*/ - unsigned int string_byte_len, //The byte chief of string is held. - string_bit_len, //The bit length of string is held. - copy_len, //The number of bytes which is used by 1-3 and which remained - msg_digest[4]; //Message digest 128bit 4byte - unsigned int *A = &msg_digest[0], //The message digest in accordance with RFC (reference) - *B = &msg_digest[1], - *C = &msg_digest[2], - *D = &msg_digest[3]; - int i; - -//prog - //Step 3.Initialize MD Buffer (although it is the initialization; step 3 of A, B, C, and D -- unavoidable -- a head) - *A = 0x67452301; - *B = 0xefcdab89; - *C = 0x98badcfe; - *D = 0x10325476; - - //Step 1.Append Padding Bits (extension of a mark bit) - //1-1 - string_byte_len = strlen(string); //The byte chief of a character sequence is acquired. - pstring = (unsigned char *)string; //The position of the present character sequence is set. - - //1-2 Repeat calculation until length becomes less than 64 bytes. - for (i=string_byte_len; 64<=i; i-=64,pstring+=64) - MD5_Round_Calculate(pstring, A,B,C,D); - - //1-3 - copy_len = string_byte_len % 64; //The number of bytes which remained is computed. - strncpy((char *)padding_message, (char *)pstring, copy_len); //A message is copied to an extended bit sequence. - memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length. - padding_message[copy_len] |= 0x80; //The next of a message is 1. - - //1-4 - //If 56 bytes or more (less than 64 bytes) of remainder becomes, it will calculate by extending to 64 bytes. - if (56 <= copy_len) { - MD5_Round_Calculate(padding_message, A,B,C,D); - memset(padding_message, 0, 56); //56 bytes is newly fill uped with 0. - } - - - //Step 2.Append Length (the information on length is added) - string_bit_len = string_byte_len * 8; //From the byte chief to bit length (32 bytes of low rank) - memcpy(&padding_message[56], &string_bit_len, 4); //32 bytes of low rank is set. - - //When bit length cannot be expressed in 32 bytes of low rank, it is a beam raising to a higher rank. - if (UINT_MAX / 8 < string_byte_len) { - unsigned int high = (string_byte_len - UINT_MAX / 8) * 8; - memcpy(&padding_message[60], &high, 4); - } else - memset(&padding_message[60], 0, 4); //In this case, it is good for a higher rank at 0. - - //Step 4.Process Message in 16-Word Blocks (calculation of MD5) - MD5_Round_Calculate(padding_message, A,B,C,D); - - - //Step 5.Output (output) - memcpy(output,msg_digest,16); -// memcpy (digest, msg_digest, and 16); //8 byte*4 < - 32byte conversion A function called Encode as used in the field of RFC -/* sprintf(output, - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - digest[ 0], digest[ 1], digest[ 2], digest[ 3], - digest[ 4], digest[ 5], digest[ 6], digest[ 7], - digest[ 8], digest[ 9], digest[10], digest[11], - digest[12], digest[13], digest[14], digest[15]);*/ -} - -/** output is the coded character sequence in the character sequence which wants to code string. */ -void MD5_String(const char * string, char * output) -{ - unsigned char digest[16]; - - MD5_String2binary(string,(char*)digest); - sprintf(output, - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - digest[ 0], digest[ 1], digest[ 2], digest[ 3], - digest[ 4], digest[ 5], digest[ 6], digest[ 7], - digest[ 8], digest[ 9], digest[10], digest[11], - digest[12], digest[13], digest[14], digest[15]); -} - diff --git a/src/login_sql/md5calc.h b/src/login_sql/md5calc.h deleted file mode 100644 index 505959c6a2..0000000000 --- a/src/login_sql/md5calc.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder - -#ifndef _MD5CALC_H_ -#define _MD5CALC_H_ - -void MD5_String(const char * string, char * output); -void MD5_String2binary(const char * string, char * output); - -#endif diff --git a/src/map/Makefile b/src/map/Makefile index 72bac5471b..2345c7dd36 100644 --- a/src/map/Makefile +++ b/src/map/Makefile @@ -1,106 +1,106 @@ -all txt: txtobj map-server - -sql: sqlobj map-server_sql - -txtobj: - mkdir txtobj - -sqlobj: - mkdir sqlobj - -COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ - ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ - ../common/obj/nullpo.o ../common/obj/malloc.o ../common/obj/showmsg.o \ - ../common/obj/utils.o ../common/obj/strlib.o ../common/obj/grfio.o \ - ../common/obj/graph.o ../common/obj/mapindex.o ../common/obj/ers.o \ - ../zlib/unz.o - -COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h \ - ../common/plugins.h ../common/lock.h ../common/nullpo.h ../common/malloc.h \ - ../common/showmsg.h ../common/utils.h ../common/strlib.h ../common/grfio.h \ - ../common/graph.h ../common/mapindex.h - -OBJECTS = obj/map.o obj/chrif.o obj/clif.o obj/pc.o obj/status.o obj/npc.o \ - obj/npc_chat.o obj/chat.o obj/path.o obj/itemdb.o obj/mob.o obj/script.o \ - obj/storage.o obj/skill.o obj/atcommand.o obj/charcommand.o obj/battle.o \ - obj/intif.o obj/trade.o obj/party.o obj/vending.o obj/guild.o obj/pet.o \ - obj/log.o obj/mail.o obj/charsave.o obj/date.o obj/irc.o obj/unit.o \ - obj/mercenary.o \ - $(COMMON_OBJ) - -map-server: $(OBJECTS:obj/%=txtobj/%) - $(CC) -o ../../$@ $> $(LIBS) $(LIB_S) - -map-server_sql: $(OBJECTS:obj/%=sqlobj/%) - $(CC) -o ../../$@ $> $(LIB_S) - -txtobj/%.o: %.c - $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $< - -sqlobj/%.o: %.c - $(COMPILE.c) $(OUTPUT_OPTION) $< - -clean: - rm -rf *.o ../../map-server ../../map-server_sql sqlobj txtobj - -# DO NOT DELETE - -txtobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h irc.h $(COMMON_H) -txtobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H) -txtobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h irc.h $(COMMON_H) -txtobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h $(COMMON_H) -txtobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H) -txtobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) -txtobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) -txtobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H) -txtobj/path.o: path.c map.h battle.h $(COMMON_H) -txtobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H) -txtobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h date.h irc.h $(COMMON_H) -txtobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h irc.h $(COMMON_H) -txtobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H) -txtobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h date.h $(COMMON_H) -txtobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) -txtobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H) -txtobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H) -txtobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h $(COMMON_H) -txtobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H) -txtobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h irc.h $(COMMON_H) -txtobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h $(COMMON_H) -txtobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H) -txtobj/log.o: log.c log.h map.h $(COMMON_H) -txtobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) -txtobj/date.o: date.c date.h $(COMMON_H) -txtobj/irc.o: irc.c irc.h map.h pc.h $(COMMON_H) -txtobj/unit.o: unit.c unit.h $(COMMON_H) -txtobj/mercenary.o: mercenary.c mercenary.h $(COMMON_H) - -sqlobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h log.h irc.h $(COMMON_H) -sqlobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H) -sqlobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h $(COMMON_H) -sqlobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h log.h $(COMMON_H) -sqlobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H) -sqlobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) -sqlobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) -sqlobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H) -sqlobj/path.o: path.c map.h battle.h $(COMMON_H) -sqlobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H) -sqlobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h log.h date.h irc.h $(COMMON_H) -sqlobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h irc.h $(COMMON_H) -sqlobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H) -sqlobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h log.h date.h $(COMMON_H) -sqlobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) -sqlobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H) -sqlobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H) -sqlobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h log.h $(COMMON_H) -sqlobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H) -sqlobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h log.h irc.h $(COMMON_H) -sqlobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h irc.h $(COMMON_H) -sqlobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H) -sqlobj/mail.o: mail.c mail.h $(COMMON_H) -sqlobj/log.o: log.c log.h map.h $(COMMON_H) -sqlobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) -sqlobj/charsave.o: charsave.c charsave.h $(COMMON_H) -sqlobj/date.o: date.c date.h $(COMMON_H) -sqlobj/irc.o: irc.c irc.h map.h pc.h $(COMMON_H) -sqlobj/unit.o: unit.c unit.h $(COMMON_H) -sqlobj/mercenary.o: mercenary.c mercenary.h $(COMMON_H) +all txt: txtobj map-server + +sql: sqlobj map-server_sql + +txtobj: + mkdir txtobj + +sqlobj: + mkdir sqlobj + +COMMON_OBJ = ../common/obj/core.o ../common/obj/socket.o ../common/obj/timer.o \ + ../common/obj/db.o ../common/obj/plugins.o ../common/obj/lock.o \ + ../common/obj/nullpo.o ../common/obj/malloc.o ../common/obj/showmsg.o \ + ../common/obj/utils.o ../common/obj/strlib.o ../common/obj/grfio.o \ + ../common/obj/graph.o ../common/obj/mapindex.o ../common/obj/ers.o \ + ../zlib/unz.o + +COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h \ + ../common/plugins.h ../common/lock.h ../common/nullpo.h ../common/malloc.h \ + ../common/showmsg.h ../common/utils.h ../common/strlib.h ../common/grfio.h \ + ../common/graph.h ../common/mapindex.h + +OBJECTS = obj/map.o obj/chrif.o obj/clif.o obj/pc.o obj/status.o obj/npc.o \ + obj/npc_chat.o obj/chat.o obj/path.o obj/itemdb.o obj/mob.o obj/script.o \ + obj/storage.o obj/skill.o obj/atcommand.o obj/charcommand.o obj/battle.o \ + obj/intif.o obj/trade.o obj/party.o obj/vending.o obj/guild.o obj/pet.o \ + obj/log.o obj/mail.o obj/charsave.o obj/date.o obj/irc.o obj/unit.o \ + obj/mercenary.o \ + $(COMMON_OBJ) + +map-server: $(OBJECTS:obj/%=txtobj/%) + $(CC) -o ../../$@ $> $(LIBS) $(LIB_S) + +map-server_sql: $(OBJECTS:obj/%=sqlobj/%) + $(CC) -o ../../$@ $> $(LIB_S) + +txtobj/%.o: %.c + $(COMPILE.c) -DTXT_ONLY $(OUTPUT_OPTION) $< + +sqlobj/%.o: %.c + $(COMPILE.c) $(OUTPUT_OPTION) $< + +clean: + rm -rf *.o ../../map-server ../../map-server_sql sqlobj txtobj + +# DO NOT DELETE + +txtobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h irc.h $(COMMON_H) +txtobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H) +txtobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h irc.h $(COMMON_H) +txtobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h $(COMMON_H) +txtobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H) +txtobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) +txtobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) +txtobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H) +txtobj/path.o: path.c map.h battle.h $(COMMON_H) +txtobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H) +txtobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h date.h irc.h $(COMMON_H) +txtobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h irc.h $(COMMON_H) +txtobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H) +txtobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h date.h $(COMMON_H) +txtobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) +txtobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H) +txtobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H) +txtobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h $(COMMON_H) +txtobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H) +txtobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h irc.h $(COMMON_H) +txtobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h $(COMMON_H) +txtobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H) +txtobj/log.o: log.c log.h map.h $(COMMON_H) +txtobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) +txtobj/date.o: date.c date.h $(COMMON_H) +txtobj/irc.o: irc.c irc.h map.h pc.h $(COMMON_H) +txtobj/unit.o: unit.c unit.h $(COMMON_H) +txtobj/mercenary.o: mercenary.c mercenary.h $(COMMON_H) + +sqlobj/map.o: map.c map.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h pet.h atcommand.h log.h irc.h $(COMMON_H) +sqlobj/chrif.o: chrif.c map.h battle.h chrif.h clif.h intif.h pc.h npc.h $(COMMON_H) +sqlobj/clif.o: clif.c map.h chrif.h clif.h mob.h intif.h pc.h npc.h itemdb.h chat.h script.h storage.h party.h guild.h atcommand.h pet.h charcommand.h $(COMMON_H) +sqlobj/pc.o: pc.c map.h clif.h intif.h pc.h npc.h mob.h itemdb.h battle.h skill.h script.h party.h guild.h pet.h trade.h storage.h chat.h vending.h log.h $(COMMON_H) +sqlobj/status.o: status.c pc.h map.h clif.h status.h mob.h itemdb.h battle.h skill.h script.h pet.h guild.h $(COMMON_H) +sqlobj/npc.o: npc.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) +sqlobj/npc_chat.o: npc_chat.c map.h npc.h clif.h pc.h script.h mob.h itemdb.h battle.h $(COMMON_H) +sqlobj/chat.o: chat.c map.h clif.h pc.h chat.h $(COMMON_H) +sqlobj/path.o: path.c map.h battle.h $(COMMON_H) +sqlobj/itemdb.o: itemdb.c map.h battle.h itemdb.h $(COMMON_H) +sqlobj/mob.o: mob.c map.h clif.h intif.h pc.h mob.h skill.h battle.h npc.h itemdb.h log.h date.h irc.h $(COMMON_H) +sqlobj/script.o: script.c itemdb.h map.h pc.h mob.h clif.h intif.h npc.h script.h storage.h skill.h pet.h battle.h log.h irc.h $(COMMON_H) +sqlobj/storage.o: storage.c itemdb.h pc.h clif.h intif.h storage.h guild.h $(COMMON_H) +sqlobj/skill.o: skill.c skill.h map.h clif.h pc.h mob.h battle.h itemdb.h script.h log.h date.h $(COMMON_H) +sqlobj/atcommand.o: atcommand.c atcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) +sqlobj/battle.o: battle.c battle.h skill.h map.h mob.h pc.h pet.h guild.h $(COMMON_H) +sqlobj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h battle.h pet.h $(COMMON_H) +sqlobj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h log.h $(COMMON_H) +sqlobj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h $(COMMON_H) +sqlobj/vending.o: vending.c vending.h clif.h itemdb.h map.h pc.h log.h irc.h $(COMMON_H) +sqlobj/guild.o: guild.c guild.h storage.h battle.h clif.h intif.h pc.h npc.h map.h irc.h $(COMMON_H) +sqlobj/pet.o: pet.c pet.h map.h clif.h chrif.h intif.h pc.h itemdb.h battle.h mob.h npc.h script.h $(COMMON_H) +sqlobj/mail.o: mail.c mail.h $(COMMON_H) +sqlobj/log.o: log.c log.h map.h $(COMMON_H) +sqlobj/charcommand.o: charcommand.c charcommand.h itemdb.h pc.h map.h skill.h clif.h mob.h intif.h battle.h storage.h guild.h pet.h log.h $(COMMON_H) +sqlobj/charsave.o: charsave.c charsave.h $(COMMON_H) +sqlobj/date.o: date.c date.h $(COMMON_H) +sqlobj/irc.o: irc.c irc.h map.h pc.h $(COMMON_H) +sqlobj/unit.o: unit.c unit.h $(COMMON_H) +sqlobj/mercenary.o: mercenary.c mercenary.h $(COMMON_H) diff --git a/src/map/npc.c b/src/map/npc.c index 8e2a0d0095..95cb4b1775 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2943,7 +2943,7 @@ int do_final_npc(void) if ((bl = map_id2bl(i))){ if (bl->type == BL_NPC) npc_unload((struct npc_data *)bl); - else if (bl->type&(BL_MOB|BL_PET))//## why BL_PET? [FlavioJS] //## Because this is invoked after saving/wiping all players, which would include all pets. This bit of code will take care of any pets without a master that are still lingering in the map. [Skotlex] + else if (bl->type&(BL_MOB|BL_PET))//# why BL_PET? [FlavioJS] //# Because this is invoked after saving/wiping all players, which would include all pets. This bit of code will take care of any pets without a master that are still lingering in the map. [Skotlex] unit_free(bl, 0); } } diff --git a/src/map/script.c b/src/map/script.c index f94b0163a8..e13edd1c4b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -499,12 +499,11 @@ static const char *skip_word(const char *p) if(*p=='#') p++; // account•Ï”—p if(*p=='#') p++; // ƒ[ƒ‹ƒhaccount•Ï”—p - while(isalnum(*p)||*p=='_'|| *p>=0x81) { //#FIXME: Changing from unsigned char to signed char makes p never be able to go above 0x81, but what IS 0x81 for? - if(*p>=0x81 && p[1]){ - p+=2; - } else - p++; - } + //# Changing from unsigned char to signed char makes p never be able to go above 0x81, but what IS 0x81 for? [Skotlex] + //# It's for multibyte encodings like Shift-JIS. Unfortunately this can be problematic for singlebyte encodings. + // Using (*p)>>7 would yield the appropriate result but it's better to restrict words to ASCII characters only. [FlavioJS] + while( ISALNUM(*p) || *p == '_' ) + p++; // postfix if(*p=='$') p++; // •¶Žš—ñ•Ï” @@ -989,7 +988,7 @@ const char* parse_syntax(const char* p) { } break; case 'c': - if(!strncmp(p,"case",4) && !isalpha(*(p + 4))) { + if(!strncmp(p,"case",4) && !ISALPHA(p[4])) { // case ‚̈— if(syntax.curly_count <= 0 || syntax.curly[syntax.curly_count - 1].type != TYPE_SWITCH) { disp_error_message("parse_syntax: unexpected 'case' ",p); @@ -1044,7 +1043,7 @@ const char* parse_syntax(const char* p) { syntax.curly[pos].count++; } return p + 1; - } else if(!strncmp(p,"continue",8) && !isalpha(*(p + 8))) { + } else if(!strncmp(p,"continue",8) && !ISALPHA(p[8])) { // continue ‚̈— char label[256]; int pos = syntax.curly_count - 1; @@ -1077,7 +1076,7 @@ const char* parse_syntax(const char* p) { } break; case 'd': - if(!strncmp(p,"default",7) && !isalpha(p[7])) { + if(!strncmp(p,"default",7) && !ISALPHA(p[7])) { // switch - default ‚̈— if(syntax.curly_count <= 0 || syntax.curly[syntax.curly_count - 1].type != TYPE_SWITCH) { disp_error_message("parse_syntax: unexpected 'default'",p); @@ -1117,7 +1116,7 @@ const char* parse_syntax(const char* p) { p = skip_word(p); return p + 1; } - } else if(!strncmp(p,"do",2) && !isalpha(*(p + 2))) { + } else if(!strncmp(p,"do",2) && !ISALPHA(p[2])) { int l; char label[256]; p=skip_word(p); @@ -1136,7 +1135,7 @@ const char* parse_syntax(const char* p) { } break; case 'f': - if(!strncmp(p,"for",3) && !isalpha(*(p + 3))) { + if(!strncmp(p,"for",3) && !ISALPHA(p[3])) { int l; char label[256]; int pos = syntax.curly_count; @@ -1215,7 +1214,7 @@ const char* parse_syntax(const char* p) { l=add_str(label); set_label(l,script_pos,p); return p; - } else if(!strncmp(p,"function",8) && !isalpha(*(p + 8))) { + } else if(!strncmp(p,"function",8) && !ISALPHA(p[8])) { const char *func_name; // function p=skip_word(p); @@ -1257,7 +1256,7 @@ const char* parse_syntax(const char* p) { } break; case 'i': - if(!strncmp(p,"if",2) && !isalpha(*(p + 2))) { + if(!strncmp(p,"if",2) && !ISALPHA(p[2])) { // if() ‚̈— char label[256]; p=skip_word(p); @@ -1279,7 +1278,7 @@ const char* parse_syntax(const char* p) { } break; case 's': - if(!strncmp(p,"switch",6) && !isalpha(*(p + 6))) { + if(!strncmp(p,"switch",6) && !ISALPHA(p[6])) { // switch() ‚̈— char label[256]; syntax.curly[syntax.curly_count].type = TYPE_SWITCH; @@ -1303,7 +1302,7 @@ const char* parse_syntax(const char* p) { } break; case 'w': - if(!strncmp(p,"while",5) && !isalpha(*(p + 5))) { + if(!strncmp(p,"while",5) && !ISALPHA(p[5])) { int l; char label[256]; p=skip_word(p); @@ -1371,11 +1370,11 @@ const char* parse_syntax_close_sub(const char* p,int* flag) { syntax.curly[pos].count++; p = skip_space(p); - if(!syntax.curly[pos].flag && !strncmp(p,"else",4) && !isalpha(*(p + 4))) { + if(!syntax.curly[pos].flag && !strncmp(p,"else",4) && !ISALPHA(p[4])) { // else or else - if p = skip_word(p); p = skip_space(p); - if(!strncmp(p,"if",2) && !isalpha(*(p + 2))) { + if(!strncmp(p,"if",2) && !ISALPHA(p[2])) { // else - if p=skip_word(p); p=skip_space(p); @@ -11326,7 +11325,7 @@ int buildin_charisalpha(struct script_state *st) { char *str=conv_str(st,& (st->stack->stack_data[st->start+2])); int pos=conv_num(st,& (st->stack->stack_data[st->start+3])); - int val = ( str && pos>0 && (unsigned int)pos0 && (unsigned int)posstack,C_INT,val); return 0; @@ -11366,9 +11365,9 @@ int buildin_compare(struct script_state *st) { message = conv_str(st,& (st->stack->stack_data[st->start+2])); cmpstring = conv_str(st,& (st->stack->stack_data[st->start+3])); for (j = 0; message[j]; j++) - message[j] = tolower(message[j]); + message[j] = TOLOWER(message[j]); for (j = 0; cmpstring[j]; j++) - cmpstring[j] = tolower(cmpstring[j]); + cmpstring[j] = TOLOWER(cmpstring[j]); push_val(st->stack,C_INT,(strstr(message,cmpstring) != NULL)); return 0; } diff --git a/src/plugins/Makefile b/src/plugins/Makefile index 183905a46c..7d100e591c 100644 --- a/src/plugins/Makefile +++ b/src/plugins/Makefile @@ -42,7 +42,7 @@ upnp.$(PLUGINEXT): ../../plugins/upnp.conf depend: makedepend -fGNUmakefile -o.$(PLUGINEXT) -Y. -Y../common *.c clean: - rm -rf $(PLUGINS) + rm -rf $(PLUGINS) GNUmakefile # DO NOT DELETE diff --git a/src/tool/Makefile b/src/tool/Makefile index d8614c3002..12f62e3735 100644 --- a/src/tool/Makefile +++ b/src/tool/Makefile @@ -1,10 +1,10 @@ -all: adduser convert - -adduser: - $(CC) -o ../../tools/$@ adduser.c - -convert: - $(CC) -o ../../tools/$@ convert.c - -clean: - rm -rf ../../tools/adduser ../../tools/convert +all: adduser convert + +adduser: + $(CC) -o ../../tools/$@ adduser.c + +convert: + $(CC) -o ../../tools/$@ convert.c + +clean: + rm -rf ../../tools/adduser ../../tools/convert diff --git a/src/txt-converter/Makefile b/src/txt-converter/Makefile index 2e40e838d6..aa559e9158 100644 --- a/src/txt-converter/Makefile +++ b/src/txt-converter/Makefile @@ -1,24 +1,24 @@ -all sql: char-converter login-converter - -char-converter: char-converter.o ../common/obj/minicore.o \ - ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o \ - ../common/obj/mapindex.o ../common/obj/ers.o ../common/obj/utils.o \ - ../char/char.o ../char/int_pet.o ../char/int_storage.o ../char/inter.o \ - ../char/int_party.o ../char/int_guild.o \ - ../char_sql/char.o ../char_sql/int_pet.o ../char_sql/int_storage.o \ - ../char_sql/inter.o ../char_sql/int_party.o ../char_sql/int_guild.o - $(CC) -o ../../tools/$@ $^ $(LIB_S) - -login-converter: login-converter.o ../common/obj/minicore.o ../common/obj/db.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/ers.o ../common/obj/utils.o - $(CC) -o ../../tools/$@ $^ $(LIB_S) - -clean: - rm -f *.o ../../tools/login-converter ../../tools/char-converter - -# DO NOT DELETE - -%.o: %.c - $(COMPILE.c) -DTXT_SQL_CONVERT $(OUTPUT_OPTION) $< - -char-converter.o: char-converter.c -login-converter.o: login-converter.c +all sql: char-converter login-converter + +char-converter: char-converter.o ../common/obj/minicore.o \ + ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/strlib.o \ + ../common/obj/mapindex.o ../common/obj/ers.o ../common/obj/utils.o \ + ../char/char.o ../char/int_pet.o ../char/int_storage.o ../char/inter.o \ + ../char/int_party.o ../char/int_guild.o \ + ../char_sql/char.o ../char_sql/int_pet.o ../char_sql/int_storage.o \ + ../char_sql/inter.o ../char_sql/int_party.o ../char_sql/int_guild.o + $(CC) -o ../../tools/$@ $^ $(LIB_S) + +login-converter: login-converter.o ../common/obj/minicore.o ../common/obj/db.o ../common/obj/malloc.o ../common/obj/showmsg.o ../common/obj/ers.o ../common/obj/utils.o + $(CC) -o ../../tools/$@ $^ $(LIB_S) + +clean: + rm -f *.o ../../tools/login-converter ../../tools/char-converter + +# DO NOT DELETE + +%.o: %.c + $(COMPILE.c) -DTXT_SQL_CONVERT $(OUTPUT_OPTION) $< + +char-converter.o: char-converter.c +login-converter.o: login-converter.c diff --git a/src/webserver/Makefile b/src/webserver/Makefile index 149f5a900b..077b39980f 100644 --- a/src/webserver/Makefile +++ b/src/webserver/Makefile @@ -1,20 +1,20 @@ -all: - #Generate framework... - $(CC) -c parse.c - $(CC) -c generate.c - $(CC) -c htmlstyle.c - $(CC) -c logs.c - - #Generate "pages"... - cd pages && $(CC) -c about.c && cd .. - cd pages && $(CC) -c sample.c && cd .. - cd pages && $(CC) -c notdone.c && cd .. - - #Building the server... - $(CC) -o webserver main.c parse.o generate.o htmlstyle.o \ - logs.o pages/about.o pages/sample.o pages/notdone.o - -clean: - rm -f *.o - rm -f pages/*.o - rm -f webserver +all: + #Generate framework... + $(CC) -c parse.c + $(CC) -c generate.c + $(CC) -c htmlstyle.c + $(CC) -c logs.c + + #Generate "pages"... + cd pages && $(CC) -c about.c && cd .. + cd pages && $(CC) -c sample.c && cd .. + cd pages && $(CC) -c notdone.c && cd .. + + #Building the server... + $(CC) -o webserver main.c parse.o generate.o htmlstyle.o \ + logs.o pages/about.o pages/sample.o pages/notdone.o + +clean: + rm -f *.o + rm -f pages/*.o + rm -f webserver diff --git a/src/zlib/Makefile b/src/zlib/Makefile index 21bd6cf37f..7ba1cb3820 100644 --- a/src/zlib/Makefile +++ b/src/zlib/Makefile @@ -1,21 +1,21 @@ - -OBJS = unzip.o ioapi.o - -ifeq ($(findstring MINGW,$(CFLAGS)), MINGW) - OBJS += iowin32.o -endif - -.c.o: - $(CC) -c $(CFLAGS) $*.c - -all: unz.o - -unz.o: $(OBJS) - ar rcs $@ $(OBJS) - -clean: - rm -f *.o - -# DO NOT DELETE -ioapi.o: ioapi.h -unzip.o: unzip.h ioapi.h crypt.h + +OBJS = unzip.o ioapi.o + +ifeq ($(findstring MINGW,$(CFLAGS)), MINGW) + OBJS += iowin32.o +endif + +.c.o: + $(CC) -c $(CFLAGS) $*.c + +all: unz.o + +unz.o: $(OBJS) + ar rcs $@ $(OBJS) + +clean: + rm -f *.o + +# DO NOT DELETE +ioapi.o: ioapi.h +unzip.o: unzip.h ioapi.h crypt.h diff --git a/vcproj-7.1/char-server_sql.vcproj b/vcproj-7.1/char-server_sql.vcproj index fc6acfcc57..1725511c39 100644 --- a/vcproj-7.1/char-server_sql.vcproj +++ b/vcproj-7.1/char-server_sql.vcproj @@ -1,309 +1,309 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-7.1/char-server_txt.vcproj b/vcproj-7.1/char-server_txt.vcproj index 1d623cf054..a4b639a13b 100644 --- a/vcproj-7.1/char-server_txt.vcproj +++ b/vcproj-7.1/char-server_txt.vcproj @@ -1,301 +1,301 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-7.1/login-server_sql.vcproj b/vcproj-7.1/login-server_sql.vcproj index c9a0c2eb21..7cec00189f 100644 --- a/vcproj-7.1/login-server_sql.vcproj +++ b/vcproj-7.1/login-server_sql.vcproj @@ -1,263 +1,263 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-7.1/login-server_txt.vcproj b/vcproj-7.1/login-server_txt.vcproj index 8a10a99cf4..035b9d4742 100644 --- a/vcproj-7.1/login-server_txt.vcproj +++ b/vcproj-7.1/login-server_txt.vcproj @@ -1,265 +1,265 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-7.1/map-server_sql.vcproj b/vcproj-7.1/map-server_sql.vcproj index ba6888a188..abd160a2b8 100644 --- a/vcproj-7.1/map-server_sql.vcproj +++ b/vcproj-7.1/map-server_sql.vcproj @@ -1,442 +1,442 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-7.1/map-server_txt.vcproj b/vcproj-7.1/map-server_txt.vcproj index 0765027463..ce3face56a 100644 --- a/vcproj-7.1/map-server_txt.vcproj +++ b/vcproj-7.1/map-server_txt.vcproj @@ -1,443 +1,443 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-8/char-server_sql.vcproj b/vcproj-8/char-server_sql.vcproj index 0bfd5d2d26..a42fa47b85 100644 --- a/vcproj-8/char-server_sql.vcproj +++ b/vcproj-8/char-server_sql.vcproj @@ -1,306 +1,306 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-8/char-server_txt.vcproj b/vcproj-8/char-server_txt.vcproj index 66bcfd8ea4..f9ea2adca5 100644 --- a/vcproj-8/char-server_txt.vcproj +++ b/vcproj-8/char-server_txt.vcproj @@ -1,304 +1,304 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-8/login-server_sql.vcproj b/vcproj-8/login-server_sql.vcproj index c764c256dc..cf0df29f76 100644 --- a/vcproj-8/login-server_sql.vcproj +++ b/vcproj-8/login-server_sql.vcproj @@ -1,281 +1,281 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-8/login-server_txt.vcproj b/vcproj-8/login-server_txt.vcproj index e87e629fa3..d4a0897061 100644 --- a/vcproj-8/login-server_txt.vcproj +++ b/vcproj-8/login-server_txt.vcproj @@ -1,284 +1,284 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-8/map-server_sql.vcproj b/vcproj-8/map-server_sql.vcproj index d02257a23b..f5257e45fb 100644 --- a/vcproj-8/map-server_sql.vcproj +++ b/vcproj-8/map-server_sql.vcproj @@ -1,394 +1,394 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcproj-8/map-server_txt.vcproj b/vcproj-8/map-server_txt.vcproj index 947759cb09..2d6402f7ef 100644 --- a/vcproj-8/map-server_txt.vcproj +++ b/vcproj-8/map-server_txt.vcproj @@ -1,396 +1,396 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +