Added TIFFArraySize macro.
This commit is contained in:
parent
01d4598d03
commit
efffb31a79
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_luv.c,v 1.13 2004-10-12 18:50:48 dron Exp $ */
|
||||
/* $Id: tif_luv.c,v 1.14 2005-12-09 12:58:08 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Greg Ward Larson
|
||||
@ -173,7 +173,6 @@ struct logLuvState {
|
||||
#define DecoderState(tif) ((LogLuvState*) (tif)->tif_data)
|
||||
#define EncoderState(tif) ((LogLuvState*) (tif)->tif_data)
|
||||
|
||||
#define N(a) (sizeof(a)/sizeof(a[0]))
|
||||
#define SGILOGDATAFMT_UNKNOWN -1
|
||||
|
||||
#define MINRUN 4 /* minimum run length */
|
||||
@ -1584,7 +1583,8 @@ TIFFInitSGILog(TIFF* tif, int scheme)
|
||||
tif->tif_cleanup = LogLuvCleanup;
|
||||
|
||||
/* override SetField so we can handle our private pseudo-tag */
|
||||
_TIFFMergeFieldInfo(tif, LogLuvFieldInfo, N(LogLuvFieldInfo));
|
||||
_TIFFMergeFieldInfo(tif, LogLuvFieldInfo,
|
||||
TIFFArraySize(LogLuvFieldInfo));
|
||||
sp->vgetparent = tif->tif_tagmethods.vgetfield;
|
||||
tif->tif_tagmethods.vgetfield = LogLuvVGetField; /* hook for codec tags */
|
||||
sp->vsetparent = tif->tif_tagmethods.vsetfield;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tiffiop.h,v 1.41 2005-11-03 18:22:58 fwarmerdam Exp $ */
|
||||
/* $Id: tiffiop.h,v 1.42 2005-12-09 12:58:08 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -229,6 +229,8 @@ struct tiff {
|
||||
#define TIFFmax(A,B) ((A)>(B)?(A):(B))
|
||||
#define TIFFmin(A,B) ((A)<(B)?(A):(B))
|
||||
|
||||
#define TIFFArraySize(a) (sizeof (a) / sizeof ((a)[0]))
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user