summaryrefslogtreecommitdiffstats
path: root/mbbsd/chc_net.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-06 01:10:28 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-06 01:10:28 +0800
commit1603deaec5d0a94c9a8201b0ba286e8e492a3602 (patch)
treee6405cfd39f8ac166ab7d00752ed6cfa3ac0a928 /mbbsd/chc_net.c
parent10bda3e57cad194ac33ccdcd01aee2d935f1544a (diff)
downloadpttbbs-1603deaec5d0a94c9a8201b0ba286e8e492a3602.tar
pttbbs-1603deaec5d0a94c9a8201b0ba286e8e492a3602.tar.gz
pttbbs-1603deaec5d0a94c9a8201b0ba286e8e492a3602.tar.bz2
pttbbs-1603deaec5d0a94c9a8201b0ba286e8e492a3602.tar.lz
pttbbs-1603deaec5d0a94c9a8201b0ba286e8e492a3602.tar.xz
pttbbs-1603deaec5d0a94c9a8201b0ba286e8e492a3602.tar.zst
pttbbs-1603deaec5d0a94c9a8201b0ba286e8e492a3602.zip
indent
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@415 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chc_net.c')
-rw-r--r--mbbsd/chc_net.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/mbbsd/chc_net.c b/mbbsd/chc_net.c
index b9f63d8f..ba52bf26 100644
--- a/mbbsd/chc_net.c
+++ b/mbbsd/chc_net.c
@@ -1,21 +1,25 @@
-/* $Id: chc_net.c,v 1.2 2002/06/04 13:08:33 in2 Exp $ */
+/* $Id: chc_net.c,v 1.3 2002/07/05 17:10:27 in2 Exp $ */
#include "bbs.h"
typedef struct drc_t {
- rc_t from, to;
-} drc_t;
+ rc_t from, to;
+} drc_t;
-int chc_recvmove(int s) {
- drc_t buf;
+int
+chc_recvmove(int s)
+{
+ drc_t buf;
- if(read(s, &buf, sizeof(buf)) != sizeof(buf))
+ if (read(s, &buf, sizeof(buf)) != sizeof(buf))
return 1;
chc_from = buf.from, chc_to = buf.to;
return 0;
}
-void chc_sendmove(int s) {
- drc_t buf;
-
+void
+chc_sendmove(int s)
+{
+ drc_t buf;
+
buf.from = chc_from, buf.to = chc_to;
write(s, &buf, sizeof(buf));
}