[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Media selection should be caseless, really
From: |
papowell |
Subject: |
Media selection should be caseless, really |
Date: |
Thu, 30 Nov 2000 06:38:47 -0800 (PST) |
I have run into problems with GhostScript/A2PS,
RedHat Filters, IFHP Filters, LPRng, and just about
all conversion programs that want media to be CASE
sensitive names.
I suggest that you might want to ACCEPT caseless but
GENERATE internally the cased versions. Here is a
patch to do this.
I plead with you to do this, to save the sanity
(what little is left) of print users.
Patrick ("Yes, I recommend a2ps") Powell
Patrick Powell Astart Technologies,
address@hidden 9475 Chesapeake Drive, Suite D,
Network and System San Diego, CA 92123
Consulting 858-874-6543 FAX 858-279-8424
LPRng - Print Spooler (http://www.astart.com)
*** lib/media.c Thu Nov 30 05:38:57 2000
--- lib/media.c.orig Thu Nov 30 05:26:33 2000
***************
*** 158,184 ****
a2ps_get_medium (a2ps_job * job, const char * name)
{
struct medium *item;
- struct medium ** media;
struct medium token;
- int i;
token.name = NULL;
if (strcaseequ (name, LIBPAPER_MEDIUM))
token.name = (char *) systempapername ();
if (!token.name)
token.name = (char *) name;
- media = (struct medium **) hash_dump (job->media, NULL, medium_hash_qcmp);
-
- for (i = 0 ; media[i] ; i++){
- if( strcaseequ( media[i]->name, token.name ) ) {
- token.name = media[i]->name;
- break;
- }
- }
-
item = (struct medium *) hash_find_item (job->media, &token);
- FREE (media);
if (item == NULL)
error (1, 0, _("unknown medium `%s'"), quotearg (token.name));
--- 158,173 ----
a2ps_get_medium (a2ps_job * job, const char * name)
{
struct medium *item;
struct medium token;
token.name = NULL;
if (strcaseequ (name, LIBPAPER_MEDIUM))
token.name = (char *) systempapername ();
+
if (!token.name)
token.name = (char *) name;
item = (struct medium *) hash_find_item (job->media, &token);
if (item == NULL)
error (1, 0, _("unknown medium `%s'"), quotearg (token.name));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Media selection should be caseless, really,
papowell <=