ReactOS 0.4.16-dev-2574-g474348f
tif_extension.c File Reference
#include "tiffiop.h"
Include dependency graph for tif_extension.c:

Go to the source code of this file.

Functions

int TIFFGetTagListCount (TIFF *tif)
 
uint32_t 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:244

◆ TIFFGetClientInfo()

void * TIFFGetClientInfo ( TIFF tif,
const char name 
)

Definition at line 64 of file tif_extension.c.

66{
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}
#define NULL
Definition: types.h:112
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3319
void * data
Definition: tiffiop.h:77
struct client_info * next
Definition: tiffiop.h:76
char * name
Definition: tiffiop.h:78
Definition: name.c:39
TIFFClientInfoLink * tif_clientinfo
Definition: tiffiop.h:245

◆ 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:142
TIFFDirectory tif_dir
Definition: tiffiop.h:157

Referenced by TIFFPrintDirectory().

◆ TIFFGetTagListEntry()

uint32_t 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_t)(-1);
49 else
50 return td->td_customValues[tag_index].info->field_tag;
51}
UINT32 uint32_t
Definition: types.h:75
TIFFTagValue * td_customValues
Definition: tif_dir.h:143
const TIFFField * info
Definition: tif_dir.h:37
uint32_t field_tag
Definition: tif_dir.h:332

Referenced by TIFFPrintDirectory().

◆ TIFFSetClientInfo()

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

Definition at line 78 of file tif_extension.c.

80{
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 =
102 assert(psLink != NULL);
103 psLink->next = tif->tif_clientinfo;
104 psLink->name = (char *)_TIFFmallocExt(tif, (tmsize_t)(strlen(name) + 1));
105 assert(psLink->name != NULL);
106 strcpy(psLink->name, name);
107 psLink->data = data;
108
109 tif->tif_clientinfo = psLink;
110}
#define assert(_expr)
Definition: assert.h:32
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
strcpy
Definition: string.h:131
void * _TIFFmallocExt(TIFF *tif, tmsize_t s)
Definition: tif_open.c:173
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:67