diff options
author | dholland <dholland@NetBSD.org> | 2009-03-14 22:52:52 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-03-14 22:52:52 +0000 |
commit | e98a44895c7ca5a00b080fce0b3cbb16bcdff859 (patch) | |
tree | a74a3e03e0056c3de3d2b751b6dea1f59baec1c7 /sail/pl_main.c | |
parent | 5e8d1f0902b592fc872212ecccaca23c8ce85231 (diff) | |
download | bsdgames-darwin-e98a44895c7ca5a00b080fce0b3cbb16bcdff859.tar.gz bsdgames-darwin-e98a44895c7ca5a00b080fce0b3cbb16bcdff859.tar.zst bsdgames-darwin-e98a44895c7ca5a00b080fce0b3cbb16bcdff859.zip |
Create some abstraction for sending messages.
Make a send and receive function for each possible message.
Make these have useful argument signatures.
Hide the list of message codes inside sync.c.
Diffstat (limited to 'sail/pl_main.c')
-rw-r--r-- | sail/pl_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sail/pl_main.c b/sail/pl_main.c index 701d2d94..205a3cbe 100644 --- a/sail/pl_main.c +++ b/sail/pl_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl_main.c,v 1.24 2009/03/14 20:14:56 dholland Exp $ */ +/* $NetBSD: pl_main.c,v 1.25 2009/03/14 22:52:53 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pl_main.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pl_main.c,v 1.24 2009/03/14 20:14:56 dholland Exp $"); +__RCSID("$NetBSD: pl_main.c,v 1.25 2009/03/14 22:52:53 dholland Exp $"); #endif #endif /* not lint */ @@ -180,7 +180,7 @@ reprint: mf = ms->file; mc = ms->specs; - Write(W_BEGIN, ms, 0, 0, 0, 0); + send_begin(ms); if (Sync() < 0) leave(LEAVE_SYNC); @@ -213,7 +213,7 @@ reprint: else captain[strlen(captain) - 1] = '\0'; } - Writestr(W_CAPTAIN, ms, captain); + send_captain(ms, captain); for (n = 0; n < 2; n++) { char buf[10]; @@ -252,6 +252,6 @@ reprint: draw_board(); snprintf(message, sizeof message, "Captain %s assuming command", captain); - Writestr(W_SIGNAL, ms, message); + send_signal(ms, message); newturn(0); } |