fix 'crash when reviving shopkeeper'
[aNetHack.git] / sys / share / nhlan.c
blobb9384ace1b3fd72b45e4b81675eacaef679cf512
1 /* NetHack 3.6 nhlan.c $NHDT-Date: 1432512786 2015/05/25 00:13:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
2 /* Copyright (c) Michael Allison, 1997 */
3 /* NetHack may be freely redistributed. See license for details. */
5 /*
6 * Currently shared by the following ports:
7 * WIN32
9 * The code in here is used to take advantage of added features
10 * that might be available in a Local Area Network environment.
12 * Network Username of player
15 #include "hack.h"
16 #include <ctype.h>
18 #ifdef LAN_FEATURES
20 void
21 init_lan_features()
23 lan_username();
26 * The get_lan_username() call is a required call, since some of
27 * the other LAN features depend on a unique username being available.
30 char lusername[MAX_LAN_USERNAME];
31 int lusername_size = MAX_LAN_USERNAME;
33 char *
34 lan_username()
36 char *lu;
37 lu = get_username(&lusername_size);
38 if (lu) {
39 Strcpy(lusername, lu);
40 return lusername;
41 } else
42 return (char *) 0;
44 #endif /*LAN_FEATURES*/
45 /*nhlan.c*/