view release on metacpan or search on metacpan
getFieldIds.numItems = 0;
getFieldIds.internalIdList = NULL;
/* try to get data type from field cache, collect fieldIds which are not cached */
for (i=0; i<c; ++i) {
ARInternalId fieldId;
a = i*2+2;
fieldId = fieldList.fieldValueList[i].fieldId = SvIV(ST(a));
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
/* printf( "%s [%d] found in cache\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto create_entry_end;
}
}else{
if( getFieldIds.numItems == 0 ){
AMALLOCNN(getFieldIds.internalIdList,c,ARInternalId);
}
/* printf( "%s [%d] collect for loading\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
getFieldIds.internalIdList[getFieldIds.numItems] = fieldId;
}
/* now get data type from the freshly cached fields */
i = 0;
for (j=0; j<getFieldIds.numItems; ++j) {
ARInternalId fieldId = getFieldIds.internalIdList[j];
while(fieldId != fieldList.fieldValueList[i].fieldId) ++i;
a = i*2+2;
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
/* printf( "%s [%d] freshly loaded\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto create_entry_end;
}
}else{
char errTxt[256];
sprintf( errTxt, "Failed to fetch field %d from hash", fieldId );
ARError_add(AR_RETURN_ERROR, AP_ERR_FIELD_TYPE);
ARError_add(AR_RETURN_ERROR, AP_ERR_CONTINUE, errTxt );
goto create_entry_end;
requestList.requestList[i-1] = SvIV(ST(i));
}
ret = ARGetServerStatistics(ctrl, &requestList, &serverInfo, &status);
#ifdef PROFILE
((ars_ctrl *)ctrl)->queries++;
#endif
if (!ARError(ret, status)) {
for(ui=0; ui<serverInfo.numItems; ui++) {
XPUSHs(sv_2mortal(newSViv(serverInfo.serverInfoList[ui].operation)));
switch(serverInfo.serverInfoList[ui].value.dataType) {
case AR_DATA_TYPE_ENUM:
case AR_DATA_TYPE_TIME:
case AR_DATA_TYPE_BITMASK:
case AR_DATA_TYPE_INTEGER:
XPUSHs(sv_2mortal(newSViv(serverInfo.serverInfoList[ui].value.u.intVal)));
break;
case AR_DATA_TYPE_REAL:
XPUSHs(sv_2mortal(newSVnv(serverInfo.serverInfoList[ui].value.u.realVal)));
break;
case AR_DATA_TYPE_CHAR:
XPUSHs(sv_2mortal(newSVpv(serverInfo.serverInfoList[ui].value.u.charVal,
strlen(serverInfo.serverInfoList[ui].value.u.charVal))));
break;
}
}
}
FreeARServerInfoList(&serverInfo, FALSE);
FreeARServerInfoRequestList(&requestList, FALSE);
} else {
(void) ARError_add( AR_RETURN_ERROR, AP_ERR_MALLOC);
#else
hv_store(menuDef, "labelIndex", strlen("labelIndex") ,
newSViv(menuDefn.u.menuSQL.labelIndex), 0);
#endif
hv_store(menuDef, "valueIndex", strlen("valueIndex") ,
newSViv(menuDefn.u.menuSQL.valueIndex), 0);
hv_store(RETVAL, "menuSQL", strlen("menuSQL") ,
newRV_noinc((SV *)menuDef), 0);
break;
# if AR_EXPORT_VERSION >= 6
case AR_CHAR_MENU_DATA_DICTIONARY:
hv_store(menuDef, "server", strlen("server") ,
newSVpv(menuDefn.u.menuDD.server, 0), 0);
hv_store(menuDef, "nameType", strlen("nameType") ,
newSViv(menuDefn.u.menuDD.nameType), 0);
hv_store(menuDef, "valueFormat", strlen("valueFormat") ,
newSViv(menuDefn.u.menuDD.valueFormat), 0);
hv_store(menuDef, "structType", strlen("structType") ,
newSViv(menuDefn.u.menuDD.structType), 0);
switch(menuDefn.u.menuDD.structType) {
case AR_CHAR_MENU_DD_FORM:
getFieldIds.numItems = 0;
getFieldIds.internalIdList = NULL;
for (i=0; i<c; i++) {
ARInternalId fieldId;
a = i*2+offset;
fieldId = fieldList.fieldValueList[i].fieldId = SvIV(ST(a));
if (! SvOK(ST(a+1))) {
/* pass a NULL */
fieldList.fieldValueList[i].value.dataType = AR_DATA_TYPE_NULL;
}else{
/* determine data type and pass value */
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto set_entry_end;
}
}else{
if( getFieldIds.numItems == 0 ){
AMALLOCNN(getFieldIds.internalIdList,c,ARInternalId);
}
/* printf( "%s [%d] collect for loading\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
getFieldIds.internalIdList[getFieldIds.numItems] = fieldId;
++getFieldIds.numItems;
}
/* now get data type from the freshly cached fields */
i = 0;
for (j=0; j<getFieldIds.numItems; ++j) {
ARInternalId fieldId = getFieldIds.internalIdList[j];
while(fieldId != fieldList.fieldValueList[i].fieldId) ++i;
a = i*2+offset;
dataType = fieldcache_get_data_type( cacheFields, fieldId );
if (dataType <= AR_DATA_TYPE_MAX_TYPE) {
/* printf( "%s [%d] freshly loaded\n", schema, fieldId ); fflush(stdout); */ /* _DEBUG_ */
if (sv_to_ARValue(ctrl, ST(a+1), dataType, &fieldList.fieldValueList[i].value) < 0) {
goto set_entry_end;
}
}else{
char errTxt[256];
sprintf( errTxt, "Failed to fetch field %d from hash", fieldId );
ARError_add(AR_RETURN_ERROR, AP_ERR_FIELD_TYPE);
ARError_add(AR_RETURN_ERROR, AP_ERR_CONTINUE, errTxt );
goto set_entry_end;
/* Zero(serverInfo.serverInfoList, 1, ARServerInfoStruct); # happens already in MALLOCNN */
for(j = 0 ; j < serverInfo.numItems ; ++j) {
i = 2 * j + 1;
infoType = lookUpServerInfoTypeHint(SvIV(ST(i)));
serverInfo.serverInfoList[j].operation = SvIV(ST(i));
serverInfo.serverInfoList[j].value.dataType = infoType;
switch(infoType) {
case AR_DATA_TYPE_CHAR:
serverInfo.serverInfoList[j].value.u.charVal = strdup(SvPV(ST(i+1), PL_na));
break;
case AR_DATA_TYPE_INTEGER:
serverInfo.serverInfoList[j].value.u.intVal = SvIV(ST(i+1));
break;
default:
sprintf( buf, "(%d) type = %d", serverInfo.serverInfoList[j].operation, serverInfo.serverInfoList[j].value.dataType );
(void) ARError_add(AR_RETURN_ERROR, AP_ERR_INV_ARGS,
buf);
FreeARServerInfoList(&serverInfo, FALSE);
XPUSHs(sv_2mortal(newSViv(0))); /* ERR */
goto SetServerInfo_fail;
}
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
rv += rev_ARCharMenuSQLStruct( ctrl, menuDef, "menuSQL", &(arMenuDef.u.menuSQL) );
}
break;
case AR_CHAR_MENU_SS:
pSvTemp = hv_fetch( menuDef, "menuSS", strlen("menuSS") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
rv += rev_ARCharMenuSSStruct( ctrl, menuDef, "menuSS", &(arMenuDef.u.menuSS) );
}
break;
case AR_CHAR_MENU_DATA_DICTIONARY:
pSvTemp = hv_fetch( menuDef, "menuDD", strlen("menuDD") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
rv += rev_ARCharMenuDDStruct( ctrl, menuDef, "menuDD", &(arMenuDef.u.menuDD) );
}
break;
}
objPropList.numItems = 0;
objPropList.props = NULL;
pSvTemp = hv_fetch( menuDef, "objPropList", strlen("objPropList") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
rv += rev_ARCharMenuSQLStruct( ctrl, menuDef, "menuSQL", &(arMenuDef->u.menuSQL) );
}
break;
case AR_CHAR_MENU_SS:
pSvTemp = hv_fetch( menuDef, "menuSS", strlen("menuSS") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
rv += rev_ARCharMenuSSStruct( ctrl, menuDef, "menuSS", &(arMenuDef->u.menuSS) );
}
break;
case AR_CHAR_MENU_DATA_DICTIONARY:
pSvTemp = hv_fetch( menuDef, "menuDD", strlen("menuDD") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
rv += rev_ARCharMenuDDStruct( ctrl, menuDef, "menuDD", &(arMenuDef->u.menuDD) );
}
break;
}
}
pSvTemp = hv_fetch( menuDef, "objPropList", strlen("objPropList") , 0 );
if( pSvTemp && *pSvTemp && SvTYPE(*pSvTemp) != SVt_NULL ){
fieldList.numItems = c;
AMALLOCNN(fieldList.fieldValueList, c, ARFieldValueStruct);
for (i = 0; i < c; i++) {
a = i*2 + 3;
fieldList.fieldValueList[i].fieldId = SvIV(ST(a));
if (! SvOK(ST(a+1))) {
/* pass a NULL */
fieldList.fieldValueList[i].value.dataType =
AR_DATA_TYPE_NULL;
} else {
#if AR_CURRENT_API_VERSION >= 17
ret = ARGetFieldCached(ctrl, schema,
fieldList.fieldValueList[i].fieldId,
NULL, NULL, &dataType, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &status);
#elif AR_EXPORT_VERSION >= 9
ret = ARGetFieldCached(ctrl, schema,
fieldList.fieldValueList[i].fieldId,
NULL, NULL, &dataType, NULL, NULL, NULL, NULL, NULL,
{
#if AR_EXPORT_VERSION >= 6
ARStatusList status;
ARValueStruct variableValue;
int ret;
char numToCharBuf[32];
(void) ARError_reset();
Zero(&status, 1, ARStatusList);
variableValue.dataType = AR_DATA_TYPE_INTEGER;
variableValue.u.intVal = value;
if (variableId == 12 || variableId == 13)
{
// just a quick and dirty solution because those variables need to be characters
sprintf(numToCharBuf, "%ld", value);
variableValue.dataType = AR_DATA_TYPE_CHAR;
variableValue.u.charVal = numToCharBuf;
}
ret = ARSetSessionConfiguration( ctrl, variableId, &variableValue, &status );
if(ARError(ret, status)) {
XPUSHs(sv_2mortal(newSViv(0))); /* ERR */
} else {
XPUSHs(sv_2mortal(newSViv(1))); /* OK */
}
(TS) fixed AR_SERVER_INFO type identification in infra/exsi.pl
(TS) updated version numbers in INSTALLATION
(TS) added ars_DateToJulianDate, ars_GetListLicense, ars_ValidateMultipleLicenses,
ars_GetServerCharSet, ars_GetClientCharSet
(TS) fixed actionList/elseList bug in ars_SetActiveLink
(TS) added AR_DATA_TYPE_VIEW handling to perl_ARValueStruct_Assign,rev_ARActiveLinkActionList
(TS) modified Makefile.PL for easier automated testing (handling of ARSPERLTEST_PARAM)
(TS) added ars_GetListRole, ars_Signal, ars_GetTextForErrorMessage
(TS) ! changed return struct of ars_GetListGroup
(TS) fixed IVLD macro in support-h.template
(TS) fixed Makefile.PL to work with $ARSAPI containing spaces on Windows
(TS) added ars_DeleteContainer (changes to ARS.xs, ARS.pm)
(TS) fixed Makefile.PL to use $ra_arlibs for Version <= 5.0 on Windows
(TS) fixed rev_ARValueStructStr2Type: use strcasecmp instead of strncasecmp
(failure to differentiate between string and substring)
(TS) added "case AR_DATA_TYPE_CURRENCY" to perl_ARValueStruct
(TS) moved existing code for AR_DATA_TYPE_CURRENCY from sv_to_ARValueStruct
to new function sv_to_ARCurrencyStruct, completed ARCurrencyStruct handling
(TS) added handling of AR_DATA_TYPE_DATE, AR_DATA_TYPE_TIME_OF_DAY,
to rev_ARValueStruct, sv_to_ARValueStruct
(TS) added conversion functions rev_ARDisplayInstanceList,
rev_ARDisplayInstanceStruct and rev_ARPermissionList
(TS) fixed DESTROY(ctrl) (use safefree if allocated with safemalloc)
(TS) minor fix in in rev_ARValueStructKW2KN (*keyword == '\0')
(TS) minor fix in rev_ARCoordList_helper ( if (hv_exists("x"... )
html/manual/toc.html; new files: html/manual/ars_SetLogging.html, t/21setlogging.t)
(TS) fixed pointer dereferencing error in supportrev.c:strmakHval
(TS) fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between
string and substring (e.g. "page_holder" and "page")
(TS) fixed support.c:perl_ARByteList (Bug ID 1213180)
(David Lindes {lindes at users.sourceforge.net})
(TS) added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct
(TS) added function perl_ARCurrencyDetailList
(TS) fixed support.c:my_strtok, perl_BuildEntryList
(ars_GetEntry crashed when retrieving join form entries)
(TS) added preprocessor directives (ARS.xs, support.c, support-h.template)
for conditional compilation depending on API version
(compiles now against version 4.5.1 to 6.3.0)
Makefile.PL view on Meta::CPAN
" ARSPerl wasn't tested on '$Config{'cc'}', if you run into trouble during 'make test'\n" .
" please contact the developer/maintainer!\n\n";
}
}
push(@extras, CAPI => 'TRUE') if ($] >= 5.005 &&
$^O eq 'MSWin32' &&
(($Config{archname} =~ /-object\b/i) ||
($Config{archname} =~ /-multi-thread\b/i))
);
push(@extras, LDDLFLAGS => " -Wl,--exclude-symbols,\177arapi71_NULL_THUNK_DATA ") if $^O eq 'cygwin';
push(@extras, LDDLFLAGS => $Config{'lddlflags'}." -Wl,-Bsymbolic ") if ($REDUCE_SYMBOL_SCOPE);
if( $WINDOWS ){
$ARS_LDPATH = qq{-L"$ARSAPI/lib"};
$INCLUDES = qq{-I"$ARSAPI/include"};
}else{
$ARS_LDPATH = "-L$ARSAPI/lib";
$INCLUDES = "-I$ARSAPI/include";
}
Makefile.PL view on Meta::CPAN
$code = (split(/\s/, $line))[1];
# _visible & _hidden are schema permissions
if($code !~ /_VISIBLE|_HIDDEN/) {
print "\t\t$code\n" if $debug;
$code =~ /^AR_PERMISSIONS_(\w+)/;
print FD " { $code, \t\t\"\L$1\E\" },\n";
}
}
}
elsif(/DATATYPEMAP/) {
print "\tProcessing AR_DATA_TYPE codes..\n";
my($code, $line);
foreach $line (grep (/^\#define\s+AR_DATA_TYPE.*/, @arh)) {
$code = (split(/\s/, $line))[1];
print "\t\t$code\n" if $debug;
$code =~ /^AR_DATA_TYPE_(\w+)/;
print FD " { $code, \t\t\"\L$1\E\" },\n";
}
}
elsif(/SCHEMATYPEMAP/) {
print "\tProcessing AR_SCHEMA codes..\n";
my($code, $line);
foreach $line (grep (/^\#define\s+AR_SCHEMA.*/, @arh)) {
# another instance of poor naming conventions
next if $line =~ /_DELETE/;
$code = (split(/\s/, $line))[1];
StructDef.pl view on Meta::CPAN
_list => 'p->fieldLimitList',
_type => 'ARFieldLimitStruct',
},
ARFieldLimitStruct => {
# _typeparam => 1,
_switch => 'p->dataType',
# _map => 'DataTypeMap',
# _switch => 'p->dataType',
_map => 'dataType',
_case => {
AR_DATA_TYPE_INTEGER => {
_type => 'ARIntegerLimitsStruct',
_data => 'p->u.intLimits',
},
AR_DATA_TYPE_REAL => {
_type => 'ARRealLimitsStruct',
_data => 'p->u.realLimits',
},
AR_DATA_TYPE_CHAR => {
_type => 'ARCharLimitsStruct',
_data => 'p->u.charLimits',
},
AR_DATA_TYPE_DIARY => {
_type => 'ARDiaryLimitsStruct',
_data => 'p->u.diaryLimits',
},
AR_DATA_TYPE_ENUM => {
_min_version => '5.0.0',
_type => 'AREnumLimitsStruct',
_data => 'p->u.enumLimits',
},
AR_DATA_TYPE_DECIMAL => {
_type => 'ARDecimalLimitsStruct',
_data => 'p->u.decimalLimits',
},
AR_DATA_TYPE_ATTACH => {
_type => 'ARAttachLimitsStruct',
_data => 'p->u.attachLimits',
},
AR_DATA_TYPE_CURRENCY => {
_min_version => '5.1.0',
_type => 'ARCurrencyLimitsStruct',
_data => 'p->u.currencyLimits',
},
AR_DATA_TYPE_DATE => {
_min_version => '5.1.0',
_type => 'ARDateLimitsStruct',
_data => 'p->u.dateLimits',
},
AR_DATA_TYPE_TABLE => {
_type => 'ARTableLimitsStruct',
_data => 'p->u.tableLimits',
},
AR_DATA_TYPE_COLUMN => {
_type => 'ARColumnLimitsStruct',
_data => 'p->u.columnLimits',
},
AR_DATA_TYPE_VIEW => {
_min_version => '5.0.0',
_type => 'ARViewLimits',
_data => 'p->u.viewLimits',
},
AR_DATA_TYPE_DISPLAY => {
_min_version => '5.0.0',
_type => 'ARDisplayLimits',
_data => 'p->u.displayLimits',
},
},
},
ARIntegerLimitsStruct => {
min => {
_type => 'long',
_data => 'p->rangeLow',
StructDef.pl view on Meta::CPAN
# _data => 'p->u.menuFile',
# },
# AR_CHAR_MENU_SQL => {
# _type => 'ARCharMenuSQLStruct',
# _data => 'p->u.menuSQL',
# },
# AR_CHAR_MENU_SS => {
# _type => 'ARCharMenuSSStruct',
# _data => 'p->u.menuSS',
# },
# AR_CHAR_MENU_DATA_DICTIONARY => {
# _type => 'ARCharMenuDDStruct',
# _data => 'p->u.menuDD',
# },
# },
#},
#ARInternalIdList => {
# _num => 'p->numItems',
# _list => 'p->internalIdList',
StructDef.pl view on Meta::CPAN
# _data => 'p->description',
# },
# type => {
# _type => 'unsigned int',
# _data => 'p->type',
# },
#
# _switch => 'p->reference.dataType',
# _map => 'dataType',
# _case => {
# ARREF_DATA_ARSREF => {
# 'name' => {
# _type => 'ARNameType',
# _data => 'p->reference.u.name',
# },
# },
# ARREF_DATA_EXTREF => {
# 'extRef' => {
# _type => 'ARExtReferenceStruct',
# _data => 'p->reference.u.extRef',
# },
# },
# },
#},
#ARExtReferenceStruct => {
# permittedGroups => {
# _type => 'ARInternalIdList',
changes.dat view on Meta::CPAN
!CL enhanced ARS OO interface to handle custom enum fields
TS fixed return value of ars_Import
TS fixed memory violation in ars_GetListContainer
TS implemented ars_qualifier_ptr function (inverse of ars_perl_qualifier)
TS added ownerObjList parameter to ars_GetListContainer
TS fixed AR_SERVER_INFO type identification in infra/exsi.pl
TS updated version numbers in INSTALLATION
TS added ars_DateToJulianDate, ars_GetListLicense, ars_ValidateMultipleLicenses,
ars_GetServerCharSet, ars_GetClientCharSet
TS fixed actionList/elseList bug in ars_SetActiveLink
TS added AR_DATA_TYPE_VIEW handling to perl_ARValueStruct_Assign,rev_ARActiveLinkActionList
TS modified Makefile.PL for easier automated testing (handling of ARSPERLTEST_PARAM)
TS added ars_GetListRole, ars_Signal, ars_GetTextForErrorMessage
!TS changed return struct of ars_GetListGroup
TS fixed IVLD macro in support-h.template
released=05/06/2008 version=1.91
TS fixed ars_padEntryid to work correctly if entry ID prefix is defined
TS replaced malloc-on-windows patch by UNDEF_PERL_MALLOC compilation option in Makefile.PL
TS fixed pointer initialization error in ars_SetVUI
TS modified ars_Create/Get/SetFilter for API 7.1
changes.dat view on Meta::CPAN
TS added check for h != NULL to strcpyHVal
TS added "case AR_COND_OP_FROM_FIELD" to perl_qualifier()
TS changed handling of qualifier structs in perl_ARFieldLimitStruct, perl_ARJoinSchema,
perl_ARArchiveInfoStruct; those functions now return the converted perl structure
instead of the pointer to a C structure.
TS fixed Makefile.PL to work with $ARSAPI containing spaces on Windows
TS added ars_DeleteContainer (changes to ARS.xs, ARS.pm)
TS fixed Makefile.PL to use $ra_arlibs for Version <= 5.0 on Windows
TS fixed rev_ARValueStructStr2Type: use strcasecmp instead of strncasecmp
(failure to differentiate between string and substring)
TS added "case AR_DATA_TYPE_CURRENCY" to perl_ARValueStruct
TS moved existing code for AR_DATA_TYPE_CURRENCY from sv_to_ARValueStruct
to new function sv_to_ARCurrencyStruct, completed ARCurrencyStruct handling
TS added handling of AR_DATA_TYPE_DATE, AR_DATA_TYPE_TIME_OF_DAY,
to rev_ARValueStruct, sv_to_ARValueStruct
TS added conversion functions rev_ARDisplayInstanceList,
rev_ARDisplayInstanceStruct and rev_ARPermissionList
TS fixed DESTROY(ctrl) (use safefree if allocated with safemalloc)
TS minor fix in in rev_ARValueStructKW2KN (*keyword == '\0')
TS minor fix in rev_ARCoordList_helper ( if (hv_exists("x"... )
TS changed handling of keyword values in rev_ARValueStruct
(assume "keyword" if first character == '\0' and length > 0)
JCM minor update to example scripts Dump_User*.pl
released=09/20/2005 version=1.85
TS added binmode-statements in t/10entry.t (test failed on win32)
TS warning cleanup in test files (t/02export.t, t/13join.t)
TS added ars_SetLogging (changes to ARS.xs, ARS.pm, support.c, support-h.template,
html/manual/toc.html; new files: html/manual/ars_SetLogging.html, t/21setlogging.t)
TS fixed pointer dereferencing error in supportrev.c:strmakHval
TS fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between
string and substring (e.g. "page_holder" and "page")
TS fixed support.c:perl_ARByteList (Bug ID 1213180)
(David Lindes {lindes at users.sourceforge.net})
TS added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct
TS added function perl_ARCurrencyDetailList
TS fixed support.c:my_strtok, perl_BuildEntryList
(ars_GetEntry crashed when retrieving join form entries)
TS added preprocessor directives (ARS.xs, support.c, support-h.template)
for conditional compilation depending on API version
(compiles now against version 4.5.1 to 6.3.0)
JCM added ars_encodeStatusHistory() routine
released=06/24/2005 version=1.84
JCM fixed 'autosplit' issue in Makefile.PL
html/changes.html view on Meta::CPAN
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ownerObjList parameter to ars_GetListContainer
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed AR_SERVER_INFO type identification in infra/exsi.pl
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>updated version numbers in INSTALLATION
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_DateToJulianDate, ars_GetListLicense, ars_ValidateMultipleLicenses,
ars_GetServerCharSet, ars_GetClientCharSet </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed actionList/elseList bug in ars_SetActiveLink
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added AR_DATA_TYPE_VIEW handling to perl_ARValueStruct_Assign,rev_ARActiveLinkActionList
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>modified Makefile.PL for easier automated testing (handling of ARSPERLTEST_PARAM)
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_GetListRole, ars_Signal, ars_GetTextForErrorMessage
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='red'>changed return struct of ars_GetListGroup
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed IVLD macro in support-h.template
</table></td></tr></table>
html/changes.html view on Meta::CPAN
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed handling of qualifier structs in perl_ARFieldLimitStruct, perl_ARJoinSchema,
perl_ARArchiveInfoStruct; those functions now return the converted perl structure instead of the pointer to a C structure. </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed Makefile.PL to work with $ARSAPI containing spaces on Windows
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_DeleteContainer (changes to ARS.xs, ARS.pm)
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed Makefile.PL to use $ra_arlibs for Version <= 5.0 on Windows
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed rev_ARValueStructStr2Type: use strcasecmp instead of strncasecmp
(failure to differentiate between string and substring) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added "case AR_DATA_TYPE_CURRENCY" to perl_ARValueStruct
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>moved existing code for AR_DATA_TYPE_CURRENCY from sv_to_ARValueStruct
to new function sv_to_ARCurrencyStruct, completed ARCurrencyStruct handling </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added handling of AR_DATA_TYPE_DATE, AR_DATA_TYPE_TIME_OF_DAY,
to rev_ARValueStruct, sv_to_ARValueStruct </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added conversion functions rev_ARDisplayInstanceList,
rev_ARDisplayInstanceStruct and rev_ARPermissionList </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed DESTROY(ctrl) (use safefree if allocated with safemalloc)
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>minor fix in in rev_ARValueStructKW2KN (*keyword == '\0')
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>minor fix in rev_ARCoordList_helper ( if (hv_exists("x"... )
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>changed handling of keyword values in rev_ARValueStruct
html/changes.html view on Meta::CPAN
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>warning cleanup in test files (t/02export.t, t/13join.t)
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added ars_SetLogging (changes to ARS.xs, ARS.pm, support.c, support-h.template,
html/manual/toc.html; new files: html/manual/ars_SetLogging.html, t/21setlogging.t) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed pointer dereferencing error in supportrev.c:strmakHval
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed supportrev.c:strcasecmp, strncasecmp; failure to differentiate between
string and substring (e.g. "page_holder" and "page") </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed support.c:perl_ARByteList (Bug ID 1213180)
(David Lindes {lindes at users.sourceforge.net}) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added support for DATA_TYPE_CURRENCY to perl_ARFieldLimitStruct
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added function perl_ARCurrencyDetailList
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed support.c:my_strtok, perl_BuildEntryList
(ars_GetEntry crashed when retrieving join form entries) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added preprocessor directives (ARS.xs, support.c, support-h.template)
for conditional compilation depending on API version (compiles now against version 4.5.1 to 6.3.0) </font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(JCM)</td><td width='90%'><font color='black'>added ars_encodeStatusHistory() routine
</table></td></tr></table>
html/copying.html view on Meta::CPAN
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.<p>
<dt>12.
<dd>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.<p>
</dl>
<center><p align=center>END OF TERMS AND CONDITIONS</p></center>
<hr>
<center><h2 align=center>Appendix: How to Apply These Terms to Your New Programs</h2></center>
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
html/manual/OO/connection.html view on Meta::CPAN
<tr><td>ARS::AR_LIST_SCHEMA_ALL</td><td>get list of all schemas</td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_REGULAR</td><td> get list of all regular
schemas</td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_JOIN </td><td> get list of all join schemas </td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_VIEW </td><td> get list of all view schemas </td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_UPLINK </td><td> get list of all schemas
depending </td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_DOWNLINK </td><td> get list of all schemas the
given </td></tr>A
<tr><td>ARS::AR_LIST_SCHEMA_DIALOG </td><td> get list of all dialog schemas</td></tr>
<tr><td>ARS::AR_LIST_SCHEMA_ALL_WITH_DATA </td><td> get list of all schemas
with data</td></tr>
</table>
In addition, you may optionally OR (logical OR) the value
<code>ARS::AR_HIDDEN_INCREMENT</code> with the above to include
hidden schemas in the final list of available schemas.
<DT><A NAME="openForm"><B>openForm()</B></A><DD>
<PRE>
html/manual/ars_APIVersion.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Programmer's Manual
</title>
<style type="text/css">
/*<![CDATA[*/
body.c2 {background-color: rgb(255, 255, 255);}
dt.c1 {font-weight: bold}
/*]]>*/
</style>
</head>
<body class="c2">
<h2>
<code>$version = ars_APIVersion()</code>
</h2>
<p>
html/manual/ars_DateToJulianDate.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Programmer's Manual
</title>
<style type="text/css">
/*<![CDATA[*/
dt.c1 {font-weight: bold}
p.c1 {font-style: italic}
/*]]>*/
</style>
</head>
<body>
<h2>
<code>ars_DateToJulianDate(control, year, month, day)</code>
</h2>
<p>
html/manual/ars_ExecuteProcess.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Manual - ars_ExecuteProcess
</title>
<style type="text/css">
/*<![CDATA[*/
body {
background-color: #FFFFFF;
}
dt.c1 {font-weight: bold}
p.c1 {font-style: italic}
/*]]>*/
</style>
</head>
<body>
<h2>
html/manual/ars_GetClientCharSet.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Programmer's Manual
</title>
<style type="text/css">
/*<![CDATA[*/
dt.c1 {font-weight: bold}
/*]]>*/
/*<![CDATA[*/
p.c1 {font-style: italic}
/*]]>*/
</style>
</head>
<body>
<h2>
<code>ars_GetClientCharSet(control)</code>
</h2>Retrieves a string that represents the name of the character set the client is using. The
API assumes that all character data the client passes it is encoded in this character set, and
returns all character data encoded in this character set. If this differs from the server
html/manual/ars_GetListEntry.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Manual - ars_GetListEntry
</title>
<style type="text/css">
/*<![CDATA[*/
body {
background-color: #FFFFFF;
}
p.c2 {font-style: italic}
dt.c1 {font-weight: bold}
/*]]>*/
</style>
</head>
<body>
<h2>
html/manual/ars_GetListEntryWithFields.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Manual - ars_GetListEntryWithFields
</title>
<style type="text/css">
/*<![CDATA[*/
body {
background-color: #FFFFFF;
}
dt.c1 {font-weight: bold}
/*]]>*/
</style>
</head>
<body>
<h2>
<code>ars_GetListEntryWithFields( ctrl, schema, qualifier, maxRetrieve=0, firstRetrieve=0, #
html/manual/ars_GetListField.html view on Meta::CPAN
<h2><code>ars_GetListField(control,schema,changedsince=0,fieldType)</code></h2>
Fetches the Field ID's for all fields in the schema specified. <code>changedsince</code>
is an optional unix timestamp and defaults to 0.
<ul>
The <code>fieldType</code> parameter allows you to specify
what field type(s) to retrieve. This is a bitmask.
<ul>
<li>Bit 0: Retrieve data fields (AR_FIELD_TYPE_DATA).
</li>
<li>Bit 1: Retrieve trim fields (AR_FIELD_TYPE_TRIM).
</li>
<li>Bit 2: Retrieve control fields (AR_FIELD_TYPE_CONTROL).
</li>
<li>Bit 3: Retrieve page fields (AR_FIELD_TYPE_PAGE).
</li>
html/manual/ars_GetServerCharSet.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Programmer's Manual
</title>
<style type="text/css">
/*<![CDATA[*/
dt.c1 {font-weight: bold}
p.c1 {font-style: italic}
/*]]>*/
</style>
</head>
<body>
<h2>
<code>ars_GetServerCharSet(control)</code>
</h2>Retrieves a string that represents the name of the character set the API library uses to
communicate with the server. If this differs from the client charset, the API converts the data
html/manual/toc.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
ARSperl Manual
</title>
<style type="text/css">
/*<![CDATA[*/
body {
background-color: #FFFFFF;
}
dt.c1 {font-weight: bold}
/*]]>*/
</style>
</head>
<body>
<h1>
ARSperl Programmer's Manual
infra/exsi.pl view on Meta::CPAN
}
}
footer();
exit 0;
sub typemap {
my $t = shift;
my %m = ( 'int' => 'AR_DATA_TYPE_INTEGER',
'long' => 'AR_DATA_TYPE_INTEGER',
'real' => 'AR_DATA_TYPE_REAL',
'char' => 'AR_DATA_TYPE_CHAR',
'String' => 'AR_DATA_TYPE_CHAR',
'diary' => 'AR_DATA_TYPE_DIARY',
'enum' => 'AR_DATA_TYPE_ENUM',
'time' => 'AR_DATA_TYPE_TIME',
'bitmask' => 'AR_DATA_TYPE_BITMASK',
'bytes' => 'AR_DATA_TYPE_BYTES'
);
$t =~ s/unsigned\s//g;
return $m{$t} if ( defined($m{$t}) );
return undef;
}
sub header {
print "
/* DO NOT EDIT. this file was automatically generated by
support-h.template view on Meta::CPAN
char *name;
} FieldPermissionTypeMap[] = {
/*FIELDPERMISSIONTYPEMAP*/
{ TYPEMAP_LAST, "" }
};
static struct {
unsigned int number;
char *name;
} DataTypeMap[] = {
/*DATATYPEMAP*/
{ TYPEMAP_LAST, "" }
};
static struct {
unsigned long number;
char *name;
} ByteListTypeMap[] = {
/*BYTELISTTYPEMAP*/
{ TYPEMAP_LAST, "" }
};
support-h.template view on Meta::CPAN
#define AP_ERR_NEEDKEYS 80022, "Required hash keys do not exists"
#define AP_ERR_NEEDKEYSKEYS 80023 /* specify what keys */
#define AP_ERR_PREREVFAIL 80024, "Failed to convert some perl structures to ars structures. Create/Set operation aborted."
#define AP_ERR_ATTACH 80025 /* roll your own text */
#define AP_ERR_INV_ARGS 80026 /* roll your own - invalid argument(s) */
#define AP_ERR_INV_ARITH 80027 /*, "Unknown arith operation in ARArithOpStruct" */
#define AP_ERR_ENUM_LISTSTYLE 80028, "Unknown EnumLimits listStyle"
#define AP_ERR_CURRENCY_STRUCT 80029, "Bad currency struct hash (missing a key or a key had an unexpected value)"
#define AP_ERR_TYPEMAP 80030, "Cannot resolve typemap value"
#define AP_ERR_INV_RETURN 80031, "Invalid return data"
#define AP_ERR_DATATYPE 80032, "Unsupported data type"
#endif /* __support_h_ */
SV *
perl_ARValueStruct_Assign(ARControlStruct * ctrl, ARValueStruct * in)
{
ARStatusList status;
int i;
Zero(&status, 1, ARStatusList);
switch (in->dataType) {
case AR_DATA_TYPE_KEYWORD:
for (i = 0; KeyWordMap[i].number != TYPEMAP_LAST; i++) {
if (KeyWordMap[i].number == in->u.keyNum)
break;
}
return newSVpv(KeyWordMap[i].name, KeyWordMap[i].len);
break;
case AR_DATA_TYPE_INTEGER:
return newSViv(in->u.intVal);
case AR_DATA_TYPE_REAL:
return newSVnv(in->u.realVal);
case AR_DATA_TYPE_DIARY: /* this is the set-fields special
* case */
case AR_DATA_TYPE_CHAR:
return newSVpv(in->u.charVal, 0);
case AR_DATA_TYPE_ENUM:
return newSViv(in->u.enumVal);
case AR_DATA_TYPE_TIME:
return newSViv(in->u.timeVal);
case AR_DATA_TYPE_BITMASK:
return newSViv(in->u.maskVal);
#if AR_EXPORT_VERSION >= 3
case AR_DATA_TYPE_BYTES:
return perl_ARByteList(ctrl, in->u.byteListVal);
case AR_DATA_TYPE_ULONG:
return newSViv(in->u.ulongVal); /* FIX -- does perl have
* unsigned long? */
case AR_DATA_TYPE_COORDS:
return perl_ARList(ctrl,
(ARList *) in->u.coordListVal,
(ARS_fn) perl_ARCoordStruct,
sizeof(ARCoordStruct));
#endif
#if AR_EXPORT_VERSION >= 7L
case AR_DATA_TYPE_TIME_OF_DAY:
return newSViv(in->u.timeOfDayVal);
case AR_DATA_TYPE_DATE:
return newSViv(in->u.dateVal);
case AR_DATA_TYPE_CURRENCY:
return perl_ARCurrencyStruct(ctrl, in->u.currencyVal);
case AR_DATA_TYPE_VIEW:
case AR_DATA_TYPE_DISPLAY:
return newSVpv(in->u.charVal, 0);
#endif
#if AR_EXPORT_VERSION >= 4
case AR_DATA_TYPE_ATTACH:
return perl_ARAttach(ctrl, in->u.attachVal);
case AR_DATA_TYPE_DECIMAL:
return newSVpv(in->u.decimalVal, 0);
#endif
case AR_DATA_TYPE_NULL:
return newSVsv(&PL_sv_undef);
default:
{
char dt[128];
sprintf(dt, "%u (in function perl_ARValueStruct_Assign)", in->dataType);
ARError_add(AR_RETURN_WARNING, AP_ERR_DATATYPE);
ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE, dt);
}
return newSVsv(&PL_sv_undef); /* FIX */
}
}
/* this one is for "normal" field/value decoding */
SV *
perl_ARValueStruct(ARControlStruct * ctrl, ARValueStruct * in)
{
ARDiaryList diaryList;
ARStatusList status;
int ret, i;
Zero(&status, 1, ARStatusList);
switch (in->dataType) {
case AR_DATA_TYPE_KEYWORD:
for (i = 0; KeyWordMap[i].number != TYPEMAP_LAST; i++) {
if (KeyWordMap[i].number == in->u.keyNum)
break;
}
return newSVpv(KeyWordMap[i].name, KeyWordMap[i].len);
break;
case AR_DATA_TYPE_INTEGER:
return newSViv(in->u.intVal);
case AR_DATA_TYPE_REAL:
return newSVnv(in->u.realVal);
case AR_DATA_TYPE_CHAR:
return newSVpv(in->u.charVal, 0);
case AR_DATA_TYPE_DIARY:
#if AR_EXPORT_VERSION >= 4
ret = ARDecodeDiary(ctrl, in->u.diaryVal, &diaryList, &status);
#else
ret = ARDecodeDiary(in->u.diaryVal, &diaryList, &status);
#endif
if (ARError(ret, status)) {
return newSVsv(&PL_sv_undef);
} else {
SV *array;
array = perl_ARList(ctrl,
(ARList *) & diaryList,
(ARS_fn) perl_diary,
sizeof(ARDiaryStruct));
FreeARDiaryList(&diaryList, FALSE);
return array;
}
case AR_DATA_TYPE_ENUM:
return newSViv(in->u.enumVal);
case AR_DATA_TYPE_TIME:
return newSViv(in->u.timeVal);
case AR_DATA_TYPE_BITMASK:
return newSViv(in->u.maskVal);
#if AR_EXPORT_VERSION >= 3
case AR_DATA_TYPE_BYTES:
return perl_ARByteList(ctrl, in->u.byteListVal);
case AR_DATA_TYPE_ULONG:
return newSViv(in->u.ulongVal); /* FIX -- does perl have
* unsigned long? */
case AR_DATA_TYPE_COORDS:
return perl_ARList(ctrl,
(ARList *) in->u.coordListVal,
(ARS_fn) perl_ARCoordStruct,
sizeof(ARCoordStruct));
#endif
#if AR_EXPORT_VERSION >= 4
case AR_DATA_TYPE_ATTACH:
return perl_ARAttach(ctrl, in->u.attachVal);
case AR_DATA_TYPE_DECIMAL:
return newSVpv(in->u.decimalVal, 0);
#endif
#if AR_EXPORT_VERSION >= 7L
case AR_DATA_TYPE_TIME_OF_DAY:
return newSViv(in->u.timeOfDayVal);
case AR_DATA_TYPE_DATE:
return newSViv(in->u.dateVal);
case AR_DATA_TYPE_CURRENCY:
return perl_ARCurrencyStruct(ctrl, in->u.currencyVal);
#endif
case AR_DATA_TYPE_NULL:
default:
return newSVsv(&PL_sv_undef); /* FIX */
}
}
SV *
perl_ARStatHistoryValue(ARControlStruct * ctrl, ARStatHistoryValue * in)
{
HV *hash = newHV();
hv_store(hash, "userOrTime", strlen("userOrTime") , newSViv(in->userOrTime), 0);
SV *
perl_ARReferenceStruct(ARControlStruct * ctrl, ARReferenceStruct * in)
{
HV *hash = newHV();
hv_store(hash, "label", strlen("label") ,
newSVpv(in->label, 0), 0);
hv_store(hash, "description", strlen("description") ,
newSVpv(in->description, 0), 0);
hv_store(hash, "type", strlen("type") , newSViv(in->type), 0);
hv_store(hash, "dataType", strlen("dataType") , newSViv(in->reference.dataType), 0);
if (in->reference.dataType == ARREF_DATA_ARSREF)
hv_store(hash, "name", strlen("name") ,
perl_ARNameType(ctrl, &(in->reference.u.name)), 0);
else {
hv_store(hash, "permittedGroups", strlen("permittedGroups") ,
perl_ARList(ctrl,
(ARList *) &(in->reference.u.extRef.permittedGroups),
(ARS_fn) perl_ARInternalId,
sizeof(ARInternalId)), 0);
hv_store(hash, "value", strlen("value") ,
perl_ARValueStruct(ctrl, &(in->reference.u.extRef.value)), 0);
SV *
perl_ARFieldLimitStruct(ARControlStruct * ctrl, ARFieldLimitStruct * in)
{
HV *hash = newHV();
SV *qual = newSViv(0);
DBG( ("FLS dt=%d\n", in->dataType) );
hv_store(hash, "dataType", strlen("dataType") , newSViv(in->dataType), 0);
switch (in->dataType) {
case AR_DATA_TYPE_KEYWORD:
return &PL_sv_undef;
case AR_DATA_TYPE_INTEGER:
hv_store(hash, "min", strlen("min") , newSViv(in->u.intLimits.rangeLow), 0);
hv_store(hash, "max", strlen("max") , newSViv(in->u.intLimits.rangeHigh), 0);
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_REAL:
hv_store(hash, "min", strlen("min") , newSVnv(in->u.realLimits.rangeLow), 0);
hv_store(hash, "max", strlen("max") , newSVnv(in->u.realLimits.rangeHigh), 0);
hv_store(hash, "precision", strlen("precision") ,
newSViv(in->u.realLimits.precision), 0);
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_CHAR:
hv_store(hash, "maxLength", strlen("maxLength") ,
newSViv(in->u.charLimits.maxLength), 0);
switch (in->u.charLimits.menuStyle) {
case AR_MENU_APPEND:
hv_store(hash, "menuStyle", strlen("menuStyle") , newSVpv("append", 0), 0);
break;
case AR_MENU_OVERWRITE:
hv_store(hash, "menuStyle", strlen("menuStyle") , newSVpv("overwrite", 0), 0);
break;
hv_store(hash, "storageOptionForCLOB", strlen("storageOptionForCLOB") , newSVpv("inrow", 0), 0);
break;
case AR_STORE_OPT_OUTROW:
hv_store(hash, "storageOptionForCLOB", strlen("storageOptionForCLOB") , newSVpv("outrow", 0), 0);
break;
}
#endif
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_DIARY:
switch (in->u.diaryLimits.fullTextOptions) {
case AR_FULLTEXT_OPTIONS_NONE:
hv_store(hash, "fullTextOptions", strlen("fullTextOptions") , newSVpv("none", 0), 0);
break;
case AR_FULLTEXT_OPTIONS_INDEXED:
hv_store(hash, "fullTextOptions", strlen("fullTextOptions") , newSVpv("indexed", 0), 0);
break;
}
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_ENUM:
/*
* as of 5.x, eunmLimits went from a list of ARNameType
* to an AREnumLimitsStruct (true for 5.0.1 and beyond -
* 5.0beta still had it as a list of NameTypes)
*/
#if AR_EXPORT_VERSION >= 6L
DBG( ("case ENUM api v6+\n") );
hv_store(hash, "enumLimits", strlen("enumLimits") ,
perl_AREnumLimitsStruct(ctrl,
DBG( ("case ENUM api v-6\n") );
hv_store(hash, "enumLimits", strlen("enumLimits") ,
perl_ARList(ctrl, (ARList *) & (in->u.enumLimits),
(ARS_fn) perl_ARNameType,
sizeof(ARNameType)),
0);
#endif
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_TIME:
return &PL_sv_undef;
case AR_DATA_TYPE_BITMASK:
DBG( ("case BITMASK\n") );
#if AR_EXPORT_VERSION >= 6L
hv_store(hash, "maskLimits", strlen("maskLimits") ,
perl_AREnumLimitsStruct(ctrl,
&(in->u.enumLimits))
,0
);
#else
hv_store(hash, "maskLimits", strlen("maskLimits") ,
perl_ARList(ctrl, (ARList *) & (in->u.enumLimits),
(ARS_fn) perl_ARNameType,
sizeof(ARNameType)),
0);
#endif
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_BYTES:
return &PL_sv_undef;
case AR_DATA_TYPE_DECIMAL:
hv_store(hash, "rangeLow", strlen("rangeLow") , newSVpv(in->u.decimalLimits.rangeLow, 0), 0);
hv_store(hash, "rangeHigh", strlen("rangeHigh") , newSVpv(in->u.decimalLimits.rangeHigh, 0), 0);
hv_store(hash, "precision", strlen("precision") , newSViv(in->u.decimalLimits.precision), 0);
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_ATTACH:
hv_store(hash, "maxSize", strlen("maxSize") , newSViv(in->u.attachLimits.maxSize), 0);
hv_store(hash, "attachType", strlen("attachType") , newSViv(in->u.attachLimits.attachType), 0);
return newRV_noinc((SV *) hash);
#if AR_EXPORT_VERSION >= 7
case AR_DATA_TYPE_CURRENCY:
hv_store(hash, "rangeLow", strlen("rangeLow") , newSVpv(in->u.currencyLimits.rangeLow, 0), 0);
hv_store(hash, "rangeHigh", strlen("rangeHigh") , newSVpv(in->u.currencyLimits.rangeHigh, 0), 0);
hv_store(hash, "precision", strlen("precision") , newSViv(in->u.currencyLimits.precision), 0);
hv_store(hash, "functionalCurrencies", strlen("functionalCurrencies"), perl_ARCurrencyDetailList(ctrl,&(in->u.currencyLimits.functionalCurrencies)), 0 );
hv_store(hash, "allowableCurrencies", strlen("allowableCurrencies"), perl_ARCurrencyDetailList(ctrl,&(in->u.currencyLimits.allowableCurrencies)), 0 );
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_DATE:
return &PL_sv_undef;
case AR_DATA_TYPE_TIME_OF_DAY:
return &PL_sv_undef;
#endif
case AR_DATA_TYPE_TABLE:
hv_store(hash, "numColumns", strlen("numColumns") , newSViv(in->u.tableLimits.numColumns), 0);
hv_store(hash, "qualifier", strlen("qualifier"), newRV_inc((SV*) perl_qualifier(ctrl,&(in->u.tableLimits.qualifier))), 0);
hv_store(hash, "maxRetrieve", strlen("maxRetrieve") , newSViv(in->u.tableLimits.maxRetrieve), 0);
hv_store(hash, "schema", strlen("schema") , newSVpv(in->u.tableLimits.schema, 0), 0);
hv_store(hash, "server", strlen("server") , newSVpv(in->u.tableLimits.server, 0), 0);
#if AR_EXPORT_VERSION >= 8L
hv_store(hash, "sampleSchema", strlen("sampleSchema") , newSVpv(in->u.tableLimits.sampleSchema, 0), 0);
hv_store(hash, "sampleServer", strlen("sampleServer") , newSVpv(in->u.tableLimits.sampleServer, 0), 0);
#endif
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_COLUMN:
hv_store(hash, "parent", strlen("parent"), perl_ARInternalId(ctrl, &(in->u.columnLimits.parent)), 0);
hv_store(hash, "dataField", strlen("dataField"), perl_ARInternalId(ctrl, &(in->u.columnLimits.dataField)), 0);
#if AR_EXPORT_VERSION >= 6L
hv_store(hash, "dataSource", strlen("dataSource") , newSViv(in->u.columnLimits.dataSource), 0);
#endif
hv_store(hash, "colLength", strlen("colLength") , newSViv(in->u.columnLimits.colLength), 0);
return newRV_noinc((SV *) hash);
#if AR_EXPORT_VERSION >= 6L
case AR_DATA_TYPE_VIEW:
hv_store(hash, "maxLength", strlen("maxLength") , newSViv(in->u.viewLimits.maxLength), 0);
return newRV_noinc((SV *) hash);
case AR_DATA_TYPE_DISPLAY:
hv_store(hash, "maxLength", strlen("maxLength") , newSViv(in->u.displayLimits.maxLength), 0);
#if AR_API_VERSION >= 14
switch (in->u.charLimits.lengthUnits) {
case AR_LENGTH_UNIT_BYTE:
hv_store(hash, "lengthUnits", strlen("lengthUnits") , newSVpv("byte", 0), 0);
break;
case AR_LENGTH_UNIT_CHAR:
hv_store(hash, "lengthUnits", strlen("lengthUnits") , newSVpv("char", 0), 0);
break;
}
#endif
return newRV_noinc((SV *) hash);
#endif
case AR_DATA_TYPE_NULL:
default:
/* no meaningful limits */
return &PL_sv_undef;
}
}
SV *
perl_ARAssignStruct(ARControlStruct * ctrl, ARAssignStruct * in)
{
HV *hash = newHV();
switch (in->assignType) {
case AR_ASSIGN_TYPE_NONE:
hv_store(hash, "none", strlen("none") , &PL_sv_undef, 0);
break;
case AR_ASSIGN_TYPE_VALUE:
/*
* we will also be storing the specific AR_DATA_TYPE_* since
* this is used in the rev_* routines to translate back. we
* wouldnt be able to derive the datatype in any other
* fashion.
*/
/*
* 1998-03-12 patch the assign struct stores assign field
* actions on diary fields as character assignments (makes
* sense). but this means we can't use the standard
* perl_ARValueStruct call to decode. we need to have a
}
#endif /* ARS 3 */
void
dup_Value(ARControlStruct * ctrl, ARValueStruct * n, ARValueStruct * in)
{
n->dataType = in->dataType;
switch (in->dataType) {
case AR_DATA_TYPE_NULL:
case AR_DATA_TYPE_KEYWORD:
case AR_DATA_TYPE_INTEGER:
case AR_DATA_TYPE_REAL:
case AR_DATA_TYPE_TIME:
case AR_DATA_TYPE_BITMASK:
case AR_DATA_TYPE_ENUM:
case AR_DATA_TYPE_ULONG:
n->u = in->u;
break;
#if AR_EXPORT_VERSION > 6L
case AR_DATA_TYPE_DATE:
n->u = in->u;
break;
case AR_DATA_TYPE_CURRENCY:
n->u.currencyVal = dup_ARCurrencyStruct(ctrl,
in->u.currencyVal);
break;
#endif
case AR_DATA_TYPE_CHAR:
n->u.charVal = strdup(in->u.charVal);
break;
case AR_DATA_TYPE_DECIMAL:
n->u.decimalVal = strdup(in->u.decimalVal);
break;
case AR_DATA_TYPE_DIARY:
n->u.diaryVal = strdup(in->u.diaryVal);
break;
case AR_DATA_TYPE_COORDS:
n->u.coordListVal = dup_ARCoordList(ctrl,
in->u.coordListVal);
break;
case AR_DATA_TYPE_BYTES:
n->u.byteListVal = dup_ARByteList(ctrl,
in->u.byteListVal);
break;
}
}
ARArithOpStruct *
dup_ArithOp(ARControlStruct * ctrl, ARArithOpStruct * in)
{
ARArithOpStruct *n;
hv_store(hash, "queryValue", strlen("queryValue") ,
perl_ARQueryValueStruct(ctrl, in->u.queryValue), 0);
break;
case AR_FIELD_CURRENT:
hv_store(hash, "queryCurrent", strlen("queryCurrent") ,
newSViv(in->u.fieldId), 0);
break;
}
#if AR_EXPORT_VERSION >= 7L
if( in->tag >= AR_FIELD_OFFSET && in->tag <= AR_FIELD_OFFSET + AR_MAX_STD_DATA_TYPE ){
#else
if( in->tag >= AR_FIELD_OFFSET && in->tag <= AR_FIELD_OFFSET + AR_DATA_TYPE_ATTACH ){
#endif
unsigned int dt = in->tag - AR_FIELD_OFFSET;
hv_store( hash, "fieldId", strlen("fieldId"), newSViv(in->u.fieldId), 0 );
hv_store( hash, "dataType", strlen("dataType"), perl_dataType_names(ctrl,&dt), 0 );
/* hv_store( hash, "dataType", strlen("dataType"), newSViv(in->u.dataType), 0); */
}
return newRV_noinc((SV *) hash);
}
hv_store(base, "name", strlen("name") , newSVpv(fieldName, 0), 0);
hv_store(base, "type", strlen("type") , newSViv(dataType), 0);
return 0;
}
unsigned int
fieldcache_get_data_type( HV *fields, ARInternalId fieldId )
{
int dataType = AR_DATA_TYPE_MAX_TYPE + 100;
SV **field;
SV **val;
HV *base;
char field_string[20];
sprintf(field_string, "%i", (int) fieldId);
field = hv_fetch(fields, field_string, strlen(field_string), FALSE );
if( !field ){
/* (void) ARError_add(ARSPERL_TRACEBACK, 1,
AV *array, *array2;
HV *hash;
SV **fetch, *type, *val, **fetch2;
char *bytelist;
unsigned int i;
STRLEN len;
out->dataType = dataType;
if (!SvOK(in)) {
/* pass a NULL */
out->dataType = AR_DATA_TYPE_NULL;
} else {
switch (dataType) {
case AR_DATA_TYPE_NULL:
break;
case AR_DATA_TYPE_KEYWORD:
out->u.keyNum = SvIV(in);
break;
case AR_DATA_TYPE_INTEGER:
out->u.intVal = SvIV(in);
break;
case AR_DATA_TYPE_REAL:
out->u.realVal = SvNV(in);
break;
case AR_DATA_TYPE_CHAR:
out->u.charVal = strdup(SvPV(in, PL_na));
/* charData = SvPV( in, slen );
out->u.charVal = MALLOCNN( slen + 1 );
strncpy( out->u.charVal, charData, slen );
out->u.charVal[slen] = '\0'; */
break;
case AR_DATA_TYPE_DIARY:
out->u.diaryVal = strdup(SvPV(in, PL_na));
break;
case AR_DATA_TYPE_ENUM:
out->u.enumVal = SvIV(in);
break;
case AR_DATA_TYPE_TIME:
out->u.timeVal = SvIV(in);
break;
case AR_DATA_TYPE_BITMASK:
out->u.maskVal = SvIV(in);
break;
#if AR_EXPORT_VERSION >= 7L
case AR_DATA_TYPE_DATE:
out->u.dateVal = SvIV(in);
break;
case AR_DATA_TYPE_TIME_OF_DAY:
out->u.timeOfDayVal = SvIV(in);
break;
case AR_DATA_TYPE_CURRENCY:
out->u.currencyVal = MALLOCNN(sizeof(ARCurrencyStruct));
if( sv_to_ARCurrencyStruct(ctrl,in,out->u.currencyVal) == -1 )
return -1;
break;
#endif /* 7L */
#if AR_EXPORT_VERSION >= 3
case AR_DATA_TYPE_BYTES:
if (SvROK(in)) {
if (SvTYPE(hash = (HV *) SvRV(in)) == SVt_PVHV) {
fetch = hv_fetch(hash, "type", 4, FALSE);
if (!fetch) {
ARError_add(AR_RETURN_ERROR, AP_ERR_BYTE_LIST);
return -1;
}
type = *fetch;
if (!(SvOK(type) && SvTYPE(type) < SVt_PVAV)) {
ARError_add(AR_RETURN_ERROR, AP_ERR_BYTE_LIST);
out->u.byteListVal->type = SvIV(type);
bytelist = SvPV(val, len);
out->u.byteListVal->numItems = len;
out->u.byteListVal->bytes = MALLOCNN(len);
memcpy(out->u.byteListVal->bytes, bytelist, len);
break;
}
}
ARError_add(AR_RETURN_ERROR, AP_ERR_BYTE_LIST);
return -1;
case AR_DATA_TYPE_ULONG:
out->u.ulongVal = SvIV(in); /* FIX -- does perl have
* ulong ? */
break;
#if AR_EXPORT_VERSION >= 4
case AR_DATA_TYPE_DECIMAL:
out->u.decimalVal = strdup(SvPV(in, PL_na));
break;
case AR_DATA_TYPE_ATTACH:
/* value must be a hash reference */
if (SvROK(in)) {
if (SvTYPE(hash = (HV *) SvRV(in)) == SVt_PVHV) {
ARAttachStruct *attachp = MALLOCNN(sizeof(ARAttachStruct));
ARLocStruct *locp = &(attachp->loc);
long size = 0;
SV *name = NULL;
/*
* the hash should contain keys:
out->u.attachVal = attachp;
break;
}
}
ARError_add(AR_RETURN_ERROR, AP_ERR_ATTACH,
"Non hash-reference passed as attachment value.");
return -1;
break;
#endif
case AR_DATA_TYPE_COORDS:
if (SvTYPE(array = (AV *) SvRV(in)) == SVt_PVAV) {
len = av_len(array) + 1;
out->u.coordListVal = MALLOCNN(sizeof(ARCoordList));
out->u.coordListVal->numItems = len;
out->u.coordListVal->coords = MALLOCNN(sizeof(ARCoordStruct) * len);
for (i = 0; i < len; i++) {
fetch = av_fetch(array, i, 0);
if (fetch && SvTYPE(array2 = (AV *) SvRV(*fetch)) == SVt_PVAV &&
av_len(array2) == 1) {
fetch2 = av_fetch(array2, 0, 0);
case AR_CHAR_MENU_LIST:
{
SV *val;
val = perl_ARCharMenuList( ctrl, &(p->u.menuList) );
ret = val;
}
break;
case AR_CHAR_MENU_SQL:
case AR_CHAR_MENU_SS:
case AR_CHAR_MENU_FILE:
case AR_CHAR_MENU_DATA_DICTIONARY:
case AR_CHAR_MENU_QUERY:
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, ": Unsupported case" );
ret = &PL_sv_undef;
break;
default:
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, ": Invalid case" );
ret = &PL_sv_undef;
break;
}
}
supportrev.c view on Meta::CPAN
if (val && *val && type && *type && SvPOK(*type)) {
char *tp, *vp;
STRLEN len;
char *str;
if( SvOK(*val) ){
str = SvPV( *val, len );
if( len > 0 && str[0] == '\0' ){
m->dataType = AR_DATA_TYPE_KEYWORD;
if (rev_ARValueStructKW2KN(ctrl, str, &(m->u.keyNum)) == -1) return -1;
return 0;
}
}
tp = SvPV(*type, PL_na);
(void) rev_ARValueStructStr2Type(ctrl, tp, &(m->dataType));
switch (m->dataType) {
case AR_DATA_TYPE_NULL:
m->u.intVal = 0;
break;
case AR_DATA_TYPE_KEYWORD:
vp = SvPV(*val, PL_na);
if (rev_ARValueStructKW2KN(ctrl, vp, &(m->u.keyNum)) == -1)
return -1;
break;
case AR_DATA_TYPE_INTEGER:
m->u.intVal = SvIV(*val);
break;
case AR_DATA_TYPE_REAL:
m->u.realVal = SvNV(*val);
break;
case AR_DATA_TYPE_CHAR:
if (strmakHVal(h, k, &(m->u.charVal)) == -1)
return -1;
break;
case AR_DATA_TYPE_DIARY:
if (rev_ARValueStructDiary(ctrl, h, k, &(m->u.diaryVal)) == -1)
return -1;
break;
case AR_DATA_TYPE_ENUM:
m->u.enumVal = (unsigned long) SvIV(*val);
break;
case AR_DATA_TYPE_TIME:
m->u.timeVal = (ARTimestamp) SvIV(*val);
break;
case AR_DATA_TYPE_BITMASK:
m->u.maskVal = (unsigned long) SvIV(*val);
break;
#if AR_EXPORT_VERSION >= 3
case AR_DATA_TYPE_BYTES:
m->u.byteListVal = (ARByteList *) MALLOCNN(sizeof(ARByteList));
if (rev_ARByteList(ctrl, h, k, m->u.byteListVal) == -1)
return -1;
break;
case AR_DATA_TYPE_JOIN:
return -1; /* FIX: implement */
break;
case AR_DATA_TYPE_TRIM:
return -1; /* FIX: implement */
break;
case AR_DATA_TYPE_CONTROL:
return -1; /* FIX: implement */
break;
case AR_DATA_TYPE_COORDS:
m->u.coordListVal = (ARCoordList *) MALLOCNN(sizeof(ARCoordList));
if (rev_ARCoordList(ctrl, h, k, m->u.coordListVal) == -1)
return -1;
break;
case AR_DATA_TYPE_ULONG:
m->u.ulongVal = (unsigned long) SvIV(*val);
break;
#endif
#if AR_EXPORT_VERSION >= 4
case AR_DATA_TYPE_DECIMAL:
if (strmakHVal(h, k, &(m->u.decimalVal)) == -1)
return -1;
break;
#endif
#if AR_EXPORT_VERSION >= 7
case AR_DATA_TYPE_DATE:
m->u.dateVal = SvIV(*val);
break;
case AR_DATA_TYPE_TIME_OF_DAY:
m->u.timeOfDayVal = (ARTime) SvIV(*val);
break;
case AR_DATA_TYPE_CURRENCY:
m->u.currencyVal = (ARCurrencyStruct*) MALLOCNN(sizeof(ARCurrencyStruct));
if( sv_to_ARCurrencyStruct(ctrl,*val,m->u.currencyVal) == -1 )
return -1;
break;
case AR_DATA_TYPE_VIEW:
case AR_DATA_TYPE_DISPLAY:
if (strmakHVal(h, k, &(m->u.charVal)) == -1)
return -1;
break;
#endif
default:
ARError_add(AR_RETURN_WARNING, AP_ERR_GENERAL,
"rev_ARValueStruct: unknown data type:");
ARError_add(AR_RETURN_WARNING, AP_ERR_CONTINUE,
tp);
return -2;
supportrev.c view on Meta::CPAN
// pcase = SvPV_nolen(*val);
// p->reference.dataType = caseLookUpTypeNumber( (TypeMapStruct*) dataType, pcase );
HV *h2 = (HV* ) SvRV((SV*) *val);
valDataType = hv_fetch( h2, "dataType", 8, 0 );
p->reference.dataType = SvIV(*valDataType);
switch( p->reference.dataType ){
case ARREF_DATA_ARSREF:
{
if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
int i = 0, num = 0;
HV *h = (HV* ) SvRV((SV*) *val);
char k[256];
k[255] = '\0';
supportrev.c view on Meta::CPAN
}else{
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARReferenceStruct: hash value is not a hash reference" );
return -1;
}
}
break;
case ARREF_DATA_EXTREF:
{
if( SvTYPE(SvRV(*val)) == SVt_PVHV ){
int i = 0, num = 0;
HV *h = (HV* ) SvRV((SV*) *val);
char k[256];
k[255] = '\0';
supportrev_generated.c view on Meta::CPAN
// pcase = SvPV_nolen(*val);
// p->dataType = caseLookUpTypeNumber( (TypeMapStruct*) dataType, pcase );
HV *h2 = (HV* ) SvRV((SV*) *val);
SV** val = hv_fetch( h2, "dataType", 8, 0 );
p->dataType = SvIV(*val);
switch( p->dataType ){
case AR_DATA_TYPE_DIARY:
{
rev_ARDiaryLimitsStruct( ctrl, h, k, &(p->u.diaryLimits) );
}
break;
#if AR_CURRENT_API_VERSION >= 8
case AR_DATA_TYPE_VIEW:
{
rev_ARViewLimits( ctrl, h, k, &(p->u.viewLimits) );
}
break;
#endif
case AR_DATA_TYPE_INTEGER:
{
rev_ARIntegerLimitsStruct( ctrl, h, k, &(p->u.intLimits) );
}
break;
case AR_DATA_TYPE_CHAR:
{
rev_ARCharLimitsStruct( ctrl, h, k, &(p->u.charLimits) );
}
break;
#if AR_CURRENT_API_VERSION >= 9
case AR_DATA_TYPE_DATE:
{
rev_ARDateLimitsStruct( ctrl, h, k, &(p->u.dateLimits) );
}
break;
#endif
#if AR_CURRENT_API_VERSION >= 8
case AR_DATA_TYPE_ENUM:
{
rev_AREnumLimitsStruct( ctrl, h, k, &(p->u.enumLimits) );
}
break;
#endif
#if AR_CURRENT_API_VERSION >= 9
case AR_DATA_TYPE_CURRENCY:
{
rev_ARCurrencyLimitsStruct( ctrl, h, k, &(p->u.currencyLimits) );
}
break;
#endif
case AR_DATA_TYPE_COLUMN:
{
rev_ARColumnLimitsStruct( ctrl, h, k, &(p->u.columnLimits) );
}
break;
case AR_DATA_TYPE_ATTACH:
{
rev_ARAttachLimitsStruct( ctrl, h, k, &(p->u.attachLimits) );
}
break;
#if AR_CURRENT_API_VERSION >= 8
case AR_DATA_TYPE_DISPLAY:
{
rev_ARDisplayLimits( ctrl, h, k, &(p->u.displayLimits) );
}
break;
#endif
case AR_DATA_TYPE_TABLE:
{
rev_ARTableLimitsStruct( ctrl, h, k, &(p->u.tableLimits) );
}
break;
case AR_DATA_TYPE_DECIMAL:
{
rev_ARDecimalLimitsStruct( ctrl, h, k, &(p->u.decimalLimits) );
}
break;
case AR_DATA_TYPE_REAL:
{
rev_ARRealLimitsStruct( ctrl, h, k, &(p->u.realLimits) );
}
break;
default:
sprintf( errText, "rev_ARFieldLimitStruct: invalid switch value %d", p->dataType );
ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, errText );
}
t/aptest51.def view on Meta::CPAN
vui {
id : 536873337
name : TEST_FixedWebView
label : TEST_FixedWebView
timestamp : 1225458854
vui-locale : fr_FR
vui-type : 3
owner : Demo
last-changed : Demo
display-prop : 6\20\4\17\TEST_FixedWebView\264\6\0\251\6\0\252\6\0\60019\4\16\TestFixedWebView\83\4\1125\<HTML>
<HEAD>
<%@ page contentType="text/html; charset=win
display-prop : dows-1252"%><%@ taglib uri="remedy_arsys" prefix="arsys" %><arsys:preamble /></HEAD>
<BODY><!--METADATA TYPE="DesignerControl" startspan
<OBJECT cla
display-prop : ssid="clsid:496A808B-407A-11D4-80DA-00B0D020044D" width=1600 height=20>
<PARAM NAME="ARType" VALUE="26">
<PARAM NAME="ViewID" VALUE="536873337">
display-prop : </OBJECT>-->
<arsys:open_services>
<arsys:form server="@@SERVER@@" name="@@FORM@@" vuiid="536873337"/>
</arsys:open_services><!--METADAT
display-prop : A TYPE="DesignerControl" endspan--><!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:496A808B-407A-11D4-80DA-00B0D020044D" width=
display-prop : 900 height=50>
<PARAM NAME="ARType" VALUE="31">
<PARAM NAME="Form" VALUE="ARSperl Test3">
</OBJECT>--><arsys:form_view/><!--METADATA TYPE=
display-prop : "DesignerControl" endspan--><!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:496A808B-407A-11D4-80DA-00B0D020044D" width=1600 he
display-prop : ight=20>
<PARAM NAME="ARType" VALUE="27">
</OBJECT>--><arsys:close_services/><!--METADATA TYPE="DesignerControl" endspan--></BODY>
</HTML>
\
display-prop :
}
field {
id : 1
name : Request-ID
datatype : 4
fieldtype : 1
create-mode : 2
option : 3
timestamp : 1225458854