summaryrefslogtreecommitdiff
path: root/src/tool
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool')
-rw-r--r--src/tool/GNUmakefile7
-rw-r--r--src/tool/Makefile15
-rw-r--r--src/tool/convert.c4
-rw-r--r--src/tool/eathena-monitor.c2
-rw-r--r--src/tool/itemfrob.c2
-rw-r--r--src/tool/mapfrob.c2
-rw-r--r--src/tool/moneycount/Makefile14
-rw-r--r--src/tool/moneycount/mmo.h5
-rw-r--r--src/tool/skillfrob.c2
9 files changed, 12 insertions, 41 deletions
diff --git a/src/tool/GNUmakefile b/src/tool/GNUmakefile
new file mode 100644
index 0000000..2efc93b
--- /dev/null
+++ b/src/tool/GNUmakefile
@@ -0,0 +1,7 @@
+.SUFFIXES:
+all:
+ make -C ../.. tools
+clean:
+ rm -r ../../obj/tool/
+%::
+ make -C ../.. obj/tool/$@
diff --git a/src/tool/Makefile b/src/tool/Makefile
deleted file mode 100644
index 8d51c25..0000000
--- a/src/tool/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-include ../../make.defs
-
-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 ${OBJS}
-mapfrob: mapfrob.o ${OBJS}
-marriage-info: marriage-info.o ${OBJS}
-eathena-monitor: eathena-monitor.c
-
-clean:
- rm -f adduser itemfrob mapfrob marriage-info eathena-monitor
- rm -f *.exe
- rm -f *.o
diff --git a/src/tool/convert.c b/src/tool/convert.c
index 8436ebb..e256fc9 100644
--- a/src/tool/convert.c
+++ b/src/tool/convert.c
@@ -1,8 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
-#define RETCODE "\r\n"
-
#define MAX_INVENTORY 100
#define MAX_CART 100
#define MAX_SKILL 350
@@ -284,7 +282,7 @@ int mmo_char_convert (char *fname1, char *fname2)
if (ret)
{
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
fcloseall ();
diff --git a/src/tool/eathena-monitor.c b/src/tool/eathena-monitor.c
index 6e26706..1b1abd5 100644
--- a/src/tool/eathena-monitor.c
+++ b/src/tool/eathena-monitor.c
@@ -76,7 +76,7 @@ pid_t pid_login, pid_map, pid_char;
const char* make_path (const char* base, const char* path) {
size_t base_len = strlen(base);
size_t path_len = strlen(path);
- char* out = malloc(base_len + 1 + path_len + 1);
+ char* out = (char *)malloc(base_len + 1 + path_len + 1);
memcpy(out, base, base_len);
out[base_len] = '/';
memcpy(out + base_len + 1, path, path_len);
diff --git a/src/tool/itemfrob.c b/src/tool/itemfrob.c
index 646ec73..4651452 100644
--- a/src/tool/itemfrob.c
+++ b/src/tool/itemfrob.c
@@ -35,7 +35,7 @@ int mmo_char_convert ()
{
transform_char (&char_dat);
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
return 0;
diff --git a/src/tool/mapfrob.c b/src/tool/mapfrob.c
index 11983eb..9dc1a5b 100644
--- a/src/tool/mapfrob.c
+++ b/src/tool/mapfrob.c
@@ -61,7 +61,7 @@ int mmo_char_convert ()
{
transform_char (&char_dat);
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
return 0;
diff --git a/src/tool/moneycount/Makefile b/src/tool/moneycount/Makefile
deleted file mode 100644
index e7b7022..0000000
--- a/src/tool/moneycount/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-all: moneycount
-
-OBJECTS = main.o athena_text.o inf.o portability_fixes.o
-CPP = g++
-
-moneycount: $(OBJECTS)
- $(CPP) -o $@ $(OBJECTS) $(COMMON_OBJS) $(LIBS)
-main.o: main.cpp
-athena_text.o: athena_text.cpp athena_text.h
-inf.o: inf.cpp inf.hpp
-portability_fixes.o: portability_fixes.cpp portability_fixes.hpp portability_exceptions.hpp
-
-clean:
- rm -f *.o moneycount
diff --git a/src/tool/moneycount/mmo.h b/src/tool/moneycount/mmo.h
index c7ab21f..bd62b49 100644
--- a/src/tool/moneycount/mmo.h
+++ b/src/tool/moneycount/mmo.h
@@ -5,11 +5,6 @@
#define _MMO_H_
#include <time.h>
-#ifdef CYGWIN
-#define RETCODE "\r\n" // (CR/LF?FWindows?n)
-#else
-#define RETCODE "\n" // (LF?FUnix?n?j
-#endif
#define FIFOSIZE_SERVERLINK 256*1024
diff --git a/src/tool/skillfrob.c b/src/tool/skillfrob.c
index c7b6bb6..44855ac 100644
--- a/src/tool/skillfrob.c
+++ b/src/tool/skillfrob.c
@@ -39,7 +39,7 @@ int mmo_char_convert ()
{
transform_char (&char_dat);
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
fcloseall ();