Index: ppdc/ppdc-source.cxx =================================================================== --- ppdc/ppdc-source.cxx (revision 8942) +++ ppdc/ppdc-source.cxx (working copy) @@ -3,7 +3,7 @@ // // Source class for the CUPS PPD Compiler. // -// Copyright 2007-2009 by Apple Inc. +// Copyright 2007-2010 by Apple Inc. // Copyright 2002-2007 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -3514,7 +3514,8 @@ for (d = (ppdcDriver *)drivers->first(); d; d = (ppdcDriver *)drivers->next()) { // Start the driver... - cupsFilePrintf(fp, "\n// %s %s\n", d->manufacturer->value, d->model_name->value); + cupsFilePrintf(fp, "\n// %s %s\n", d->manufacturer->value, + d->model_name->value); cupsFilePuts(fp, "{\n"); // Write the copyright stings... Index: ppdc/ppdc.cxx =================================================================== --- ppdc/ppdc.cxx (revision 8942) +++ ppdc/ppdc.cxx (working copy) @@ -3,7 +3,7 @@ // // PPD file compiler main entry for the CUPS PPD Compiler. // -// Copyright 2007-2008 by Apple Inc. +// Copyright 2007-2010 by Apple Inc. // Copyright 2002-2007 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -52,6 +52,8 @@ char *opt, // Current option *value, // Value in option *outname, // Output filename + make_model[1024], + // Make and model pcfilename[1024], // Lowercase pcfilename filename[1024]; // PPD filename @@ -313,7 +315,21 @@ { // Write the PPD file for this driver... if (use_model_name) - outname = d->model_name->value; + { + if (!strncasecmp(d->model_name->value, d->manufacturer->value, + strlen(d->manufacturer->value))) + { + // Model name already starts with the manufacturer... + outname = d->model_name->value; + } + else + { + // Add manufacturer to the front of the model name... + snprintf(make_model, sizeof(make_model), "%s %s", + d->manufacturer->value, d->model_name->value); + outname = make_model; + } + } else if (d->file_name) outname = d->file_name->value; else