]> andersk Git - moira.git/commitdiff
Changed some procedure names, and fixed pgets to use the common
authormar <mar>
Fri, 2 Sep 1988 12:39:19 +0000 (12:39 +0000)
committermar <mar>
Fri, 2 Sep 1988 12:39:19 +0000 (12:39 +0000)
routine PromptWithDefault

clients/moira/dcmmaint.c

index 0fbbd8f1d7ca4d52fa051bf19013dc770eef6bdc..974106789c403b06c287b3856044135bbcca498c 100644 (file)
@@ -5,6 +5,7 @@
 #include <strings.h>
 #include <ctype.h>
 #include <sms.h>
+#include <sms_app.h>
 #include <menu.h>
 
 #include "mit-copyright.h"
 #include "globals.h"
 #include "infodefs.h"
 
-char *whoami;
-
+extern char *whoami;
 static char buf[BUFSIZ];
-char *unparse_interval(), *canonicalize_hostname(), *pgets(), *strsave();
+char *unparse_interval(), *canonicalize_hostname(), *pgets();
 char *atot();
 
 #define DCM_ENABLE_FLAG 0
@@ -30,7 +30,7 @@ int *hint;
     return(SMS_CONT);
 }
 
-enabledcm(argc, argv)
+EnableDcm(argc, argv)
 int argc;
 char **argv;
 {
@@ -146,14 +146,10 @@ char *pgets(prompt, def)
 char *prompt;
 char *def;
 {
-    char ibuf[BUFSIZ], pbuf[BUFSIZ];
+    char ibuf[BUFSIZ];
 
-    sprintf(pbuf, "%s [%s]: ", prompt, def);
-    Prompt_input(pbuf, ibuf, BUFSIZ);
-    if (!strlen(ibuf))
-      return(strsave(def));
-    else
-      return(strsave(ibuf));
+    PromptWithDefault(prompt, ibuf, BUFSIZ, def);
+    return(strsave(ibuf));
 }
 
 
@@ -412,7 +408,7 @@ int *count;
 }
 
 
-inprogress()
+InProgress()
 {
     char *argv[6];
     int status, count = 0;
@@ -439,7 +435,7 @@ inprogress()
     return(DM_NORMAL);
 }
 
-failed()
+DcmFailed()
 {
     char *argv[6];
     int status, count = 0;
@@ -467,7 +463,7 @@ failed()
 }
 
 
-dcm()
+Dcm()
 {
     int status;
     if (status = sms_do_update())
This page took 0.042468 seconds and 5 git commands to generate.