2001-10-16 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
Patch from Dan Fandrich <<dan@coneharvesters.com>: * libgphoto2/gphoto2-abilities-list.c: * libgphoto2/gphoto2-camera.c: Make models case-insensitive. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2568 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
2001-10-17 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
2001-10-16 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
Patch from Dan Fandrich <<dan@coneharvesters.com>:
|
||||
|
||||
* libgphoto2/gphoto2-abilities-list.c:
|
||||
* libgphoto2/gphoto2-camera.c: Make models case-insensitive.
|
||||
|
||||
2001-10-16 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* libgphoto2/gphoto2-camera.[c,h]: Documented
|
||||
|
||||
|
||||
@@ -290,8 +290,8 @@ gp_abilities_list_sort (CameraAbilitiesList *list)
|
||||
|
||||
for (x = 0; x < list->count - 1; x++)
|
||||
for (y = x + 1; y < list->count; y++)
|
||||
if (strcmp (list->abilities[x]->model,
|
||||
list->abilities[y]->model) > 0) {
|
||||
if (strcasecmp (list->abilities[x]->model,
|
||||
list->abilities[y]->model) > 0) {
|
||||
t = list->abilities[x];
|
||||
list->abilities[x] = list->abilities[y];
|
||||
list->abilities[y] = t;
|
||||
@@ -336,7 +336,7 @@ gp_abilities_list_lookup_model (CameraAbilitiesList *list, const char *model)
|
||||
CHECK_NULL (list && model);
|
||||
|
||||
for (x = 0; x < list->count; x++)
|
||||
if (!strcmp (list->abilities[x]->model, model))
|
||||
if (!strcasecmp (list->abilities[x]->model, model))
|
||||
return (x);
|
||||
|
||||
return (GP_ERROR_MODEL_NOT_FOUND);
|
||||
|
||||
@@ -665,7 +665,7 @@ gp_camera_init (Camera *camera)
|
||||
* If the port or the model hasn't been indicated, try to
|
||||
* figure it out (USB only). Beware of "Directory Browse".
|
||||
*/
|
||||
if (strcmp (camera->abilities->model, "Directory Browse")) {
|
||||
if (strcasecmp (camera->abilities->model, "Directory Browse")) {
|
||||
if (!camera->port || !strcmp ("", camera->abilities->model)) {
|
||||
|
||||
/* Call auto-detect and choose the first camera */
|
||||
|
||||
Reference in New Issue
Block a user