2002-02-02 Lutz M�ller <lutz@users.sourceforge.net>
* frontends/command-line: Let --show-exif accept image numbers, too. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@4067 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2002-02-02 Lutz Müller <lutz@users.sourceforge.net>
|
||||
|
||||
* frontends/command-line: Let --show-exif accept image numbers, too.
|
||||
|
||||
2002-02-01 Lutz Müller <lutz@users.sourceforge.net>
|
||||
|
||||
* frontends/command-line/gphoto2-cmd-exif.[c,h]: New
|
||||
|
||||
@@ -200,7 +200,7 @@ get_path_for_id_rec (const char *base_folder, unsigned int id,
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
get_path_for_id (const char *base_folder, unsigned char recurse,
|
||||
unsigned int id, const char **folder, const char **filename)
|
||||
{
|
||||
|
||||
@@ -30,4 +30,8 @@ int for_each_image (const char *folder, image_action iaction,
|
||||
int for_each_image_in_range (const char *folder, unsigned char recurse,
|
||||
char *range, image_action action, int reverse);
|
||||
|
||||
int get_path_for_id (const char *base_folder, unsigned char recurse,
|
||||
unsigned int id, const char **folder,
|
||||
const char **filename);
|
||||
|
||||
#endif /* __FOREACH_H__ */
|
||||
|
||||
@@ -20,10 +20,14 @@
|
||||
#include <config.h>
|
||||
#include "gphoto2-cmd-exif.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libexif/exif-data.h>
|
||||
|
||||
#include "foreach.h"
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# undef _
|
||||
@@ -84,10 +88,9 @@ gp_cmd_exif (Camera *camera, const char *folder, const char *filename,
|
||||
ExifData *ed;
|
||||
|
||||
/* Did the user specify a number? */
|
||||
if (!strchr (filename, '.')) {
|
||||
gp_context_error (context, _("Please specify a filename."));
|
||||
return (GP_ERROR);
|
||||
}
|
||||
if (!strchr (filename, '.'))
|
||||
CR (get_path_for_id (folder, 1, atoi (filename) - 1, &folder,
|
||||
&filename));
|
||||
|
||||
CR (gp_file_new (&file));
|
||||
CRU (gp_camera_file_get (camera, folder, filename, GP_FILE_TYPE_EXIF,
|
||||
|
||||
Reference in New Issue
Block a user