diff options
author | Andrew Tridgell <tridge@samba.org> | 1999-12-13 13:27:58 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1999-12-13 13:27:58 +0000 |
commit | 453a822a76780063dff23526c35408866d0c0154 (patch) | |
tree | 804feffcd5e60153e27d3ca2b007021e66e5bd0a /source/printing/pcap.c | |
parent | 054195df9b6187c663ede5cf4489499abbdc29fc (diff) | |
download | samba-453a822a76780063dff23526c35408866d0c0154.tar.gz samba-453a822a76780063dff23526c35408866d0c0154.tar.xz samba-453a822a76780063dff23526c35408866d0c0154.zip |
first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
Diffstat (limited to 'source/printing/pcap.c')
-rw-r--r-- | source/printing/pcap.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/source/printing/pcap.c b/source/printing/pcap.c index 242406c9748..62010706bb3 100644 --- a/source/printing/pcap.c +++ b/source/printing/pcap.c @@ -9,6 +9,8 @@ Re-written again by Andrew Tridgell Modified for SVID support by Norm Jacobs, 1997 + + Modified for CUPS support by Michael Sweet, 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,6 +56,9 @@ * * Modified to call SVID/XPG4 support if printcap name is set to "lpstat" * in smb.conf under Solaris. + * + * Modified to call CUPS support if printcap name is set to "cups" + * in smb.conf. */ #include "includes.h" @@ -69,7 +74,7 @@ extern int DEBUGLEVEL; ****************************************** */ static int strlocate(char *xpLine,char *xpS) { - int iS,iL,i,iRet; + int iS,iL,iRet; char *p; iS = strlen(xpS); iL = strlen(xpLine); @@ -91,9 +96,9 @@ static int strlocate(char *xpLine,char *xpS) /* ******************************************************************* */ /* * Scan qconfig and search all virtual printer (device printer) * */ /* ******************************************************************* */ -static void ScanQconfig_fn(char *psz,void (*fn)()) +static void ScanQconfig_fn(char *psz,void (*fn)(char *, char *)) { - int iLg,iEtat; + int iEtat; FILE *pfile; char *line,*p; pstring name,comment; @@ -262,6 +267,11 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname) return(False); } +#ifdef HAVE_LIBCUPS + if (strequal(psz, "cups")) + return (cups_printername_ok(pszPrintername)); +#endif /* HAVE_LIBCUPS */ + #ifdef SYSV if (strequal(psz, "lpstat")) return (sysv_printername_ok(pszPrintername)); @@ -329,6 +339,13 @@ void pcap_printer_fn(void (*fn)(char *, char *)) return; } +#ifdef HAVE_LIBCUPS + if (strequal(psz, "cups")) { + cups_printer_fn(fn); + return; + } +#endif /* HAVE_LIBCUPS */ + #ifdef SYSV if (strequal(psz, "lpstat")) { sysv_printer_fn(fn); |