version 1.37, 2001/12/28 09:50:36 |
version 1.40, 2002/08/02 02:28:27 |
|
|
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* 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/io/ox_asir.c,v 1.36 2001/12/27 07:51:17 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.39 2002/02/25 06:47:39 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 78 Obj *asir_OperandStack; |
|
Line 78 Obj *asir_OperandStack; |
|
int asir_OperandStackPtr = -1; |
int asir_OperandStackPtr = -1; |
|
|
void ox_io_init(); |
void ox_io_init(); |
void ox_asir_init(int,char **); |
void ox_asir_init(int,char **,char *); |
Obj asir_pop_one(); |
Obj asir_pop_one(); |
Obj asir_peek_one(); |
Obj asir_peek_one(); |
void asir_push_one(Obj); |
void asir_push_one(Obj); |
Line 140 void ox_main(int argc,char **argv) { |
|
Line 140 void ox_main(int argc,char **argv) { |
|
int ret; |
int ret; |
extern char LastError[]; |
extern char LastError[]; |
|
|
ox_asir_init(argc,argv); |
ox_asir_init(argc,argv,"ox_asir"); |
if ( do_message ) |
if ( do_message ) |
fprintf(stderr,"I'm an ox_asir, Version %d.\n",ASIR_VERSION); |
fprintf(stderr,"I'm an ox_asir, Version %d.\n",ASIR_VERSION); |
if ( SETJMP(ox_env) ) { |
if ( SETJMP(ox_env) ) { |
Line 636 Obj asir_peek_one() { |
|
Line 636 Obj asir_peek_one() { |
|
} |
} |
} |
} |
|
|
void ox_asir_init(int argc,char **argv) |
void ox_asir_init(int argc,char **argv,char *servername) |
{ |
{ |
char ifname[BUFSIZ]; |
char ifname[BUFSIZ]; |
extern int GC_dont_gc; |
extern int GC_dont_gc; |
Line 712 void ox_asir_init(int argc,char **argv) |
|
Line 712 void ox_asir_init(int argc,char **argv) |
|
input_init(0,"string"); |
input_init(0,"string"); |
/* XXX Windows compatibility */ |
/* XXX Windows compatibility */ |
ox_io_init(); |
ox_io_init(); |
create_my_mathcap("ox_asir"); |
create_my_mathcap(servername); |
} |
} |
|
|
void ox_io_init() { |
void ox_io_init() { |
Line 900 int asir_ox_peek_cmo_size() |
|
Line 900 int asir_ox_peek_cmo_size() |
|
Obj obj; |
Obj obj; |
int len; |
int len; |
|
|
obj = asir_pop_one(); |
obj = asir_peek_one(); |
asir_push_one(obj); |
|
if ( !valid_as_cmo(obj) ) { |
if ( !valid_as_cmo(obj) ) { |
fprintf(stderr,"The object at the stack top is invalid as a CMO.\n"); |
fprintf(stderr,"The object at the stack top is invalid as a CMO.\n"); |
return 0; |
return 0; |
} |
} |
len = count_as_cmo(obj); |
len = count_as_cmo(obj); |
return len; |
return len; |
|
} |
|
|
|
int asir_ox_peek_cmo_string_length() |
|
{ |
|
Obj obj; |
|
int len; |
|
|
|
obj = asir_peek_one(); |
|
if ( !valid_as_cmo(obj) ) { |
|
fprintf(stderr,"The object at the stack top is invalid as a CMO.\n"); |
|
return 0; |
|
} |
|
len = estimate_length(CO,obj); |
|
return len+1; |
} |
} |
|
|
/* |
/* |