From 8d35aaad64283408c7db10e8249f78f30a8853fb Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Fri, 28 Jun 2002 12:43:20 +0000 Subject: =?UTF-8?q?2002-06-28=20=20Lutz=20M=EF=BF=BDller=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * sierra.h: * library.[c,h]: * sierra-desc.[c,h]: Fix includes. * sierra.c: Remove cruft. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@4786 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/sierra/ChangeLog | 7 ++++++ camlibs/sierra/library.c | 19 +++++++++++++++++ camlibs/sierra/library.h | 21 ------------------ camlibs/sierra/sierra-desc.c | 26 +++++++++++++++++++--- camlibs/sierra/sierra-desc.h | 5 +++++ camlibs/sierra/sierra.c | 51 ++++++++++++++++++-------------------------- 6 files changed, 75 insertions(+), 54 deletions(-) (limited to 'camlibs') diff --git a/camlibs/sierra/ChangeLog b/camlibs/sierra/ChangeLog index d1e160a50..08ebedc34 100644 --- a/camlibs/sierra/ChangeLog +++ b/camlibs/sierra/ChangeLog @@ -1,3 +1,10 @@ +2002-06-28 Lutz Müller + + * sierra.h: + * library.[c,h]: + * sierra-desc.[c,h]: Fix includes. + * sierra.c: Remove cruft. + 2002-06-28 Selmeczi David * olympus-desc.c: New. diff --git a/camlibs/sierra/library.c b/camlibs/sierra/library.c index 2f63034f3..e22e14b22 100644 --- a/camlibs/sierra/library.c +++ b/camlibs/sierra/library.c @@ -33,6 +33,25 @@ #define GP_MODULE "sierra" +#ifdef ENABLE_NLS +# include +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + typedef enum _SierraPacket SierraPacket; enum _SierraPacket { NUL = 0x00, diff --git a/camlibs/sierra/library.h b/camlibs/sierra/library.h index 68b176a93..496cce212 100644 --- a/camlibs/sierra/library.h +++ b/camlibs/sierra/library.h @@ -23,27 +23,6 @@ #include -#ifdef ENABLE_NLS -# include -# undef _ -# define _(String) dgettext (PACKAGE, String) -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) -# define _(String) (String) -# define N_(String) (String) -#endif - -#define GP_MODULE "sierra" - #define TIMEOUT 2000 #define CHECK_STOP(camera,result) \ diff --git a/camlibs/sierra/sierra-desc.c b/camlibs/sierra/sierra-desc.c index d2d51b025..4e2ce9fb4 100644 --- a/camlibs/sierra/sierra-desc.c +++ b/camlibs/sierra/sierra-desc.c @@ -18,23 +18,43 @@ * Boston, MA 02111-1307, USA. */ #include -#include -#include "sierra.h" #include #include #include + /* XXX hack hack how do we define this via gcc? For use with round() */ #define __USE_ISOC99 1 #include -#include #include #include +#include "sierra.h" #include "sierra-desc.h" #include "library.h" +#ifdef ENABLE_NLS +# include +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + +#define GP_MODULE "sierra" + static int camera_cam_desc_get_value (ValueNameType *val_name_p, CameraWidgetType widge, u_int32_t reg_len, void *buff, int mask, diff --git a/camlibs/sierra/sierra-desc.h b/camlibs/sierra/sierra-desc.h index 7ea5309bd..9c0616f56 100644 --- a/camlibs/sierra/sierra-desc.h +++ b/camlibs/sierra/sierra-desc.h @@ -35,6 +35,9 @@ * description (string). */ +#ifndef __SIERRA_DESC_H__ +#define __SIERRA_DESC_H__ + #define SIZE_ADDR(type, var) (sizeof(var)/sizeof(type)), (type*) var #define VAL_NAME_INIT(name) \ @@ -123,3 +126,5 @@ typedef struct CameraRegisterSet { extern const CameraRegisterSetType cp880_desc[]; extern const CameraRegisterSetType oly3040_desc[]; + +#endif /* __SIERRA_DESC_H__ */ diff --git a/camlibs/sierra/sierra.c b/camlibs/sierra/sierra.c index d346f4947..0dec14549 100644 --- a/camlibs/sierra/sierra.c +++ b/camlibs/sierra/sierra.c @@ -25,23 +25,33 @@ #include #include -/* - * Per Gilles' request, EXIF support disabled for now. - */ -#ifdef HAVE_EXIF -#undef HAVE_EXIF -#endif - -#ifdef HAVE_EXIF -#include -#endif - #include #include #include "sierra-desc.h" #include "library.h" +#ifdef ENABLE_NLS +# include +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + +#define GP_MODULE "sierra" + int get_jpeg_data(const char *data, int data_size, char **jpeg_data, int *jpeg_size); /* Useful markers */ @@ -399,11 +409,6 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, const char *data, *mime_type; long int size; SierraPicInfo info; -#ifdef HAVE_EXIF - ExifData *exif_data; - unsigned char *buf = NULL; - unsigned int buf_len = 0; -#endif /* * Get the file number from the CameraFileSystem. @@ -485,20 +490,6 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, CHECK (gp_file_set_mime_type (file, GP_MIME_WAV)); break; -#ifdef HAVE_EXIF - case GP_FILE_TYPE_EXIF: - CHECK (gp_file_set_mime_type (file, GP_MIME_JPEG)); - - exif_data = exif_data_new_from_data ( - (const unsigned char *) data, - (unsigned int) size); - - exif_data_save_data (exif_data, &buf, &buf_len); - exif_data_unref (exif_data); - gp_file_set_data_and_size (file, buf, buf_len); - break; -#endif - default: return (GP_ERROR_NOT_SUPPORTED); } -- cgit v1.2.1