]> andersk Git - moira.git/commitdiff
deal with longer HP hwtypes
authordanw <danw>
Wed, 2 Jun 1999 22:22:08 +0000 (22:22 +0000)
committerdanw <danw>
Wed, 2 Jun 1999 22:22:08 +0000 (22:22 +0000)
gen/print.pc

index 103a0783213eae5d4a8c8a2dbffa82aa2b94a8a9..f7bde0f808ba0c29f2d7125e57c2dc369e17865a 100644 (file)
@@ -127,14 +127,14 @@ void do_host(char *host)
              "\t:af=/var/spool/printer/%s/%s-acct:\\\n"
              "\t:ka#%d:pc#%d:\\\n",
              !strcmp(hwtype, "LPR") ? "raw" : rp,
-             !strcmp(hwtype, "HP") ? rm : hostname,
+             !strncmp(hwtype, "HP", 2) ? rm : hostname,
              rp, rp, rp, rp, rp, ka, pc);
       if (strcmp(rq, "[NONE]"))
        fprintf(out, "\t:rq=%s:\\\n", rq);
       if (ac)
        fprintf(out, "\t:ac=/var/spool/printer/%s/restrict.list:pa:\\\n", rp);
 
-      if (!strcmp(hwtype, "HP"))
+      if (!strncmp(hwtype, "HP", 2))
        {
          fprintf(out, "\t:if=/usr/athena/lib/lpdfilters/hpif:\\\n"
                  "\t:of=/usr/athena/lib/lpdfilters/hpof:\\\n"
@@ -177,7 +177,7 @@ void do_host(char *host)
       tarfile_mkdir(tf, filename, 0755, 1, 1, "daemon", "daemon", mtime);
 
       /* If spooling to an HP printer, make a .options file. */
-      if (!strcmp(hwtype, "HP"))
+      if (!strncmp(hwtype, "HP", 2))
        {
          sprintf(filename, "/var/spool/printer/%s/.options", name);
          out = tarfile_start(tf, filename, 0755, 1, 1, "daemon", "daemon",
This page took 0.037964 seconds and 5 git commands to generate.