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

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

Zero redundant declarations.

  • 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
8#include "ram.h"
9
10int8_t *script0[] = { /* initialization score selection string */
11
12 "!quiet !normal !score=0 !weight=60 !end",
13 (int8_t *)0L
14};
15
16/*
17 =============================================================================
18 rscript() -- run a script and return the end condition
19
20 -1 error returned by sqscan
21 0 end of strings, no errors
22 1 !end statement encountered
23 =============================================================================
24*/
25
26int16_t rscript(int8_t *p[])
27{
28 int16_t rc;
29
30 sqinit(); /* initialize the score string interpreter */
31 rc = 0; /* preset rc for end of script return */
32
33 while (*p) { /* feed the interpreter the score strings */
34
35 if (!sqscan(*p++)) { /* ... until we have an error ... */
36
37 rc = -1; /* error return */
38 break;
39 }
40
41 if (endflg) { /* ... or until we hit the !end */
42
43 rc = 1; /* !end return */
44 break;
45 }
46 }
47
48 return(rc);
49}
Note: See TracBrowser for help on using the repository browser.