version 1.24, 2004/10/27 08:21:47 |
version 1.26, 2006/02/08 02:11:19 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/miscf.c,v 1.23 2004/03/11 09:53:34 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/miscf.c,v 1.25 2004/11/16 01:47:31 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 129 void Pset_secure_mode(NODE arg,Q *rp) |
|
Line 129 void Pset_secure_mode(NODE arg,Q *rp) |
|
|
|
void Pset_secure_flag(NODE arg,Q *rp) |
void Pset_secure_flag(NODE arg,Q *rp) |
{ |
{ |
int ac,s; |
int ac,s,status; |
|
Obj f; |
|
char *fname; |
|
|
ac = argc(arg); |
ac = argc(arg); |
if ( !ac ) |
if ( !ac ) |
Line 138 void Pset_secure_flag(NODE arg,Q *rp) |
|
Line 140 void Pset_secure_flag(NODE arg,Q *rp) |
|
s = QTOS((Q)ARG1(arg)); |
s = QTOS((Q)ARG1(arg)); |
else |
else |
s = 1; |
s = 1; |
setsecureflag(BDY((STRING)ARG0(arg)),s); |
f = ARG0(arg); |
|
if ( !f ) |
|
error("set_secure_flag : invalid argument"); |
|
switch ( OID(f) ) { |
|
case O_STR: |
|
fname = BDY((STRING)f); break; |
|
case O_P: |
|
fname = NAME(VR((P)f)); break; |
|
default: |
|
error("set_secure_flag : invalid argument"); break; |
|
} |
|
status = setsecureflag(fname,s); |
|
if ( status < 0 ) |
|
error("set_secure_flag : function not found"); |
STOQ(s,*rp); |
STOQ(s,*rp); |
} |
} |
|
|
|
|
void Pquit(rp) |
void Pquit(rp) |
pointer *rp; |
pointer *rp; |
{ |
{ |
if ( !NEXT(asir_infile) ) |
if ( asir_infile && NEXT(asir_infile) && asir_infile->ready_for_longjmp ) |
asir_terminate(2); |
LONGJMP(asir_infile->jmpbuf,1); |
else { |
else { |
closecurrentinput(); |
closecurrentinput(); |
if ( !asir_infile->fp && strcmp(asir_infile->name,"string") ) |
asir_terminate(2); |
asir_terminate(2); |
|
} |
} |
*rp = 0; |
*rp = 0; |
} |
} |