rpms/cups/devel cups-strcasecmp.patch, NONE, 1.1 cups.spec, 1.105, 1.106
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Sep 28 12:55:01 UTC 2005
- Previous message (by thread): rpms/gnome-bluetooth/devel gnome-bluetooth-0.5.1-pydir.patch, 1.6, 1.7
- Next message (by thread): rpms/openoffice.org/FC-4 openoffice.org-1.9.111.ooo51091.exportgcjsymbolname.jvmaccess.patch, 1.2, 1.3 openoffice.org-1.9.122.ooo52974.systemhsqldbbeanshell.patch, NONE, 1.1 openoffice.org-1.9.125.ooo53612.systemnp_sdk.extensions.patch, NONE, 1.1 openoffice.org-1.9.125.ooo53723.bulletexport.vcl.patch, NONE, 1.1 openoffice.org-1.9.125.ooo54040.savecrash.svtools.patch, NONE, 1.1 openoffice.org-1.9.125.ooo54586.nfslock.sal.patch, NONE, 1.1 openoffice.org-1.9.126.ooo30380.uselibxslt.xmlhelp.patch, NONE, 1.1 openoffice.org-1.9.128.ooo54479.systemicu.patch, NONE, 1.1 openoffice.org-1.9.129.ooo54603.fontconfig.patch, NONE, 1.1 openoffice.org-1.9.130.ooo54692.fasterhelpcontent2.patch, NONE, 1.1 openoffice.org-1.9.130.ooo54959.negativeindent.sw.patch, NONE, 1.1 openoffice.org-1.9.130.oooXXXXX.newsystemdb.xmlhelp.patch, NONE, 1.1 workspace.cmcfixes17.patch, NONE, 1.1 workspace.cmcfixes18.patch, NONE, 1.1 workspace.cmcfixes19.patch, NONE, 1.1 workspace.dmake43p01.patch, NONE, 1.1 workspace.emblock1.patch, NON! E, 1.1 workspace.gslpatches6.patch, NONE, 1.1 workspace.impress57.patch, NONE, 1.1 openoffice.org-1.9.106.ooo44627.sal.brokencondition.patch, 1.1, 1.2 openoffice.org-1.9.106.ooo50172.icu.tamilvowelslikepango.patch, 1.1, 1.2 openoffice.org-1.9.114.ooo51638.mailmerge.patch, 1.1, 1.2 openoffice.org-1.9.114.ooo51718.rpath.patch, 1.1, 1.2 openoffice.org-1.9.117.ooo49720.mozillanspr.extensions.patch, 1.1, 1.2 openoffice.org-1.9.121.rh127576.gnomeprintui.patch, 1.1, 1.2 openoffice.org-1.9.84.ooo44843.sdcasting.patch, 1.2, 1.3 openoffice.org-1.9.84.ooo45725.lingucomponent.contribdict.patch, 1.2, 1.3 openoffice.org-1.9.87.rh151357.setlangtolocale.patch, 1.1, 1.2 openoffice.org-1.9.88.rh133741.alwaysgtk.desktop.patch, 1.1, 1.2 openoffice.org-1.9.89.ooo35627.parallel.cppumaker.patch, 1.4, 1.5 openoffice.org.spec, 1.209, 1.210 sources, 1.75, 1.76 workspace.javapatch.patch, 1.1, 1.2 workspace.vcl39.patch, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: twaugh
Update of /cvs/dist/rpms/cups/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv5602
Modified Files:
cups.spec
Added Files:
cups-strcasecmp.patch
Log Message:
* Wed Sep 28 2005 Tim Waugh <twaugh at redhat.com>
- Added strcasecmp patch for better scaling (bug #164232).
cups-strcasecmp.patch:
cupsd.h | 1 +
main.c | 23 +++++++++++++++++++++++
printers.c | 29 ++++++++++++++++++++++++-----
printers.h | 1 +
4 files changed, 49 insertions(+), 5 deletions(-)
--- NEW FILE cups-strcasecmp.patch ---
--- cups-1.1.23/scheduler/printers.c.strcasecmp 2005-09-28 12:33:13.000000000 +0100
+++ cups-1.1.23/scheduler/printers.c 2005-09-28 12:59:39.000000000 +0100
@@ -100,6 +100,8 @@
}
SetString(&p->name, name);
+ SetString(&p->lcasename, name);
+ MakeLowerCase(&p->lcasename);
SetString(&p->info, name);
SetString(&p->hostname, ServerName);
SetStringf(&p->uri, "ipp://%s:%d/printers/%s", ServerName,
@@ -124,7 +126,7 @@
for (prev = NULL, current = Printers;
current != NULL;
prev = current, current = current->next)
- if (strcasecmp(p->name, current->name) < 0)
+ if (strcmp(p->lcasename, current->lcasename) < 0)
break;
/*
@@ -661,6 +663,7 @@
ClearString(&p->uri);
ClearString(&p->hostname);
ClearString(&p->name);
+ ClearString(&p->lcasename);
ClearString(&p->location);
ClearString(&p->make_model);
ClearString(&p->info);
@@ -729,14 +732,22 @@
{
printer_t *p; /* Current destination */
int diff; /* Difference */
+ char *lcasename = strdup (name);
-
+ MakeLowerCase (&lcasename);
for (p = Printers; p != NULL; p = p->next)
- if ((diff = strcasecmp(name, p->name)) == 0)/* name == p->name */
+ if ((diff = strcmp(lcasename, p->lcasename)) == 0)/* name == p->name */
+ {
+ free (lcasename);
return (p);
+ }
else if (diff < 0) /* name < p->name */
+ {
+ free (lcasename);
return (NULL);
+ }
+ free (lcasename);
return (NULL);
}
@@ -750,15 +761,23 @@
{
printer_t *p; /* Current printer */
int diff; /* Difference */
+ char *lcasename = strdup (name);
-
+ MakeLowerCase (&lcasename);
for (p = Printers; p != NULL; p = p->next)
- if ((diff = strcasecmp(name, p->name)) == 0 &&
+ if ((diff = strcmp(lcasename, p->lcasename)) == 0 &&
!(p->type & CUPS_PRINTER_CLASS)) /* name == p->name */
+ {
+ free (lcasename);
return (p);
+ }
else if (diff < 0) /* name < p->name */
+ {
+ free (lcasename);
return (NULL);
+ }
+ free (lcasename);
return (NULL);
}
--- cups-1.1.23/scheduler/printers.h.strcasecmp 2005-09-28 12:34:53.000000000 +0100
+++ cups-1.1.23/scheduler/printers.h 2005-09-28 12:36:05.000000000 +0100
@@ -48,6 +48,7 @@
*location, /* Location code */
*make_model, /* Make and model */
*info; /* Description */
+ char *lcasename; /* Printer name in lower-case */
int accepting; /* Accepting jobs? */
ipp_pstate_t state; /* Printer state */
char state_message[1024]; /* Printer state message */
--- cups-1.1.23/scheduler/main.c.strcasecmp 2005-09-28 12:49:41.000000000 +0100
+++ cups-1.1.23/scheduler/main.c 2005-09-28 12:54:53.000000000 +0100
@@ -32,6 +32,7 @@
* ReleaseSignals() - Release signals for delivery.
* SetString() - Set a string value.
* SetStringf() - Set a formatted string value.
+ * MakeLowerCase() - Make an ASCII string value lower-case.
* parent_handler() - Catch USR1/CHLD signals...
* process_children() - Process all dead children...
* sigchld_handler() - Handle 'child' signals from old processes.
@@ -1219,6 +1220,28 @@
/*
+ * 'MakeLowerCase()' - Make an ASCII string lower-case.
+ */
+
+void
+MakeLowerCase(char **s) /* I/O - String value */
+{
+ int c;
+ char *p;
+
+ if (!s || !*s)
+ return;
+
+ p = *s;
+ while ((c = *p) != 0)
+ {
+ *p = tolower (c);
+ ++p;
+ }
+}
+
+
+/*
* 'parent_handler()' - Catch USR1/CHLD signals...
*/
--- cups-1.1.23/scheduler/cupsd.h.strcasecmp 2005-09-28 12:53:34.000000000 +0100
+++ cups-1.1.23/scheduler/cupsd.h 2005-09-28 12:54:01.000000000 +0100
@@ -204,6 +204,7 @@
extern void ReleaseSignals(void);
extern void SetString(char **s, const char *v);
extern void SetStringf(char **s, const char *f, ...);
+extern void MakeLowerCase(char **s);
extern void StartServer(void);
extern void StopServer(void);
extern void cupsdClosePipe(int *fds);
Index: cups.spec
===================================================================
RCS file: /cvs/dist/rpms/cups/devel/cups.spec,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- cups.spec 2 Sep 2005 16:45:00 -0000 1.105
+++ cups.spec 28 Sep 2005 12:54:59 -0000 1.106
@@ -49,7 +49,8 @@
Patch32: cups-pid.patch
Patch33: cups-CAN-2004-0888.patch
Patch34: cups-CAN-2005-2097.patch
-Patch35: cups-dbus.patch
+Patch35: cups-strcasecmp.patch
+Patch36: cups-dbus.patch
Epoch: 1
Url: http://www.cups.org/
BuildRoot: %{_tmppath}/%{name}-root
@@ -143,8 +144,9 @@
%patch32 -p1 -b .pid
%patch33 -p1 -b .CAN-2004-0888
%patch34 -p1 -b .CAN-2005-2097
+%patch35 -p1 -b .strcasecmp
%if %use_dbus
-%patch35 -p1 -b .dbus
+%patch36 -p1 -b .dbus
%endif
perl -pi -e 's,^#(Printcap\s+/etc/printcap),$1,' conf/cupsd.conf.in
aclocal -I config-scripts
@@ -409,6 +411,9 @@
%{_libdir}/cups/daemon/cups-lpd
%changelog
+* Wed Sep 28 2005 Tim Waugh <twaugh at redhat.com>
+- Added strcasecmp patch for better scaling (bug #164232).
+
* Fri Sep 2 2005 Tim Waugh <twaugh at redhat.com> 1:1.1.23-17
- Fixed CAN-2005-2097 (bug #164510).
- Previous message (by thread): rpms/gnome-bluetooth/devel gnome-bluetooth-0.5.1-pydir.patch, 1.6, 1.7
- Next message (by thread): rpms/openoffice.org/FC-4 openoffice.org-1.9.111.ooo51091.exportgcjsymbolname.jvmaccess.patch, 1.2, 1.3 openoffice.org-1.9.122.ooo52974.systemhsqldbbeanshell.patch, NONE, 1.1 openoffice.org-1.9.125.ooo53612.systemnp_sdk.extensions.patch, NONE, 1.1 openoffice.org-1.9.125.ooo53723.bulletexport.vcl.patch, NONE, 1.1 openoffice.org-1.9.125.ooo54040.savecrash.svtools.patch, NONE, 1.1 openoffice.org-1.9.125.ooo54586.nfslock.sal.patch, NONE, 1.1 openoffice.org-1.9.126.ooo30380.uselibxslt.xmlhelp.patch, NONE, 1.1 openoffice.org-1.9.128.ooo54479.systemicu.patch, NONE, 1.1 openoffice.org-1.9.129.ooo54603.fontconfig.patch, NONE, 1.1 openoffice.org-1.9.130.ooo54692.fasterhelpcontent2.patch, NONE, 1.1 openoffice.org-1.9.130.ooo54959.negativeindent.sw.patch, NONE, 1.1 openoffice.org-1.9.130.oooXXXXX.newsystemdb.xmlhelp.patch, NONE, 1.1 workspace.cmcfixes17.patch, NONE, 1.1 workspace.cmcfixes18.patch, NONE, 1.1 workspace.cmcfixes19.patch, NONE, 1.1 workspace.dmake43p01.patch, NONE, 1.1 workspace.emblock1.patch, NON! E, 1.1 workspace.gslpatches6.patch, NONE, 1.1 workspace.impress57.patch, NONE, 1.1 openoffice.org-1.9.106.ooo44627.sal.brokencondition.patch, 1.1, 1.2 openoffice.org-1.9.106.ooo50172.icu.tamilvowelslikepango.patch, 1.1, 1.2 openoffice.org-1.9.114.ooo51638.mailmerge.patch, 1.1, 1.2 openoffice.org-1.9.114.ooo51718.rpath.patch, 1.1, 1.2 openoffice.org-1.9.117.ooo49720.mozillanspr.extensions.patch, 1.1, 1.2 openoffice.org-1.9.121.rh127576.gnomeprintui.patch, 1.1, 1.2 openoffice.org-1.9.84.ooo44843.sdcasting.patch, 1.2, 1.3 openoffice.org-1.9.84.ooo45725.lingucomponent.contribdict.patch, 1.2, 1.3 openoffice.org-1.9.87.rh151357.setlangtolocale.patch, 1.1, 1.2 openoffice.org-1.9.88.rh133741.alwaysgtk.desktop.patch, 1.1, 1.2 openoffice.org-1.9.89.ooo35627.parallel.cppumaker.patch, 1.4, 1.5 openoffice.org.spec, 1.209, 1.210 sources, 1.75, 1.76 workspace.javapatch.patch, 1.1, 1.2 workspace.vcl39.patch, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list