* $Author$
* $Header$
* $Log$
- * Revision 1.8 1987-08-21 22:52:37 wesommer
- * [changes from poto]
+ * Revision 1.9 1987-08-21 23:31:37 wesommer
+ * Now passes lint with minimal difficulties.
*
+ * Revision 1.8 87/08/21 22:52:37 wesommer
+ * [changes from poto]
+ *
* Revision 1.7 87/08/17 14:23:05 jtkohl
* add Password_input
*
#endif lint
+#include <sys/types.h>
#include <stdio.h>
#include <signal.h>
#include <curses.h>
#include <ctype.h>
+#include <strings.h>
#include "menu.h"
#define MAX(A,B) ((A) > (B) ? (A) : (B))
#define MIN_INPUT 2 /* Minimum number of lines for input window */
-char *strcpy();
-char *strncpy();
+extern char *calloc();
int more_flg = 1;
/* Structure for holding current displayed menu */
fputs("Can't initialize curses!\n", stderr);
Start_no_menu(m);
}
- raw(); /* We parse & print everything ourselves */
- noecho();
+ (void) raw(); /* We parse & print everything ourselves */
+ (void) noecho();
cur_ms = make_ms(0); /* So we always have some current */
/* menu_screen */
top_menu = m;
Cleanup_menu()
{
if (cur_ms) {
- wclear(cur_ms->ms_screen);
- wrefresh(cur_ms->ms_screen);
+ (void) wclear(cur_ms->ms_screen);
+ (void) wrefresh(cur_ms->ms_screen);
}
endwin();
}
case CTL('C'):
return 0;
case CTL('Z'):
- kill(getpid(), SIGTSTP);
+ (void) kill(getpid(), SIGTSTP);
touchwin(curscr);
break;
case CTL('L'):
(void) wclear(cur_ms->ms_input);
(void) waddstr(cur_ms->ms_input, prompt);
- wrefresh(curscr);
+ (void) wrefresh(curscr);
getyx(cur_ms->ms_input, y, x);
break;
case '\n':
case CTL('C'):
return 0;
case CTL('Z'):
- kill(getpid(), SIGTSTP);
+ (void) kill(getpid(), SIGTSTP);
touchwin(curscr);
break;
case CTL('L'):
(void) wclear(cur_ms->ms_input);
(void) waddstr(cur_ms->ms_input, prompt);
- wrefresh(curscr);
+ (void) wrefresh(curscr);
getyx(cur_ms->ms_input, y, x);
break;
case '\n':
struct sgttyb ttybuf, nttybuf;
printf("%s", prompt);
/* turn off echoing */
- (void) ioctl(0, TIOCGETP, &ttybuf);
+ (void) ioctl(0, TIOCGETP, (char *)&ttybuf);
nttybuf = ttybuf;
nttybuf.sg_flags &= ~ECHO;
- (void)ioctl(0, TIOCSETP, &nttybuf);
+ (void)ioctl(0, TIOCSETP, (char *)&nttybuf);
if (gets(buf) == NULL) {
- (void) ioctl(0, TIOCSETP, &ttybuf);
+ (void) ioctl(0, TIOCSETP, (char *)&ttybuf);
putchar('\n');
return 0;
}
putchar('\n');
- (void) ioctl(0, TIOCSETP, &ttybuf);
+ (void) ioctl(0, TIOCSETP, (char *)&ttybuf);
Start_paging();
return 1;
}
+ return 0;
}
int lines_left;
{
char *copy, *line, *s;
- copy = (char *) malloc(COLS);
+ copy = (char *) malloc((u_int)COLS);
s = line = msg;
while(*s++) {
if (s - line >= COLS-1) {
- strncpy(copy, line, COLS-1);
+ (void) strncpy(copy, line, COLS-1);
line += COLS-1;
} else if (*s == '\n') {
*s = '\0';
- strcpy(copy, line);
+ (void) strcpy(copy, line);
line = ++s;
} else
continue;
return;
}
getyx(cur_ms->ms_input, y, x);
+ /* x is a bitbucket; avoid lint problems */
+ x=x;
(void) wmove(cur_ms->ms_input, y, 0);
(void) wclrtoeol(cur_ms->ms_input);
}
}
if (cur_ms != NULLMS) {
- msg1 = (char *) calloc(COLS, 1);
+ msg1 = (char *) calloc((u_int)COLS, 1);
(void) strncpy(msg1, msg, COLS-1);
for (i = strlen(msg1); i < COLS - 1; i++)
msg1[i] = ' ';