ReactOS  0.4.14-dev-297-g23e575c
tif_extension.c File Reference
#include <precomp.h>
Include dependency graph for tif_extension.c:

Go to the source code of this file.

Functions

int TIFFGetTagListCount (TIFF *tif)
 
uint32 TIFFGetTagListEntry (TIFF *tif, int tag_index)
 
TIFFTagMethodsTIFFAccessTagMethods (TIFF *tif)
 
voidTIFFGetClientInfo (TIFF *tif, const char *name)
 
void TIFFSetClientInfo (TIFF *tif, void *data, const char *name)
 

Function Documentation

◆ TIFFAccessTagMethods()

TIFFTagMethods* TIFFAccessTagMethods ( TIFF tif)

Definition at line 58 of file tif_extension.c.

60 {
61  return &(tif->tif_tagmethods);
62 }
TIFFTagMethods tif_tagmethods
Definition: tiffiop.h:203

◆ TIFFGetClientInfo()

void* TIFFGetClientInfo ( TIFF tif,
const char name 
)

Definition at line 64 of file tif_extension.c.

66 {
67  TIFFClientInfoLink *psLink = tif->tif_clientinfo;
68 
69  while( psLink != NULL && strcmp(psLink->name,name) != 0 )
70  psLink = psLink->next;
71 
72  if( psLink != NULL )
73  return psLink->data;
74  else
75  return NULL;
76 }
void * data
Definition: tiffiop.h:82
TIFFClientInfoLink * tif_clientinfo
Definition: tiffiop.h:204
char * name
Definition: tiffiop.h:83
smooth NULL
Definition: ftsmooth.c:416
struct client_info * next
Definition: tiffiop.h:81
Definition: name.c:36
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469

◆ TIFFGetTagListCount()

int TIFFGetTagListCount ( TIFF tif)

Definition at line 34 of file tif_extension.c.

36 {
37  TIFFDirectory* td = &tif->tif_dir;
38 
39  return td->td_customValueCount;
40 }
int td_customValueCount
Definition: tif_dir.h:119
TIFFDirectory tif_dir
Definition: tiffiop.h:135

Referenced by TIFFPrintDirectory().

◆ TIFFGetTagListEntry()

uint32 TIFFGetTagListEntry ( TIFF tif,
int  tag_index 
)

Definition at line 42 of file tif_extension.c.

44 {
45  TIFFDirectory* td = &tif->tif_dir;
46 
47  if( tag_index < 0 || tag_index >= td->td_customValueCount )
48  return (uint32)(-1);
49  else
50  return td->td_customValues[tag_index].info->field_tag;
51 }
unsigned int uint32
Definition: types.h:32
TIFFTagValue * td_customValues
Definition: tif_dir.h:120
int td_customValueCount
Definition: tif_dir.h:119
const TIFFField * info
Definition: tif_dir.h:36
uint32 field_tag
Definition: tif_dir.h:279
TIFFDirectory tif_dir
Definition: tiffiop.h:135

Referenced by TIFFPrintDirectory().

◆ TIFFSetClientInfo()

void TIFFSetClientInfo ( TIFF tif,
void data,
const char name 
)

Definition at line 78 of file tif_extension.c.

80 {
81  TIFFClientInfoLink *psLink = tif->tif_clientinfo;
82 
83  /*
84  ** Do we have an existing link with this name? If so, just
85  ** set it.
86  */
87  while( psLink != NULL && strcmp(psLink->name,name) != 0 )
88  psLink = psLink->next;
89 
90  if( psLink != NULL )
91  {
92  psLink->data = data;
93  return;
94  }
95 
96  /*
97  ** Create a new link.
98  */
99 
100  psLink = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
101  assert (psLink != NULL);
102  psLink->next = tif->tif_clientinfo;
103  psLink->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1));
104  assert (psLink->name != NULL);
105  strcpy(psLink->name, name);
106  psLink->data = data;
107 
108  tif->tif_clientinfo = psLink;
109 }
void * data
Definition: tiffiop.h:82
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
TIFFClientInfoLink * tif_clientinfo
Definition: tiffiop.h:204
#define assert(x)
Definition: debug.h:53
char * name
Definition: tiffiop.h:83
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
smooth NULL
Definition: ftsmooth.c:416
void * _TIFFmalloc(tmsize_t s)
Definition: tif_unix.c:309
struct client_info * next
Definition: tiffiop.h:81
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: name.c:36
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469