diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2012-03-30 05:59:14 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2012-03-30 05:59:14 +0000 |
commit | 82cc1f9ac32564e92bfbbe7a1de416f4ebcc8584 (patch) | |
tree | af43377451e06dac91d6639e35b1b5bf41d14d4e /ppdc | |
parent | 3e7fe0ca760ad0054cf5c9ec7c90ca415cf6eb06 (diff) |
Merge changes from CUPS 1.6svn-r10390.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3755 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'ppdc')
-rw-r--r-- | ppdc/ppdc-file.cxx | 7 | ||||
-rw-r--r-- | ppdc/ppdc-source.cxx | 5 | ||||
-rw-r--r-- | ppdc/ppdc.h | 1 |
3 files changed, 8 insertions, 5 deletions
diff --git a/ppdc/ppdc-file.cxx b/ppdc/ppdc-file.cxx index 3d4520eb0..1f1d9a84e 100644 --- a/ppdc/ppdc-file.cxx +++ b/ppdc/ppdc-file.cxx @@ -42,8 +42,9 @@ ppdcFile::ppdcFile(const char *f, // I - File to open else fp = cupsFileOpen(f, "r"); - filename = f; - line = 1; + close_on_delete = !ffp; + filename = f; + line = 1; if (!fp) _cupsLangPrintf(stderr, _("ppdc: Unable to open %s: %s"), f, @@ -57,7 +58,7 @@ ppdcFile::ppdcFile(const char *f, // I - File to open ppdcFile::~ppdcFile() { - if (fp) + if (close_on_delete && fp) cupsFileClose(fp); } diff --git a/ppdc/ppdc-source.cxx b/ppdc/ppdc-source.cxx index e806d2449..78e97adc8 100644 --- a/ppdc/ppdc-source.cxx +++ b/ppdc/ppdc-source.cxx @@ -3,7 +3,7 @@ // // Source class for the CUPS PPD Compiler. // -// Copyright 2007-2011 by Apple Inc. +// Copyright 2007-2012 by Apple Inc. // Copyright 2002-2007 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -1338,7 +1338,8 @@ ppdcSource::get_integer(const char *v) // I - Value string // NAME logicop value for (newv = (char *)v + 1; *newv && (isalnum(*newv & 255) || *newv == '_'); - newv ++); + newv ++) + /* do nothing */; ch = *newv; *newv = '\0'; diff --git a/ppdc/ppdc.h b/ppdc/ppdc.h index 24c9f2c26..c940e00a0 100644 --- a/ppdc/ppdc.h +++ b/ppdc/ppdc.h @@ -447,6 +447,7 @@ class ppdcFile //// File { public: + bool close_on_delete; // Close file on delete? cups_file_t *fp; // File pointer const char *filename; // Filename int line; // Line in file |