/***********************************************************************/
#include <stdio.h>
#include <pwd.h>
-#include <menu.h>
#include <signal.h>
#include <strings.h>
#include <curses.h>
#include <sms_app.h>
#include <mit-copyright.h>
+
#define STARTCOL 0
#define STARTROW 3
#define SECONDCOL 30
if (use_menu) {
(void) initscr();
if ((LINES < 24) || (COLS < 60)) {
- Put_message("Display window too small.\n\n");
+ display_buff("Display window too small.\n\n");
(void) sprintf(buf, "Current window parameters are (%d \
lines, %d columns)\n", LINES, COLS);
- Put_message(buf);
- Put_message("Please resize your window\n");
- Put_message("to at least 24 lines and 60 columns.\n");
+ display_buff(buf);
+ display_buff("Please resize your window\n");
+ display_buff("to at least 24 lines and 60 columns.\n");
exit(0);
}
raw();
show_text(DISPROW, STARTCOL, "Show information about a list.\n\r");
buf = calloc((unsigned)1024, 1);
if (Prompt("Enter List Name: ", buf, LISTSIZE, 1) == 1) {
- Put_message("\n\r");
+ display_buff("\n\r");
if (fetch_list_info(buf, current_li) == 0) {
(void) sprintf(buf, "Description: %s\n\r", current_li->desc);
if (strlen(buf) > 60)
mvcur(0, 0, currow, STARTCOL);
refresh();
if (Prompt("--RETURN for more, ctl-c to exit--", buffer, 1, 0) == 0) {
- Put_message("Flushing query...");
+ display_buff("Flushing query...");
moreflg = 1;
return (0);
}
show_text(DISPROW, STARTCOL, "Add yourself to a list\n\r");
buf = calloc(LISTMAX, 1);
if (Prompt("Enter List Name: ", buf, LISTSIZE, 1) == 1) {
- Put_message("\r\n");
+ display_buff("\r\n");
argv[0] = strsave(buf);
argv[1] = strsave("user");
argv[2] = strsave(uname);
if (status = sms_query("add_member_to_list", 3, argv,
scream, (char *) NULL)) {
- Put_message("\r\n");
+ display_buff("\r\n");
com_err(whoami, status, " found.\n");
}
else {
show_text(DISPROW, STARTCOL, "Remove yourself from a list\n\r");
buf = calloc(LISTMAX, 1);
if (Prompt("Enter List Name: ", buf, LISTSIZE, 1) == 1) {
- Put_message("\r\n");
+ display_buff("\r\n");
argv[0] = strsave(buf);
argv[1] = strsave("user");
argv[2] = strsave(uname);
if (status = sms_query("delete_member_from_list", 3, argv,
scream, (char *) NULL)) {
- Put_message("\r\n");
+ display_buff("\r\n");
com_err(whoami, status, " found.\n");
}
else {
refresh();
if (status = sms_query("get_lists_of_member", 2, nargv + 1,
print_1, (char *) NULL)) {
- Put_message("\r\n");
+ display_buff("\r\n");
com_err(whoami, status, " in get_lists_of_member");
}
currow++;
{
char buf[BUFSIZ];
- /* no newline 'cause Put_message adds one */
+ /* no newline 'cause display_buff adds one */
(void) sprintf(buf, "%s\r", argv[0]);
(void) start_display(buf);
first_time = 1;
if (status = sms_query("qualified_get_lists", 5, argv,
print_all, (char *) NULL)) {
- Put_message("\r\n");
+ display_buff("\r\n");
com_err(whoami, status, " in list_all_groups\n");
}
end_display();
- return (DM_NORMAL); /* HA! */
+ return (0);
}
/****************************************************/
argv[0] = buf;
if (status = sms_query("get_members_of_list", 1, argv,
print_2, (char *) NULL)) {
- Put_message("\r\n");
+ display_buff("\r\n");
com_err(whoami, status, " found.\n");
currow++;
}
return(0);
}
clrwin(DISPROW);
- return (DM_NORMAL); /* HA! */
+ return (0);
}
/****************************************************/
mvcur(0, 0, currow, STARTCOL);
refresh();
if (Prompt("--RETURN for more, ctl-c to exit--", buffer, 1, 0) == 0) {
- Put_message("Flushing query...");
+ display_buff("Flushing query...");
moreflg = 1;
return (0);
}
case '\n':
case '\r':
if (crok)
- Put_message("\r");
+ display_buff("\r");
*p = '\0';
if (strlen(buf) < 1)/* only \n or \r in buff */
return (-1);
_strbuf._cnt = BUFSIZ - (cp - buf);
_doprnt(fmt, args, &_strbuf);
(void) putc('\0', &_strbuf);
- Put_message(buf);
+ display_buff(buf);
}