diff options
author | Timothy Pearson <[email protected]> | 2014-11-20 10:36:29 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-11-20 10:36:29 -0600 |
commit | cfa9446f2535a288f803412a996acb5dd741e8fb (patch) | |
tree | 8c5dd69db62e43696f25d445c49e2de2db0abe01 /tdeprint | |
parent | 540db0b3e7e829e71c4c32a4bcc44d4d0addcfb7 (diff) | |
download | tdelibs-cfa9446f2535a288f803412a996acb5dd741e8fb.tar.gz tdelibs-cfa9446f2535a288f803412a996acb5dd741e8fb.zip |
Use compressed-ppd:<database name>:<ppd name> as compressed PPD URI
Diffstat (limited to 'tdeprint')
-rw-r--r-- | tdeprint/cups/make_driver_db_cups.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tdeprint/cups/make_driver_db_cups.c b/tdeprint/cups/make_driver_db_cups.c index bba9adce2..0a0160275 100644 --- a/tdeprint/cups/make_driver_db_cups.c +++ b/tdeprint/cups/make_driver_db_cups.c @@ -164,7 +164,18 @@ void initPpd(const char *dirname) char * pos2 = strstr(pos1 + 1, "\""); if (pos2 >= 0) { *pos2 = 0; - addFile(line+1, dirname); + char * pos3 = strstr(pos1 + 1, ":"); + if (pos3 >= 0) { + char *ppduri; + int n2 = strlen("compressed-ppd:")+strlen(pos3+1); + ppduri = (char*)malloc(n2*sizeof(char)+1); + memset(ppduri,0,n2); + strcat(ppduri, "compressed-ppd:"); + strcat(ppduri, pos3+1); + addFile(ppduri, dirname); + free(ppduri); + ppduri = NULL; + } } } } @@ -232,7 +243,7 @@ int parseCompressedPpdFile(const char *ppdfilename, const char *origin, FILE *ou size_t len = 0; ssize_t read; - fprintf(output_file,"FILE=foomatic-db-compressed-ppds:%s\n",ppdfilename); + fprintf(output_file,"FILE=compressed-ppd:%s:%s\n", origin, ppdfilename); while ((read = getline(&line, &len, file)) != -1) { PROCESS_PPD_FILE_CONTENTS @@ -257,7 +268,7 @@ int parseCompressedPpdFile(const char *ppdfilename, const char *origin, FILE *ou int main(int argc, char *argv[]) { registerHandler("ppd:", initPpd, parsePpdFile); - registerHandler("foomatic-db-compressed-ppds:", initPpd, parseCompressedPpdFile); + registerHandler("compressed-ppd:", initPpd, parseCompressedPpdFile); initFoomatic(); return execute(argc, argv); } |