From f25ce75f367ec5fb8cd59ed2f9e4170a8d3034da Mon Sep 17 00:00:00 2001 From: msweet Date: Mon, 12 Jan 2015 16:59:02 +0000 Subject: [PATCH] Use PPD deprecation annotation for cupsGetPPD functions. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12401 a1ca3aef-8c08-0410-bb20-df032aa958be --- cups/cups.h | 17 ++++++++++++----- xcode/CUPS.xcodeproj/project.pbxproj | 22 +++++++++++++--------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/cups/cups.h b/cups/cups.h index 4858a7f6b5..a215c8a926 100644 --- a/cups/cups.h +++ b/cups/cups.h @@ -35,6 +35,15 @@ typedef off_t ssize_t; /* @private@ */ # include "language.h" # include "pwg.h" +/* + * Define _PPD_DEPRECATED to silence the warnings about PPD functions being + * deprecated... + */ + +# ifndef _PPD_DEPRECATED +# define _PPD_DEPRECATED _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo and friends instead.") +# endif /* !_PPD_DEPRECATED */ + /* * C++ magic... @@ -354,8 +363,7 @@ extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsGetDes extern const char *cupsGetDefault(void); extern int cupsGetJobs(cups_job_t **jobs, const char *name, int myjobs, int whichjobs); -extern const char *cupsGetPPD(const char *name) - _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead."); +extern const char *cupsGetPPD(const char *name) _PPD_DEPRECATED; extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead."); extern ipp_status_t cupsLastError(void); extern int cupsPrintFile(const char *name, const char *filename, @@ -413,8 +421,7 @@ extern int cupsGetDests2(http_t *http, cups_dest_t **dests) extern int cupsGetJobs2(http_t *http, cups_job_t **jobs, const char *name, int myjobs, int whichjobs) _CUPS_API_1_1_21; -extern const char *cupsGetPPD2(http_t *http, const char *name) - _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead."); +extern const char *cupsGetPPD2(http_t *http, const char *name) _PPD_DEPRECATED; extern int cupsPrintFile2(http_t *http, const char *name, const char *filename, const char *title, int num_options, @@ -479,7 +486,7 @@ extern const char *cupsGetPassword2(const char *prompt, http_t *http, const char *resource) _CUPS_API_1_4; extern http_status_t cupsGetPPD3(http_t *http, const char *name, time_t *modtime, char *buffer, - size_t bufsize) _CUPS_API_1_4; + size_t bufsize) _PPD_DEPRECATED; extern ipp_t *cupsGetResponse(http_t *http, const char *resource) _CUPS_API_1_4; extern ssize_t cupsReadResponseData(http_t *http, char *buffer, diff --git a/xcode/CUPS.xcodeproj/project.pbxproj b/xcode/CUPS.xcodeproj/project.pbxproj index 8c30ac0c77..49166c3b9e 100644 --- a/xcode/CUPS.xcodeproj/project.pbxproj +++ b/xcode/CUPS.xcodeproj/project.pbxproj @@ -1561,6 +1561,8 @@ 728FB7EC1536161C005426E1 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = ""; }; 728FB7EF1536167A005426E1 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = /usr/lib/libiconv.dylib; sourceTree = ""; }; 728FB7F01536167A005426E1 /* libresolv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libresolv.dylib; path = /usr/lib/libresolv.dylib; sourceTree = ""; }; + 729D4B561A2CB48700692B21 /* CHANGES-2.0.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = "CHANGES-2.0.txt"; path = "../CHANGES-2.0.txt"; sourceTree = ""; }; + 729D4B571A2CB48700692B21 /* CHANGES-IPPTOOL.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = "CHANGES-IPPTOOL.txt"; path = "../CHANGES-IPPTOOL.txt"; sourceTree = ""; }; 72A4332F155844CF002E172D /* libcups_static.a */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcups_static.a; sourceTree = BUILT_PRODUCTS_DIR; }; 72C16CB8137B195D007E4BF4 /* file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = file.c; path = ../scheduler/file.c; sourceTree = SOURCE_ROOT; }; 72CF95E018A13543000FCAE4 /* dest-job.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dest-job.c"; path = "../cups/dest-job.c"; sourceTree = ""; }; @@ -2488,15 +2490,6 @@ 72E65BB818DC79F800097E89 /* Documentation */ = { isa = PBXGroup; children = ( - 72E65BDE18DCA35700097E89 /* CHANGES.txt */, - 72E65BDD18DCA35700097E89 /* CHANGES-1.7.txt */, - 72E65BDF18DCA35700097E89 /* CREDITS.txt */, - 72E65BE018DCA35700097E89 /* INSTALL.txt */, - 72E65BE118DCA35700097E89 /* IPPTOOL.txt */, - 72E65BE218DCA35700097E89 /* LICENSE.txt */, - 72E65BE318DCA35700097E89 /* README.txt */, - 72E65BB918DC7A3600097E89 /* doc */, - 72E65BBA18DC7A3600097E89 /* man */, 72E65BBB18DC7A6B00097E89 /* api-array.header */, 72E65BBC18DC7A6B00097E89 /* api-array.shtml */, 72E65BBD18DC7A6B00097E89 /* api-cups.header */, @@ -2517,12 +2510,23 @@ 72E65BCA18DC7A7E00097E89 /* api-ppdc.shtml */, 72E65BCB18DC7A9800097E89 /* api-raster.header */, 72E65BCC18DC7A9800097E89 /* api-raster.shtml */, + 72E65BDD18DCA35700097E89 /* CHANGES-1.7.txt */, + 729D4B561A2CB48700692B21 /* CHANGES-2.0.txt */, + 729D4B571A2CB48700692B21 /* CHANGES-IPPTOOL.txt */, + 72E65BDE18DCA35700097E89 /* CHANGES.txt */, + 72E65BDF18DCA35700097E89 /* CREDITS.txt */, + 72E65BB918DC7A3600097E89 /* doc */, + 72E65BE018DCA35700097E89 /* INSTALL.txt */, + 72E65BE118DCA35700097E89 /* IPPTOOL.txt */, + 72E65BE218DCA35700097E89 /* LICENSE.txt */, + 72E65BBA18DC7A3600097E89 /* man */, 72E65BCD18DC7A9800097E89 /* postscript-driver.header */, 72E65BCE18DC7A9800097E89 /* postscript-driver.shtml */, 72E65BCF18DC7A9800097E89 /* ppd-compiler.header */, 72E65BD018DC7A9800097E89 /* ppd-compiler.shtml */, 72E65BD118DC7A9800097E89 /* raster-driver.header */, 72E65BD218DC7A9800097E89 /* raster-driver.shtml */, + 72E65BE318DCA35700097E89 /* README.txt */, 72E65BD318DC7A9800097E89 /* spec-ppd.header */, 72E65BD418DC7A9800097E89 /* spec-ppd.shtml */, ); -- 2.47.2