Skip to content

Commit 6408326

Browse files
committed
Revert "multi: Further reduce optional feature set."
This reverts commit 7368068.
1 parent 1a94466 commit 6408326

File tree

3 files changed

+37
-36
lines changed

3 files changed

+37
-36
lines changed

Diff for: telnet/commands.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,7 @@ env_init (void)
18881888
extern char *strchr (const char *, int);
18891889
#endif
18901890

1891-
/* for (epp = environ; *epp; epp++)
1891+
for (epp = environ; *epp; epp++)
18921892
{
18931893
cp = strchr (*epp, '=');
18941894
if (cp)
@@ -1898,13 +1898,13 @@ env_init (void)
18981898
ep->export = 0;
18991899
*cp = '=';
19001900
}
1901-
}*/
1901+
}
19021902
/*
19031903
* Special case for DISPLAY variable. If it is ":0.0" or
19041904
* "unix:0.0", we have to get rid of "unix" and insert our
19051905
* hostname.
19061906
*/
1907-
/* if ((ep = env_find ("DISPLAY"))
1907+
if ((ep = env_find ("DISPLAY"))
19081908
&& ((*ep->value == ':')
19091909
|| (strncmp ((char *) ep->value, "unix:", 5) == 0)))
19101910
{
@@ -1918,19 +1918,19 @@ env_init (void)
19181918
ep->value = (unsigned char *) cp;
19191919

19201920
free (hostname);
1921-
}*/
1921+
}
19221922
/*
19231923
* If USER is not defined, but LOGNAME is, then add
19241924
* USER with the value from LOGNAME. By default, we
19251925
* don't export the USER variable.
19261926
*/
1927-
/* if ((env_find ("USER") == NULL) && (ep = env_find ("LOGNAME")))
1927+
if ((env_find ("USER") == NULL) && (ep = env_find ("LOGNAME")))
19281928
{
19291929
env_define ("USER", ep->value);
19301930
env_unexport ("USER");
19311931
}
19321932
env_export ("DISPLAY");
1933-
env_export ("PRINTER"); */
1933+
env_export ("PRINTER");
19341934
}
19351935

19361936
struct env_lst *

Diff for: telnetd/slc.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ add_slc (register char func, register char flag, register cc_t val)
188188
void
189189
start_slc (register int getit)
190190
{
191-
/*
191+
192192
slcchange = 0;
193193
if (getit)
194194
init_termbuf ();
195195
sprintf ((char *) slcbuf, "%c%c%c%c", IAC, SB, TELOPT_LINEMODE, LM_SLC);
196196
slcptr = slcbuf + 4;
197-
*/
197+
198198
} /* end of start_slc */
199199

200200
/*
@@ -222,7 +222,7 @@ end_slc (register unsigned char **bufp)
222222
* deferred slc request from the client, then do not send any
223223
* sort of slc negotiation now. We will respond to the client's
224224
* request very soon.
225-
*/ /*
225+
*/
226226
if (def_slcbuf && (terminit () == 0))
227227
{
228228
return (0);
@@ -241,10 +241,10 @@ end_slc (register unsigned char **bufp)
241241
slcptr += 2;
242242
len = slcptr - slcbuf;
243243
net_output_datalen (slcbuf, len);
244-
netflush (); */ /* force it out immediately */
245-
/* DEBUG (debug_options, 1, printsub ('>', slcbuf + 2, len - 2));
244+
netflush (); /* force it out immediately */
245+
DEBUG (debug_options, 1, printsub ('>', slcbuf + 2, len - 2));
246246
}
247-
} */
247+
}
248248
return (0);
249249

250250
} /* end of end_slc */

Diff for: telnetd/termstat.c

+25-24
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ localstat (void)
268268
send_will (TELOPT_SGA, 1);
269269
send_will (TELOPT_ECHO, 1);
270270
linemode = uselinemode;
271-
// goto done;
271+
goto done;
272272
}
273273

274274
/*
@@ -299,7 +299,7 @@ localstat (void)
299299
* Negotiate linemode on if pty state has changed to turn it on.
300300
* Send appropriate command and send along edit mode, then all done.
301301
*/
302-
/* if (uselinemode && !linemode)
302+
if (uselinemode && !linemode)
303303
{
304304
if (lmodetype == KLUDGE_LINEMODE)
305305
{
@@ -310,6 +310,7 @@ localstat (void)
310310
char data[8];
311311

312312
send_do (TELOPT_LINEMODE, 1);
313+
/* send along edit modes */
313314
sprintf (data, "%c%c%c%c%c%c%c",
314315
IAC, SB, TELOPT_LINEMODE,
315316
LM_MODE, useeditmode,
@@ -323,27 +324,27 @@ localstat (void)
323324
linemode = uselinemode;
324325
goto done;
325326
}
326-
*/
327+
327328
/*
328329
* None of what follows is of any value if not using
329330
* real linemode.
330331
*/
331-
// if (lmodetype < REAL_LINEMODE)
332-
// goto done;
332+
if (lmodetype < REAL_LINEMODE)
333+
goto done;
333334

334-
// if (linemode && his_state_is_will (TELOPT_LINEMODE))
335-
// {
335+
if (linemode && his_state_is_will (TELOPT_LINEMODE))
336+
{
336337
/*
337338
* If edit mode changed, send edit mode.
338339
*/
339-
// if (useeditmode != editmode)
340-
// {
340+
if (useeditmode != editmode)
341+
{
341342
/*
342343
* Send along appropriate edit mode mask.
343344
*/
344-
// char data[8];
345+
char data[8];
345346

346-
/* sprintf (data, "%c%c%c%c%c%c%c",
347+
sprintf (data, "%c%c%c%c%c%c%c",
347348
IAC, SB, TELOPT_LINEMODE,
348349
LM_MODE, useeditmode,
349350
IAC, SE);
@@ -353,19 +354,19 @@ localstat (void)
353354

354355
editmode = useeditmode;
355356
}
356-
*/
357+
357358

358359
/*
359360
* Check for changes to special characters in use.
360361
*/
361-
// start_slc (0);
362-
// check_slc ();
363-
// end_slc (0);
364-
// }
365-
366-
//done:
367-
// if (need_will_echo)
368-
// send_will (TELOPT_ECHO, 1);
362+
start_slc (0);
363+
check_slc ();
364+
end_slc (0);
365+
}
366+
367+
done:
368+
if (need_will_echo)
369+
send_will (TELOPT_ECHO, 1);
369370
/*
370371
* Some things should be deferred until after the pty state has
371372
* been set by the local process. Do those things that have been
@@ -478,7 +479,7 @@ clientstat (register int code, register int parm1, register int parm2)
478479
if (lmodetype == REAL_LINEMODE && uselinemode)
479480
if (uselinemode)
480481
{
481-
/* char data[8];
482+
char data[8];
482483

483484
useeditmode = 0;
484485
if (tty_isediting ())
@@ -498,7 +499,7 @@ clientstat (register int code, register int parm1, register int parm2)
498499
DEBUG (debug_options, 1,
499500
printsub ('>', data + 2, sizeof (data) - 2));
500501

501-
editmode = useeditmode; */
502+
editmode = useeditmode;
502503
}
503504

504505

@@ -557,13 +558,13 @@ clientstat (register int code, register int parm1, register int parm2)
557558
{
558559
char data[8];
559560

560-
/* sprintf (data, "%c%c%c%c%c%c%c",
561+
sprintf (data, "%c%c%c%c%c%c%c",
561562
IAC, SB, TELOPT_LINEMODE,
562563
LM_MODE, useeditmode | MODE_ACK,
563564
IAC, SE);
564565
net_output_datalen (data, sizeof (data));
565566
DEBUG (debug_options, 1,
566-
printsub ('>', data + 2, sizeof (data) - 2)); */
567+
printsub ('>', data + 2, sizeof (data) - 2));
567568
}
568569

569570
editmode = useeditmode;

0 commit comments

Comments
 (0)