(tn): copy the hostname so it doesn't get overwritten while reading

~/.telnetrc
(*): removed some unneeded externs


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9710 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-02-20 03:12:09 +00:00
parent a26198b523
commit 0e607f119f

View File

@@ -988,7 +988,6 @@ unsetcmd(int argc, char *argv[])
* 'mode' command. * 'mode' command.
*/ */
#ifdef KLUDGELINEMODE #ifdef KLUDGELINEMODE
extern int kludgelinemode;
static int static int
dokludgemode(void) dokludgemode(void)
@@ -1030,7 +1029,6 @@ static int
dolmmode(int bit, int on) dolmmode(int bit, int on)
{ {
unsigned char c; unsigned char c;
extern int linemode;
if (my_want_state_is_wont(TELOPT_LINEMODE)) { if (my_want_state_is_wont(TELOPT_LINEMODE)) {
printf("?Need to have LINEMODE option enabled first.\r\n"); printf("?Need to have LINEMODE option enabled first.\r\n");
@@ -1328,8 +1326,6 @@ shell(int argc, char **argv)
static int static int
bye(int argc, char **argv) bye(int argc, char **argv)
{ {
extern int resettermname;
if (connected) { if (connected) {
shutdown(net, 2); shutdown(net, 2);
printf("Connection closed.\r\n"); printf("Connection closed.\r\n");
@@ -1551,7 +1547,6 @@ env_find(unsigned char *var)
void void
env_init(void) env_init(void)
{ {
extern char **environ;
char **epp, *cp; char **epp, *cp;
struct env_lst *ep; struct env_lst *ep;
@@ -1972,7 +1967,7 @@ status(int argc, char **argv)
/* /*
* Function that gets called when SIGINFO is received. * Function that gets called when SIGINFO is received.
*/ */
void RETSIGTYPE
ayt_status(int ignore) ayt_status(int ignore)
{ {
call(status, "status", "notmuch", 0); call(status, "status", "notmuch", 0);
@@ -2117,6 +2112,7 @@ tn(int argc, char **argv)
goto usage; goto usage;
strlcpy (_hostname, hostp, sizeof(_hostname)); strlcpy (_hostname, hostp, sizeof(_hostname));
hostp = _hostname;
if (hostp[0] == '@' || hostp[0] == '!') { if (hostp[0] == '@' || hostp[0] == '!') {
char *p; char *p;
hostname = NULL; hostname = NULL;