Lines Matching refs:ppd
65 static int copyPPDFile(char *ppd, char *printersPPD);
66 static int unzipPPDFile(char *ppd, char *printersPPD);
198 if ((prbufp->ppd != NULL) && (ppdopt))
452 print_str(fdout, HEAD, prbufp->ppd);
553 char *ppd = NULL;
557 (void) snprintf(buf, sizeof (buf), "%s.ppd", name);
561 if (!(path = makepath(ETCDIR, "ppd", buf, (char *)0)))
571 if ((result == 0) && (prbufp->ppd != NULL))
573 ppd = strdup(prbufp->ppd);
575 if (ppd == NULL)
583 if (Stat(ppd, &statbuf) == -1)
586 * The given ppd files does not exist, but
590 if (strstr(ppd, PPDZIP) != NULL)
597 ppd = Realloc(ppd,
598 strlen(ppd)+strlen(PPDZIP)+2);
599 if (ppd != NULL)
601 ppd = strcat(ppd, PPDZIP);
602 if (Stat(ppd, &statbuf) == -1)
627 if (!(path = makepath(ETCDIR, "ppd", buf, (char *)0)))
634 * At this point we may have a zipped or unzipped ppd file, if
636 * printer's ppd file (/etc/lp/ppd/<printer>.ppd)
641 if (strstr(ppd, PPDZIP) == NULL)
643 result = copyPPDFile(ppd, path);
647 result = unzipPPDFile(ppd, path);
654 if (ppd != NULL)
656 Free(ppd);
671 * Description: Copy the given ppd file to the printer's file in /etc/lp/ppd
676 copyPPDFile(char *ppd, char *printersPPD)
685 if ((ppd != NULL) && (printersPPD != NULL))
687 if ((fdin = open_locked(ppd, "r", 0)) < 0)
724 * Description: Unzip the given ppd file to the printer's file in /etc/lp/ppd.
726 * zipped ppd file.
731 unzipPPDFile(char *ppd, char *printersPPD)
741 if ((ppd != NULL) && (printersPPD != NULL))
760 strlen(ppd) +
768 printersPPD, ppd,