Chameleon

Chameleon Commit Details

Date:2013-01-12 20:54:37 (6 years 11 months ago)
Author:Evan Lojewski
Commit:2159
Parents: 2158
Message:Add XMLCastData
Changes:
M/trunk/i386/libsaio/xml.h
M/trunk/i386/libsaio/xml.c

File differences

trunk/i386/libsaio/xml.c
812812
813813
814814
815
815
816816
817817
818818
......
11141114
11151115
11161116
1117
1118
1119
1120
11171121
11181122
11191123
......
11391143
11401144
11411145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
11421161
11431162
11441163
tmpTag->type = kTagTypeData;
tmpTag->string = string;
tmpTag->tag = 0;
tmpTag->offset = buffer_start ? buffer - buffer_start: 0;
tmpTag->offset = length; // buffer_start ? buffer - buffer_start: 0;
tmpTag->tagNext = 0;
*tag = tmpTag;
return entry && (entry->type == kTagTypeDict);
}
bool XMLIsData(TagPtr entry)
{
return entry && (entry->type == kTagTypeData);
}
TagPtr XMLCastDict(TagPtr dict)
{
return NULL;
}
char* XMLCastData(TagPtr dict, int* length)
{
if(!dict) return NULL;
if((dict->type == kTagTypeData) ||
(dict->type == kTagTypeKey))
{
*length = dict->offset;
return dict->string;
}
*length = 0;
return NULL;
}
long XMLCastStringOffset(TagPtr dict)
{
if(dict &&
trunk/i386/libsaio/xml.h
9797
9898
9999
100
100101
101102
102103
103104
104105
105106
107
106108
107109
108110
int XMLCastInteger ( TagPtr dict );
TagPtr XMLCastDict ( TagPtr dict );
TagPtr XMLCastArray( TagPtr dict );
char* XMLCastData( TagPtr dict );
bool XMLIsBoolean(TagPtr entry);
bool XMLIsString (TagPtr entry);
bool XMLIsInteger(TagPtr entry);
bool XMLIsDict (TagPtr entry);
bool XMLIsArray (TagPtr entry);
bool XMLIsData (TagPtr entry);
bool XMLAddTagToDictionary(TagPtr dict, char* key, TagPtr value);

Archive Download the corresponding diff file

Revision: 2159