ReactOS 0.4.15-dev-7953-g1f49173
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:219

◆ 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}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define NULL
Definition: types.h:112
void * data
Definition: tiffiop.h:95
struct client_info * next
Definition: tiffiop.h:94
char * name
Definition: tiffiop.h:96
Definition: name.c:39
TIFFClientInfoLink * tif_clientinfo
Definition: tiffiop.h:220

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

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:122
const TIFFField * info
Definition: tif_dir.h:36
uint32 field_tag
Definition: tif_dir.h:283

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
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}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define assert(x)
Definition: debug.h:53
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
void * _TIFFmalloc(tmsize_t s)
Definition: tif_unix.c:309
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65