Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made libcupsfilters support both libcups2 and libcups3 #24

Closed
wants to merge 8 commits into from

Conversation

RudraGayu
Copy link

Renamed libcupsfilters API call that it was making from libcups2 so that its compatible to version 3 of libcups. Added libcups2-private.h with certain macros, so that its compatible to the version 2 of libcups.

# define cupsArrayGetFirst cupsArrayFirst
# define cupsArrayGetElement cupsArrayIndex
# define cupsArrayNew cupsArrayNew3
# define cupsGetsDests cupsGetDests2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should probably be cupsGetDests and not cupsGetsDests here.

@@ -22,6 +22,7 @@
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
//#include <scheduler/printers.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this commented-out line.

@@ -30,6 +31,7 @@
#include <cups/cups.h>
#include <cups/backend.h>
#include <cups/dir.h>
#include <cups/http-private.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use private (library-internal) APIs in other programs/libraries. They are not stable APIs and can change at any time.

//
// Contents:
//
// main() - Main entry...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like that you have copied this header from another file. Please update it, especially line 2 and line12.

@tillkamppeter
Copy link
Member

Please also make sure that your PR is based on the current GIT master state of libcupsfilters.

@tillkamppeter
Copy link
Member

Solved differently via commit 26f9c3f

But thanks anyway for your pull request which provided a good base for the final solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants