w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cmscgats.c File Reference
#include "lcms2_internal.h"
Include dependency graph for cmscgats.c:

Go to the source code of this file.

Classes

struct  _KeyVal
 
struct  _OwnedMem
 
struct  _SubAllocator
 
struct  _Table
 
struct  _FileContext
 
struct  cmsIT8
 
struct  SAVESTREAM
 
struct  KEYWORD
 
struct  PROPERTY
 

Macros

#define MAXID   128
 
#define MAXSTR   1024
 
#define MAXTABLES   255
 
#define MAXINCLUDE   20
 
#define DEFAULT_DBL_FORMAT   "%.10g"
 
#define DIR_CHAR   '/'
 
#define NUMKEYS   (sizeof(TabKeys)/sizeof(KEYWORD))
 
#define NUMPREDEFINEDPROPS   (sizeof(PredefinedProperties)/sizeof(PROPERTY))
 
#define NUMPREDEFINEDSAMPLEID   (sizeof(PredefinedSampleID)/sizeof(char *))
 

Typedefs

typedef struct _KeyVal KEYVALUE
 
typedef struct _OwnedMem OWNEDMEM
 
typedef struct _SubAllocator SUBALLOCATOR
 
typedef struct _Table TABLE
 
typedef struct _FileContext FILECTX
 

Enumerations

enum  SYMBOL {
  SUNDEFINED , SINUM , SDNUM , SIDENT ,
  SSTRING , SCOMMENT , SEOLN , SEOF ,
  SSYNERROR , SBEGIN_DATA , SBEGIN_DATA_FORMAT , SEND_DATA ,
  SEND_DATA_FORMAT , SKEYWORD , SDATA_FORMAT_ID , SINCLUDE
}
 
enum  WRITEMODE {
  WRITE_UNCOOKED , WRITE_STRINGIFY , WRITE_HEXADECIMAL , WRITE_BINARY ,
  WRITE_PAIR
}
 

Functions

static voidAllocChunk (cmsIT8 *it8, cmsUInt32Number size)
 
static cmsBool isseparator (int c)
 
static cmsBool ismiddle (int c)
 
static cmsBool isidchar (int c)
 
static cmsBool isfirstidchar (int c)
 
static cmsBool isabsolutepath (const char *path)
 
static cmsBool BuildAbsolutePath (const char *relPath, const char *basePath, char *buffer, cmsUInt32Number MaxLen)
 
static const char * NoMeta (const char *str)
 
static cmsBool SynError (cmsIT8 *it8, const char *Txt,...)
 
static cmsBool Check (cmsIT8 *it8, SYMBOL sy, const char *Err)
 
static void NextCh (cmsIT8 *it8)
 
static SYMBOL BinSrchKey (const char *id)
 
static cmsFloat64Number xpow10 (int n)
 
static void ReadReal (cmsIT8 *it8, cmsInt32Number inum)
 
static cmsFloat64Number ParseFloatNumber (const char *Buffer)
 
static void InSymbol (cmsIT8 *it8)
 
static cmsBool CheckEOLN (cmsIT8 *it8)
 
static void Skip (cmsIT8 *it8, SYMBOL sy)
 
static void SkipEOLN (cmsIT8 *it8)
 
static cmsBool GetVal (cmsIT8 *it8, char *Buffer, cmsUInt32Number max, const char *ErrorTitle)
 
static TABLEGetTable (cmsIT8 *it8)
 
void cmsIT8Free (cmsHANDLE hIT8)
 
static voidAllocBigBlock (cmsIT8 *it8, cmsUInt32Number size)
 
static char * AllocString (cmsIT8 *it8, const char *str)
 
static cmsBool IsAvailableOnList (KEYVALUE *p, const char *Key, const char *Subkey, KEYVALUE **LastPtr)
 
static KEYVALUEAddToList (cmsIT8 *it8, KEYVALUE **Head, const char *Key, const char *Subkey, const char *xValue, WRITEMODE WriteAs)
 
static KEYVALUEAddAvailableProperty (cmsIT8 *it8, const char *Key, WRITEMODE as)
 
static KEYVALUEAddAvailableSampleID (cmsIT8 *it8, const char *Key)
 
static void AllocTable (cmsIT8 *it8)
 
cmsInt32Number cmsIT8SetTable (cmsHANDLE IT8, cmsUInt32Number nTable)
 
cmsHANDLE cmsIT8Alloc (cmsContext ContextID)
 
const char * cmsIT8GetSheetType (cmsHANDLE hIT8)
 
cmsBool cmsIT8SetSheetType (cmsHANDLE hIT8, const char *Type)
 
cmsBool cmsIT8SetComment (cmsHANDLE hIT8, const char *Val)
 
cmsBool cmsIT8SetPropertyStr (cmsHANDLE hIT8, const char *Key, const char *Val)
 
cmsBool cmsIT8SetPropertyDbl (cmsHANDLE hIT8, const char *cProp, cmsFloat64Number Val)
 
cmsBool cmsIT8SetPropertyHex (cmsHANDLE hIT8, const char *cProp, cmsUInt32Number Val)
 
cmsBool cmsIT8SetPropertyUncooked (cmsHANDLE hIT8, const char *Key, const char *Buffer)
 
cmsBool cmsIT8SetPropertyMulti (cmsHANDLE hIT8, const char *Key, const char *SubKey, const char *Buffer)
 
const char * cmsIT8GetProperty (cmsHANDLE hIT8, const char *Key)
 
cmsFloat64Number cmsIT8GetPropertyDbl (cmsHANDLE hIT8, const char *cProp)
 
const char * cmsIT8GetPropertyMulti (cmsHANDLE hIT8, const char *Key, const char *SubKey)
 
static void AllocateDataFormat (cmsIT8 *it8)
 
static const char * GetDataFormat (cmsIT8 *it8, int n)
 
static cmsBool SetDataFormat (cmsIT8 *it8, int n, const char *label)
 
cmsBool cmsIT8SetDataFormat (cmsHANDLE h, int n, const char *Sample)
 
static void AllocateDataSet (cmsIT8 *it8)
 
static char * GetData (cmsIT8 *it8, int nSet, int nField)
 
static cmsBool SetData (cmsIT8 *it8, int nSet, int nField, const char *Val)
 
static void WriteStr (SAVESTREAM *f, const char *str)
 
static void Writef (SAVESTREAM *f, const char *frm,...)
 
static void WriteHeader (cmsIT8 *it8, SAVESTREAM *fp)
 
static void WriteDataFormat (SAVESTREAM *fp, cmsIT8 *it8)
 
static void WriteData (SAVESTREAM *fp, cmsIT8 *it8)
 
cmsBool cmsIT8SaveToFile (cmsHANDLE hIT8, const char *cFileName)
 
cmsBool cmsIT8SaveToMem (cmsHANDLE hIT8, void *MemPtr, cmsUInt32Number *BytesNeeded)
 
static cmsBool DataFormatSection (cmsIT8 *it8)
 
static cmsBool DataSection (cmsIT8 *it8)
 
static cmsBool HeaderSection (cmsIT8 *it8)
 
static void ReadType (cmsIT8 *it8, char *SheetTypePtr)
 
static cmsBool ParseIT8 (cmsIT8 *it8, cmsBool nosheet)
 
static void CookPointers (cmsIT8 *it8)
 
static int IsMyBlock (const cmsUInt8Number *Buffer, cmsUInt32Number n)
 
static cmsBool IsMyFile (const char *FileName)
 
cmsHANDLE cmsIT8LoadFromMem (cmsContext ContextID, const void *Ptr, cmsUInt32Number len)
 
cmsHANDLE cmsIT8LoadFromFile (cmsContext ContextID, const char *cFileName)
 
int cmsIT8EnumDataFormat (cmsHANDLE hIT8, char ***SampleNames)
 
cmsUInt32Number cmsIT8EnumProperties (cmsHANDLE hIT8, char ***PropertyNames)
 
cmsUInt32Number cmsIT8EnumPropertyMulti (cmsHANDLE hIT8, const char *cProp, const char ***SubpropertyNames)
 
static int LocatePatch (cmsIT8 *it8, const char *cPatch)
 
static int LocateEmptyPatch (cmsIT8 *it8)
 
static int LocateSample (cmsIT8 *it8, const char *cSample)
 
int cmsIT8FindDataFormat (cmsHANDLE hIT8, const char *cSample)
 
const char * cmsIT8GetDataRowCol (cmsHANDLE hIT8, int row, int col)
 
cmsFloat64Number cmsIT8GetDataRowColDbl (cmsHANDLE hIT8, int row, int col)
 
cmsBool cmsIT8SetDataRowCol (cmsHANDLE hIT8, int row, int col, const char *Val)
 
cmsBool cmsIT8SetDataRowColDbl (cmsHANDLE hIT8, int row, int col, cmsFloat64Number Val)
 
const char * cmsIT8GetData (cmsHANDLE hIT8, const char *cPatch, const char *cSample)
 
cmsFloat64Number cmsIT8GetDataDbl (cmsHANDLE it8, const char *cPatch, const char *cSample)
 
cmsBool cmsIT8SetData (cmsHANDLE hIT8, const char *cPatch, const char *cSample, const char *Val)
 
cmsBool cmsIT8SetDataDbl (cmsHANDLE hIT8, const char *cPatch, const char *cSample, cmsFloat64Number Val)
 
const char * cmsIT8GetPatchName (cmsHANDLE hIT8, int nPatch, char *buffer)
 
int cmsIT8GetPatchByName (cmsHANDLE hIT8, const char *cPatch)
 
cmsUInt32Number cmsIT8TableCount (cmsHANDLE hIT8)
 
int cmsIT8SetTableByLabel (cmsHANDLE hIT8, const char *cSet, const char *cField, const char *ExpectedType)
 
cmsBool cmsIT8SetIndexColumn (cmsHANDLE hIT8, const char *cSample)
 
void cmsIT8DefineDblFormat (cmsHANDLE hIT8, const char *Formatter)
 

Variables

static const KEYWORD TabKeys []
 
static PROPERTY PredefinedProperties []
 
static const char * PredefinedSampleID []
 

Macro Definition Documentation

◆ DEFAULT_DBL_FORMAT

#define DEFAULT_DBL_FORMAT   "%.10g"

Definition at line 38 of file cmscgats.c.

◆ DIR_CHAR

#define DIR_CHAR   '/'

Definition at line 44 of file cmscgats.c.

◆ MAXID

#define MAXID   128

Definition at line 33 of file cmscgats.c.

◆ MAXINCLUDE

#define MAXINCLUDE   20

Definition at line 36 of file cmscgats.c.

◆ MAXSTR

#define MAXSTR   1024

Definition at line 34 of file cmscgats.c.

◆ MAXTABLES

#define MAXTABLES   255

Definition at line 35 of file cmscgats.c.

◆ NUMKEYS

#define NUMKEYS   (sizeof(TabKeys)/sizeof(KEYWORD))

Definition at line 216 of file cmscgats.c.

◆ NUMPREDEFINEDPROPS

#define NUMPREDEFINEDPROPS   (sizeof(PredefinedProperties)/sizeof(PROPERTY))

Definition at line 300 of file cmscgats.c.

◆ NUMPREDEFINEDSAMPLEID

#define NUMPREDEFINEDSAMPLEID   (sizeof(PredefinedSampleID)/sizeof(char *))

Definition at line 352 of file cmscgats.c.

Typedef Documentation

◆ FILECTX

typedef struct _FileContext FILECTX

◆ KEYVALUE

typedef struct _KeyVal KEYVALUE

◆ OWNEDMEM

typedef struct _OwnedMem OWNEDMEM

◆ SUBALLOCATOR

typedef struct _SubAllocator SUBALLOCATOR

◆ TABLE

typedef struct _Table TABLE

Enumeration Type Documentation

◆ SYMBOL

enum SYMBOL
Enumerator
SUNDEFINED 
SINUM 
SDNUM 
SIDENT 
SSTRING 
SCOMMENT 
SEOLN 
SEOF 
SSYNERROR 
SBEGIN_DATA 
SBEGIN_DATA_FORMAT 
SEND_DATA 
SEND_DATA_FORMAT 
SKEYWORD 
SDATA_FORMAT_ID 
SINCLUDE 

Definition at line 49 of file cmscgats.c.

◆ WRITEMODE

enum WRITEMODE
Enumerator
WRITE_UNCOOKED 
WRITE_STRINGIFY 
WRITE_HEXADECIMAL 
WRITE_BINARY 
WRITE_PAIR 

Definition at line 75 of file cmscgats.c.

Function Documentation

◆ AddAvailableProperty()

static KEYVALUE* AddAvailableProperty ( cmsIT8 it8,
const char *  Key,
WRITEMODE  as 
)
static

Definition at line 1231 of file cmscgats.c.

References AddToList(), as, Key, NULL, and cmsIT8::ValidKeywords.

Referenced by cmsIT8Alloc(), HeaderSection(), and WriteHeader().

◆ AddAvailableSampleID()

static KEYVALUE* AddAvailableSampleID ( cmsIT8 it8,
const char *  Key 
)
static

Definition at line 1238 of file cmscgats.c.

References AddToList(), Key, NULL, cmsIT8::ValidSampleID, and WRITE_UNCOOKED.

Referenced by cmsIT8Alloc(), and HeaderSection().

◆ AddToList()

◆ AllocateDataFormat()

static void AllocateDataFormat ( cmsIT8 it8)
static

Definition at line 1439 of file cmscgats.c.

References AllocChunk(), cmsIT8GetPropertyDbl(), GetTable(), int(), NULL, and SynError().

Referenced by cmsIT8SetData(), and SetDataFormat().

◆ AllocateDataSet()

static void AllocateDataSet ( cmsIT8 it8)
static

Definition at line 1500 of file cmscgats.c.

References AllocChunk(), atoi(), cmsIT8GetProperty(), GetTable(), NULL, and SynError().

Referenced by cmsIT8SetData(), DataSection(), and SetData().

◆ AllocBigBlock()

static void* AllocBigBlock ( cmsIT8 it8,
cmsUInt32Number  size 
)
static

Definition at line 1052 of file cmscgats.c.

References _cmsFree(), _cmsMallocZero(), cmsIT8::ContextID, NULL, ptr, and size.

Referenced by AllocChunk().

◆ AllocChunk()

◆ AllocString()

static char* AllocString ( cmsIT8 it8,
const char *  str 
)
static

Definition at line 1110 of file cmscgats.c.

References AllocChunk(), ptr, str, strlen(), and strncpy().

Referenced by AddToList(), SetData(), and SetDataFormat().

◆ AllocTable()

static void AllocTable ( cmsIT8 it8)
static

Definition at line 1245 of file cmscgats.c.

References NULL, t, cmsIT8::Tab, and cmsIT8::TablesCount.

Referenced by cmsIT8Alloc(), cmsIT8SetTable(), and ParseIT8().

◆ BinSrchKey()

static SYMBOL BinSrchKey ( const char *  id)
static

Definition at line 509 of file cmscgats.c.

References cmsstrcasecmp(), cutout::l, NUMKEYS, r, res, SUNDEFINED, KEYWORD::sy, TabKeys, and cordic::x.

Referenced by InSymbol().

◆ BuildAbsolutePath()

static cmsBool BuildAbsolutePath ( const char *  relPath,
const char *  basePath,
char *  buffer,
cmsUInt32Number  MaxLen 
)
static

Definition at line 413 of file cmscgats.c.

References DIR_CHAR, FALSE, isabsolutepath(), len, NULL, strncpy(), strrchr, tail, and TRUE.

Referenced by InSymbol().

◆ Check()

static cmsBool Check ( cmsIT8 it8,
SYMBOL  sy,
const char *  Err 
)
static

Definition at line 474 of file cmscgats.c.

References NoMeta(), SynError(), and TRUE.

Referenced by CheckEOLN(), InSymbol(), and IsProperColorSpace().

◆ CheckEOLN()

static cmsBool CheckEOLN ( cmsIT8 it8)
static

Definition at line 949 of file cmscgats.c.

References Check(), FALSE, InSymbol(), SEOLN, and TRUE.

Referenced by DataFormatSection(), and DataSection().

◆ cmsIT8Alloc()

◆ cmsIT8DefineDblFormat()

void cmsIT8DefineDblFormat ( cmsHANDLE  hIT8,
const char *  Formatter 
)

Definition at line 2764 of file cmscgats.c.

References _cmsAssert, DEFAULT_DBL_FORMAT, cmsIT8::DoubleFormatter, NULL, strcpy(), and strncpy().

◆ cmsIT8EnumDataFormat()

int cmsIT8EnumDataFormat ( cmsHANDLE  hIT8,
char ***  SampleNames 
)

Definition at line 2382 of file cmscgats.c.

References _cmsAssert, GetTable(), NULL, and t.

◆ cmsIT8EnumProperties()

cmsUInt32Number cmsIT8EnumProperties ( cmsHANDLE  hIT8,
char ***  PropertyNames 
)

Definition at line 2397 of file cmscgats.c.

References _cmsAssert, AllocChunk(), GetTable(), n, NULL, p, and t.

◆ cmsIT8EnumPropertyMulti()

cmsUInt32Number cmsIT8EnumPropertyMulti ( cmsHANDLE  hIT8,
const char *  cProp,
const char ***  SubpropertyNames 
)

◆ cmsIT8FindDataFormat()

int cmsIT8FindDataFormat ( cmsHANDLE  hIT8,
const char *  cSample 
)

Definition at line 2532 of file cmscgats.c.

References _cmsAssert, LocateSample(), and NULL.

◆ cmsIT8Free()

void cmsIT8Free ( cmsHANDLE  hIT8)

Definition at line 1023 of file cmscgats.c.

References _cmsFree(), cmsIT8::MemoryBlock, cmsIT8::MemorySink, n, NULL, and p.

Referenced by cmsIT8LoadFromFile(), and cmsIT8LoadFromMem().

◆ cmsIT8GetData()

const char* cmsIT8GetData ( cmsHANDLE  hIT8,
const char *  cPatch,
const char *  cSample 
)

Definition at line 2589 of file cmscgats.c.

References _cmsAssert, GetData(), LocatePatch(), LocateSample(), and NULL.

Referenced by cmsIT8GetDataDbl(), and cmsIT8SetTableByLabel().

◆ cmsIT8GetDataDbl()

cmsFloat64Number cmsIT8GetDataDbl ( cmsHANDLE  it8,
const char *  cPatch,
const char *  cSample 
)

Definition at line 2610 of file cmscgats.c.

References cmsIT8GetData(), and ParseFloatNumber().

◆ cmsIT8GetDataRowCol()

const char* cmsIT8GetDataRowCol ( cmsHANDLE  hIT8,
int  row,
int  col 
)

Definition at line 2543 of file cmscgats.c.

References _cmsAssert, col, GetData(), NULL, and row.

Referenced by cmsIT8GetDataRowColDbl().

◆ cmsIT8GetDataRowColDbl()

cmsFloat64Number cmsIT8GetDataRowColDbl ( cmsHANDLE  hIT8,
int  row,
int  col 
)

Definition at line 2553 of file cmscgats.c.

References cmsIT8GetDataRowCol(), col, NULL, ParseFloatNumber(), and row.

◆ cmsIT8GetPatchByName()

int cmsIT8GetPatchByName ( cmsHANDLE  hIT8,
const char *  cPatch 
)

Definition at line 2697 of file cmscgats.c.

References _cmsAssert, LocatePatch(), and NULL.

◆ cmsIT8GetPatchName()

const char* cmsIT8GetPatchName ( cmsHANDLE  hIT8,
int  nPatch,
char *  buffer 
)

Definition at line 2678 of file cmscgats.c.

References _cmsAssert, buffer, GetData(), GetTable(), MAXSTR, NULL, strncpy(), and t.

◆ cmsIT8GetProperty()

const char* cmsIT8GetProperty ( cmsHANDLE  hIT8,
const char *  Key 
)

Definition at line 1402 of file cmscgats.c.

References GetTable(), IsAvailableOnList(), Key, NULL, and p.

Referenced by AllocateDataSet(), cmsIT8GetPropertyDbl(), WriteData(), and WriteDataFormat().

◆ cmsIT8GetPropertyDbl()

cmsFloat64Number cmsIT8GetPropertyDbl ( cmsHANDLE  hIT8,
const char *  cProp 
)

Definition at line 1415 of file cmscgats.c.

References cmsIT8GetProperty(), NULL, ParseFloatNumber(), and v.

Referenced by AllocateDataFormat().

◆ cmsIT8GetPropertyMulti()

const char* cmsIT8GetPropertyMulti ( cmsHANDLE  hIT8,
const char *  Key,
const char *  SubKey 
)

Definition at line 1424 of file cmscgats.c.

References GetTable(), IsAvailableOnList(), Key, NULL, and p.

◆ cmsIT8GetSheetType()

const char* cmsIT8GetSheetType ( cmsHANDLE  hIT8)

Definition at line 1332 of file cmscgats.c.

References GetTable(), and _Table::SheetType.

◆ cmsIT8LoadFromFile()

◆ cmsIT8LoadFromMem()

◆ cmsIT8SaveToFile()

cmsBool cmsIT8SaveToFile ( cmsHANDLE  hIT8,
const char *  cFileName 
)

◆ cmsIT8SaveToMem()

◆ cmsIT8SetComment()

cmsBool cmsIT8SetComment ( cmsHANDLE  hIT8,
const char *  Val 
)

Definition at line 1346 of file cmscgats.c.

References AddToList(), FALSE, GetTable(), NULL, and WRITE_UNCOOKED.

◆ cmsIT8SetData()

cmsBool cmsIT8SetData ( cmsHANDLE  hIT8,
const char *  cPatch,
const char *  cSample,
const char *  Val 
)

◆ cmsIT8SetDataDbl()

cmsBool cmsIT8SetDataDbl ( cmsHANDLE  hIT8,
const char *  cPatch,
const char *  cSample,
cmsFloat64Number  Val 
)

Definition at line 2663 of file cmscgats.c.

References _cmsAssert, Buff, cmsIT8SetData(), cmsIT8::DoubleFormatter, NULL, and snprintf.

◆ cmsIT8SetDataFormat()

cmsBool cmsIT8SetDataFormat ( cmsHANDLE  h,
int  n,
const char *  Sample 
)

Definition at line 1493 of file cmscgats.c.

References h, n, and SetDataFormat().

◆ cmsIT8SetDataRowCol()

cmsBool cmsIT8SetDataRowCol ( cmsHANDLE  hIT8,
int  row,
int  col,
const char *  Val 
)

Definition at line 2565 of file cmscgats.c.

References _cmsAssert, col, NULL, row, and SetData().

◆ cmsIT8SetDataRowColDbl()

cmsBool cmsIT8SetDataRowColDbl ( cmsHANDLE  hIT8,
int  row,
int  col,
cmsFloat64Number  Val 
)

Definition at line 2575 of file cmscgats.c.

References _cmsAssert, Buff, col, cmsIT8::DoubleFormatter, NULL, row, SetData(), and snprintf.

◆ cmsIT8SetIndexColumn()

cmsBool cmsIT8SetIndexColumn ( cmsHANDLE  hIT8,
const char *  cSample 
)

Definition at line 2748 of file cmscgats.c.

References _cmsAssert, FALSE, LocateSample(), cmsIT8::nTable, NULL, pos, _Table::SampleID, cmsIT8::Tab, and TRUE.

◆ cmsIT8SetPropertyDbl()

cmsBool cmsIT8SetPropertyDbl ( cmsHANDLE  hIT8,
const char *  cProp,
cmsFloat64Number  Val 
)

Definition at line 1367 of file cmscgats.c.

References AddToList(), cmsIT8::DoubleFormatter, GetTable(), NULL, snprintf, and WRITE_UNCOOKED.

◆ cmsIT8SetPropertyHex()

cmsBool cmsIT8SetPropertyHex ( cmsHANDLE  hIT8,
const char *  cProp,
cmsUInt32Number  Val 
)

Definition at line 1377 of file cmscgats.c.

References AddToList(), GetTable(), NULL, snprintf, and WRITE_HEXADECIMAL.

◆ cmsIT8SetPropertyMulti()

cmsBool cmsIT8SetPropertyMulti ( cmsHANDLE  hIT8,
const char *  Key,
const char *  SubKey,
const char *  Buffer 
)

Definition at line 1394 of file cmscgats.c.

References AddToList(), GetTable(), Key, NULL, and WRITE_PAIR.

◆ cmsIT8SetPropertyStr()

cmsBool cmsIT8SetPropertyStr ( cmsHANDLE  hIT8,
const char *  Key,
const char *  Val 
)

Definition at line 1357 of file cmscgats.c.

References AddToList(), FALSE, GetTable(), Key, NULL, and WRITE_STRINGIFY.

◆ cmsIT8SetPropertyUncooked()

cmsBool cmsIT8SetPropertyUncooked ( cmsHANDLE  hIT8,
const char *  Key,
const char *  Buffer 
)

Definition at line 1387 of file cmscgats.c.

References AddToList(), GetTable(), Key, NULL, and WRITE_UNCOOKED.

◆ cmsIT8SetSheetType()

cmsBool cmsIT8SetSheetType ( cmsHANDLE  hIT8,
const char *  Type 
)

Definition at line 1337 of file cmscgats.c.

References GetTable(), MAXSTR, strncpy(), and TRUE.

Referenced by cmsIT8Alloc(), and ParseIT8().

◆ cmsIT8SetTable()

cmsInt32Number cmsIT8SetTable ( cmsHANDLE  IT8,
cmsUInt32Number  nTable 
)

Definition at line 1259 of file cmscgats.c.

References AllocTable(), cmsIT8::nTable, and SynError().

Referenced by cmsIT8SaveToFile(), cmsIT8SaveToMem(), and cmsIT8SetTableByLabel().

◆ cmsIT8SetTableByLabel()

int cmsIT8SetTableByLabel ( cmsHANDLE  hIT8,
const char *  cSet,
const char *  cField,
const char *  ExpectedType 
)

Definition at line 2716 of file cmscgats.c.

References _cmsAssert, cField, cmsIT8GetData(), cmsIT8SetTable(), cmsstrcasecmp(), NULL, and sscanf().

◆ cmsIT8TableCount()

cmsUInt32Number cmsIT8TableCount ( cmsHANDLE  hIT8)

Definition at line 2704 of file cmscgats.c.

References _cmsAssert, NULL, and cmsIT8::TablesCount.

◆ CookPointers()

◆ DataFormatSection()

static cmsBool DataFormatSection ( cmsIT8 it8)
static

◆ DataSection()

static cmsBool DataSection ( cmsIT8 it8)
static

◆ GetData()

static char* GetData ( cmsIT8 it8,
int  nSet,
int  nField 
)
static

◆ GetDataFormat()

static const char* GetDataFormat ( cmsIT8 it8,
int  n 
)
static

Definition at line 1462 of file cmscgats.c.

References GetTable(), n, and NULL.

Referenced by LocateSample().

◆ GetTable()

◆ GetVal()

static cmsBool GetVal ( cmsIT8 it8,
char *  Buffer,
cmsUInt32Number  max,
const char *  ErrorTitle 
)
static

◆ HeaderSection()

◆ InSymbol()

◆ isabsolutepath()

static cmsBool isabsolutepath ( const char *  path)
static

Definition at line 387 of file cmscgats.c.

References DIR_CHAR, FALSE, isalpha, NULL, strncpy(), and TRUE.

Referenced by BuildAbsolutePath().

◆ IsAvailableOnList()

static cmsBool IsAvailableOnList ( KEYVALUE p,
const char *  Key,
const char *  Subkey,
KEYVALUE **  LastPtr 
)
static

◆ isfirstidchar()

static cmsBool isfirstidchar ( int  c)
static

Definition at line 380 of file cmscgats.c.

References c, isdigit, and ismiddle().

Referenced by InSymbol().

◆ isidchar()

static cmsBool isidchar ( int  c)
static

Definition at line 373 of file cmscgats.c.

References c, isalnum, and ismiddle().

Referenced by InSymbol().

◆ ismiddle()

static cmsBool ismiddle ( int  c)
static

Definition at line 366 of file cmscgats.c.

References c, and isseparator().

Referenced by isfirstidchar(), and isidchar().

◆ IsMyBlock()

static int IsMyBlock ( const cmsUInt8Number Buffer,
cmsUInt32Number  n 
)
static

Definition at line 2224 of file cmscgats.c.

References i, n, space, and words.

Referenced by cmsIT8LoadFromMem(), and IsMyFile().

◆ IsMyFile()

static cmsBool IsMyFile ( const char *  FileName)
static

Definition at line 2263 of file cmscgats.c.

References cmsERROR_FILE, cmsSignalError(), FALSE, fclose, FILE, FileName, fopen, fp, fread, and IsMyBlock().

Referenced by cmsIT8LoadFromFile().

◆ isseparator()

static cmsBool isseparator ( int  c)
static

Definition at line 359 of file cmscgats.c.

References c.

Referenced by InSymbol(), ismiddle(), ParseIT8(), and ReadType().

◆ LocateEmptyPatch()

static int LocateEmptyPatch ( cmsIT8 it8)
static

Definition at line 2493 of file cmscgats.c.

References data, GetData(), GetTable(), i, and NULL.

Referenced by cmsIT8SetData().

◆ LocatePatch()

static int LocatePatch ( cmsIT8 it8,
const char *  cPatch 
)
static

Definition at line 2470 of file cmscgats.c.

References cmsstrcasecmp(), data, GetData(), GetTable(), i, and NULL.

Referenced by cmsIT8GetData(), cmsIT8GetPatchByName(), and cmsIT8SetData().

◆ LocateSample()

static int LocateSample ( cmsIT8 it8,
const char *  cSample 
)
static

◆ NextCh()

static void NextCh ( cmsIT8 it8)
static

Definition at line 483 of file cmscgats.c.

References ch, cmsIT8::ch, fclose, feof, fgetc, cmsIT8::IncludeSP, and cmsIT8::Source.

Referenced by InSymbol(), ParseIT8(), ReadReal(), and ReadType().

◆ NoMeta()

static const char* NoMeta ( const char *  str)
static

Definition at line 445 of file cmscgats.c.

References NULL, str, and strchr.

Referenced by Check().

◆ ParseFloatNumber()

static cmsFloat64Number ParseFloatNumber ( const char *  Buffer)
static

Definition at line 604 of file cmscgats.c.

References digit, e, isdigit, NULL, sgn(), sign, toupper(), and xpow10().

Referenced by cmsIT8GetDataDbl(), cmsIT8GetDataRowColDbl(), and cmsIT8GetPropertyDbl().

◆ ParseIT8()

◆ ReadReal()

static void ReadReal ( cmsIT8 it8,
cmsInt32Number  inum 
)
static

Definition at line 538 of file cmscgats.c.

References cmsIT8::ch, digit, cmsIT8::dnum, e, isdigit, NextCh(), sgn(), toupper(), and xpow10().

Referenced by InSymbol().

◆ ReadType()

static void ReadType ( cmsIT8 it8,
char *  SheetTypePtr 
)
static

Definition at line 2037 of file cmscgats.c.

References ch, cmsIT8::ch, cnt, isseparator(), MAXSTR, and NextCh().

Referenced by ParseIT8().

◆ SetData()

static cmsBool SetData ( cmsIT8 it8,
int  nSet,
int  nField,
const char *  Val 
)
static

◆ SetDataFormat()

static cmsBool SetDataFormat ( cmsIT8 it8,
int  n,
const char *  label 
)
static

Definition at line 1473 of file cmscgats.c.

References AllocateDataFormat(), AllocString(), FALSE, GetTable(), label, n, SynError(), and TRUE.

Referenced by cmsIT8SetDataFormat(), and DataFormatSection().

◆ Skip()

static void Skip ( cmsIT8 it8,
SYMBOL  sy 
)
static

◆ SkipEOLN()

static void SkipEOLN ( cmsIT8 it8)
static

Definition at line 970 of file cmscgats.c.

References InSymbol(), SEOLN, and cmsIT8::sy.

Referenced by DataFormatSection(), DataSection(), HeaderSection(), and ParseIT8().

◆ SynError()

◆ WriteData()

static void WriteData ( SAVESTREAM fp,
cmsIT8 it8 
)
static

Definition at line 1726 of file cmscgats.c.

References atoi(), cmsIT8GetProperty(), fp, GetTable(), i, j, NULL, ptr, strchr, and WriteStr().

Referenced by cmsIT8SaveToFile(), and cmsIT8SaveToMem().

◆ WriteDataFormat()

static void WriteDataFormat ( SAVESTREAM fp,
cmsIT8 it8 
)
static

Definition at line 1703 of file cmscgats.c.

References atoi(), cmsIT8GetProperty(), fp, GetTable(), i, and WriteStr().

Referenced by cmsIT8SaveToFile(), and cmsIT8SaveToMem().

◆ Writef()

static void Writef ( SAVESTREAM f,
const char *  frm,
  ... 
)
static

Definition at line 1608 of file cmscgats.c.

References args, f, va_end, va_start, vsnprintf, and WriteStr().

Referenced by WriteHeader().

◆ WriteHeader()

◆ WriteStr()

static void WriteStr ( SAVESTREAM f,
const char *  str 
)
static

Definition at line 1567 of file cmscgats.c.

References cmsERROR_WRITE, cmsSignalError(), f, fwrite(), len, Max(), memmove, NULL, str, and strlen().

Referenced by WriteData(), WriteDataFormat(), Writef(), and WriteHeader().

◆ xpow10()

static cmsFloat64Number xpow10 ( int  n)
static

Definition at line 530 of file cmscgats.c.

References n, and pow().

Referenced by ParseFloatNumber(), and ReadReal().

Variable Documentation

◆ PredefinedProperties

PROPERTY PredefinedProperties[]
static

Definition at line 226 of file cmscgats.c.

Referenced by cmsIT8Alloc().

◆ PredefinedSampleID

const char* PredefinedSampleID[]
static

Definition at line 304 of file cmscgats.c.

Referenced by cmsIT8Alloc().

◆ TabKeys

const KEYWORD TabKeys[]
static
Initial value:
= {
{"$INCLUDE", SINCLUDE},
{".INCLUDE", SINCLUDE},
{"BEGIN_DATA", SBEGIN_DATA },
{"BEGIN_DATA_FORMAT", SBEGIN_DATA_FORMAT },
{"DATA_FORMAT_IDENTIFIER", SDATA_FORMAT_ID},
{"END_DATA", SEND_DATA},
{"END_DATA_FORMAT", SEND_DATA_FORMAT},
{"KEYWORD", SKEYWORD}
}
@ SKEYWORD
Definition: cmscgats.c:67
@ SBEGIN_DATA
Definition: cmscgats.c:63
@ SDATA_FORMAT_ID
Definition: cmscgats.c:68
@ SBEGIN_DATA_FORMAT
Definition: cmscgats.c:64
@ SEND_DATA_FORMAT
Definition: cmscgats.c:66
@ SEND_DATA
Definition: cmscgats.c:65
@ SINCLUDE
Definition: cmscgats.c:69

Definition at line 203 of file cmscgats.c.

Referenced by BinSrchKey().