[Pkg-phototools-devel] [gphoto-devel] ANNOUNCE: libgphoto2/gphoto2 2.4.2 released!
Marcus Meissner
marcus at jet.franken.de
Mon Jul 21 06:02:56 UTC 2008
On Mon, Jul 21, 2008 at 12:05:28AM +0200, Cyril Brulebois wrote:
> Marcus Meissner <marcus at jet.franken.de> (13/07/2008):
> > Hi folks!
>
> Hello,
>
> > It took longer than I actually expected, but here it is, the 2.4.2
> > branch release.
>
> here's a quick update from the libgphoto2 Debian maintainers, targeted
> at both developers and users.
>
> Since 2.4.2 got out just before the freeze, we didn't have a
> sufficiently wide window to got it tested in depth, so we'll stick to
> 2.4.1 for the next stable release. Since we know that ID updates (and
> other bugfixes/improvements) are quite frequent, we'll try to keep a
> version available through the backports.org site, so that stable users
> can easily have an updated libgphoto2 package.
Oh.
> If you have any question/suggestion/other regarding the Debian
> packaging, feel free to contact us at the following address:
> <pkg-phototools-devel at lists.alioth.debian.org>.
You should at least also take the initial startup speedup patch,
rev 11066.
Even on fast machines it saves over a second startup time.
Ciao, Marcus
Index: gphoto2-abilities-list.c
===================================================================
--- gphoto2-abilities-list.c (Revision 11065)
+++ gphoto2-abilities-list.c (Revision 11066)
@@ -576,28 +576,20 @@
return (list->count);
}
+static int
+cmp_abilities (const void *a, const void *b) {
+ const CameraAbilities *ca = a;
+ const CameraAbilities *cb = b;
+ return strcasecmp (ca->model, cb->model);
+}
+
static int
gp_abilities_list_sort (CameraAbilitiesList *list)
{
- CameraAbilities t;
- int x, y;
-
CHECK_NULL (list);
- for (x = 0; x < list->count - 1; x++)
- for (y = x + 1; y < list->count; y++)
- if (strcasecmp (list->abilities[x].model,
- list->abilities[y].model) > 0) {
- memcpy (&t, &list->abilities[x],
- sizeof (CameraAbilities));
- memcpy (&list->abilities[x],
- &list->abilities[y],
- sizeof (CameraAbilities));
- memcpy (&list->abilities[y], &t,
- sizeof (CameraAbilities));
- }
-
+ qsort (list->abilities, list->count, sizeof(CameraAbilities), cmp_abilities);
return (GP_OK);
}
More information about the Pkg-phototools-devel
mailing list