From: mar Date: Fri, 2 Sep 1988 12:39:19 +0000 (+0000) Subject: Changed some procedure names, and fixed pgets to use the common X-Git-Tag: KREL1~165 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/3ed06d63b28af9978e56b1aed9c7654d12b8fa08?ds=sidebyside Changed some procedure names, and fixed pgets to use the common routine PromptWithDefault --- diff --git a/clients/moira/dcmmaint.c b/clients/moira/dcmmaint.c index 0fbbd8f1..97410678 100644 --- a/clients/moira/dcmmaint.c +++ b/clients/moira/dcmmaint.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "mit-copyright.h" @@ -13,10 +14,9 @@ #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())