summaryrefslogtreecommitdiff
path: root/src/tool
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-03-24 13:57:13 -0700
committerBen Longbons <b.r.longbons@gmail.com>2011-03-24 13:57:13 -0700
commita2306446c86b3333e69b082e41ae76ba71a42d9d (patch)
treeac032fc4566d2ae3091a0dc95329ac86d50b9a23 /src/tool
parentb6fa80d4c17994771cb796317c52cb8fb7a38a16 (diff)
downloadtmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.tar.gz
tmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.tar.bz2
tmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.tar.xz
tmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.zip
Optimize common objects, and adjust other objects accordingly.
Major changes still need to be made to each of the servers.
Diffstat (limited to 'src/tool')
-rw-r--r--src/tool/Makefile10
-rw-r--r--src/tool/eathena-monitor.c6
-rw-r--r--src/tool/itemfrob.c7
-rw-r--r--src/tool/mapfrob.c7
-rw-r--r--src/tool/marriage-info.c6
-rw-r--r--src/tool/moneycount/mmo.h15
-rw-r--r--src/tool/skillfrob.c5
7 files changed, 10 insertions, 46 deletions
diff --git a/src/tool/Makefile b/src/tool/Makefile
index 87393fb..8d51c25 100644
--- a/src/tool/Makefile
+++ b/src/tool/Makefile
@@ -1,15 +1,13 @@
include ../../make.defs
-COBJS=../common/timer.o ../common/malloc.o ../common/socket.o ../common/lock.o ../common/db.o ../char/int_storage.o ../char/inter.o ../char/int_party.o ../char/int_guild.o
-MOBJS=../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../char/int_guild.o ../char/int_party.o ../char/int_storage.o ../char/inter.o
+OBJS =../common/timer.o ../common/socket.o ../common/db.o ../common/lock.o ../char/inter.o ../char/int_guild.o ../char/int_party.o ../char/int_storage.o
all: adduser itemfrob mapfrob marriage-info eathena-monitor
adduser: adduser.o ../common/socket.o
-itemfrob: itemfrob.o ${COBJS}
-mapfrob: mapfrob.o ${COBJS}
-marriage-info: marriage-info.o ${MOBJS}
+itemfrob: itemfrob.o ${OBJS}
+mapfrob: mapfrob.o ${OBJS}
+marriage-info: marriage-info.o ${OBJS}
eathena-monitor: eathena-monitor.c
- $(CC) $(CFLAGS) -o eathena-monitor eathena-monitor.c
clean:
rm -f adduser itemfrob mapfrob marriage-info eathena-monitor
diff --git a/src/tool/eathena-monitor.c b/src/tool/eathena-monitor.c
index 04a48cf..6e26706 100644
--- a/src/tool/eathena-monitor.c
+++ b/src/tool/eathena-monitor.c
@@ -27,7 +27,7 @@
#define SKIP_BLANK(ptr) ptr += skip_blank(ptr)
-inline size_t skip_blank(const char* ptr) {
+static inline size_t skip_blank(const char* ptr) {
size_t i = 0;
while (
(ptr[i] == ' ') ||
@@ -39,7 +39,7 @@ inline size_t skip_blank(const char* ptr) {
}
#define GOTO_EQL(ptr) ptr += goto_eql(ptr)
-inline size_t goto_eql(const char* ptr) {
+static inline size_t goto_eql(const char* ptr) {
size_t i = 0;
while (
(ptr[i] != '\0') &&
@@ -51,7 +51,7 @@ inline size_t goto_eql(const char* ptr) {
}
#define GOTO_EOL(ptr) ptr += goto_newline(ptr)
-inline size_t goto_newline(const char* ptr) {
+static inline size_t goto_newline(const char* ptr) {
size_t i = 0;
while (
(ptr[i] != '\0') &&
diff --git a/src/tool/itemfrob.c b/src/tool/itemfrob.c
index bc9ff35..646ec73 100644
--- a/src/tool/itemfrob.c
+++ b/src/tool/itemfrob.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "../common/mmo.h"
+// Yes, this is intentional
#include "../char/char.c"
// Well, this is not terribly elegant, but I don't have that much time.
@@ -37,7 +38,6 @@ int mmo_char_convert ()
fprintf (ofp, "%s" RETCODE, line);
}
}
- fcloseall ();
return 0;
}
@@ -128,8 +128,3 @@ int main (int argc, char *argv[])
return 0;
}
-
-/* satisfy linker */
-void set_termfunc (void (*termfunc) (void))
-{
-};
diff --git a/src/tool/mapfrob.c b/src/tool/mapfrob.c
index d410878..11983eb 100644
--- a/src/tool/mapfrob.c
+++ b/src/tool/mapfrob.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "../common/mmo.h"
+// Yes, this is intentional
#include "../char/char.c"
// Well, this is not terribly elegant, but I don't have that much time.
@@ -63,7 +64,6 @@ int mmo_char_convert ()
fprintf (ofp, "%s" RETCODE, line);
}
}
- fcloseall ();
return 0;
}
@@ -127,8 +127,3 @@ int main (int argc, char *argv[])
return 0;
}
-
-/* satisfy linker */
-void set_termfunc (void (*termfunc) (void))
-{
-};
diff --git a/src/tool/marriage-info.c b/src/tool/marriage-info.c
index 9b91955..4d7cbc3 100644
--- a/src/tool/marriage-info.c
+++ b/src/tool/marriage-info.c
@@ -9,6 +9,7 @@ src/char/int_party.o src/char/int_storage.o src/char/inter.o
#include <stdlib.h>
#include "../login/login.h"
#include "../common/mmo.h"
+// Yes, this is intentional
#include "../char/char.c"
int mode;
@@ -442,7 +443,6 @@ int mmo_char_dump()
mmo_check_dumpworthy(&char_dat);
}
}
- fcloseall();
return 0;
}
@@ -480,7 +480,3 @@ int main(int argc,char *argv[])
return 0;
}
-
-
-/* satisfy linker */
-void set_termfunc(void (*termfunc)(void)) {};
diff --git a/src/tool/moneycount/mmo.h b/src/tool/moneycount/mmo.h
index 640065a..c7ab21f 100644
--- a/src/tool/moneycount/mmo.h
+++ b/src/tool/moneycount/mmo.h
@@ -310,20 +310,5 @@ enum
};
-#ifndef LCCWIN32
-#ifndef strcmpi
-#define strcmpi strcasecmp
-#endif
-#ifndef stricmp
-#define stricmp strcasecmp
-#endif
-#ifndef strncmpi
-#define strncmpi strncasecmp
-#endif
-#ifndef strnicmp
-#define strnicmp strncasecmp
-#endif
-#endif
-
#endif // _MMO_H_
diff --git a/src/tool/skillfrob.c b/src/tool/skillfrob.c
index ea68660..c7b6bb6 100644
--- a/src/tool/skillfrob.c
+++ b/src/tool/skillfrob.c
@@ -78,8 +78,3 @@ int main (int argc, char *argv[])
return 0;
}
-
-/* satisfy linker */
-void set_termfunc (void (*termfunc) (void))
-{
-};