#include <sys/stat.h>
#endif
+#include "pwd_grp/pwd.h"
+
+
static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */
enum {
struct winsize win = { 0, 0, 0, 0 };
static __sighandler_t previous_SIGWINCH_handler; /* for reset */
- /* emulate signal call if not called as a sig handler */
+ /* emulate signal call if not called as a sig handler */
if(nsig == -SIGWINCH || nsig == SIGWINCH) {
ioctl(0, TIOCGWINSZ, &win);
if (win.ws_col > 0) {
cmdedit_setwidth( win.ws_col, nsig == SIGWINCH );
+ } else {
+ /* Default to 79 if their console doesn't want to share */
+ cmdedit_setwidth( 79, nsig == SIGWINCH );
}
}
input_backward();
}
} else {
- error_msg("\n*** Error: minimum screen width is %d\n", cmdedit_termw);
+ error_msg("\n*** Error: minimum screen width is %d", cmdedit_termw);
}
}