source: buchla-68k/ram/rscript.c@ c65a0e2

Last change on this file since c65a0e2 was c65a0e2, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added RAM files.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 =============================================================================
3 rscript.c -- define the score test script for scordsp.c
4 Version 13 -- 1988-11-03 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8extern int sqscan();
9
10extern int endflg;
11
12char *script0[] = { /* initialization score selection string */
13
14 "!quiet !normal !score=0 !weight=60 !end",
15 (char *)0L
16};
17
18/*
19 =============================================================================
20 rscript() -- run a script and return the end condition
21
22 -1 error returned by sqscan
23 0 end of strings, no errors
24 1 !end statement encountered
25 =============================================================================
26*/
27
28short
29rscript(p)
30register char *p[];
31{
32 short rc;
33
34 sqinit(); /* initialize the score string interpreter */
35 rc = 0; /* preset rc for end of script return */
36
37 while (*p) { /* feed the interpreter the score strings */
38
39 if (!sqscan(*p++)) { /* ... until we have an error ... */
40
41 rc = -1; /* error return */
42 break;
43 }
44
45 if (endflg) { /* ... or until we hit the !end */
46
47 rc = 1; /* !end return */
48 break;
49 }
50 }
51
52 return(rc);
53}
Note: See TracBrowser for help on using the repository browser.