remove obsolete function and references
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
/* NetHack 3.7 nhlan.c $NHDT-Date: 1596498282 2020/08/03 23:44:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */
|
||||
/* Copyright (c) Michael Allison, 1997 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
* Currently shared by the following ports:
|
||||
* WIN32
|
||||
*
|
||||
* The code in here is used to take advantage of added features
|
||||
* that might be available in a Local Area Network environment.
|
||||
*
|
||||
* Network Username of player
|
||||
*/
|
||||
|
||||
#include "hack.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef LAN_FEATURES
|
||||
|
||||
void
|
||||
init_lan_features(void)
|
||||
{
|
||||
lan_username();
|
||||
}
|
||||
/*
|
||||
* The get_lan_username() call is a required call, since some of
|
||||
* the other LAN features depend on a unique username being available.
|
||||
*
|
||||
*/
|
||||
|
||||
char *
|
||||
lan_username(void)
|
||||
{
|
||||
char *lu;
|
||||
lu = get_username(&g.lusername_size);
|
||||
if (lu) {
|
||||
Strcpy(g.lusername, lu);
|
||||
return g.lusername;
|
||||
} else
|
||||
return (char *) 0;
|
||||
}
|
||||
#endif /*LAN_FEATURES*/
|
||||
/*nhlan.c*/
|
||||
@@ -720,7 +720,7 @@ COREOBJS = $(addsuffix .o, allmain alloc apply artifact attrib ball bones botl c
|
||||
hack hacklib insight invent isaac64 light lock \
|
||||
mail makemon mcastu mdlib mhitm mhitu minion mklev mkmap mkmaze mkobj mkroom \
|
||||
mon mondata monmove monst mplayer mthrowu muse music \
|
||||
nhlan nhlobj nhlsel nhlua ntsound o_init objects objnam options \
|
||||
nhlobj nhlsel nhlua ntsound o_init objects objnam options \
|
||||
pager pickup pline polyself potion pray priest quest questpgr \
|
||||
random read rect region restore rip rnd role rumors \
|
||||
safeproc save sfstruct shk shknam sit sounds sp_lev spell steal steed stubs symbols sys \
|
||||
|
||||
@@ -500,7 +500,7 @@ CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \
|
||||
$(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o
|
||||
|
||||
SOBJ = $(O)windmain.o $(O)windsys.o $(O)win10.o \
|
||||
$(O)safeproc.o $(O)nhlan.o $(SOUND)
|
||||
$(O)safeproc.o $(SOUND)
|
||||
|
||||
OBJS = $(MDLIB) \
|
||||
$(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
|
||||
|
||||
@@ -176,38 +176,6 @@ void nt_regularize(char* s) /* normalize file name */
|
||||
*lp = '_';
|
||||
}
|
||||
|
||||
/*
|
||||
* This is used in nhlan.c to implement some of the LAN_FEATURES.
|
||||
*/
|
||||
char *
|
||||
get_username(int *lan_username_size)
|
||||
{
|
||||
static TCHAR username_buffer[BUFSZ];
|
||||
DWORD i = BUFSZ - 1;
|
||||
BOOL allowUserName = TRUE;
|
||||
|
||||
Strcpy(username_buffer, "NetHack");
|
||||
|
||||
#ifndef WIN32CON
|
||||
/* Our privacy policy for the windows store version of nethack makes
|
||||
* a promise about not collecting any personally identifiable information.
|
||||
* Do not allow getting user name if we being run from windows store
|
||||
* version of nethack. In 3.7, we should remove use of username.
|
||||
*/
|
||||
allowUserName = !win10_is_desktop_bridge_application();
|
||||
#endif
|
||||
|
||||
if (allowUserName) {
|
||||
/* i gets updated with actual size */
|
||||
if (GetUserName(username_buffer, &i))
|
||||
username_buffer[i] = '\0';
|
||||
}
|
||||
|
||||
if (lan_username_size)
|
||||
*lan_username_size = strlen(username_buffer);
|
||||
return username_buffer;
|
||||
}
|
||||
|
||||
#if 0
|
||||
char *getxxx(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user