Skip to content

Commit

Permalink
Add new array APIs, remove old private array header, update unit test…
Browse files Browse the repository at this point in the history
…s, update

ippfind to use new array and DNS-SD APIs, update other code as needed to not
use deprecated APIs.
  • Loading branch information
michaelrsweet committed Sep 10, 2023
1 parent bd031ca commit 4113ba0
Show file tree
Hide file tree
Showing 28 changed files with 2,158 additions and 2,971 deletions.
60 changes: 31 additions & 29 deletions backend/Dependencies
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ipp.o: ipp.c backend-private.h ../cups/cups-private.h \
../cups/string-private.h ../config.h ../cups/versioning.h \
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
../cups/debug-internal.h ../cups/debug-private.h ../cups/ipp-private.h \
../cups/cups.h ../cups/file.h ../cups/ipp.h ../cups/http.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand Down Expand Up @@ -53,15 +53,16 @@ lpd.o: lpd.c ../cups/http-private.h ../config.h ../cups/language.h \
\
\
backend-private.h ../cups/cups-private.h ../cups/string-private.h \
../cups/array-private.h ../cups/language-private.h ../cups/transcode.h \
../cups/pwg-private.h ../cups/thread.h ../cups/snmp-private.h \
../cups/backend.h ../cups/sidechannel.h
../cups/debug-internal.h ../cups/debug-private.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/thread.h ../cups/snmp-private.h ../cups/backend.h \
../cups/sidechannel.h
dnssd.o: dnssd.c backend-private.h ../cups/cups-private.h \
../cups/string-private.h ../config.h ../cups/versioning.h \
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
../cups/debug-internal.h ../cups/debug-private.h ../cups/ipp-private.h \
../cups/cups.h ../cups/file.h ../cups/ipp.h ../cups/http.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand All @@ -87,10 +88,10 @@ dnssd.o: dnssd.c backend-private.h ../cups/cups-private.h \
../cups/sidechannel.h
snmp.o: snmp.c backend-private.h ../cups/cups-private.h \
../cups/string-private.h ../config.h ../cups/versioning.h \
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
../cups/debug-internal.h ../cups/debug-private.h ../cups/ipp-private.h \
../cups/cups.h ../cups/file.h ../cups/ipp.h ../cups/http.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand Down Expand Up @@ -139,14 +140,16 @@ socket.o: socket.c ../cups/http-private.h ../config.h ../cups/language.h \
\
\
backend-private.h ../cups/cups-private.h ../cups/string-private.h \
../cups/array-private.h ../cups/language-private.h ../cups/transcode.h \
../cups/pwg-private.h ../cups/thread.h ../cups/snmp-private.h \
../cups/backend.h ../cups/sidechannel.h
../cups/debug-internal.h ../cups/debug-private.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/thread.h ../cups/snmp-private.h ../cups/backend.h \
../cups/sidechannel.h
test1284.o: test1284.c ../cups/string-private.h ../config.h \
../cups/versioning.h ieee1284.c backend-private.h \
../cups/cups-private.h ../cups/array-private.h ../cups/array.h \
../cups/ipp-private.h ../cups/cups.h ../cups/file.h ../cups/ipp.h \
../cups/http.h ../cups/language.h ../cups/pwg.h ../cups/http-private.h \
../cups/cups-private.h ../cups/debug-internal.h \
../cups/debug-private.h ../cups/ipp-private.h ../cups/cups.h \
../cups/file.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
\
\
Expand Down Expand Up @@ -176,8 +179,8 @@ testbackend.o: testbackend.c ../cups/string-private.h ../config.h \
../cups/versioning.h ../cups/cups.h ../cups/file.h ../cups/ipp.h \
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/sidechannel.h backend-private.h ../cups/cups-private.h \
../cups/array-private.h ../cups/ipp-private.h ../cups/http-private.h \
\
../cups/debug-internal.h ../cups/debug-private.h ../cups/ipp-private.h \
../cups/http-private.h \
\
\
\
Expand All @@ -202,10 +205,10 @@ testbackend.o: testbackend.c ../cups/string-private.h ../config.h \
../cups/thread.h ../cups/snmp-private.h ../cups/backend.h
testsupplies.o: testsupplies.c backend-private.h ../cups/cups-private.h \
../cups/string-private.h ../config.h ../cups/versioning.h \
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
../cups/debug-internal.h ../cups/debug-private.h ../cups/ipp-private.h \
../cups/cups.h ../cups/file.h ../cups/ipp.h ../cups/http.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand All @@ -231,10 +234,10 @@ testsupplies.o: testsupplies.c backend-private.h ../cups/cups-private.h \
../cups/sidechannel.h
usb.o: usb.c backend-private.h ../cups/cups-private.h \
../cups/string-private.h ../config.h ../cups/versioning.h \
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
../cups/debug-internal.h ../cups/debug-private.h ../cups/ipp-private.h \
../cups/cups.h ../cups/file.h ../cups/ipp.h ../cups/http.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand All @@ -257,6 +260,5 @@ usb.o: usb.c backend-private.h ../cups/cups-private.h \
\
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/thread.h ../cups/snmp-private.h ../cups/backend.h \
../cups/sidechannel.h usb-darwin.c ../cups/debug-private.h \
../cups/file-private.h ../cups/ppd-private.h ../cups/ppd.h \
../cups/raster.h
../cups/sidechannel.h usb-darwin.c ../cups/file-private.h \
../cups/ppd-private.h ../cups/ppd.h ../cups/raster.h
5 changes: 2 additions & 3 deletions backend/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "backend-private.h"
#include <cups/ppd-private.h>
#include <cups/array-private.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
Expand Down Expand Up @@ -333,7 +332,7 @@ main(int argc, /* I - Number of command-line args */
if ((auth_info_required = getenv("AUTH_INFO_REQUIRED")) == NULL)
auth_info_required = "none";

state_reasons = _cupsArrayNewStrings(getenv("PRINTER_STATE_REASONS"), ',');
state_reasons = cupsArrayNewStrings(getenv("PRINTER_STATE_REASONS"), ',');

#ifdef HAVE_GSSAPI
/*
Expand Down Expand Up @@ -3549,7 +3548,7 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
else
op = '\0';

new_reasons = _cupsArrayNewStrings(s, ',');
new_reasons = cupsArrayNewStrings(s, ',');
}
else
return;
Expand Down
27 changes: 14 additions & 13 deletions berkeley/Dependencies
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
lpc.o: lpc.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
../cups/versioning.h ../cups/debug-internal.h ../cups/debug-private.h \
../cups/ipp-private.h ../cups/cups.h ../cups/file.h ../cups/ipp.h \
../cups/http.h ../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand All @@ -26,10 +26,10 @@ lpc.o: lpc.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/thread.h
lpq.o: lpq.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
../cups/versioning.h ../cups/debug-internal.h ../cups/debug-private.h \
../cups/ipp-private.h ../cups/cups.h ../cups/file.h ../cups/ipp.h \
../cups/http.h ../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand All @@ -53,10 +53,10 @@ lpq.o: lpq.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/thread.h
lpr.o: lpr.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
../cups/versioning.h ../cups/debug-internal.h ../cups/debug-private.h \
../cups/ipp-private.h ../cups/cups.h ../cups/file.h ../cups/ipp.h \
../cups/http.h ../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
\
\
\
Expand All @@ -80,10 +80,11 @@ lpr.o: lpr.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/thread.h
lprm.o: lprm.c ../cups/cups-private.h ../cups/string-private.h \
../config.h ../cups/versioning.h ../cups/array-private.h \
../cups/array.h ../cups/ipp-private.h ../cups/cups.h ../cups/file.h \
../cups/ipp.h ../cups/http.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h \
../config.h ../cups/versioning.h ../cups/debug-internal.h \
../cups/debug-private.h ../cups/ipp-private.h ../cups/cups.h \
../cups/file.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
\
\
\
\
Expand Down
Loading

0 comments on commit 4113ba0

Please sign in to comment.