]> andersk Git - moira.git/commitdiff
reversed the default of a yes-or-no question;
authorambar <ambar>
Tue, 15 Sep 1987 16:06:30 +0000 (16:06 +0000)
committerambar <ambar>
Tue, 15 Sep 1987 16:06:30 +0000 (16:06 +0000)
changed a call to ds() to use the library's
strsave().

clients/mailmaint/mailmaint.c

index d69bb4b0b51f1f7be20a9deffd24c8da9091a0b8..83b1a0d87155db8cc466c0ed2a0b77d9c2763167 100644 (file)
@@ -5,7 +5,6 @@
 
 #ifndef lint
 static char rcsid_mailmaint_c[] = "$Header$";
-
 #endif lint
 
 /***********************************************************************/
@@ -35,7 +34,7 @@ static char rcsid_mailmaint_c[] = "$Header$";
 static char *whoami;
 static int status;
 static void scream();
-char *ds();
+extern char *strsave();
 
 typedef struct list_info {
     char *acl;
@@ -107,7 +106,7 @@ main(argc, argv)
 
        uname = getpwuid((int) getuid())->pw_name;
     }
-    uname = (uname && strlen(uname)) ? ds(uname) : "";
+    uname = (uname && strlen(uname)) ? strsave(uname) : "";
 
     printf("Connecting to database for %s...please hold on.\n", uname);
 
@@ -439,16 +438,19 @@ show_all()
 {
     char c;
 
-    show_text(DISPROW, STARTCOL, "This function may take a while...proceed[y]?");
+    show_text(DISPROW, STARTCOL, "This function may take a \
+while... proceed? [y] ");
     c = getchar();
-    if (c == 'n' || c == 'N') {
-       erase_line(DISPROW, STARTCOL);
-       return;
+    if (c == 'y' || c == 'Y') {
+       move(DISPROW + 1, STARTCOL);
+       addstr("Processing query...please hold");
+       refresh();
+       (void) list_all_groups();
     }
-    move(DISPROW + 1, STARTCOL);
-    addstr("Processing query...please hold");
-    refresh();
-    (void) list_all_groups();
+    else
+       erase_line(DISPROW, STARTCOL);
+    return;
+
 }
 
 /****************************************************/
@@ -899,21 +901,6 @@ Prompt(prompt, buf, buflen)
     return(0);
 }
 
-/*
- * duplicate string 
- */
-char *
-ds(str)
-    char *str;
-{
-    register char *newstr = malloc((unsigned) strlen(str) + 1);
-
-    if (newstr == (char *) NULL)
-       return ((char *) NULL);
-    else
-       return (strcpy(newstr, str));
-}
-
 /*
  * Local Variables:
  * mode: c
This page took 0.044374 seconds and 5 git commands to generate.