Annotation of OpenXM/src/ox_math/test1.c, Revision 1.1
1.1 ! ohara 1: /* -*- mode: C -*- */
! 2: /* $OpenXM$ */
! 3:
! 4: #include <stdio.h>
! 5: #include <unistd.h>
! 6: #include <mathlink.h>
! 7: #include <ox_toolkit.h>
! 8: #include "mlo.h"
! 9:
! 10: #define CMD1 "If[True, Pause[200]; 20, -1]"
! 11: /* #define CMD1 "If[True, 20, -1]" */
! 12: // #define CMD2 "If[True, Pause[1]; SessionTime[], -1]"
! 13: #define CMD2 "Print[\"hoge\"] ; 4+5"
! 14:
! 15: int fase1(char *cmd)
! 16: {
! 17: ml_evaluateStringByLocalParser(cmd);
! 18: sleep(1);
! 19: ml_interrupt();
! 20: ml_return();
! 21: ox_printf("====\n");
! 22: }
! 23:
! 24: int fase2(char *cmd)
! 25: {
! 26: ml_evaluateStringByLocalParser(cmd);
! 27: ml_return();
! 28: ox_printf("====\n");
! 29: }
! 30:
! 31: int main()
! 32: {
! 33: /* ox_stderr_init(fopen("ZZ.Linux", "w+")); */
! 34: ox_stderr_init(NULL);
! 35: ml_init();
! 36: fase2(CMD2);
! 37: fase1(CMD1);
! 38: fase2(CMD2);
! 39: ml_exit();
! 40: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>