Annotation of OpenXM_contrib2/asir2000/parse/asir_sm_main.c, Revision 1.1
1.1 ! noro 1: /* $OpenXM: OpenXM/src/asir99/parse/asir_sm_main.c,v 1.1.1.1 1999/11/10 08:12:34 noro Exp $ */
! 2: #include "ca.h"
! 3: #include "parse.h"
! 4:
! 5: extern jmp_buf env;
! 6: extern int Asir_OperandStackPtr;
! 7:
! 8: main() {
! 9: char buf[BUFSIZ*100];
! 10: char *data;
! 11: int size,cur_sig;
! 12:
! 13: Asir_Start();
! 14:
! 15: while ( 1 ) {
! 16: while ( 1 ) {
! 17: cur_sig = sigsetmask(~0);
! 18: if ( !fgets(buf,BUFSIZ*100,stdin) )
! 19: exit(0);
! 20: sigsetmask(cur_sig);
! 21: switch ( buf[0] ) {
! 22: case 'u':
! 23: Asir_ExecuteString(buf+1);
! 24: break;
! 25: case 'o':
! 26: printf("%s\n",Asir_PopString());
! 27: break;
! 28: case 's':
! 29: Asir_Set(buf+1);
! 30: break;
! 31: case 'O':
! 32: data = (char *)Asir_PopBinary(&size);
! 33: Asir_PushBinary(size,data);
! 34: break;
! 35: default:
! 36: break;
! 37: }
! 38: }
! 39: }
! 40: }
! 41:
! 42: KSstart(){}
! 43: KSexecuteString(){}
! 44: KSpopString(){}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>