Permalink
Browse files

Pull `main` out into its own source code file.

  • Loading branch information...
1 parent 911c3ba commit 5b9f0358e3ef5505ffbdd079ac9094a8754386e0 @jonm committed Oct 19, 2015
Showing with 13 additions and 6 deletions.
  1. +4 −4 src/Makefile
  2. +1 −1 src/comm.c
  3. +7 −0 src/main.c
  4. +1 −1 src/protos.h
View
@@ -77,18 +77,18 @@ SRCS = comm.c act.comm.c act.info.c act.move.c act.obj1.c act.obj2.c \
all : dmserver
-dmserver : ${OBJS}
+dmserver : ${OBJS} main.o
## if you want to add debugging stuff, uncomment the following, and comment
## out the line after that
## $(LD) -o $@ -g ${OBJS} /local/lib/gnu/gcc-gnulib /usr/lib/debug/malloc.o
- $(LD) -o $@ -g ${OBJS}
+ $(LD) -o $@ -g ${OBJS} main.o
## $(LD) -o $@ ${OBJS}
##
depend :
- makedepend ${SRCS}
+ makedepend ${SRCS} main.c
clean :
- rm -f ${OBJS} dmserver
+ rm -f ${OBJS} dmserver main.o
View
@@ -100,7 +100,7 @@ void close_socket_fd( int desc)
}
}
-int main (int argc, char **argv)
+int real_main (int argc, char **argv)
{
int port, pos=1;
char buf[512], *dir;
View
@@ -0,0 +1,7 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "protos.h"
+
+int main(int argc, char **argv) {
+ return real_main(argc, argv);
+}
View
@@ -341,7 +341,7 @@ int board_check_locks (int bnum, struct char_data *ch);
int __main ();
void close_socket_fd( int desc);
-int main (int argc, char **argv);
+int real_main (int argc, char **argv);
void run_the_game(int port);
void game_loop(int s);
int get_from_q(struct txt_q *queue, char *dest);

0 comments on commit 5b9f035

Please sign in to comment.