view release on metacpan or search on metacpan
((ars_ctrl *)ctrl)->endTime = 0;
#else
DBG( ("safemalloc ARControlStruct\n") );
ctrl = (ARControlStruct *)safemalloc(sizeof(ARControlStruct));
/* DBG( ("malloc ARControlStruct\n") );
ctrl = (ARControlStruct *)MALLOCNN(sizeof(ARControlStruct)); */
Zero(ctrl, 1, ARControlStruct);
#endif
#ifdef PROFILE
if (gettimeofday(&tv, 0) != -1)
((ars_ctrl *)ctrl)->startTime = tv.tv_sec;
else
perror("gettimeofday");
#endif
ctrl->cacheId = 0;
#if AR_EXPORT_VERSION >= 4
ctrl->sessionId = 0;
#endif
ctrl->operationTime = 0;
strncpy(ctrl->user, username, sizeof(ctrl->user));
ctrl->user[sizeof(ctrl->user)-1] = 0;
(TS) implemented ars_GetList/Get/Create/Set/DeleteImage
(TS) fixed incorrect AR_ARITH_OP_NEGATE handling in rev_ARArithOpStruct
(TS) fixed wrong operand evaluation for AR_ARITH_OP_NEGATE in perl_ARArithOpStruct
(TS) fixed ars_SetServerInfo() memory violation in case of more than one key/value pair
(TS) ars_GetFieldTable performance improvement by using ARGetMultipleFields
(TS) removed unnecessary second invocation of ARGetField in ars_GetField
(TS) code cleanup (#ifdef statements) in ARGetFieldCached, ars_GetField, ars_GetFieldByName
(TS) ! appended ARControlStruct pointer address to server key in %ARS::field_cache
(affects only scripts which make explicit use of the internal field_cache structure)
(CL) ! enhanced ARS OO interface to handle custom enum fields
(TS) fixed return value of ars_Import
(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 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
INSTALLATION view on Meta::CPAN
and the path to the include files, into Makefile.pl (or the resulting
Makfile).
then execute the following comands:
> perl Makefile.PL
> make
> make install
The first command will construct a Makefile.
The second comand will compile the source files.
The third command might require special (i.e. root) access if your
perl distribution is not owned by your userid.
BUILDING ON WINDOWS WITH STRAWBERRY PERL
(Note to Windows Developers: While this is the correct procedure, it will not
yet provide a stable 64-bit module)
1) Download ARSPerl source and unpack
Makefile.PL view on Meta::CPAN
print "Building against perl $]\n";
$AUTODEFINES .= " -DPERL_PATCHLEVEL_IS=$Config{'PATCHLEVEL'} -DPERL_SUBVERSION_IS=$Config{'SUBVERSION'} -DPERL_BASEREV_IS=".($Config{'baserev'}*10)." ";
if($Config{'baserev'} == 5 &&
$Config{'PATCHLEVEL'} == 4 &&
$Config{'SUBVERSION'} == 3) {
print "\n\nWARNING: Perl-5.004_03 contained a buggy 'h2ph' application.\nYou should examine line 100 of perl's 'h2ph' script and be sure that it\n
produces correct syntax (it's missing a close-parenthesis)\n";
print "\nsleeping for 5 seconds. press control-c to abort.\n\n";
sleep 5;
}
if ($LARCH =~ /64/) {
if ($Config{'cc'} =~ /cc/) {
$REDUCE_SYMBOL_SCOPE = 1;
}
else {
print "\n\nWARNING: Because of symbol name collisions (both -- perl and arapi -- use the xdr-functions),\n" .
" it is necessary to reduce the symbol scope to symbols declared within the DSO.\n" .
changes.dat view on Meta::CPAN
TS ars_GetEntryBLOB bugfix by Conny Martin
TS fixed "hv_fetch error" problem in case of undefined ARValueStruct
TS fixed SignalTypeMap problem
TS package directory reorganization/cleanup
TS additional ars_Login parameters by Conny Martin
TS implemented ars_GetList/Get/Create/Set/DeleteImage
TS fixed incorrect AR_ARITH_OP_NEGATE handling in rev_ARArithOpStruct
TS fixed wrong operand evaluation for AR_ARITH_OP_NEGATE in perl_ARArithOpStruct
TS fixed ars_SetServerInfo() memory violation in case of more than one key/value pair
TS ars_GetFieldTable performance improvement by using ARGetMultipleFields
TS removed unnecessary second invocation of ARGetField in ars_GetField
TS code cleanup (#ifdef statements) in ARGetFieldCached, ars_GetField, ars_GetFieldByName
!TS appended ARControlStruct pointer address to server key in %ARS::field_cache
(affects only scripts which make explicit use of the internal field_cache structure)
!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
changes.dat view on Meta::CPAN
TS added module (ARS/CodeTemplate.pm) for code generation
TS change in perl_ARFieldValueOrArithStruct; if tag == AR_VALUE, put dataType into hash
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')
changes.dat view on Meta::CPAN
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)
example/ars_GetListEntry.pl view on Meta::CPAN
[
{
columnWidth => 10,
separator => ' ',
fieldId => $fids{$login_name}
}, # first field: login name
{
columnWidth => 15,
separator => ' ',
fieldId => $fids{$full_name}
}, # second field: full name
],
$fids{$full_name},
2
)
) || die "ars_GetListEntry: $ars_errstr";
for ( my $i = 0 ; $i < $#basic_sorted_entries ; $i += 2 ) {
printf( "%s %s\n",
$basic_sorted_entries[$i],
$basic_sorted_entries[ $i + 1 ] );
example/del_all.pl view on Meta::CPAN
print $#es." found.\n";
print "\tFilters .. ";
@fi = ars_GetListFilter($c);
print $#fi." found.\n";
print "\tSchemas .. ";
@sc = ars_GetListSchema($c, 0, 1024);
print $#sc." found.\n";
print "Sleeping for 5 seconds. control-c to abort!\n";
sleep(5);
print "\nDeleting Activelinks:\n";
foreach (@al) {
if($_ =~ /$pat/) {
print "\t$_\n";
ars_DeleteActiveLink($c, $_) || die "$ars_errstr";
}
}
html/changes.html view on Meta::CPAN
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>implemented ars_GetList/Get/Create/Set/DeleteImage
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed incorrect AR_ARITH_OP_NEGATE handling in rev_ARArithOpStruct
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed wrong operand evaluation for AR_ARITH_OP_NEGATE in perl_ARArithOpStruct
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed ars_SetServerInfo() memory violation in case of more than one key/value pair
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>ars_GetFieldTable performance improvement by using ARGetMultipleFields
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>removed unnecessary second invocation of ARGetField in ars_GetField
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>code cleanup (#ifdef statements) in ARGetFieldCached, ars_GetField, ars_GetFieldByName
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='red'>appended ARControlStruct pointer address to server key in %ARS::field_cache
(affects only scripts which make explicit use of the internal field_cache structure) </font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(CL)</td><td width='90%'><font color='red'>enhanced ARS OO interface to handle custom enum fields
</font></td></tr>
<tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed return value of ars_Import
</font></td></tr>
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>fixed memory violation in ars_GetListContainer
html/changes.html view on Meta::CPAN
<tr bgcolor='#dddddd'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added "case AR_COND_OP_FROM_FIELD" to perl_qualifier()
</font></td></tr>
<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)
html/changes.html view on Meta::CPAN
<td width='50%'>Version: <B>1.85
</B></td>
</tr></table></td>
</tr><tr bgcolor='#eeeeee'><td width='10%'>(TS)</td><td width='90%'><font color='black'>added binmode-statements in t/10entry.t (test failed on win32)
</font></td></tr>
<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)
html/copying.html view on Meta::CPAN
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)<p>
</dl>
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.<p>
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.<p>
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.<p>
<dt>3.
html/copying.html view on Meta::CPAN
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,<p>
<dt>c)
<dd>Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)<p>
</dl>
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
html/copying.html view on Meta::CPAN
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.<p>
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.<p>
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.<p>
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.<p>
<dt>8.
<dd>If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.<p>
html/manual/ds_getescalation_hash.html view on Meta::CPAN
"TmMonthDayMask" => integer, <B>*</B>
"TmWeekDayMask" => integer, <B>*</B>
"TmHourMask" => integer, <B>*</B>
"TmMinute" => integer, <B>*</B>
}
</PRE>
<B>*</B> If <CODE>TmType == AR_ESCALATION_TYPE_INTERVAL</CODE> then
<CODE>TmInterval</CODE> will be defined and the other <CODE>Tm*</CODE> keys
will <B>not</B> be defined. <CODE>TmInterval</CODE> will specify how many
seconds should elapse between firings of the Escalation. <P>
<B>*</B> If <CODE>TmType == AR_ESCALATION_TYPE_TIMEMARK</CODE> then
<CODE>TmInterval</CODE> will <B>not</B> be defined and the other
<CODE>Tm*</CODE> keys will be defined. In this case, use the
<CODE><A HREF="AR_DAY.html">ARS::AR_DAY()</A></CODE> and
<CODE><A HREF="AR_HOUR.html">ARS::AR_HOUR()</A></CODE>
helper functions to analyze the
information held in these hash values. These variables, in concert, specify
when the Escalation should fire.
}
#endif /* NT routines gone in ars 5.x */
unsigned int
caseLookUpTypeNumber(TypeMapStruct *t, char *s)
{
int i = 0;
if(!t || !CVLD(s)) return TYPEMAP_LAST;
while(strcasecmp(s, t[i].name) && t[i].number != TYPEMAP_LAST)
i++;
return t[i].number;
}
char *
lookUpTypeName(TypeMapStruct *t, unsigned int v)
{
int i = 0;
supportrev.c view on Meta::CPAN
rv += uintcpyHVal(h, "length", &(d->length));
rv += uintcpyHVal(h, "numRows", &(d->numRows));
/* variables that need some decoding before we store them */
/*
* "option" will be either "VISIBLE" or "HIDDEN" default: Visible
*/
if ((rv2 = strcpyHVal(h, "option", buf, sizeof(buf)-1)) == 0) {
if (strncasecmp(buf, "HIDDEN", sizeof(buf)) == 0)
d->option = AR_DISPLAY_OPT_HIDDEN;
else
d->option = AR_DISPLAY_OPT_VISIBLE;
} else
rv += rv2;
/*
* "labelLocation" will be either "Left" or "Top" default: Left
*/
if ((rv2 = strcpyHVal(h, "labelLocation", buf, sizeof(buf)-1)) == 0) {
if (strncasecmp(buf, "Top", sizeof(buf)) == 0)
d->labelLocation = AR_DISPLAY_LABEL_TOP;
else
d->labelLocation = AR_DISPLAY_LABEL_LEFT;
} else
rv += rv2;
/*
* "type" will be one of: NONE, TEXT, NUMTEXT, CHECKBOX, CHOICE,
* BUTTON default: NONE
*/
if ((rv2 = strcpyHVal(h, "type", buf, sizeof(buf)-1)) == 0) {
if (strncasecmp(buf, "TEXT", sizeof(buf)) == 0)
d->type = AR_DISPLAY_TYPE_TEXT;
else if (strncasecmp(buf, "NUMTEXT", sizeof(buf)) == 0)
d->type = AR_DISPLAY_TYPE_NUMTEXT;
else if (strncasecmp(buf, "CHECKBOX", sizeof(buf)) == 0)
d->type = AR_DISPLAY_TYPE_CHECKBOX;
else if (strncasecmp(buf, "CHOICE", sizeof(buf)) == 0)
d->type = AR_DISPLAY_TYPE_CHOICE;
else if (strncasecmp(buf, "BUTTON", sizeof(buf)) == 0)
d->type = AR_DISPLAY_TYPE_BUTTON;
else
d->type = AR_DISPLAY_TYPE_NONE;
} else
rv += rv2;
return rv;
}
/* ROUTINE
supportrev.c view on Meta::CPAN
return -2;
}
static int
rev_ARValueStructStr2Type(ARControlStruct * ctrl, char *type, unsigned int *n)
{
int i = 0;
if (type && *type) {
for (i = 0; DataTypeMap[i].number != TYPEMAP_LAST; i++)
if (strcasecmp(type, DataTypeMap[i].name) == 0)
break;
if (DataTypeMap[i].number != TYPEMAP_LAST) {
*n = DataTypeMap[i].number;
return 0;
}
ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
"rev_ARValueStructStr2Type: type given is unknown:");
ARError_add(AR_RETURN_ERROR, AP_ERR_CONTINUE,
type);
} else
supportrev.c view on Meta::CPAN
#if AR_CURRENT_API_VERSION >= 14
rev_ARByteListStr2Type(ARControlStruct * ctrl, char *ts, ARULong32 *tv)
#else
rev_ARByteListStr2Type(ARControlStruct * ctrl, char *ts, unsigned long *tv)
#endif
{
int i = 0;
if (ts && *ts && tv) {
for (i = 0; ByteListTypeMap[i].number != TYPEMAP_LAST; i++)
if (strncasecmp(ts, ByteListTypeMap[i].name, strlen(ByteListTypeMap[i].name) ) == 0)
break;
if (ByteListTypeMap[i].number != TYPEMAP_LAST) {
*tv = ByteListTypeMap[i].number;
return 0;
}
}
return -1;
}
int
supportrev.c view on Meta::CPAN
return -1;
}
static int
rev_ARAssignFieldStructStr2NMO(ARControlStruct * ctrl, char *s, unsigned int *nmo)
{
if (s && *s) {
int i;
for (i = 0; NoMatchOptionMap[i].number != TYPEMAP_LAST; i++)
if (strcasecmp(NoMatchOptionMap[i].name, s) == 0)
break;
if (NoMatchOptionMap[i].number != TYPEMAP_LAST) {
*nmo = NoMatchOptionMap[i].number;
return 0;
}
}
return -1;
}
static int
rev_ARAssignFieldStructStr2MMO(ARControlStruct * ctrl, char *s, unsigned int *mmo)
{
if (s && *s) {
int i;
for (i = 0; MultiMatchOptionMap[i].number != TYPEMAP_LAST; i++)
if (strcasecmp(MultiMatchOptionMap[i].name, s) == 0)
break;
if (MultiMatchOptionMap[i].number != TYPEMAP_LAST) {
*mmo = MultiMatchOptionMap[i].number;
return 0;
}
}
return -1;
}
/* ROUTINE
supportrev.c view on Meta::CPAN
if (rev_ARAssignStruct(ctrl, h, "left", &(s->operandLeft)) == -1)
return -1;
return rev_ARAssignStruct(ctrl, h, "right", &(s->operandRight));
}
static int
rev_ARArithOpAssignStructStr2OP(ARControlStruct * ctrl, char *c, unsigned int *o)
{
int i;
for (i = 0; ArithOpMap[i].number != TYPEMAP_LAST; i++)
if (strcasecmp(ArithOpMap[i].name, c) == 0)
break;
if (ArithOpMap[i].number == TYPEMAP_LAST) {
ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
"rev_ARArithOpAssignStructStr2OP: unknown operation word:");
ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL, c);
return -1;
}
*o = ArithOpMap[i].number;
return 0;
}
supportrev.c view on Meta::CPAN
ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
"rev_ARFunctionAssignStruct: first argument is not a hash");
return -1;
}
static int
rev_ARFunctionAssignStructStr2FCODE(ARControlStruct * ctrl, char *c, unsigned int *o)
{
int i;
for (i = 0; FunctionMap[i].number != TYPEMAP_LAST; i++)
if (strcasecmp(FunctionMap[i].name, c) == 0)
break;
if (FunctionMap[i].number == TYPEMAP_LAST) {
ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
"rev_ARFunctionAssignStructStr2FCODE: unknown function name:");
ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL, c);
return -1;
}
*o = FunctionMap[i].number;
return 0;
}
supportrev.c view on Meta::CPAN
"rev_ARMacroParmList: key doesn't exist");
return -2;
}
} else
ARError_add(AR_RETURN_ERROR, AP_ERR_GENERAL,
"rev_ARMacroParmList: first argument is not a hash");
return -1;
}
#if defined(_WIN32) && !defined(__GNUC__)
/* roll our own strcasecmp and strncasecmp for Win */
int
strcasecmp(char *s1, char *s2)
{
char *p1, *p2;
char c1, c2;
p1 = s1;
p2 = s2;
while ((*p1 != '\0') && (*p2 != '\0')) {
c1 = tolower(*p1);
c2 = tolower(*p2);
if ((c1 - c2) == 0) {
p2++;
p1++;
} else {
return (c1 - c2);
}
}
return *p1 - *p2;
}
int
strncasecmp(char *s1, char *s2, size_t n)
{
char *p1, *p2;
char c1, c2;
size_t i = 0;
p1 = s1;
p2 = s2;
while ((*p1 != '\0') && (*p2 != '\0') && (i <= n)) {
c1 = tolower(*p1);
supportrev.h view on Meta::CPAN
HV *h, char *k, ARByteList *b);
EXTERN int rev_ARCoordList(ARControlStruct *ctrl,
HV *h, char *k, ARCoordList *m);
EXTERN int rev_ARPropList(ARControlStruct *ctrl,
HV *h, char *k, ARPropList *m);
EXTERN int rev_ARAssignSQLStruct(ARControlStruct *ctrl,
HV *h, char *k, ARAssignSQLStruct *s);
#endif
#if defined(_WIN32) && !defined(__GNUC__)
/* roll our own strcasecmp and strncasecmp for Win */
EXTERN int strcasecmp(char *s1, char *s2);
EXTERN int strncasecmp(char *s1, char *s2, size_t n);
EXTERN char* arsperl_strdup( char *s1 );
#define strdup arsperl_strdup
#endif /* def _WIN32 */
EXTERN int rev_ARDisplayInstanceList(ARControlStruct *ctrl,
HV *h, char *k, ARDisplayInstanceList *d);
t/aptest50.def view on Meta::CPAN
upgrade-version: 0
num-fields : 116
timestamp : 1049205545
owner : jcmurphy
last-changed : jcmurphy
default-vui : Default Admin View
num-vuis : 1
export-version : 6
schema-type : 2
primary : ARSperl Test
secondary : ARSperl Test2
join-option : 1
join-query : 4\1\99\1\1\1\
next-field-id : 536871018
vui {
id : 536870912
name : Default Admin View
label : Default Admin View
timestamp : 1049205537
vui-locale :
vui-type : 1
t/aptest51.def view on Meta::CPAN
upgrade-version: 0
num-fields : 116
timestamp : 1049205545
owner : jcmurphy
last-changed : jcmurphy
default-vui : Default Admin View
num-vuis : 1
export-version : 6
schema-type : 2
primary : ARSperl Test
secondary : ARSperl Test2
join-option : 1
join-query : 4\1\99\8\1\8\
next-field-id : 536871018
vui {
id : 536870912
name : Default Admin View
label : Default Admin View
timestamp : 1049205537
vui-locale :
vui-type : 1