Mercurial > hg > early-roguelike
annotate xrogue/network.h @ 212:12e070d1a780
rogue3: replace alarm() calls with a portable function.
Calls to alarm() in main.c are replaced with md_start_checkout_timer(),
so the #ifdefs around nonportable code can be confined to mdport.c.
author | John "Elwin" Edwards |
---|---|
date | Fri, 22 Jan 2016 19:19:48 -0500 |
parents | e6179860cb76 |
children | f54901b9c39b |
rev | line source |
---|---|
133
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
1 /* |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
2 network.h - networking setup |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
3 |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
4 XRogue: Expeditions into the Dungeons of Doom |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
5 Copyright (C) 1991 Robert Pietkivitch |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
6 All rights reserved. |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
7 |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
8 Based on "Advanced Rogue" |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
9 Copyright (C) 1984, 1985 Michael Morgan, Ken Dalka and AT&T |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
10 All rights reserved. |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
11 |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
12 See the file LICENSE.TXT for full copyright and licensing information. |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
13 */ |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
14 |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
15 /* |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
16 * Note that networking is set up for machines that can communicate |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
17 * via some system such as uucp. The mechanism listed here uses uux |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
18 * and assumes that the target machine allows access to the game via |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
19 * the uux command. NETCOMMAND must be defined if networking is desired. |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
20 */ |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
21 |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
22 /* #undef NETCOMMAND "uux - -n '%s!%s -u' >/dev/null 2>&1" */ |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
23 /* #define NETCOMMAND "usend -s -d%s -uNoLogin -!'%s -u' - 2>/dev/null" */ |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
24 #define NETCOMMAND "" |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
25 |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
26 /* Networking information -- should not vary among networking machines */ |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
27 |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
28 struct network { |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
29 char *system; |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
30 char *rogue; |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
31 }; |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
32 extern struct network Network[]; |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
33 extern unsigned long netread(); |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
34 extern unsigned long netwrite(); |
e6179860cb76
Import XRogue 8.0 from the Roguelike Restoration Project (r1490)
John "Elwin" Edwards
parents:
diff
changeset
|
35 |