source: buchla-68k/orig/DOC/SCFNS.TXT@ 0170798

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

Imported original source code.

  • Property mode set to 100755
File size: 3.6 KB
Line 
1 long
2 scinit()
3
4 Initializes the score data structures.
5 Returns the number of free storage units.
6
7 struct s_entry *
8 e_clr(e1)
9 struct s_entry *e1;
10
11 Clears the event pointed to by 'e1'. Returns 'e1'.
12 Preserves e_size field, all others set to zero.
13
14 struct s_entry *
15 e_ins(e1, e2)
16 struct s_entry *e1, *e2;
17
18 Inserts the event pointed to by 'e1' after the event
19 pointed to by 'e2'. Returns 'e1'.
20
21 struct s_entry *
22 e_rmv(e1)
23 struct s_entry *e1;
24
25 Removes the event pointed to by 'e1' from the list it's in.
26 Returns 'e1'.
27
28 struct s_entry *
29 e_alc(w)
30 int w;
31
32 Allocates a new event entry.
33 Returns the event entry address, or E_NULL
34 if none can be allocated.
35
36 short
37 e_del(e1)
38 struct s_entry *e1;
39
40 Deallocates the event entry pointed to by 'e1'.
41 Returns 0 if successful, 1 if not.
42
43 long
44 evleft()
45
46 Returns total number of longs left for score storage.
47
48
49 eh_ins(ne, et)
50 struct s_entry *ne;
51 short et;
52
53 Inserts event 'ne' of type 'et' into score header list
54 "hplist[curscor][et]" along the "up" chain.
55
56 eh_rmv(ev, et)
57 struct s_entry *ev;
58 short et;
59
60 Removes event 'ev' of type 'et' from score header list
61 "hplist[curscor][et]" along the "up" chain.
62
63 sc_clr(ns)
64 short ns;
65
66 Clears score 'ns'.
67
68 short
69 selscor(ns)
70 short ns;
71
72 Selects score 'ns' for use.
73
74
75 struct s_entry *
76 ep_adj(sep, sdir, tval)
77 struct s_entry *sep;
78 int sdir;
79 long tval;
80
81 Returns a pointer to the event chain at the time 'tval'
82 starting from 'sep' in the direction 'sdir'.
83 The right end of the chain is returned when 'sdir' EQ 0,
84 and the left end is returned when 'sdir' NE 0.
85
86 struct s_entry *
87 frfind(tval, sdir)
88 long tval;
89 int sdir;
90
91 Returns a pointer to the event chain at the time 'tval'
92 in the current score in the direction 'sdir', or E_NULL
93 if the current score is empty.
94 The right end of the chain is returned when 'sdir' EQ 0,
95 and the left end is returned when 'sdir' NE 0.
96
97 struct s_entry *
98 findev(ep, te, et, d1, d2)
99 struct s_entry *ep;
100 long te;
101 short et, d1, d2;
102
103 Searches the event chain starting at 'ep' for an event at
104 a time of 'te' with: a type of 'et', e_data1 EQ 'd1',
105 and e_data2 EQ 'd2'. The values of 'd1' or 'd2' may be -1,
106 in which case e_data1 or e_data2 will be assumed to match.
107 Returns a pointer to the desired event if it is found, or
108 E_NULL if no event in the chain matches the criteria given.
109
110 struct s_entry *
111 ehfind(et, te, d1, d2)
112 short et;
113 long te;
114 short d1, d2;
115
116 Searches the event header chain starting for an event at
117 a time of 'te' with: a type of 'et', e_data1 EQ 'd1',
118 and e_data2 EQ 'd2'. The values of 'd1' or 'd2' may be -1,
119 in which case e_data1 or e_data2 will be assumed to match.
120 Returns a pointer to the desired event if it is found, or
121 E_NULL if no event in the chain matches the criteria given.
122
123
124e_alc 304 SCINIT.C e_alc(w)
125e_clr 216 SCINIT.C e_clr(e1)
126e_del 457 SCINIT.C e_del(e1)
127e_ins 258 SCINIT.C e_ins(e1, e2)
128e_rmv 279 SCINIT.C e_rmv(e1)
129
130eh_ins 503 SCINIT.C eh_ins(ne, et)
131eh_rmv 558 SCINIT.C eh_rmv(ev, et)
132ehfind 399 FRFIND.C ehfind(eh, te, d1, d2)
133
134ep_adj 77 FRFIND.C ep_adj(sep, sdir, tval)
135
136evleft 144 SCINIT.C evleft()
137
138findev 356 FRFIND.C findev(ep, te, et, d1, d2)
139frfind 212 FRFIND.C frfind(tval, sdir)
140
141sc_clr 583 SCINIT.C sc_clr(ns)
142scinit 161 SCINIT.C scinit()
143selscor 625 SCINIT.C selscor(ns)
Note: See TracBrowser for help on using the repository browser.