Changeset View
Changeset View
Standalone View
Standalone View
head/bin/sh/histedit.c
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#include "shell.h" | #include "shell.h" | ||||
#include "parser.h" | #include "parser.h" | ||||
#include "var.h" | #include "var.h" | ||||
#include "options.h" | #include "options.h" | ||||
#include "main.h" | #include "main.h" | ||||
#include "output.h" | #include "output.h" | ||||
#include "mystring.h" | #include "mystring.h" | ||||
#include "builtins.h" | |||||
#ifndef NO_HISTORY | #ifndef NO_HISTORY | ||||
#include "myhistedit.h" | #include "myhistedit.h" | ||||
#include "error.h" | #include "error.h" | ||||
#include "eval.h" | #include "eval.h" | ||||
#include "memalloc.h" | #include "memalloc.h" | ||||
#include "builtins.h" | |||||
#define MAXHISTLOOPS 4 /* max recursions through fc */ | #define MAXHISTLOOPS 4 /* max recursions through fc */ | ||||
#define DEFEDITOR "ed" /* default editor *should* be $EDITOR */ | #define DEFEDITOR "ed" /* default editor *should* be $EDITOR */ | ||||
History *hist; /* history cookie */ | History *hist; /* history cookie */ | ||||
EditLine *el; /* editline cookie */ | EditLine *el; /* editline cookie */ | ||||
int displayhist; | int displayhist; | ||||
static FILE *el_in, *el_out; | static FILE *el_in, *el_out; | ||||
▲ Show 20 Lines • Show All 427 Lines • ▼ Show 20 Lines | bindcmd(int argc, char **argv) | ||||
return ret; | return ret; | ||||
} | } | ||||
#else | #else | ||||
#include "error.h" | #include "error.h" | ||||
int | int | ||||
histcmd(int argc, char **argv) | histcmd(int argc __unused, char **argv __unused) | ||||
{ | { | ||||
error("not compiled with history support"); | error("not compiled with history support"); | ||||
/*NOTREACHED*/ | /*NOTREACHED*/ | ||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
bindcmd(int argc, char **argv) | bindcmd(int argc __unused, char **argv __unused) | ||||
{ | { | ||||
error("not compiled with line editing support"); | error("not compiled with line editing support"); | ||||
return (0); | return (0); | ||||
} | } | ||||
#endif | #endif |