Subversion Repositories wimsdev

Rev

Rev 8100 | Rev 8149 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8100 Rev 8120
Line 16... Line 16...
16
 */
16
 */
17
 
17
 
18
/* Interface Macaulay2 to wims */
18
/* Interface Macaulay2 to wims */
19
 
19
 
20
/*************** Customization: change values hereafter ****************/
20
/*************** Customization: change values hereafter ****************/
-
 
21
#include "common.h"
21
 
22
 
22
/* limit of input/output file sizes */
-
 
23
#define fsizelim 131072
-
 
24
/* This string tells m2 to exit. */
23
/* This string tells m2 to exit. */
25
#define quitstring "\nexit;\n"
24
char *quitstring="\nexit;\n";
26
/* The way to print a string in the program. */
25
/* The way to print a string in the program. */
27
#define stringprinter "print(\"%s\");\n"
26
char *stringprinter="print(\"%s\");\n";
28
/* This is m2 home page. To be kept up to date. */
27
/* This is m2 home page. To be kept up to date. */
29
#define homepage "http://www.math.uiuc.edu/Macaulay2/"
28
#define homepage "http://www.math.uiuc.edu/Macaulay2/"
30
 
-
 
-
 
29
/* limit of input/output file sizes */
31
char *nameofcmd="M2";
30
int fsizelim=131072;
32
int precision=20; /* default */
31
int precision=20; /* default */
-
 
32
 
-
 
33
char *nameofcmd="M2";
33
char header[]="Thing#{Standard,BeforePrint} = toString; \
34
char header[]="Thing#{Standard,BeforePrint} = toString; \
34
scan(methods {Standard,AfterPrint}, (a,b) -> installMethod(a,b,identity));\
35
scan(methods {Standard,AfterPrint}, (a,b) -> installMethod(a,b,identity));\
35
";
36
";
36
 
37
 
37
struct {
38
struct {
Line 45... Line 46...
45
      "exec","run","fork",
46
      "exec","run","fork",
46
      "input",  /* "load","needs", */
47
      "input",  /* "load","needs", */
47
      "tmpname", "path", "processID",
48
      "tmpname", "path", "processID",
48
      "getWWW", "getenv",
49
      "getWWW", "getenv",
49
      "<<", "close"
50
      "<<", "close"
50
};
51
};
-
 
52
 
-
 
53
int illegal_no=(sizeof(illegal)/sizeof(illegal[0]));
51
 
54
 
52
/* name parts which are not allowed */
55
/* name parts which are not allowed */
53
char *illpart[]={
56
char *illpart[]={
54
};
57
};
-
 
58
 
-
 
59
int illpart_no=(sizeof(illpart)/sizeof(illpart[0]));
55
 
60
 
56
/***************** Nothing should need change hereafter *****************/
61
/***************** Nothing should need change hereafter *****************/
57
 
62
 
58
#define progname "m2"
63
char *progname="m2";
59
#include "common.h"
-
 
-
 
64
 
60
#include "common.c"
65
/*#include "common.c"*/
61
 
66
 
62
/* check for security violations in command string */
67
/* check for security violations in command string */
63
void check_parm(char *pm)
68
void check_parm(char *pm)
64
{
69
{
65
    find_illegal(pm);
70
    find_illegal(pm);