EXIF library (libexif) Internals  0.6.24
exif-mnote-data-pentax.c File Reference
#include "config.h"
#include "exif-mnote-data-pentax.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <libexif/exif-byte-order.h>
#include <libexif/exif-utils.h>
Include dependency graph for exif-mnote-data-pentax.c:

Go to the source code of this file.

Macros

#define CHECKOVERFLOW(offset, datasize, structsize)   (( offset >= datasize) || (structsize > datasize) || (offset > datasize - structsize ))
 

Functions

static void exif_mnote_data_pentax_clear (ExifMnoteDataPentax *n)
 
static void exif_mnote_data_pentax_free (ExifMnoteData *n)
 
static char * exif_mnote_data_pentax_get_value (ExifMnoteData *d, unsigned int i, char *val, unsigned int maxlen)
 
static void exif_mnote_data_pentax_save (ExifMnoteData *ne, unsigned char **buf, unsigned int *buf_size)
 save the MnoteData from ne to buf More...
 
static void exif_mnote_data_pentax_load (ExifMnoteData *en, const unsigned char *buf, unsigned int buf_size)
 
static unsigned int exif_mnote_data_pentax_count (ExifMnoteData *n)
 
static unsigned int exif_mnote_data_pentax_get_id (ExifMnoteData *d, unsigned int n)
 
static const char * exif_mnote_data_pentax_get_name (ExifMnoteData *d, unsigned int n)
 
static const char * exif_mnote_data_pentax_get_title (ExifMnoteData *d, unsigned int n)
 
static const char * exif_mnote_data_pentax_get_description (ExifMnoteData *d, unsigned int n)
 
static void exif_mnote_data_pentax_set_offset (ExifMnoteData *d, unsigned int o)
 
static void exif_mnote_data_pentax_set_byte_order (ExifMnoteData *d, ExifByteOrder o)
 
int exif_mnote_data_pentax_identify (const ExifData *ed, const ExifEntry *e)
 Detect if MakerNote is recognized as one handled by the Pentax module. More...
 
ExifMnoteDataexif_mnote_data_pentax_new (ExifMem *mem)
 

Macro Definition Documentation

◆ CHECKOVERFLOW

#define CHECKOVERFLOW (   offset,
  datasize,
  structsize 
)    (( offset >= datasize) || (structsize > datasize) || (offset > datasize - structsize ))

Definition at line 31 of file exif-mnote-data-pentax.c.

Function Documentation

◆ exif_mnote_data_pentax_clear()

static void exif_mnote_data_pentax_clear ( ExifMnoteDataPentax n)
static

Definition at line 34 of file exif-mnote-data-pentax.c.

References _ExifMnoteDataPentax::count, _MnotePentaxEntry::data, _ExifMnoteDataPentax::entries, exif_mem_free(), and _ExifMnoteData::mem.

Referenced by exif_mnote_data_pentax_free(), and exif_mnote_data_pentax_load().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_count()

static unsigned int exif_mnote_data_pentax_count ( ExifMnoteData n)
static

Definition at line 352 of file exif-mnote-data-pentax.c.

Referenced by exif_mnote_data_pentax_new().

◆ exif_mnote_data_pentax_free()

static void exif_mnote_data_pentax_free ( ExifMnoteData n)
static

Definition at line 54 of file exif-mnote-data-pentax.c.

References exif_mnote_data_pentax_clear().

Referenced by exif_mnote_data_pentax_new().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_get_description()

static const char* exif_mnote_data_pentax_get_description ( ExifMnoteData d,
unsigned int  n 
)
static

Definition at line 388 of file exif-mnote-data-pentax.c.

References _ExifMnoteDataPentax::count, _ExifMnoteDataPentax::entries, mnote_pentax_tag_get_description(), and _MnotePentaxEntry::tag.

Referenced by exif_mnote_data_pentax_new().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_get_id()

static unsigned int exif_mnote_data_pentax_get_id ( ExifMnoteData d,
unsigned int  n 
)
static

◆ exif_mnote_data_pentax_get_name()

static const char* exif_mnote_data_pentax_get_name ( ExifMnoteData d,
unsigned int  n 
)
static

Definition at line 368 of file exif-mnote-data-pentax.c.

References _ExifMnoteDataPentax::count, _ExifMnoteDataPentax::entries, mnote_pentax_tag_get_name(), and _MnotePentaxEntry::tag.

Referenced by exif_mnote_data_pentax_new().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_get_title()

static const char* exif_mnote_data_pentax_get_title ( ExifMnoteData d,
unsigned int  n 
)
static

Definition at line 378 of file exif-mnote-data-pentax.c.

References _ExifMnoteDataPentax::count, _ExifMnoteDataPentax::entries, mnote_pentax_tag_get_title(), and _MnotePentaxEntry::tag.

Referenced by exif_mnote_data_pentax_new().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_get_value()

static char* exif_mnote_data_pentax_get_value ( ExifMnoteData d,
unsigned int  i,
char *  val,
unsigned int  maxlen 
)
static

Definition at line 62 of file exif-mnote-data-pentax.c.

References _ExifMnoteDataPentax::count, _ExifMnoteDataPentax::entries, and mnote_pentax_entry_get_value().

Referenced by exif_mnote_data_pentax_new().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_identify()

int exif_mnote_data_pentax_identify ( const ExifData ed,
const ExifEntry e 
)

Detect if MakerNote is recognized as one handled by the Pentax module.

Parameters
[in]edimage ExifData to identify as as a Pentax type
[in]eExifEntry for EXIF_TAG_MAKER_NOTE, from within ed but duplicated here for convenience
Returns
0 if not recognized, nonzero if recognized. The specific nonzero value returned may identify a subtype unique within this module.

Definition at line 424 of file exif-mnote-data-pentax.c.

References casioV2, _ExifEntry::data, pentaxV1, pentaxV2, pentaxV3, and _ExifEntry::size.

Referenced by interpret_maker_note().

◆ exif_mnote_data_pentax_load()

◆ exif_mnote_data_pentax_new()

◆ exif_mnote_data_pentax_save()

static void exif_mnote_data_pentax_save ( ExifMnoteData ne,
unsigned char **  buf,
unsigned int *  buf_size 
)
static

save the MnoteData from ne to buf

Parameters
neextract the data from this structure
*bufwrite the mnoteData to this buffer (buffer will be allocated)
buf_sizethe final size of the buffer

Definition at line 79 of file exif-mnote-data-pentax.c.

References casioV2, _MnotePentaxEntry::components, _ExifMnoteDataPentax::count, _MnotePentaxEntry::data, _ExifMnoteDataPentax::entries, EXIF_BYTE_ORDER_INTEL, exif_format_get_size(), exif_log(), EXIF_LOG_CODE_CORRUPT_DATA, EXIF_LOG_NO_MEMORY, exif_mem_alloc(), exif_mem_realloc(), exif_set_long(), exif_set_short(), _MnotePentaxEntry::format, _ExifMnoteData::log, _ExifMnoteData::mem, MNOTE_PENTAX2_TAG_BASE, _ExifMnoteDataPentax::offset, _ExifMnoteDataPentax::order, pentaxV1, pentaxV2, pentaxV3, _MnotePentaxEntry::tag, and _ExifMnoteDataPentax::version.

Referenced by exif_mnote_data_pentax_new().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_set_byte_order()

static void exif_mnote_data_pentax_set_byte_order ( ExifMnoteData d,
ExifByteOrder  o 
)
static

Definition at line 404 of file exif-mnote-data-pentax.c.

References _MnotePentaxEntry::components, _ExifMnoteDataPentax::count, _MnotePentaxEntry::data, _ExifMnoteDataPentax::entries, exif_array_set_byte_order(), exif_format_get_size(), _MnotePentaxEntry::format, _ExifMnoteDataPentax::order, _MnotePentaxEntry::order, and _MnotePentaxEntry::size.

Referenced by exif_mnote_data_pentax_new().

Here is the call graph for this function:

◆ exif_mnote_data_pentax_set_offset()

static void exif_mnote_data_pentax_set_offset ( ExifMnoteData d,
unsigned int  o 
)
static

Definition at line 398 of file exif-mnote-data-pentax.c.

Referenced by exif_mnote_data_pentax_new().


libexif Generated by doxygen