Annotation of OpenXM/src/Macaulay2/m2/ox_m2.c, Revision 1.2
1.2 ! takayama 1: /* $OpenXM: OpenXM/src/Macaulay2/m2/ox_m2.c,v 1.1 2000/10/09 12:04:01 takayama Exp $ */
1.1 takayama 2: /* original code from */
3: /* $Id: ox_m2.c,v 1.2 2000/09/20 17:16:01 mike Exp $ */
4: #include <stdio.h>
5: #include <unistd.h>
1.2 ! takayama 6: #include <stdlib.h>
1.1 takayama 7:
8: #define OXDIR "/home/mike/M2stuff/takayama/rat/"
9: int main(int argc, char **argv)
10: {
1.2 ! takayama 11: char *c,*s1, *s2, *e;
! 12: e = getenv("OpenXM_HOME");
! 13: c = (char *) malloc(strlen(e)+256);
! 14: s1 = (char *) malloc(strlen(e)+256);
! 15: s2 = (char *) malloc(strlen(e)+256);
! 16: strcpy(c,e); strcat(c,"/bin/M2");
! 17: strcpy(s1,e); strcat(s1,"/lib/m2/oxcommon.m2");
! 18: strcpy(s2,e); strcat(s2,"/lib/m2/oxserver.m2");
! 19:
1.1 takayama 20: dup2(3,0);
21: dup2(4,1);
22: /*execl("/usr/local/bin/M2", "M2", "-n", "oxcommon.m2",
23: "oxserver.m2", "-e\"OXserver()\"", NULL);
24: */
1.2 ! takayama 25: /*
1.1 takayama 26: execl("/usr/local/bin/M2", "M2", "-n", "-silent", OXDIR "oxcommon.m2",
27: OXDIR "oxserver.m2", NULL);
1.2 ! takayama 28: */
! 29: execl(c, "M2", "-n", "-silent", s1, s2, NULL);
1.1 takayama 30: return 0;
31: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>