]> andersk Git - moira.git/commitdiff
deal with the new "banner" field in the printers table
authordanw <danw>
Sat, 6 Feb 1999 18:45:33 +0000 (18:45 +0000)
committerdanw <danw>
Sat, 6 Feb 1999 18:45:33 +0000 (18:45 +0000)
clients/moira/printer.c

index 87bf005aed1e1d047d3ad0af6465449d8541ba22..eac11cd228298b4e62571e89721e7ee6ab70f127 100644 (file)
@@ -67,6 +67,7 @@ static char **SetDefaults(char **info, char *name)
   info[PRN_PC] = strdup("10");
   info[PRN_AC] = strdup("[none]");
   info[PRN_LPC_ACL] = strdup("[none]");
+  info[PRN_BANNER] = strdup("1");
   info[PRN_LOCATION] = strdup("");
   info[PRN_CONTACT] = strdup("");
   info[PRN_MODTIME] = info[PRN_MODBY] = info[PRN_MODWITH] = NULL;
@@ -140,7 +141,7 @@ static struct mqelem *GetPrnInfo(char *name, int how)
 static char *PrintPrnInfo(char **info)
 {
   char buf[BUFSIZ], *hwaddr;
-  int status;
+  int status, banner = atoi(info[PRN_BANNER]);
 
   if (!info)           /* If no informaion */
     {
@@ -169,7 +170,8 @@ static char *PrintPrnInfo(char **info)
   Put_message(buf);
   sprintf(buf, "Spool host: %s", info[PRN_RM]);
   Put_message(buf);
-  sprintf(buf, "Remote Printer Name: %s", info[PRN_RP]);
+  sprintf(buf, "Remote Printer Name: %-38s Banner page: %s", info[PRN_RP],
+         banner ? ( banner == PRN_BANNER_FIRST ? "Yes" : "Last" ) : "No");
   Put_message(buf);
   sprintf(buf, "Authentication: %-3s Price/page: %-3s  Quota Server: %s",
          atoi(info[PRN_KA]) ? "yes" : "no", info[PRN_PC], info[PRN_RQ]);
@@ -250,6 +252,8 @@ static char **AskPrnInfo(char **info)
     }
   if (GetValueFromUser("LPC ACL", &info[PRN_LPC_ACL]) == SUB_ERROR)
     return NULL;
+  if (GetYesNoValueFromUser("Banner page", &info[PRN_BANNER]) == SUB_ERROR)
+    return NULL;
   if (GetValueFromUser("Location", &info[PRN_LOCATION]) == SUB_ERROR)
     return NULL;
   if (GetValueFromUser("Contact", &info[PRN_CONTACT]) == SUB_ERROR)
This page took 0.258366 seconds and 5 git commands to generate.