EXIF library (libexif) Internals  0.6.24
mnote-canon-entry.c File Reference
#include "config.h"
#include "mnote-canon-entry.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <libexif/exif-format.h>
#include <libexif/exif-utils.h>
#include <libexif/i18n.h>
Include dependency graph for mnote-canon-entry.c:

Go to the source code of this file.

Data Structures

struct  canon_entry_table_t
 

Macros

#define CF(format, target, v, maxlen)
 
#define CC(number, target, v, maxlen)
 
#define CC2(number, t1, t2, v, maxlen)
 
#define UNDEFINED   0xFF
 

Functions

static void canon_search_table_value (const struct canon_entry_table_t table[], unsigned int t, ExifShort vs, char *val, unsigned int maxlen)
 
static void canon_search_table_bitfield (const struct canon_entry_table_t table[], unsigned int t, ExifShort vs, char *val, unsigned int maxlen)
 
unsigned int mnote_canon_entry_count_values (const MnoteCanonEntry *entry)
 
static double apex_value_to_aperture (double x)
 
static double apex_value_to_shutter_speed (double x)
 
static double apex_value_to_iso_speed (double x)
 
char * mnote_canon_entry_get_value (const MnoteCanonEntry *entry, unsigned int t, char *val, unsigned int maxlen)
 

Variables

static const struct canon_entry_table_t entries_settings_1 []
 
static const struct canon_entry_table_t entries_focal_length []
 
static const struct canon_entry_table_t entries_settings_2 []
 
static const struct canon_entry_table_t entries_panorama []
 
static const struct canon_entry_table_t color_information []
 

Macro Definition Documentation

◆ CC

#define CC (   number,
  target,
  v,
  maxlen 
)
Value:
{ \
if (number != target) { \
snprintf (v, maxlen, \
_("Invalid number of components (%i, " \
"expected %i)."), (int) number, (int) target); \
break; \
} \
}
#define _(String)
Definition: i18n.h:48

Definition at line 46 of file mnote-canon-entry.c.

◆ CC2

#define CC2 (   number,
  t1,
  t2,
  v,
  maxlen 
)
Value:
{ \
if ((number != t1) && (number != t2)) { \
snprintf (v, maxlen, \
_("Invalid number of components (%i, " \
"expected %i or %i)."), (int) number, \
(int) t1, (int) t2); \
break; \
} \
}

Definition at line 55 of file mnote-canon-entry.c.

◆ CF

#define CF (   format,
  target,
  v,
  maxlen 
)
Value:
{ \
if (format != target) { \
snprintf (v, maxlen, \
_("Invalid format '%s', " \
"expected '%s'."), \
exif_format_get_name (target)); \
break; \
} \
}
const char * exif_format_get_name(ExifFormat format)
Return a textual representation of the given EXIF data type.
Definition: exif-format.c:53
ExifFormat format
Definition: exif-format.c:33

Definition at line 34 of file mnote-canon-entry.c.

◆ UNDEFINED

#define UNDEFINED   0xFF

Definition at line 66 of file mnote-canon-entry.c.

Function Documentation

◆ apex_value_to_aperture()

static double apex_value_to_aperture ( double  x)
static

Definition at line 531 of file mnote-canon-entry.c.

Referenced by mnote_canon_entry_get_value().

◆ apex_value_to_iso_speed()

static double apex_value_to_iso_speed ( double  x)
static

Definition at line 543 of file mnote-canon-entry.c.

Referenced by mnote_canon_entry_get_value().

◆ apex_value_to_shutter_speed()

static double apex_value_to_shutter_speed ( double  x)
static

Definition at line 537 of file mnote-canon-entry.c.

Referenced by mnote_canon_entry_get_value().

◆ canon_search_table_bitfield()

static void canon_search_table_bitfield ( const struct canon_entry_table_t  table[],
unsigned int  t,
ExifShort  vs,
char *  val,
unsigned int  maxlen 
)
static

Definition at line 462 of file mnote-canon-entry.c.

References _, name, subtag, and table.

Referenced by mnote_canon_entry_get_value().

◆ canon_search_table_value()

static void canon_search_table_value ( const struct canon_entry_table_t  table[],
unsigned int  t,
ExifShort  vs,
char *  val,
unsigned int  maxlen 
)
static

Definition at line 440 of file mnote-canon-entry.c.

References _, name, subtag, and table.

Referenced by mnote_canon_entry_get_value().

◆ mnote_canon_entry_count_values()

◆ mnote_canon_entry_get_value()

Variable Documentation

◆ color_information

const struct canon_entry_table_t color_information[]
static

◆ entries_focal_length

const struct canon_entry_table_t entries_focal_length[]
static
Initial value:
= {
{0, 1, N_("Fixed")},
{0, 2, N_("Zoom")},
{0, 0, NULL}
}
#define N_(String)
Definition: i18n.h:49

Referenced by mnote_canon_entry_get_value().

◆ entries_panorama

const struct canon_entry_table_t entries_panorama[]
static
Initial value:
= {
{0, 0, N_("Left to right")},
{0, 1, N_("Right to left")},
{0, 2, N_("Bottom to top")},
{0, 3, N_("Top to bottom")},
{0, 4, N_("2x2 matrix (clockwise)")},
{0, 0, NULL}
}

Referenced by mnote_canon_entry_get_value().

◆ entries_settings_1

const struct canon_entry_table_t entries_settings_1[]
static

◆ entries_settings_2

const struct canon_entry_table_t entries_settings_2[]
static

libexif Generated by doxygen