summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2013-10-13 03:05:14 +0800
committerLAN-TW <lantw44@gmail.com>2013-10-13 03:05:14 +0800
commit6db932a78e96443950061c96c3f59181f0e0acc0 (patch)
treea0a5b37861fe1abf4493a5e980c277e5d2cefd89
parent8768b00bd60164c6a3e5373b4593bb42b956edb1 (diff)
downloadsp2013-6db932a78e96443950061c96c3f59181f0e0acc0.tar.gz
sp2013-6db932a78e96443950061c96c3f59181f0e0acc0.tar.zst
sp2013-6db932a78e96443950061c96c3f59181f0e0acc0.zip
HW1: 加入檔頭註解和 config.h
-rw-r--r--hw1/common.c5
-rw-r--r--hw1/main.c11
-rw-r--r--hw1/proc_r.c5
-rw-r--r--hw1/proc_w.c5
-rw-r--r--hw1/server.c5
5 files changed, 31 insertions, 0 deletions
diff --git a/hw1/common.c b/hw1/common.c
index 37f71e2..ef48ef1 100644
--- a/hw1/common.c
+++ b/hw1/common.c
@@ -1,3 +1,8 @@
+/* B01902062 藍挺瑋 */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "common.h"
#include <stdbool.h>
diff --git a/hw1/main.c b/hw1/main.c
index fb152c5..a35984d 100644
--- a/hw1/main.c
+++ b/hw1/main.c
@@ -1,3 +1,8 @@
+/* B01902062 藍挺瑋 */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "common.h"
#include "server.h"
#include "proc.h"
@@ -25,6 +30,12 @@ static void message_cb (server* svr, request* req, int maxfd) {
printf (
"Dump server information ...\n"
+#ifdef READ_SERVER
+ " This is read_server\n"
+#endif
+#ifdef WRITE_SERVER
+ " This is write_server\n"
+#endif
" Server hostname: %s\n"
" Server port: %hu\n"
" Server is listening on fd %d\n",
diff --git a/hw1/proc_r.c b/hw1/proc_r.c
index 12b6239..4370015 100644
--- a/hw1/proc_r.c
+++ b/hw1/proc_r.c
@@ -1,3 +1,8 @@
+/* B01902062 藍挺瑋 */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "common.h"
#include "proc.h"
diff --git a/hw1/proc_w.c b/hw1/proc_w.c
index 63cedc0..9312c4e 100644
--- a/hw1/proc_w.c
+++ b/hw1/proc_w.c
@@ -1,3 +1,8 @@
+/* B01902062 藍挺瑋 */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "common.h"
#include "proc.h"
diff --git a/hw1/server.c b/hw1/server.c
index b416153..2478eb3 100644
--- a/hw1/server.c
+++ b/hw1/server.c
@@ -1,3 +1,8 @@
+/* B01902062 藍挺瑋 */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "server.h"
#include "common.h"