Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/tftp/main.c
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
HistEvent he; | HistEvent he; | ||||
static EditLine *el; | static EditLine *el; | ||||
static History *hist; | static History *hist; | ||||
bool interactive; | bool interactive; | ||||
acting_as_client = 1; | acting_as_client = 1; | ||||
peer = -1; | peer = -1; | ||||
strcpy(mode, "netascii"); | strcpy(mode, "octet"); | ||||
signal(SIGINT, intr); | signal(SIGINT, intr); | ||||
interactive = isatty(STDIN_FILENO); | interactive = isatty(STDIN_FILENO); | ||||
if (interactive) { | if (interactive) { | ||||
el = el_init("tftp", stdin, stdout, stderr); | el = el_init("tftp", stdin, stdout, stderr); | ||||
hist = history_init(); | hist = history_init(); | ||||
history(hist, &he, H_SETSIZE, 100); | history(hist, &he, H_SETSIZE, 100); | ||||
el_set(el, EL_HIST, history, hist); | el_set(el, EL_HIST, history, hist); | ||||
▲ Show 20 Lines • Show All 875 Lines • Show Last 20 Lines |