[Commit] rrserver ChangeLog, NONE, 1.1 dispatch.5c, 1.30,
1.31 games.5c, 1.29, 1.30
Carl Worth
commit at keithp.com
Thu Jun 16 11:10:48 PDT 2005
Committed by: cworth
Update of /local/src/CVS/rrserver
In directory home.keithp.com:/tmp/cvs-serv798
Modified Files:
dispatch.5c games.5c
Added Files:
ChangeLog
Log Message:
* dispatch.5c:
* games.5c: Track syntax change in nickle like so:
was: &Foo foo = make_foo ();
now: &Foo foo = &make_foo ();
* dispatch.5c: Extract function call from try block to let
unexpected exceptions to bubble out.
--- NEW FILE: ChangeLog ---
2005-06-16 Carl Worth <cworth at cworth.org>
* dispatch.5c:
* games.5c: Track syntax change in nickle like so:
was: &Foo foo = make_foo ();
now: &Foo foo = &make_foo ();
* dispatch.5c: Extract function call from try block to let
unexpected exceptions to bubble out.
Index: dispatch.5c
===================================================================
RCS file: /local/src/CVS/rrserver/dispatch.5c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- dispatch.5c 2 Jan 2004 03:40:53 -0000 1.30
+++ dispatch.5c 16 Jun 2005 18:10:45 -0000 1.31
@@ -159,7 +159,7 @@
f = void func (string[] w) {
string game = w[0];
assert_user ();
- &Game g = Games::find (game);
+ &Game g = &Games::find (game);
respond ("PLAYERS");
Games::iterate_client (&g, print_client_score, true, false);
respond ("\n");
@@ -173,7 +173,7 @@
f = void func (string[] w) {
string game = w[0];
assert_user ();
- &Game g = Games::find (game);
+ &Game g = &Games::find (game);
respond ("WATCHERS");
Games::iterate_client (&g, print_client, false, true);
respond ("\n");
@@ -202,7 +202,7 @@
f = void func (string[] w) {
string game = w[0];
assert_user ();
- &Game g = Games::find (game);
+ &Game g = &Games::find (game);
int turn = 17 - dim (g.targets);
@@ -288,7 +288,7 @@
f = void func (string[] w) {
string game=w[0];
assert_user ();
- &Game g = Games::new (game);
+ &Game g = &Games::new (game);
Games::add_client (&g, &c, true);
respond ("NEW %s\n", g.name);
}
@@ -301,7 +301,7 @@
f = void func (string[] w) {
string game=w[0];
assert_user ();
- &Game g = Games::find (game);
+ &Game g = &Games::find (game);
Games::add_client (&g, &c, true);
respond ("JOIN\n");
}
@@ -314,7 +314,7 @@
f = void func (string[] w) {
string game=w[0];
assert_user ();
- &Game g = Games::find (game);
+ &Game g = &Games::find (game);
Games::add_client (&g, &c, false);
respond ("WATCH\n");
}
@@ -327,7 +327,7 @@
f = void func (string[] w) {
string game=w[0];
assert_user ();
- &Game g = Games::find (game);
+ &Game g = &Games::find (game);
Games::dispose (&g);
respond ("DISPOSE\n");
}
@@ -610,12 +610,14 @@
for (i = 0; i < dim(commands); i++)
if (command == commands[i].command)
{
+ void f(string[*]);
try {
- commands[i].f (args);
+ f = commands[i].f;
} catch invalid_array_bounds (string s,
poly a, poly i) {
raise rr_error (Error.SYNTAX);
}
+ f (args);
break;
}
if (i == dim(commands))
@@ -643,7 +645,7 @@
public void client (file f)
{
twixt (lock (); unlock ())
- twixt ((&Client c = Clients::new (f)), true;
+ twixt ((&Client c = &Clients::new (f)), true;
client_cleanup (&c))
client_locked (f, &c);
}
Index: games.5c
===================================================================
RCS file: /local/src/CVS/rrserver/games.5c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- games.5c 8 Jan 2004 07:05:39 -0000 1.29
+++ games.5c 16 Jun 2005 18:10:45 -0000 1.30
@@ -474,7 +474,7 @@
sprintf ("%s-%d", suggestion, n) : suggestion);
n++)
;
- &Game g = insert ();
+ &Game g = &insert ();
g.name = name;
g.clients = ((&Client)[*]) {};
g.expire_interval = 60;
More information about the Commit
mailing list