libextractor  1.11
About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.
  Fossies Dox: libextractor-1.11.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dvi_extractor.c File Reference

plugin to support DVI files (from LaTeX) More...

#include "platform.h"
#include "extractor.h"
Include dependency graph for dvi_extractor.c:

Go to the source code of this file.

Data Structures

struct  Matches
 

Functions

static int parseZZZ (const char *data, size_t pos, size_t len, EXTRACTOR_MetaDataProcessor proc, void *proc_cls)
 
static uint32_t getIntAt (const void *data)
 
static uint16_t getShortAt (const void *data)
 
void EXTRACTOR_dvi_extract_method (struct EXTRACTOR_ExtractContext *ec)
 

Variables

static struct Matches tmap []
 

Detailed Description

plugin to support DVI files (from LaTeX)

Author
Christian Grothoff

Definition in file dvi_extractor.c.

Function Documentation

◆ EXTRACTOR_dvi_extract_method()

void EXTRACTOR_dvi_extract_method ( struct EXTRACTOR_ExtractContext ec)

◆ getIntAt()

static uint32_t getIntAt ( const void *  data)
static

Read 32-bit unsigned integer in big-endian format from 'data'.

Parameters
datapointer to integer (possibly unaligned)
Returns
32-bit integer in host byte order

Definition at line 130 of file dvi_extractor.c.

Referenced by EXTRACTOR_dvi_extract_method().

◆ getShortAt()

static uint16_t getShortAt ( const void *  data)
static

Read 16-bit unsigned integer in big-endian format from 'data'.

Parameters
datapointer to integer (possibly unaligned)
Returns
16-bit integer in host byte order

Definition at line 146 of file dvi_extractor.c.

Referenced by EXTRACTOR_dvi_extract_method().

◆ parseZZZ()

static int parseZZZ ( const char *  data,
size_t  pos,
size_t  len,
EXTRACTOR_MetaDataProcessor  proc,
void *  proc_cls 
)
static

Parse a "ZZZ" tag. Specifically, the data may contain a postscript dictionary with metadata.

Parameters
dataoverall input stream
poswhere in data is the zzz data
lenhow many bytes from 'pos' does the zzz data extend?
procfunction to call with meta data found
proc_clsclosure for proc
Returns
0 to continue to extract, 1 to stop

Definition at line 72 of file dvi_extractor.c.

References EXTRACTOR_METAFORMAT_C_STRING, NULL, Matches::text, tmap, and type.

Referenced by EXTRACTOR_dvi_extract_method().

Variable Documentation

◆ tmap

struct Matches tmap[]
static
Initial value:
= {
{ "/Title (", EXTRACTOR_METATYPE_TITLE },
{ "/Subject (", EXTRACTOR_METATYPE_SUBJECT },
{ "/Keywords (", EXTRACTOR_METATYPE_KEYWORDS },
{ NULL, 0 }
}
#define NULL
Definition: getopt1.c:60
@ EXTRACTOR_METATYPE_PRODUCED_BY_SOFTWARE
Definition: extractor.h:258
@ EXTRACTOR_METATYPE_AUTHOR_NAME
Definition: extractor.h:143
@ EXTRACTOR_METATYPE_TITLE
Definition: extractor.h:134
@ EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE
Definition: extractor.h:194
@ EXTRACTOR_METATYPE_KEYWORDS
Definition: extractor.h:185
@ EXTRACTOR_METATYPE_SUBJECT
Definition: extractor.h:188

Map from PS names to LE types.

Definition at line 1 of file dvi_extractor.c.

Referenced by parseZZZ().