=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/ox_asir.c,v retrieving revision 1.36 retrieving revision 1.39 diff -u -p -r1.36 -r1.39 --- OpenXM_contrib2/asir2000/io/ox_asir.c 2001/12/27 07:51:17 1.36 +++ OpenXM_contrib2/asir2000/io/ox_asir.c 2002/02/25 06:47:39 1.39 @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.35 2001/12/25 02:39:05 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.38 2002/02/25 06:39:12 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -643,6 +643,7 @@ void ox_asir_init(int argc,char **argv) extern int read_exec_file; extern int do_asirrc; extern int do_server_in_X11; + extern char displayname[]; char *getenv(); static ox_asir_initialized = 0; FILE *ifp; @@ -666,6 +667,10 @@ void ox_asir_init(int argc,char **argv) endian_init(); GC_init(); process_args(--argc,++argv); +#if defined(__CYGWIN__) + if ( !displayname[0] ) + do_server_in_X11 = 0; /* XXX */ +#endif output_init(); arf_init(); nglob_init(); @@ -895,14 +900,27 @@ int asir_ox_peek_cmo_size() Obj obj; int len; - obj = asir_pop_one(); - asir_push_one(obj); + 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 = count_as_cmo(obj); 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; } /*