7780507c6c8ed1a10dfced18e986a09c78944a81
[platform/upstream/libexif.git] / libexif / exif-byte-order.c
1 /* exif-byte-order.c
2  *
3  * Copyright (C) 2002 Lutz Müller <lutz@users.sourceforge.net>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, 
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details. 
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 #include <config.h>
21 #include "exif-byte-order.h"
22
23 #include <stdlib.h>
24
25 #ifdef ENABLE_NLS
26 #  include <libintl.h>
27 #  undef _
28 #  define _(String) dgettext (GETTEXT_PACKAGE, String)
29 #  ifdef gettext_noop
30 #    define N_(String) gettext_noop (String)
31 #  else
32 #    define N_(String) (String)
33 #  endif
34 #else
35 #  define textdomain(String) (String)
36 #  define gettext(String) (String)
37 #  define dgettext(Domain,Message) (Message)
38 #  define dcgettext(Domain,Message,Type) (Message)
39 #  define bindtextdomain(Domain,Directory) (Domain)
40 #  define _(String) (String)
41 #  define N_(String) (String)
42 #endif
43
44 const char *
45 exif_byte_order_get_name (ExifByteOrder order)
46 {
47         switch (order) {
48         case EXIF_BYTE_ORDER_MOTOROLA:
49                 return (_("Motorola"));
50         case EXIF_BYTE_ORDER_INTEL:
51                 return (_("Intel"));
52         default:
53                 return NULL;
54         }
55 }