History

Merge branch 'main' into emscripten-and-ios

Jack Atherton committed 5 years ago

Commit 8da8c8b2 parents a303f34 f524ce142 files · +13346 −6064Browse files

Unified · Split

42 files
  1. .gitignore +9 −7
  2. README.md +9 −4
  3. examples/basic/adsr.ck +28 −9
  4. examples/deep/shepard.ck +1 −1
  5. examples/deep/thx.ck +76 −21
  6. examples/extend/chugraph.ck +2 −2
  7. examples/midi/playmidi.ck +68 −19
  8. examples/osc/r.ck +10 −4
  9. examples/osc/s.ck +9 −4
  10. notes/VERSIONS +33 −0
  11. src/core/chuck.cpp +36 −7
  12. src/core/chuck.h +6 −0
  13. src/core/chuck.y +5 −4
  14. src/core/chuck_absyn.cpp +55 −12
  15. src/core/chuck_absyn.h +3 −3
  16. src/core/chuck_compile.cpp +2 −1
  17. src/core/chuck_dl.cpp +48 −0
  18. src/core/chuck_dl.h +23 −2
  19. src/core/chuck_errmsg.cpp +0 −0
  20. src/core/chuck_instr.cpp +2 −2
  21. src/core/chuck_io.cpp +2498 −0
  22. src/core/chuck_io.h +220 −2
  23. src/core/chuck_lang.cpp +1229 −3751
  24. src/core/chuck_lang.h +0 −214
  25. src/core/chuck_otf.cpp +10 −5
  26. src/core/chuck_type.cpp +3 −2
  27. src/core/chuck_win32.c +1927 −1814
  28. src/core/chuck_win32.h +245 −145
  29. src/core/makefile.x/makefile.win32 +12 −0
  30. src/core/midiio_rtmidi.cpp +1071 −2
  31. src/core/midiio_rtmidi.h +222 −0
  32. src/core/uana_extract.cpp +1 −1
  33. src/core/ugen_filter.cpp +118 −1
  34. src/core/ugen_stk.cpp +32 −1
  35. src/core/ugen_stk.h +12 −3
  36. src/core/ugen_xxx.cpp +3 −2
  37. src/core/util_thread.cpp +9 −1
  38. src/host/chuck_audio.cpp +80 −15
  39. src/host/chuck_audio.h +2 −0
  40. src/host/chuck_main.cpp +18 −2
  41. src/makefile +1 −1
  42. src/test/04-Stress/5200_lines.ck +5208 −0
.gitignore+9−7
@@ -1,14 +1,16 @@
11 *.d
22 *.o
33
4−src/chuck
5−src/chuck.output
6−src/chuck.tab.c
7−src/chuck.tab.h
8−src/chuck.yy.c
9−src/Release
10−src/Debug
4+/src/chuck
5+/src/core/chuck.output
6+/src/core/chuck.tab.c
7+/src/core/chuck.tab.h
8+/src/core/chuck.yy.c
9+/src/Release
10+/src/Debug
1111
1212 .DS_Store
1313 project.xcworkspace
1414 xcuserdata
15+
16+.vscode
README.md+9−4
@@ -1,11 +1,16 @@
1−# ChucK [![Build Status](https://travis-ci.org/ccrma/chuck.svg?branch=master)](https://travis-ci.org/ccrma/chuck)
1+# ChucK [![Build Status](https://travis-ci.org/ccrma/chuck.svg?branch=main)](https://travis-ci.org/ccrma/chuck)
2+
3+Please note that the `master` branch has been renamed to `main.`
4+
5+> The Internet Engineering Task Force (IETF) points out that "Master-slave is an oppressive metaphor that will and should never become fully detached from history" as well as "In addition to being inappropriate and arcane, the master-slave metaphor is both technically and historically inaccurate."
6+[https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx](https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx)
7+
8+
29 ## Strongly-timed, Concurrent, and On-the-fly Music Programming Language
310
411 Welcome to ChucK!
512
6−what is it? : ChucK is a programming language for real-time sound synthesis and music creation. It is open-source and freely available on MacOS X, Windows, and Linux. ChucK presents a unique time-based, concurrent programming model that's precise and expressive (we call this strongly-timed), dynamic control rates, and the ability to add and modify code on-the-fly. In addition, ChucK supports MIDI, OpenSoundControl, HID device, and multi-channel audio. It's fun and easy to learn, and offers composers, researchers, and performers a powerful programming tool for building and experimenting with complex audio synthesis/analysis programs, and real-time interactive music.
13+what is it? : Chuck is a programming language for real-time sound synthesis and music creation. It is open-source and freely available on MacOS X, Windows, and Linux. Chuck presents a unique time-based, a concurrent programming model that's precise and expressive (we call this strongly-timed), dynamic control rates, and the ability to add and modify code on-the-fly. In addition, ChucK supports MIDI, OpenSoundControl, HID device, and multi-channel audio. It's fun and easy to learn, and offers composers, researchers, and performers a powerful programming tool for building and experimenting with complex audio synthesis/analysis programs, and real-time interactive music.
714
815 For more information, including documentation, research publications, and community resources, please check out the ChucK website:
916 http://chuck.stanford.edu/
10−
11−
examples/basic/adsr.ck+28−9
@@ -1,9 +1,21 @@
1−// an ADSR envelope
2−// (also see envelope.ck)
1+// name: adsr.ck
2+// desc: ADSR envelope example
3+// (A)ttack: duration of initial attack
4+// (D)ecay: duration of decay
5+// (S)ustain: the level of the sustain
6+// (R)elease): duration the release
7+//
8+// for more info on envelopes and ADSRs see:
9+// https://en.wikipedia.org/wiki/Envelope_(music)
10+// https://en.wikipedia.org/wiki/Envelope_(music)#ADSR
11+
12+// our patch
313 SinOsc s => ADSR e => dac;
414
5−// set a, d, s, and r
15+// set A, D, S, and R
616 e.set( 10::ms, 8::ms, .5, 500::ms );
17+// (note: A, D, R are durations; S is a number between 0 and 1)
18+
719 // set gain
820 .5 => s.gain;
921
@@ -11,14 +23,21 @@ e.set( 10::ms, 8::ms, .5, 500::ms ); · 1 unmodified line
1123 while( true )
1224 {
1325 // choose freq
14− Math.random2( 20, 120 ) => Std.mtof => s.freq;
26+ Math.random2( 32, 96 ) => Std.mtof => s.freq;
1527
16− // key on - start attack
28+ // key on: begin ATTACK
29+ // (note: ATTACK automatically transitions to DECAY;
30+ // DECAY automatically transitions to SUSTAIN)
1731 e.keyOn();
18− // advance time by 800 ms
32+ // advance time by 500 ms
33+ // (note: this is the duration from the
34+ // beginning of ATTACK to the end of SUSTAIN)
1935 500::ms => now;
20− // key off - start release
36+ // key off; start RELEASE
2137 e.keyOff();
22− // advance time by 800 ms
23− 800::ms => now;
38+ // allow the RELEASE to ramp down to 0
39+ e.releaseTime() => now;
40+
41+ // advance time by 300 ms (duration until the next sound)
42+ 300::ms => now;
2443 }
examples/deep/shepard.ck+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 // desc: continuous shepard-risset tone generator;
44 // descending but can easily made to ascend
55 //
6−// author: Ge Wang (http://www.gewang.com/)
6+// author: Ge Wang (https://ccrma.stanford.edu/~ge/)
77 // date: spring 2016
88 //--------------------------------------------------------------------
99
examples/deep/thx.ck+76−21
@@ -1,32 +1,81 @@
1−//---------------------------------------------------------------------
1+//--------------------------------------------------------------------
22 // name: thx.ck
3−// desc: THX Deep Note emulator
4−// (original Deep Note by James Andy Moorer)
3+// desc: emulation of the original THX Deep Note
4+// (by Dr. James Andy Moorer)
5+//
6+// author: Perry R. Cook (https://www.cs.princeton.edu/~prc/)
7+// Ge Wang (https://ccrma.stanford.edu/~ge/)
58 //
6−// authors:
79 // Perry R. Cook (Jan 8, 2007) -- original ChucK version
8−// Ge Wang -- modified final chord: D1,D1,D2,D3,D4,A4,D5,A5,D6,A6
9−// -- added detune (original Deep Note root between D and Eb)
10+// Ge Wang -- modified final chord to align with original Deep Note
11+// -- added beginning "chaotic" section
1012 // -- time-driven loops (was counter-driven loops)
11−//---------------------------------------------------------------------
12−
13+//
14+// THX resources from /Artful Design/:
15+// https://artful.design/thx/
16+//
17+// Andy Moorer's personal account
18+//. http://www.jamminpower.org/THX.html
19+//
20+// -------------------------------------------------------------------
21+// Ge, Fall 2017: from Andy Mooorer:
22+// -------------------------------------------------------------------
23+// OK - I dug out the original program. Here are the frequency
24+// bounds of the cluster:
25+// #define LOCLUST 40.0
26+// #define HICLUST 350.0
27+//
28+// I had started with them in a more narrow range, but then
29+// widened it. With the randomness, they never get anywhere
30+// near the limits. And here are the pitches in the final
31+// chord for all 30 voices:
32+//
33+// double freqs[NOSCS], initialfreqs[NOSCS],
34+// finalfreqs[] =
35+// { 1800.0, 1800.0, 1800.0,
36+// 1500.0, 1500.0,
37+// 1200.0, 1200.0, 1200.0, 1200.0,
38+// 900.0, 900.0, 900.0, 900.0,
39+// 600.0, 600.0, 600.0,
40+// 300.0, 300.0, 300.0, 300.0,
41+// 150.0, 150.0, 150.0, 150.0,
42+// 75.0, 75.0, 75.0
43+// 37.5, 37.5, 37.5,
44+// };
45+//
46+// Note that in the final chord, they are detuned a bit by
47+// injecting a bit of randomness to make sure they don't fuse
48+// totally. Several people have commented that the chord
49+// sounds "bigger" than an equivalent orchestra or organ
50+// chord (like the big chord in the Bm fugue which was my
51+// inspiration). I believe this is because of the just
52+// temperament of the chord. Moving the thirds and fifths
53+// to equal temperament just doesn't have the same impact.
54+//
55+// Let me know if you have any other questions. I am really
56+// excited to see your new book. It looks like great fun!
57+// -A
58+//--------------------------------------------------------------------
59+
1360 // 30 target frequencies, corresponding to pitches in a big chord:
14−// D1, D1, D2, D3, D4, A4, D5, A5, D6, A6
15−[ 36.7, 36.7, 73.4, 146.8, 293.7, 440.0, 587.3, 880.0, 1174.7, 1760.0,
16− 36.7, 36.7, 73.4, 146.8, 293.7, 440.0, 587.3, 880.0, 1174.7, 1760.15,
17− 36.7, 36.7, 73.4, 146.8, 293.7, 440.0, 587.3, 880.0, 1174.7, 1759.85
61+// D1, D2, D3, D4, D5, A5, D6, F#6, A6
62+[ 37.5, 75, 150, 300, 600, 900, 1200, 1500, 1800,
63+ 37.5, 75, 150, 300, 600, 900, 1200, 1500, 1800,
64+ 37.5, 75, 150, 300, 600, 900, 1200, 1800,
65+ 150, 300, 900, 1200
1866 ] @=> float targets[];
19−// detune mutiplier (original Deep Note between D and Eb)
20−Math.mtof(26.3) / Math.mtof(26) => float detune;
2167
2268 // initial frequencies
2369 float initials[30];
70+// for the initial "wavering" in the steady state
71+float initialsBase[30];
72+float randomRates[30];
2473
2574 // parameters (play with these to control timing)
26−3.0::second => dur initialHold; // initial steady segment
27−5.5::second => dur sweepTime; // duration over which to change freq
28−3.5::second => dur targetHold; // duration to hold target chord
29−2.0::second => dur decayTime; // duration for reverb tail to decay to 0
75+12.5::second => dur initialHold; // initial steady segment
76+6.0::second => dur sweepTime; // duration over which to change freq
77+5.5::second => dur targetHold; // duration to hold target chord
78+6.0::second => dur decayTime; // duration for reverb tail to decay to 0
3079
3180 // sound objects
3281 SawOsc saw[30]; // sawtooth waveform (30 of them)
@@ -46,13 +95,16 @@ for( 0 => int i; i < 30; i++ ) · 13 unmodified lines
4695 // connect sound objects (right channel)
4796 saw[i] => gainR[i] => reverbR;
4897 // randomize initial frequencies
49− Math.random2f( 200.0, 400.0 ) => initials[i] => saw[i].freq;
98+ Math.random2f( 160.0, 360.0 ) => initials[i]
99+ => initialsBase[i] => saw[i].freq;
50100 // initial gain for each sawtooth generator
51101 0.1 => saw[i].gain;
52102 // randomize gain (volume)
53103 Math.random2f( 0.0, 1.0 ) => gainL[i].gain;
54104 // right.gain is 1-left.gain -- effectively panning in stereo
55105 1.0 - gainL[i].gain() => gainR[i].gain;
106+ // rate at which to waver the initial voices
107+ Math.random2f(.1,1) => randomRates[i];
56108 }
57109
58110 // hold steady cluster (initial chaotic random frequencies)
@@ -66,6 +118,9 @@ while( now < end ) · 7 unmodified lines
66118 for( 0 => int i; i < 30; i++ ) {
67119 // set gradually decaying values to volume
68120 0.1 * Math.pow(progress,3) => saw[i].gain;
121+ // waver the voices
122+ initialsBase[i] + (1.25-progress)*.5*initialsBase[i]*Math.sin(now/second*randomRates[i])
123+ => initials[i] => saw[i].freq;
69124 }
70125 // advance time
71126 10::ms => now;
@@ -81,7 +136,7 @@ while( now < end ) · 9 unmodified lines
81136 // for each sawtooth
82137 for( 0 => int i; i < 30; i++ ) {
83138 // update frequency by delta, towards target
84− initials[i] + (targets[i]*detune-initials[i])*progress => saw[i].freq;
139+ initials[i] + (targets[i]-initials[i])*progress => saw[i].freq;
85140 }
86141 // advance time
87142 10::ms => now;
@@ -107,4 +162,4 @@ while( now < end ) · 19 unmodified lines
107162 }
108163
109164 // wait for reverb tail before ending
110−2::second => now;
165+5::second => now;
examples/extend/chugraph.ckrenamed from examples/extend/chubgraph.ck+2−2
@@ -1,7 +1,7 @@
1−// Chubgraph
1+// Chugraph
22 // Create new UGens by compositing existing UGens
33
4−class MyString extends Chubgraph
4+class MyString extends Chugraph
55 {
66 // karplus + strong plucked string filter
77 // Ge Wang (gewang@cs.princeton.edu)
examples/midi/playmidi.ck+68−19
@@ -1,55 +1,104 @@
1+// name: playmidi.ck
2+// desc: example to render a MIDI file using ChucK
13
4+// path
25 NRev reverb => dac;
3−0.01 => reverb.mix;
6+// just a bit of reverb
7+0.025 => reverb.mix;
48
9+// the MIDI file in object
510 MidiFileIn min;
11+// the MIDI message shuttle
612 MidiMsg msg;
713
14+// the filename
815 string filename;
9−if(me.args() == 0)
10− me.sourceDir() + "/bwv772.mid" => filename;
11−else
12− me.arg(0) => filename;
16+// if no command line arguments provided
17+if( me.args() == 0 ) me.sourceDir() + "bwv772.mid" => filename;
18+// else use that filename
19+else me.arg(0) => filename;
1320
14−if(!min.open(filename))
21+// open the file
22+if( !min.open(filename) )
1523 {
24+ // error!
1625 cherr <= "unable to open MIDI file: '" <= filename <= "'\n";
26+ // done
1727 me.exit();
1828 }
1929
20−chout <= filename <= ": " <= min.numTracks() <= " tracks\n";
30+// print out
31+cherr <= "----------" <= IO.newline();
32+cherr <= "MIDI file: " <= IO.newline()
33+ <= " |- " <= filename <= IO.newline()
34+ <= " |- contains " <= min.numTracks() <= " tracks" <= IO.newline();
35+// print
36+cherr <= "----------" <= IO.newline();
37+cherr <= "playing..." <= IO.newline();
38+cherr <= "----------" <= IO.newline();
2139
40+// flag
2241 int done;
2342
24−for(int t; t < min.numTracks(); t++)
25− spork ~ track(t);
43+// for each track, spork a separate shred with the track number
44+for( int t; t < min.numTracks(); t++ )
45+ spork ~ doTrack( t, 1 );
2646
27−while(done < min.numTracks())
47+// keeping track of how many tracks are done
48+while( done < min.numTracks() )
2849 1::second => now;
2950
51+// done
52+cherr <= "done; cleaning up..." <= IO.newline();
53+
54+// close the file
3055 min.close();
3156
32−fun void track(int t)
57+// entry point for each shred assigned to a track
58+fun void doTrack( int track, float speed )
3359 {
3460 // hack polyphony
35− Mandolin s[4];
36− for(int i; i < s.size(); i++) s[i] => reverb;
37−
61+ Wurley s[4];
62+ // for each voice
63+ for( int i; i < s.size(); i++ )
64+ {
65+ // set gain
66+ .5 => s[i].gain;
67+ // connect to output
68+ s[i] => reverb;
69+ }
70+ // voice number for quick polyphony
3871 int v;
3972
40− while(min.read(msg, t))
73+ // read through all MIDI messages on track
74+ while( min.read( msg, track ) )
4175 {
42− if(msg.when > 0::second)
43− msg.when => now;
76+ // this means no more MIDI events at current time; advance time
77+ if( msg.when > 0::second )
78+ msg.when * speed => now; // speed of 1 is nominal
4479
45− if((msg.data1 & 0xF0) == 0x90 && msg.data2 > 0 && msg.data3 > 0)
80+ // catch NOTEON messages (lower nibble == 0x90)
81+ if( (msg.data1 & 0xF0) == 0x90 && msg.data2 > 0 && msg.data3 > 0 )
4682 {
83+ // get the pitch and convert to frequencey; set
4784 msg.data2 => Std.mtof => s[v].freq;
85+ // velocity data; note on
4886 msg.data3/127.0 => s[v].noteOn;
49−
87+ // cycle the voices
5088 (v+1)%s.size() => v;
89+
90+ // log
91+ cherr <= "NOTE ON track:" <= track <= " pitch:" <= msg.data2 <=" velocity:" <= msg.data3 <= IO.newline();
92+ }
93+ // other messages
94+ else
95+ {
96+ // log
97+ // cherr <= "----EVENT (unhandled) track:" <= track <= " type:" <= (msg.data1&0xF0)
98+ // <= " data2:" <= msg.data2 <= " data3:" <= msg.data3 <= IO.newline();
5199 }
52100 }
53101
102+ // done with track
54103 done++;
55104 }
examples/osc/r.ck+10−4
@@ -1,4 +1,8 @@
1−// (launch with s.ck)
1+//----------------------------------------------------------------------------
2+// name: r.ck ('r' is for "receiver")
3+// desc: OpenSoundControl (OSC) receiver example
4+// note: launch with s.ck (that's the sender)
5+//----------------------------------------------------------------------------
26
37 // the patch
48 SinOsc s => JCRev r => dac;
@@ -11,8 +15,8 @@ OscIn oin; · 6 unmodified lines
1115 OscMsg msg;
1216 // use port 6449 (or whatever)
1317 6449 => oin.port;
14−// create an address in the receiver
15−oin.addAddress( "/foo/notes, if" );
18+// create an address in the receiver, expect an int and a float
19+oin.addAddress( "/foo/notes, i f" );
1620
1721 // infinite event loop
1822 while( true )
@@ -23,11 +27,13 @@ while( true ) · 4 unmodified lines
2327 // grab the next message from the queue.
2428 while( oin.recv(msg) )
2529 {
30+ // expected datatypes (note: as indicated by "i f")
2631 int i;
2732 float f;
2833
29− // getFloat fetches the expected float (as indicated by "i f")
34+ // fetch the first data element as int
3035 msg.getInt(0) => i => Std.mtof => s.freq;
36+ // fetch the second data element as float
3137 msg.getFloat(1) => f => s.gain;
3238
3339 // print
examples/osc/s.ck+9−4
@@ -1,17 +1,22 @@
1−// launch with r.ck
1+//----------------------------------------------------------------------------
2+// name: s.ck ('s' is "sender")
3+// desc: OpenSoundControl (OSC) sender example
4+// note: launch with r.ck (that's the receiver)
5+//----------------------------------------------------------------------------
26
3−// name
7+// destination host name
48 "localhost" => string hostname;
9+// destination port number
510 6449 => int port;
611
712 // check command line
813 if( me.args() ) me.arg(0) => hostname;
914 if( me.args() > 1 ) me.arg(1) => Std.atoi => port;
1015
11−// send object
16+// sender object
1217 OscOut xmit;
1318
14−// aim the transmitter
19+// aim the transmitter at destination
1520 xmit.dest( hostname, port );
1621
1722 // infinite time loop
notes/VERSIONS+33−0
@@ -1,3 +1,36 @@
1+1.4.0.2
2+---
3+ - (deprecated) Chubgraph => (new) Chugraph;
4+ Chubgraph will continue to function.
5+
6+1.4.0.1
7+---
8+ - (fixed) when opening audio input devices where the default
9+ device has insufficient chanels (e.g., MacOS input is mono
10+ by default), logic has been added to also match sample rates
11+ when searching for alternate audio input devices; additional
12+ logic added in the specific case of mono input devices to
13+ simulate stereo, to fulfill the standard request for stereo
14+ input.
15+ - (fixed) added check to prevent crash in rare situations involving
16+ self-join when deleting XThread in background. (git PR #103)
17+ - (fixed) by stuntgoat@github -- right-recursion in chuck parser
18+ can exhaust memory in larger chuck files; this has been updated
19+ to use left recursion. (git PR #32, (finally) merged by hand by
20+ Spencer and Ge) Also thanks to Tom Lieber for the initial analysis
21+ and solution:
22+ https://lists.cs.princeton.edu/pipermail/chuck-users/2009-April/004029.html
23+ - (added) by Nathan Tindall -- Q and freq bounding for filters (LPF,
24+ HPF, BPF, BRF) to avoid LOUD FILTER EXPLOSIONS; now negative values
25+ will throw an exception on the offending shred.
26+ - (restored, macOS) MAUI Chugin now (re)supported, post 1.4.0.0
27+ - (added; developer) ChucK.h API to set a main thread hook (e.g., for
28+ graphical functionalitie from Chugins)
29+ - (updated, developer) Chugin API now support main thread callback
30+ for graphical-/GUI purposes
31+ - (developer) refactored code to move I/O-related code out of
32+ chuck_lang and into chuck_io.
33+
134 1.4.0.0
235 ---
336 ********************************************************
src/core/chuck.cpp+36−7
@@ -90,7 +90,7 @@ · 89 unmodified lines
9090
9191
9292 // chuck statics
93−const char ChucK::VERSION[] = "1.4.0.0 (numchucks)";
93+const char ChucK::VERSION[] = "1.4.0.1 (numchucks)";
9494 t_CKUINT ChucK::o_numVMs = 0;
9595 t_CKBOOL ChucK::o_isGlobalInit = FALSE;
9696 t_CKBOOL ChucK::enableSystemCall = FALSE;
@@ -140,6 +140,8 @@ ChucK::ChucK() · 43 unmodified lines
140140 initDefaultParams();
141141 // did user init?
142142 m_init = FALSE;
143+ // zero out the hook
144+ m_hook = NULL; // m_hook = nullptr
143145
144146 // global init, if needed
145147 if( !o_isGlobalInit ) globalInit();
@@ -684,22 +686,23 @@ bool ChucK::shutdown() · 538 unmodified lines
684686 stk_detach( m_carrier );
685687
686688 // cancel otf thread
687−#ifndef __DISABLE_OTF_SERVER__
689+ if(m_carrier->otf_thread)
690+ {
688691 #if !defined(__PLATFORM_WIN32__) || defined(__WINDOWS_PTHREAD__)
689− if( m_carrier->otf_thread ) pthread_cancel( m_carrier->otf_thread );
692+ pthread_cancel( m_carrier->otf_thread );
690693 #else
691− if( m_carrier->otf_thread ) CloseHandle( m_carrier->otf_thread );
694+ CloseHandle( m_carrier->otf_thread ); // doesn't cancel thread
692695 #endif
696+ m_carrier->otf_thread = 0; // signals thread shutdown
697+ }
698+
693699 // close otf socket
694700 if( m_carrier->otf_socket ) ck_close( m_carrier->otf_socket );
695701
696702 // reset
697703 m_carrier->otf_socket = NULL;
698704 m_carrier->otf_port = 0;
699− m_carrier->otf_thread = 0;
700705
701−#endif
702−
703706 // TODO: a different way to unlock?
704707 // unlock all objects to delete chout, cherr
705708 Chuck_VM_Object::unlock_all();
@@ -1715,3 +1718,29 @@ void ChucK::poop() · 1009 unmodified lines
17151718 ::uh();
17161719 #endif
17171720 }
1721+
1722+
1723+
1724+
1725+//-----------------------------------------------------------------------------
1726+// name: setMainThreadHook()
1727+// desc: set a function pointer to call from the main thread loop
1728+// e.g., for graphics, MAUI, potentially from a chug-in
1729+//-----------------------------------------------------------------------------
1730+bool ChucK::setMainThreadHook(Chuck_DL_MainThreadHook * hook)
1731+{
1732+ m_hook = hook;
1733+ return true;
1734+}
1735+
1736+
1737+
1738+
1739+//-----------------------------------------------------------------------------
1740+// name: getMainThreadHook()
1741+// desc: get pointer to current function to be called from main loop
1742+//-----------------------------------------------------------------------------
1743+Chuck_DL_MainThreadHook * ChucK::getMainThreadHook()
1744+{
1745+ return m_hook;
1746+}
src/core/chuck.h+6−0
@@ -136,6 +136,10 @@ public: · 135 unmodified lines
136136 public:
137137 // additional native chuck bindings/types (use with extra caution)
138138 bool bind( f_ck_query queryFunc, const std::string & name );
139+ // set a function pointer to call from the main thread loop
140+ bool setMainThreadHook( Chuck_DL_MainThreadHook * hook );
141+ // get pointer to current function to be called from main loop
142+ Chuck_DL_MainThreadHook * getMainThreadHook();
139143
140144 public:
141145 // get VM (dangerous)
@@ -260,6 +264,8 @@ protected: · 118 unmodified lines
260264 std::map< std::string, std::list<std::string> > m_listParams;
261265 // did user init?
262266 t_CKBOOL m_init;
267+ // main thread "hook" (if there is a main thread)
268+ Chuck_DL_MainThreadHook * m_hook;
263269 };
264270
265271
src/core/chuck.y+5−4
@@ -88,7 +88,8 @@ a_Program g_program = NULL; · 87 unmodified lines
8888 // 1.3.5.3: changed to 39 for vec literal
8989 // 1.3.6.0: changed to 40 for external keyword
9090 // 1.4.0.0: changed to 41 for global keyword
91−%expect 41
91+// 1.4.0.1: changed to 79 for left recursion
92+%expect 79
9293
9394 %token <sval> ID STRING_LIT CHAR_LIT
9495 %token <ival> NUM
@@ -182,7 +183,7 @@ a_Program g_program = NULL; · 87 unmodified lines
182183
183184 program
184185 : program_section { $$ = g_program = new_program( $1, EM_lineNum ); }
185− | program_section program { $$ = g_program = prepend_program( $1, $2, EM_lineNum ); }
186+ | program program_section { $$ = g_program = append_program( $1, $2, EM_lineNum ); }
186187 ;
187188
188189 program_section
@@ -303,7 +304,7 @@ arg_list · 114 unmodified lines
303304
304305 statement_list
305306 : statement { $$ = new_stmt_list( $1, EM_lineNum ); }
306− | statement statement_list { $$ = prepend_stmt_list( $1, $2, EM_lineNum ); }
307+ | statement_list statement { $$ = append_stmt_list( $1, $2, EM_lineNum ); }
307308 ;
308309
309310 statement
@@ -358,7 +359,7 @@ expression_statement · 48 unmodified lines
358359
359360 expression
360361 : chuck_expression { $$ = $1; }
361− | chuck_expression COMMA expression { $$ = prepend_expression( $1, $3, EM_lineNum ); }
362+ | expression COMMA chuck_expression { $$ = append_expression( $1, $3, EM_lineNum ); }
362363 ;
363364
364365 chuck_expression
src/core/chuck_absyn.cpp+55−12
@@ -45,13 +45,27 @@ a_Program new_program( a_Section section, int pos ) · 44 unmodified lines
4545 return a;
4646 }
4747
48−a_Program prepend_program( a_Section section, a_Program program, int pos )
48+a_Program append_program( a_Program program, a_Section section, int pos )
4949 {
5050 a_Program a = new_program( section, pos );
51− a->next = program;
52− a->linepos = pos;
51+ a_Program current;
5352
54− return a;
53+ current = program->next;
54+ if (current == NULL) {
55+ program->next = a;
56+ return program;
57+ }
58+
59+ while (1)
60+ {
61+ if (current->next == NULL) {
62+ current->next = a;
63+ break;
64+ } else {
65+ current = current->next;
66+ }
67+ }
68+ return program;
5569 }
5670
5771 a_Section new_section_stmt( a_Stmt_List list, int pos )
@@ -94,13 +108,27 @@ a_Stmt_List new_stmt_list( a_Stmt stmt, int pos ) · 36 unmodified lines
94108 return a;
95109 }
96110
97−a_Stmt_List prepend_stmt_list( a_Stmt stmt, a_Stmt_List stmt_list, int pos )
111+a_Stmt_List append_stmt_list( a_Stmt_List stmt_list, a_Stmt stmt, int pos )
98112 {
99− a_Stmt_List a = new_stmt_list( stmt, pos );
100− a->next = stmt_list;
101− a->linepos = pos;
113+ a_Stmt_List a = new_stmt_list( stmt, pos );
114+ a_Stmt_List current;
102115
103− return a;
116+ current = stmt_list->next;
117+ if (current == NULL) {
118+ stmt_list->next = a;
119+ return stmt_list;
120+ }
121+
122+ while (1)
123+ {
124+ if (current->next == NULL) {
125+ current->next = a;
126+ break;
127+ } else {
128+ current = current->next;
129+ }
130+ }
131+ return stmt_list;
104132 }
105133
106134 a_Stmt new_stmt_from_expression( a_Exp exp, int pos )
@@ -293,10 +321,25 @@ a_Stmt new_stmt_from_case( a_Exp exp, int pos ) · 186 unmodified lines
293321 return a;
294322 }
295323
296−a_Exp prepend_expression( a_Exp exp, a_Exp list, int pos )
324+a_Exp append_expression( a_Exp list, a_Exp exp, int pos )
297325 {
298− exp->next = list;
299− return exp;
326+ a_Exp current;
327+ current = list->next;
328+ if (current == NULL) {
329+ list->next = exp;
330+ return list;
331+ }
332+
333+ while (1)
334+ {
335+ if (current->next == NULL) {
336+ current->next = exp;
337+ break;
338+ } else {
339+ current = current->next;
340+ }
341+ }
342+ return list;
300343 }
301344
302345 a_Exp new_exp_from_binary( a_Exp lhs, ae_Operator oper, a_Exp rhs, int pos )
src/core/chuck_absyn.h+3−3
@@ -130,12 +130,12 @@ typedef struct Chuck_VM_Code * t_CKVMCODE; · 129 unmodified lines
130130 // functions
131131 //------------------------------------------------------------------------------
132132 a_Program new_program( a_Section section, int pos );
133−a_Program prepend_program( a_Section section, a_Program program, int pos );
133+a_Program append_program( a_Program program, a_Section section, int pos );
134134 a_Section new_section_stmt( a_Stmt_List stmt_list, int pos );
135135 a_Section new_section_func_def( a_Func_Def func_def, int pos );
136136 a_Section new_section_class_def( a_Class_Def class_def, int pos );
137137 a_Stmt_List new_stmt_list( a_Stmt stmt, int pos );
138−a_Stmt_List prepend_stmt_list( a_Stmt stmt, a_Stmt_List stmt_list, int pos );
138+a_Stmt_List append_stmt_list( a_Stmt_List stmt_list, a_Stmt stmt, int pos );
139139 a_Stmt new_stmt_from_expression( a_Exp exp, int pos );
140140 a_Stmt new_stmt_from_code( a_Stmt_List code, int pos );
141141 a_Stmt new_stmt_from_while( a_Exp cond, a_Stmt body, int pos );
@@ -151,7 +151,7 @@ a_Stmt new_stmt_from_continue( int pos ); · 9 unmodified lines
151151 a_Stmt new_stmt_from_return( a_Exp exp, int pos );
152152 a_Stmt new_stmt_from_label( c_str xid, int pos );
153153 a_Stmt new_stmt_from_case( a_Exp exp, int pos );
154−a_Exp prepend_expression( a_Exp exp, a_Exp list, int pos );
154+a_Exp append_expression( a_Exp list, a_Exp exp, int pos );
155155 a_Exp new_exp_from_binary( a_Exp lhs, ae_Operator oper, a_Exp rhs, int pos );
156156 a_Exp new_exp_from_unary( ae_Operator oper, a_Exp exp, int pos );
157157 a_Exp new_exp_from_unary2( ae_Operator oper, a_Type_Decl type, a_Array_Sub array, int pos );
src/core/chuck_compile.cpp+2−1
@@ -78,7 +78,8 @@ t_CKBOOL load_external_modules( Chuck_Compiler * compiler, · 77 unmodified lines
7878 const char * extension,
7979 std::list<std::string> & chugin_search_paths,
8080 std::list<std::string> & named_dls);
81−t_CKBOOL load_module( Chuck_Compiler * compiler, Chuck_Env * env, f_ck_query query, const char * name, const char * nspc );
81+t_CKBOOL load_module( Chuck_Compiler * compiler, Chuck_Env * env,
82+ f_ck_query query, const char * name, const char * nspc );
8283
8384
8485
src/core/chuck_dl.cpp+48−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 #include "chuck_instr.h"
4141 #include "chuck_compile.h"
4242 #include "chuck_vm.h"
43+#include "chuck.h"
4344 #include <sstream>
4445 using namespace std;
4546
@@ -556,6 +557,17 @@ t_CKBOOL CK_DLL_CALL ck_end_class( Chuck_DL_Query * query ) · 510 unmodified lines
556557 }
557558
558559
560+//-----------------------------------------------------------------------------
561+// name: ck_create_main_thread_hook()
562+// desc: ...
563+//-----------------------------------------------------------------------------
564+Chuck_DL_MainThreadHook * CK_DLL_CALL ck_create_main_thread_hook( Chuck_DL_Query * query,
565+ f_mainthreadhook hook,
566+ f_mainthreadquit quit,
567+ void * bindle )
568+{
569+ return new Chuck_DL_MainThreadHook( hook, quit, bindle, query->carrier() );
570+}
559571
560572
561573 //-----------------------------------------------------------------------------
@@ -935,6 +947,7 @@ Chuck_DL_Query::Chuck_DL_Query( Chuck_Carrier * carrier ) · 373 unmodified lines
935947 doc_class = ck_doc_class;
936948 doc_func = ck_doc_func;
937949 doc_var = ck_doc_var;
950+ create_main_thread_hook = ck_create_main_thread_hook;
938951 m_carrier = carrier;
939952
940953 // memset(reserved2, NULL, sizeof(void*)*RESERVED_SIZE);
@@ -1005,6 +1018,41 @@ Chuck_DL_Func::~Chuck_DL_Func() · 64 unmodified lines
10051018 }
10061019
10071020
1021+/*******************************************************************************
1022+
1023+ Main Thread Hook stuff
1024+
1025+*******************************************************************************/
1026+
1027+t_CKBOOL ck_mthook_activate(Chuck_DL_MainThreadHook *hook)
1028+{
1029+ hook->m_carrier->chuck->setMainThreadHook(hook);
1030+ hook->m_active = true;
1031+ return hook->m_active;
1032+}
1033+
1034+t_CKBOOL ck_mthook_deactivate(Chuck_DL_MainThreadHook *hook)
1035+{
1036+ hook->m_carrier->chuck->setMainThreadHook(NULL);
1037+ hook->m_active = false;
1038+ return hook->m_active;
1039+}
1040+
1041+//-----------------------------------------------------------------------------
1042+// name: Chuck_DL_MainThreadHook()
1043+// desc: ...
1044+//-----------------------------------------------------------------------------
1045+Chuck_DL_MainThreadHook::Chuck_DL_MainThreadHook(f_mainthreadhook hook, f_mainthreadquit quit,
1046+ void * bindle, Chuck_Carrier * carrier) :
1047+m_hook(hook),
1048+m_quit(quit),
1049+m_carrier(carrier),
1050+m_bindle(bindle),
1051+activate(ck_mthook_activate),
1052+deactivate(ck_mthook_deactivate),
1053+m_active(FALSE)
1054+{ }
1055+
10081056
10091057
10101058 /*******************************************************************************
src/core/chuck_dl.h+23−2
@@ -48,7 +48,7 @@ · 47 unmodified lines
4848 // major version must be the same between chuck:chugin
4949 #define CK_DLL_VERSION_MAJOR (0x0007)
5050 // minor version of chugin must be less than or equal to chuck's
51−#define CK_DLL_VERSION_MINOR (0x0000)
51+#define CK_DLL_VERSION_MINOR (0x0001)
5252 #define CK_DLL_VERSION_MAKE(maj,min) ((t_CKUINT)(((maj) << 16) | (min)))
5353 #define CK_DLL_VERSION_GETMAJOR(v) (((v) >> 16) & 0xFFFF)
5454 #define CK_DLL_VERSION_GETMINOR(v) ((v) & 0xFFFF)
@@ -73,6 +73,7 @@ struct Chuck_DLL; · 18 unmodified lines
7373 struct Chuck_UGen;
7474 struct Chuck_UAna;
7575 struct Chuck_UAnaBlobProxy;
76+struct Chuck_DL_MainThreadHook;
7677 namespace Chuck_DL_Api { struct Api; }
7778
7879
@@ -306,7 +307,9 @@ typedef void (CK_DLL_CALL * f_add_ugen_ctrl)( Chuck_DL_Query * query, f_ctrl ctr · 227 unmodified lines
306307 const char * type, const char * name );
307308 // end class/namespace - must correspondent with begin_class. returns false on error
308309 typedef t_CKBOOL (CK_DLL_CALL * f_end_class)( Chuck_DL_Query * query );
309−
310+// create main thread hook- used for executing a "hook" function in the main thread of a primary chuck instance
311+typedef Chuck_DL_MainThreadHook * (CK_DLL_CALL * f_create_main_thread_hook)( Chuck_DL_Query * query, f_mainthreadhook hook, f_mainthreadquit quit, void * bindle );
312+
310313 // documentation
311314 // set current class documentation
312315 typedef t_CKBOOL (CK_DLL_CALL * f_doc_class)( Chuck_DL_Query * query, const char * doc );
@@ -334,6 +337,7 @@ public: · 21 unmodified lines
334337 Chuck_Compiler * compiler() const { return m_carrier->compiler; }
335338 Chuck_VM * vm() const { return m_carrier->vm; }
336339 Chuck_Env * env() const { return m_carrier->env; }
340+ Chuck_Carrier * carrier() const { return m_carrier; }
337341
338342 public:
339343 // function pointers - to be called from client module
@@ -375,6 +379,9 @@ public: · 35 unmodified lines
375379 f_doc_var doc_var;
376380 f_add_example add_ex;
377381
382+ // re-added 1.4.0.1
383+ f_create_main_thread_hook create_main_thread_hook;
384+
378385 // NOTE: everything below std::anything cannot be reliably accessed
379386 // by offset between dynamic modules, since std::anything could be variable
380387 // size -- put everything need to be accessed across modules above here!
@@ -629,6 +636,20 @@ protected: · 248 unmodified lines
629636 };
630637
631638
639+struct Chuck_DL_MainThreadHook
640+{
641+public:
642+ Chuck_DL_MainThreadHook(f_mainthreadhook hook, f_mainthreadquit quit,
643+ void * bindle, Chuck_Carrier * carrier);
644+ t_CKBOOL (* const activate)(Chuck_DL_MainThreadHook *);
645+ t_CKBOOL (* const deactivate)(Chuck_DL_MainThreadHook *);
646+
647+ Chuck_Carrier * const m_carrier;
648+ f_mainthreadhook const m_hook;
649+ f_mainthreadquit const m_quit;
650+ void * const m_bindle;
651+ t_CKBOOL m_active;
652+};
632653
633654
634655 /* API to ChucK's innards */
src/core/chuck_errmsg.cpp+0−0

File mode changed from 100755 to 100644.

src/core/chuck_instr.cpp+2−2
@@ -7503,12 +7503,12 @@ void Chuck_Instr_Gack::execute( Chuck_VM * vm, Chuck_VM_Shred * shred ) · 7502 unmodified lines
75037503 if( type->size == sz_INT && iskindofint(vm->env(), type) ) // ISSUE: 64-bit (fixed 1.3.1.0)
75047504 {
75057505 t_CKINT * sp = (t_CKINT *)the_sp;
7506− if( !isa( type, vm->env()->t_string ) || *(sp) == 0 )
7506+ if( !isa( type, vm->env()->t_string ) || *(sp) == 0 )
75077507 {
75087508 if( isa( type, vm->env()->t_object ) )
75097509 {
75107510 // print it
7511− if( *(sp-1) == 0 )
7511+ if( *(sp) == 0 )
75127512 CK_FPRINTF_STDERR( "null " );
75137513 else
75147514 CK_FPRINTF_STDERR( "0x%lx ", *(sp) );
src/core/chuck_io.cpp+2498−0
@@ -35,6 +35,11 @@ · 34 unmodified lines
3535 #include "chuck_instr.h"
3636 #include "chuck_type.h"
3737 #include "chuck_vm.h"
38+#include "hidio_sdl.h"
39+
40+#ifndef __DISABLE_MIDI__
41+#include "midiio_rtmidi.h"
42+#endif
3843
3944 #ifndef __WINDOWS_DS__
4045 #include <sys/select.h>
@@ -47,6 +52,8 @@ · 6 unmodified lines
4752 #include <fcntl.h>
4853 #include <math.h>
4954
55+#include <iomanip>
56+#include <sstream>
5057 #include <iostream>
5158 #include <fstream>
5259 using namespace std;
@@ -65,6 +72,2497 @@ typedef DWORD uint32_t; · 12 unmodified lines
6572 #include <stdint.h>
6673 #endif
6774
75+// global
76+static Chuck_String * g_newline = new Chuck_String();
77+
78+
79+
80+
81+//-----------------------------------------------------------------------------
82+// name: init_class_io()
83+// desc: ...
84+//-----------------------------------------------------------------------------
85+t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type )
86+{
87+ // init as base class
88+ Chuck_DL_Func * func = NULL;
89+
90+ // log
91+ EM_log( CK_LOG_SEVERE, "class 'io'" );
92+
93+ // init as base class
94+ // TODO: ctor/dtor?
95+ // TODO: replace dummy with pure function
96+ if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
97+ return FALSE;
98+
99+ // add good()
100+ func = make_new_mfun( "int", "good", io_dummy );
101+ if( !type_engine_import_mfun( env, func ) ) goto error;
102+
103+ // add close()
104+ func = make_new_mfun( "void", "close", io_dummy );
105+ if( !type_engine_import_mfun( env, func ) ) goto error;
106+
107+ // add flush()
108+ func = make_new_mfun( "void", "flush", io_dummy );
109+ if( !type_engine_import_mfun( env, func ) ) goto error;
110+
111+ // add mode(int)
112+ func = make_new_mfun( "int", "mode", io_dummy );
113+ func->add_arg( "int", "flag" );
114+ if( !type_engine_import_mfun( env, func ) ) goto error;
115+
116+ // add mode()
117+ func = make_new_mfun( "int", "mode", io_dummy );
118+ if( !type_engine_import_mfun( env, func ) ) goto error;
119+
120+ // TODO: add this later?
121+ // add read()
122+ // func = make_new_mfun( "string", "read", io_dummy );
123+ // func->add_arg( "int", "length" );
124+ // if( !type_engine_import_mfun( env, func ) ) goto error;
125+
126+ // add readLine()
127+ func = make_new_mfun( "string", "readLine", io_dummy );
128+ if( !type_engine_import_mfun( env, func ) ) goto error;
129+
130+ // add readInt()
131+ func = make_new_mfun( "int", "readInt", io_dummy );
132+ func->add_arg( "int", "flags" );
133+ if( !type_engine_import_mfun( env, func ) ) goto error;
134+
135+ // add readFloat()
136+ // func = make_new_mfun( "float", "readFloat", io_dummy );
137+ // if( !type_engine_import_mfun( env, func ) ) goto error;
138+
139+ // add eof()
140+ func = make_new_mfun( "int", "eof", io_dummy );
141+ if( !type_engine_import_mfun( env, func ) ) goto error;
142+
143+ // add more()
144+ func = make_new_mfun( "int", "more", io_dummy );
145+ if( !type_engine_import_mfun( env, func ) ) goto error;
146+
147+ // add write(string)
148+ func = make_new_mfun( "void", "write", io_dummy );
149+ func->add_arg( "string", "val" );
150+ if( !type_engine_import_mfun( env, func ) ) goto error;
151+
152+ // add write(int)
153+ func = make_new_mfun( "void", "write", io_dummy );
154+ func->add_arg( "int", "val" );
155+ if( !type_engine_import_mfun( env, func ) ) goto error;
156+
157+ // add write(float)
158+ func = make_new_mfun( "void", "write", io_dummy );
159+ func->add_arg( "float", "val" );
160+ if( !type_engine_import_mfun( env, func ) ) goto error;
161+
162+ // add newline
163+ func = make_new_sfun( "string", "newline", io_newline );
164+ if( !type_engine_import_sfun( env, func ) ) goto error;
165+ func = make_new_sfun( "string", "nl", io_newline );
166+ if( !type_engine_import_sfun( env, func ) ) goto error;
167+ func = make_new_sfun( "string", "newlineEx2VistaHWNDVisualFoxProA", io_newline );
168+ if( !type_engine_import_sfun( env, func ) ) goto error;
169+ initialize_object( g_newline, env->t_string );
170+ g_newline->set( "\n" );
171+
172+ // add READ_INT32
173+ if( !type_engine_import_svar( env, "int", "READ_INT32",
174+ TRUE, (t_CKUINT)&Chuck_IO::INT32 ) ) goto error;
175+
176+ // add READ_INT16
177+ if( !type_engine_import_svar( env, "int", "READ_INT16",
178+ TRUE, (t_CKUINT)&Chuck_IO::INT16 ) ) goto error;
179+
180+ // add READ_INT8
181+ if( !type_engine_import_svar( env, "int", "READ_INT8",
182+ TRUE, (t_CKUINT)&Chuck_IO::INT8 ) ) goto error;
183+
184+ // add INT32
185+ if( !type_engine_import_svar( env, "int", "INT32",
186+ TRUE, (t_CKUINT)&Chuck_IO::INT32 ) ) goto error;
187+
188+ // add INT16
189+ if( !type_engine_import_svar( env, "int", "INT16",
190+ TRUE, (t_CKUINT)&Chuck_IO::INT16 ) ) goto error;
191+
192+ // add INT8
193+ if( !type_engine_import_svar( env, "int", "INT8",
194+ TRUE, (t_CKUINT)&Chuck_IO::INT8 ) ) goto error;
195+
196+ // add MODE_SYNC
197+ if( !type_engine_import_svar( env, "int", "MODE_SYNC",
198+ TRUE, (t_CKUINT)&Chuck_IO::MODE_SYNC ) ) goto error;
199+
200+ // add MODE_ASYNC
201+ if( !type_engine_import_svar( env, "int", "MODE_ASYNC",
202+ TRUE, (t_CKUINT)&Chuck_IO::MODE_ASYNC ) ) goto error;
203+
204+ // end the class import
205+ type_engine_import_class_end( env );
206+
207+ return TRUE;
208+
209+error:
210+
211+ // end the class import
212+ type_engine_import_class_end( env );
213+
214+ return FALSE;
215+}
216+
217+
218+
219+
220+//-----------------------------------------------------------------------------
221+// name: init_class_fileio()
222+// desc: ...
223+//-----------------------------------------------------------------------------
224+t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type )
225+{
226+ // init as base class
227+ Chuck_DL_Func * func = NULL;
228+
229+ // log
230+ EM_log( CK_LOG_SEVERE, "class 'fileio'" );
231+
232+ // init as base class
233+ // TODO: ctor/dtor?
234+ // TODO: replace dummy with pure function
235+ if( !type_engine_import_class_begin( env, type, env->global(), fileio_ctor, fileio_dtor ) )
236+ return FALSE;
237+
238+ // add open(string)
239+ func = make_new_mfun( "int", "open", fileio_open );
240+ func->add_arg( "string", "path" );
241+ if( !type_engine_import_mfun( env, func ) ) goto error;
242+
243+ // add open(string, flags)
244+ func = make_new_mfun( "int", "open", fileio_openflags );
245+ func->add_arg( "string", "path" );
246+ func->add_arg( "int", "flags" );
247+ if( !type_engine_import_mfun( env, func ) ) goto error;
248+
249+ // add good()
250+ func = make_new_mfun( "int", "good", fileio_good );
251+ if( !type_engine_import_mfun( env, func ) ) goto error;
252+
253+ // add close()
254+ func = make_new_mfun( "void", "close", fileio_close );
255+ if( !type_engine_import_mfun( env, func ) ) goto error;
256+
257+ // add flush()
258+ func = make_new_mfun( "void", "flush", fileio_flush );
259+ if( !type_engine_import_mfun( env, func ) ) goto error;
260+
261+ // add mode()
262+ func = make_new_mfun( "int", "mode", fileio_getmode );
263+ if( !type_engine_import_mfun( env, func ) ) goto error;
264+
265+ // add mode(int)
266+ func = make_new_mfun( "int", "mode", fileio_setmode );
267+ func->add_arg( "int", "flag" );
268+ if( !type_engine_import_mfun( env, func ) ) goto error;
269+
270+ // add size()
271+ func = make_new_mfun( "int", "size", fileio_size );
272+ if( !type_engine_import_mfun( env, func ) ) goto error;
273+
274+ // add seek(int)
275+ func = make_new_mfun( "void", "seek", fileio_seek );
276+ func->add_arg( "int", "pos" );
277+ if( !type_engine_import_mfun( env, func ) ) goto error;
278+
279+ // add tell()
280+ func = make_new_mfun( "int", "tell", fileio_tell );
281+ if( !type_engine_import_mfun( env, func ) ) goto error;
282+
283+ // add isDir()
284+ func = make_new_mfun( "int", "isDir", fileio_isdir );
285+ if( !type_engine_import_mfun( env, func ) ) goto error;
286+
287+ // add dirList()
288+ func = make_new_mfun( "string[]", "dirList", fileio_dirlist );
289+ if( !type_engine_import_mfun( env, func ) ) goto error;
290+
291+ // add read()
292+ // func = make_new_mfun( "string", "read", fileio_read );
293+ // func->add_arg( "int", "length" );
294+ // if( !type_engine_import_mfun( env, func ) ) goto error;
295+
296+ // add readLine()
297+ func = make_new_mfun( "string", "readLine", fileio_readline );
298+ if( !type_engine_import_mfun( env, func ) ) goto error;
299+
300+ // add readInt()
301+ // func = make_new_mfun( "int", "readInt", fileio_readint );
302+ // if( !type_engine_import_mfun( env, func ) ) goto error;
303+
304+ // add readInt(int)
305+ func = make_new_mfun( "int", "readInt", fileio_readintflags );
306+ func->add_arg( "int", "flags" );
307+ if( !type_engine_import_mfun( env, func ) ) goto error;
308+
309+ // add readFloat()
310+ // func = make_new_mfun( "float", "readFloat", fileio_readfloat );
311+ // if( !type_engine_import_mfun( env, func ) ) goto error;
312+
313+ // add eof()
314+ func = make_new_mfun( "int", "eof", fileio_eof );
315+ if( !type_engine_import_mfun( env, func ) ) goto error;
316+
317+ // add more()
318+ func = make_new_mfun( "int", "more", fileio_more );
319+ if( !type_engine_import_mfun( env, func ) ) goto error;
320+
321+ // add write(string)
322+ func = make_new_mfun( "void", "write", fileio_writestring );
323+ func->add_arg( "string", "val" );
324+ if( !type_engine_import_mfun( env, func ) ) goto error;
325+
326+ // add write(int)
327+ func = make_new_mfun( "void", "write", fileio_writeint );
328+ func->add_arg( "int", "val" );
329+ if( !type_engine_import_mfun( env, func ) ) goto error;
330+
331+ // add write(int,flags)
332+ func = make_new_mfun( "void", "write", fileio_writeintflags );
333+ func->add_arg( "int", "val" );
334+ func->add_arg( "int", "flags" );
335+ if( !type_engine_import_mfun( env, func ) ) goto error;
336+
337+ // add write(float)
338+ func = make_new_mfun( "void", "write", fileio_writefloat );
339+ func->add_arg( "float", "val" );
340+ if( !type_engine_import_mfun( env, func ) ) goto error;
341+
342+ // add FLAG_READ_WRITE
343+ if( !type_engine_import_svar( env, "int", "READ_WRITE",
344+ TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_READ_WRITE ) ) goto error;
345+
346+ // add FLAG_READONLY
347+ if( !type_engine_import_svar( env, "int", "READ",
348+ TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_READONLY ) ) goto error;
349+
350+ // add FLAG_WRITEONLY
351+ if( !type_engine_import_svar( env, "int", "WRITE",
352+ TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_WRITEONLY ) ) goto error;
353+
354+ // add FLAG_APPEND
355+ if( !type_engine_import_svar( env, "int", "APPEND",
356+ TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_APPEND ) ) goto error;
357+
358+ // add TYPE_ASCII
359+ if( !type_engine_import_svar( env, "int", "ASCII",
360+ TRUE, (t_CKUINT)&Chuck_IO_File::TYPE_ASCII ) ) goto error;
361+
362+ // add TYPE_BINARY
363+ if( !type_engine_import_svar( env, "int", "BINARY",
364+ TRUE, (t_CKUINT)&Chuck_IO_File::TYPE_BINARY ) ) goto error;
365+
366+ // end the class import
367+ type_engine_import_class_end( env );
368+
369+ return TRUE;
370+
371+error:
372+
373+ // end the class import
374+ type_engine_import_class_end( env );
375+
376+ return FALSE;
377+}
378+
379+
380+
381+
382+//-----------------------------------------------------------------------------
383+// name: init_class_chout()
384+// desc: added 1.3.0.0 as full class
385+//-----------------------------------------------------------------------------
386+t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type )
387+{
388+ // init as base class
389+ Chuck_DL_Func * func = NULL;
390+
391+ // log
392+ EM_log( CK_LOG_SEVERE, "class 'chout'" );
393+
394+ // TODO: ctor/dtor?
395+ if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
396+ return FALSE;
397+
398+ // add good()
399+ func = make_new_mfun( "int", "good", chout_good );
400+ if( !type_engine_import_mfun( env, func ) ) goto error;
401+
402+ // add close()
403+ func = make_new_mfun( "void", "close", chout_close );
404+ if( !type_engine_import_mfun( env, func ) ) goto error;
405+
406+ // add flush()
407+ func = make_new_mfun( "void", "flush", chout_flush );
408+ if( !type_engine_import_mfun( env, func ) ) goto error;
409+
410+ // add mode()
411+ func = make_new_mfun( "int", "mode", chout_getmode );
412+ if( !type_engine_import_mfun( env, func ) ) goto error;
413+
414+ // add mode(int)
415+ func = make_new_mfun( "int", "mode", chout_setmode );
416+ func->add_arg( "int", "flag" );
417+ if( !type_engine_import_mfun( env, func ) ) goto error;
418+
419+ // add readLine()
420+ func = make_new_mfun( "string", "readLine", chout_readline );
421+ if( !type_engine_import_mfun( env, func ) ) goto error;
422+
423+ // add readInt()
424+ // func = make_new_mfun( "int", "readInt", chout_readint );
425+ // if( !type_engine_import_mfun( env, func ) ) goto error;
426+
427+ // add readInt(int)
428+ func = make_new_mfun( "int", "readInt", chout_readintflags );
429+ func->add_arg( "int", "flags" );
430+ if( !type_engine_import_mfun( env, func ) ) goto error;
431+
432+ // add readFloat()
433+ // func = make_new_mfun( "float", "readFloat", chout_readfloat );
434+ // if( !type_engine_import_mfun( env, func ) ) goto error;
435+
436+ // add eof()
437+ func = make_new_mfun( "int", "eof", chout_eof );
438+ if( !type_engine_import_mfun( env, func ) ) goto error;
439+
440+ // add more()
441+ func = make_new_mfun( "int", "more", chout_more );
442+ if( !type_engine_import_mfun( env, func ) ) goto error;
443+
444+ // add write(string)
445+ func = make_new_mfun( "void", "write", chout_writestring );
446+ func->add_arg( "string", "val" );
447+ if( !type_engine_import_mfun( env, func ) ) goto error;
448+
449+ // add write(int)
450+ func = make_new_mfun( "void", "write", chout_writeint );
451+ func->add_arg( "int", "val" );
452+ if( !type_engine_import_mfun( env, func ) ) goto error;
453+
454+ // add write(float)
455+ func = make_new_mfun( "void", "write", chout_writefloat );
456+ func->add_arg( "float", "val" );
457+ if( !type_engine_import_mfun( env, func ) ) goto error;
458+
459+ // end the class import
460+ type_engine_import_class_end( env );
461+
462+ return TRUE;
463+
464+error:
465+
466+ // end the class import
467+ type_engine_import_class_end( env );
468+
469+ return FALSE;
470+}
471+
472+
473+
474+
475+//-----------------------------------------------------------------------------
476+// name: init_class_cherr()
477+// desc: added 1.3.0.0 -- as full class
478+//-----------------------------------------------------------------------------
479+t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type )
480+{
481+ // init as base class
482+ Chuck_DL_Func * func = NULL;
483+
484+ // log
485+ EM_log( CK_LOG_SEVERE, "class 'cherr'" );
486+
487+ // TODO: ctor/dtor?
488+ if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
489+ return FALSE;
490+
491+ // add good()
492+ func = make_new_mfun( "int", "good", cherr_good );
493+ if( !type_engine_import_mfun( env, func ) ) goto error;
494+
495+ // add close()
496+ func = make_new_mfun( "void", "close", cherr_close );
497+ if( !type_engine_import_mfun( env, func ) ) goto error;
498+
499+ // add flush()
500+ func = make_new_mfun( "void", "flush", cherr_flush );
501+ if( !type_engine_import_mfun( env, func ) ) goto error;
502+
503+ // add mode()
504+ func = make_new_mfun( "int", "mode", cherr_getmode );
505+ if( !type_engine_import_mfun( env, func ) ) goto error;
506+
507+ // add mode(int)
508+ func = make_new_mfun( "int", "mode", cherr_setmode );
509+ func->add_arg( "int", "flag" );
510+ if( !type_engine_import_mfun( env, func ) ) goto error;
511+
512+ // add readLine()
513+ func = make_new_mfun( "string", "readLine", cherr_readline );
514+ if( !type_engine_import_mfun( env, func ) ) goto error;
515+
516+ // add readInt()
517+ // func = make_new_mfun( "int", "readInt", cherr_readint );
518+ // if( !type_engine_import_mfun( env, func ) ) goto error;
519+
520+ // add readInt(int)
521+ func = make_new_mfun( "int", "readInt", cherr_readintflags );
522+ func->add_arg( "int", "flags" );
523+ if( !type_engine_import_mfun( env, func ) ) goto error;
524+
525+ // add readFloat()
526+ // func = make_new_mfun( "float", "readFloat", cherr_readfloat );
527+ // if( !type_engine_import_mfun( env, func ) ) goto error;
528+
529+ // add eof()
530+ func = make_new_mfun( "int", "eof", cherr_eof );
531+ if( !type_engine_import_mfun( env, func ) ) goto error;
532+
533+ // add more()
534+ func = make_new_mfun( "int", "more", cherr_more );
535+ if( !type_engine_import_mfun( env, func ) ) goto error;
536+
537+ // add write(string)
538+ func = make_new_mfun( "void", "write", cherr_writestring );
539+ func->add_arg( "string", "val" );
540+ if( !type_engine_import_mfun( env, func ) ) goto error;
541+
542+ // add write(int)
543+ func = make_new_mfun( "void", "write", cherr_writeint );
544+ func->add_arg( "int", "val" );
545+ if( !type_engine_import_mfun( env, func ) ) goto error;
546+
547+ // add write(float)
548+ func = make_new_mfun( "void", "write", cherr_writefloat );
549+ func->add_arg( "float", "val" );
550+ if( !type_engine_import_mfun( env, func ) ) goto error;
551+
552+ // end the class import
553+ type_engine_import_class_end( env );
554+
555+ return TRUE;
556+
557+error:
558+
559+ // end the class import
560+ type_engine_import_class_end( env );
561+
562+ return FALSE;
563+}
564+
565+
566+
567+
568+
569+
570+// static
571+static t_CKUINT MidiIn_offset_data = 0;
572+t_CKUINT MidiMsg_offset_data1 = 0;
573+t_CKUINT MidiMsg_offset_data2 = 0;
574+t_CKUINT MidiMsg_offset_data3 = 0;
575+t_CKUINT MidiMsg_offset_when = 0;
576+static t_CKUINT MidiOut_offset_data = 0;
577+
578+//-----------------------------------------------------------------------------
579+// name: init_class_Midi()
580+// desc: ...
581+//-----------------------------------------------------------------------------
582+t_CKBOOL init_class_Midi( Chuck_Env * env )
583+{
584+ Chuck_DL_Func * func = NULL;
585+
586+ // init base class
587+ // TODO: ctor/dtor?
588+ if( !type_engine_import_class_begin( env, "MidiMsg", "Object",
589+ env->global(), NULL, NULL ) )
590+ return FALSE;
591+
592+ // add member variable
593+ MidiMsg_offset_data1 = type_engine_import_mvar( env, "int", "data1", FALSE );
594+ if( MidiMsg_offset_data1 == CK_INVALID_OFFSET ) goto error;
595+
596+ // add member variable
597+ MidiMsg_offset_data2 = type_engine_import_mvar( env, "int", "data2", FALSE );
598+ if( MidiMsg_offset_data2 == CK_INVALID_OFFSET ) goto error;
599+
600+ // add member variable
601+ MidiMsg_offset_data3 = type_engine_import_mvar( env, "int", "data3", FALSE );
602+ if( MidiMsg_offset_data3 == CK_INVALID_OFFSET ) goto error;
603+
604+ // add member variable
605+ MidiMsg_offset_when = type_engine_import_mvar( env, "dur", "when", FALSE );
606+ if( MidiMsg_offset_when == CK_INVALID_OFFSET ) goto error;
607+
608+ // end the class import
609+ type_engine_import_class_end( env );
610+
611+#ifndef __DISABLE_MIDI__
612+ // init base class
613+ if( !type_engine_import_class_begin( env, "MidiIn", "Event",
614+ env->global(), MidiIn_ctor, MidiIn_dtor ) )
615+ return FALSE;
616+
617+ // add open()
618+ func = make_new_mfun( "int", "open", MidiIn_open );
619+ func->add_arg( "int", "port" );
620+ if( !type_engine_import_mfun( env, func ) ) goto error;
621+
622+ // add open() (added 1.3.0.0)
623+ func = make_new_mfun( "int", "open", MidiIn_open_named );
624+ func->add_arg( "string", "name" );
625+ if( !type_engine_import_mfun( env, func ) ) goto error;
626+
627+ // add good()
628+ func = make_new_mfun( "int", "good", MidiIn_good );
629+ if( !type_engine_import_mfun( env, func ) ) goto error;
630+
631+ // add num()
632+ func = make_new_mfun( "int", "num", MidiIn_num );
633+ if( !type_engine_import_mfun( env, func ) ) goto error;
634+
635+ // add name()
636+ func = make_new_mfun( "string", "name", MidiIn_name );
637+ if( !type_engine_import_mfun( env, func ) ) goto error;
638+
639+ // add printerr()
640+ func = make_new_mfun( "void", "printerr", MidiIn_printerr );
641+ func->add_arg( "int", "print_or_not" );
642+ if( !type_engine_import_mfun( env, func ) ) goto error;
643+
644+ // add recv()
645+ func = make_new_mfun( "int", "recv", MidiIn_recv );
646+ func->add_arg( "MidiMsg", "msg" );
647+ if( !type_engine_import_mfun( env, func ) ) goto error;
648+
649+ // add can_wait()
650+ func = make_new_mfun( "int", "can_wait", MidiIn_can_wait );
651+ if( !type_engine_import_mfun( env, func ) ) goto error;
652+
653+ // add member variable
654+ MidiIn_offset_data = type_engine_import_mvar( env, "int", "@MidiIn_data", FALSE );
655+ if( MidiIn_offset_data == CK_INVALID_OFFSET ) goto error;
656+
657+ // end the class import
658+ type_engine_import_class_end( env );
659+
660+ // init base class
661+ if( !type_engine_import_class_begin( env, "MidiOut", "Object",
662+ env->global(), MidiOut_ctor, MidiOut_dtor ) )
663+ return FALSE;
664+
665+ // add open()
666+ func = make_new_mfun( "int", "open", MidiOut_open );
667+ func->add_arg( "int", "port" );
668+ if( !type_engine_import_mfun( env, func ) ) goto error;
669+
670+ // add open() (added 1.3.0.0)
671+ func = make_new_mfun( "int", "open", MidiOut_open_named );
672+ func->add_arg( "string", "name" );
673+ if( !type_engine_import_mfun( env, func ) ) goto error;
674+
675+ // add good()
676+ func = make_new_mfun( "int", "good", MidiOut_good );
677+ if( !type_engine_import_mfun( env, func ) ) goto error;
678+
679+ // add num()
680+ func = make_new_mfun( "int", "num", MidiOut_num );
681+ if( !type_engine_import_mfun( env, func ) ) goto error;
682+
683+ // add name()
684+ func = make_new_mfun( "string", "name", MidiOut_name );
685+ if( !type_engine_import_mfun( env, func ) ) goto error;
686+
687+ // add printerr()
688+ func = make_new_mfun( "void", "printerr", MidiOut_printerr );
689+ func->add_arg( "int", "print_or_not" );
690+ if( !type_engine_import_mfun( env, func ) ) goto error;
691+
692+ // add send()
693+ func = make_new_mfun( "int", "send", MidiOut_send );
694+ func->add_arg( "MidiMsg", "msg" );
695+ if( !type_engine_import_mfun( env, func ) ) goto error;
696+
697+ // add member variable
698+ MidiOut_offset_data = type_engine_import_mvar( env, "int", "@MidiOut_data", FALSE );
699+ if( MidiOut_offset_data == CK_INVALID_OFFSET ) goto error;
700+
701+ // end the class import
702+ type_engine_import_class_end( env );
703+
704+#endif // __DISABLE_MIDI__
705+
706+ return TRUE;
707+
708+error:
709+
710+ // end the class import
711+ type_engine_import_class_end( env );
712+
713+ return FALSE;
714+}
715+
716+
717+
718+
719+// static
720+static t_CKUINT HidIn_offset_data = 0;
721+
722+static t_CKUINT HidMsg_offset_device_type = 0;
723+static t_CKUINT HidMsg_offset_device_num = 0;
724+static t_CKUINT HidMsg_offset_type = 0;
725+static t_CKUINT HidMsg_offset_which = 0;
726+static t_CKUINT HidMsg_offset_idata = 0;
727+static t_CKUINT HidMsg_offset_fdata = 0;
728+static t_CKUINT HidMsg_offset_when = 0;
729+static t_CKUINT HidMsg_offset_deltax = 0;
730+static t_CKUINT HidMsg_offset_deltay = 0;
731+static t_CKUINT HidMsg_offset_axis_position = 0; // deprecated
732+static t_CKUINT HidMsg_offset_axis_position2 = 0;
733+static t_CKUINT HidMsg_offset_scaled_axis_position = 0; // deprecated
734+static t_CKUINT HidMsg_offset_hat_position = 0;
735+static t_CKUINT HidMsg_offset_cursorx = 0;
736+static t_CKUINT HidMsg_offset_cursory = 0;
737+static t_CKUINT HidMsg_offset_scaledcursorx = 0;
738+static t_CKUINT HidMsg_offset_scaledcursory = 0;
739+static t_CKUINT HidMsg_offset_x = 0;
740+static t_CKUINT HidMsg_offset_y = 0;
741+static t_CKUINT HidMsg_offset_z = 0;
742+static t_CKUINT HidMsg_offset_touchx = 0; // added 1.3.0.0
743+static t_CKUINT HidMsg_offset_touchy = 0; // added 1.3.0.0
744+static t_CKUINT HidMsg_offset_touchsize = 0; // added 1.3.0.0
745+static t_CKUINT HidMsg_offset_ascii = 0;
746+static t_CKUINT HidMsg_offset_key = 0;
747+
748+static t_CKUINT HidOut_offset_data = 0;
749+
750+//-----------------------------------------------------------------------------
751+// name: init_class_HID()
752+// desc: ...
753+//-----------------------------------------------------------------------------
754+t_CKBOOL init_class_HID( Chuck_Env * env )
755+{
756+ Chuck_DL_Func * func = NULL;
757+
758+ // init base class
759+ if( !type_engine_import_class_begin( env, "HidMsg", "Object",
760+ env->global(), NULL, NULL ) )
761+ return FALSE;
762+
763+ // add member variable
764+ HidMsg_offset_device_type = type_engine_import_mvar( env, "int", "deviceType", FALSE );
765+ if( HidMsg_offset_device_type == CK_INVALID_OFFSET ) goto error;
766+
767+ // add member variable
768+ HidMsg_offset_device_num = type_engine_import_mvar( env, "int", "deviceNum", FALSE );
769+ if( HidMsg_offset_device_num == CK_INVALID_OFFSET ) goto error;
770+
771+ // add member variable
772+ HidMsg_offset_type = type_engine_import_mvar( env, "int", "type", FALSE );
773+ if( HidMsg_offset_type == CK_INVALID_OFFSET ) goto error;
774+
775+ // add member variable
776+ HidMsg_offset_which = type_engine_import_mvar( env, "int", "which", FALSE );
777+ if( HidMsg_offset_which == CK_INVALID_OFFSET ) goto error;
778+
779+ // add member variable
780+ HidMsg_offset_idata = type_engine_import_mvar( env, "int", "idata", FALSE );
781+ if( HidMsg_offset_idata == CK_INVALID_OFFSET ) goto error;
782+
783+ // add member variable
784+ HidMsg_offset_fdata = type_engine_import_mvar( env, "float", "fdata", FALSE );
785+ if( HidMsg_offset_fdata == CK_INVALID_OFFSET ) goto error;
786+
787+ // add member variable
788+ HidMsg_offset_when = type_engine_import_mvar( env, "time", "when", FALSE );
789+ if( HidMsg_offset_when == CK_INVALID_OFFSET ) goto error;
790+
791+ // add member variable
792+ HidMsg_offset_deltax = type_engine_import_mvar( env, "int", "deltaX", FALSE );
793+ if( HidMsg_offset_deltax == CK_INVALID_OFFSET ) goto error;
794+
795+ // add member variable
796+ HidMsg_offset_deltay = type_engine_import_mvar( env, "int", "deltaY", FALSE );
797+ if( HidMsg_offset_deltay == CK_INVALID_OFFSET ) goto error;
798+
799+ // add member variable
800+ HidMsg_offset_cursorx = type_engine_import_mvar( env, "int", "cursorX", FALSE );
801+ if( HidMsg_offset_cursorx == CK_INVALID_OFFSET ) goto error;
802+
803+ // add member variable
804+ HidMsg_offset_cursory = type_engine_import_mvar( env, "int", "cursorY", FALSE );
805+ if( HidMsg_offset_cursory == CK_INVALID_OFFSET ) goto error;
806+
807+ // add member variable
808+ HidMsg_offset_scaledcursorx = type_engine_import_mvar( env, "float", "scaledCursorX", FALSE );
809+ if( HidMsg_offset_scaledcursorx == CK_INVALID_OFFSET ) goto error;
810+
811+ // add member variable
812+ HidMsg_offset_scaledcursory = type_engine_import_mvar( env, "float", "scaledCursorY", FALSE );
813+ if( HidMsg_offset_scaledcursory == CK_INVALID_OFFSET ) goto error;
814+
815+ // add member variable
816+ HidMsg_offset_x = type_engine_import_mvar( env, "int", "x", FALSE );
817+ if( HidMsg_offset_x == CK_INVALID_OFFSET ) goto error;
818+
819+ // add member variable
820+ HidMsg_offset_y = type_engine_import_mvar( env, "int", "y", FALSE );
821+ if( HidMsg_offset_y == CK_INVALID_OFFSET ) goto error;
822+
823+ // add member variable
824+ HidMsg_offset_z = type_engine_import_mvar( env, "int", "z", FALSE );
825+ if( HidMsg_offset_z == CK_INVALID_OFFSET ) goto error;
826+
827+ // add member variable (added 1.3.0.0)
828+ HidMsg_offset_touchx = type_engine_import_mvar( env, "float", "touchX", FALSE );
829+ if( HidMsg_offset_touchx == CK_INVALID_OFFSET ) goto error;
830+
831+ // add member variable (added 1.3.0.0)
832+ HidMsg_offset_touchy = type_engine_import_mvar( env, "float", "touchY", FALSE );
833+ if( HidMsg_offset_touchy == CK_INVALID_OFFSET ) goto error;
834+
835+ // add member variable (added 1.3.0.0)
836+ HidMsg_offset_touchsize = type_engine_import_mvar( env, "float", "touchSize", FALSE );
837+ if( HidMsg_offset_touchsize == CK_INVALID_OFFSET ) goto error;
838+
839+ // add member variable
840+ HidMsg_offset_axis_position = type_engine_import_mvar( env, "int", "axis_position", FALSE );
841+ if( HidMsg_offset_axis_position == CK_INVALID_OFFSET ) goto error;
842+
843+ // add member variable
844+ HidMsg_offset_axis_position2 = type_engine_import_mvar( env, "float", "axisPosition", FALSE );
845+ if( HidMsg_offset_axis_position2 == CK_INVALID_OFFSET ) goto error;
846+
847+ // add member variable
848+ HidMsg_offset_hat_position = type_engine_import_mvar( env, "int", "hatPosition", FALSE );
849+ if( HidMsg_offset_hat_position == CK_INVALID_OFFSET ) goto error;
850+
851+ // add member variable
852+ HidMsg_offset_ascii = type_engine_import_mvar( env, "int", "ascii", FALSE );
853+ if( HidMsg_offset_ascii == CK_INVALID_OFFSET ) goto error;
854+
855+ // add member variable
856+ HidMsg_offset_key = type_engine_import_mvar( env, "int", "key", FALSE );
857+ if( HidMsg_offset_key == CK_INVALID_OFFSET ) goto error;
858+
859+ // add member variable
860+ HidMsg_offset_scaled_axis_position = type_engine_import_mvar( env, "float", "scaled_axis_position", FALSE );
861+ if( HidMsg_offset_scaled_axis_position == CK_INVALID_OFFSET ) goto error;
862+
863+ // add is_axis_motion()
864+ func = make_new_mfun( "int", "is_axis_motion", HidMsg_is_axis_motion ); // deprecated
865+ if( !type_engine_import_mfun( env, func ) ) goto error;
866+
867+ // add isAxisMotion()
868+ func = make_new_mfun( "int", "isAxisMotion", HidMsg_is_axis_motion );
869+ if( !type_engine_import_mfun( env, func ) ) goto error;
870+
871+ // add is_button_down()
872+ func = make_new_mfun( "int", "is_button_down", HidMsg_is_button_down ); // deprecated
873+ if( !type_engine_import_mfun( env, func ) ) goto error;
874+
875+ // add isButtonDown()
876+ func = make_new_mfun( "int", "isButtonDown", HidMsg_is_button_down );
877+ if( !type_engine_import_mfun( env, func ) ) goto error;
878+
879+ // add is_button_up()
880+ func = make_new_mfun( "int", "is_button_up", HidMsg_is_button_up ); // deprecated
881+ if( !type_engine_import_mfun( env, func ) ) goto error;
882+
883+ // add isButtonUp()
884+ func = make_new_mfun( "int", "isButtonUp", HidMsg_is_button_up );
885+ if( !type_engine_import_mfun( env, func ) ) goto error;
886+
887+ // add is_mouse_motion()
888+ func = make_new_mfun( "int", "is_mouse_motion", HidMsg_is_mouse_motion ); // deprecated
889+ if( !type_engine_import_mfun( env, func ) ) goto error;
890+
891+ // add isMouseMotion()
892+ func = make_new_mfun( "int", "isMouseMotion", HidMsg_is_mouse_motion );
893+ if( !type_engine_import_mfun( env, func ) ) goto error;
894+
895+ // add is_hat_motion()
896+ func = make_new_mfun( "int", "is_hat_motion", HidMsg_is_hat_motion ); // deprecated
897+ if( !type_engine_import_mfun( env, func ) ) goto error;
898+
899+ // add isHatMotion()
900+ func = make_new_mfun( "int", "isHatMotion", HidMsg_is_hat_motion );
901+ if( !type_engine_import_mfun( env, func ) ) goto error;
902+
903+ // add isWheelMotion()
904+ func = make_new_mfun( "int", "isWheelMotion", HidMsg_is_wheel_motion );
905+ if( !type_engine_import_mfun( env, func ) ) goto error;
906+
907+ // end the class import
908+ type_engine_import_class_end( env );
909+
910+
911+ // register deprecate
912+ type_engine_register_deprecate( env, "HidIn", "Hid" );
913+
914+ // init base class Hid (copy of HidIn + constants)
915+ if( !type_engine_import_class_begin( env, "Hid", "Event",
916+ env->global(), HidIn_ctor, HidIn_dtor ) )
917+ return FALSE;
918+
919+ // add open()
920+ func = make_new_mfun( "int", "open", HidIn_open );
921+ func->add_arg( "int", "type" );
922+ func->add_arg( "int", "num" );
923+ if( !type_engine_import_mfun( env, func ) ) goto error;
924+
925+ // add open()
926+ func = make_new_mfun( "int", "open", HidIn_open_named );
927+ func->add_arg( "string", "name" );
928+ if( !type_engine_import_mfun( env, func ) ) goto error;
929+
930+ // add openJoystick()
931+ func = make_new_mfun( "int", "openJoystick", HidIn_open_joystick );
932+ func->add_arg( "int", "num" );
933+ if( !type_engine_import_mfun( env, func ) ) goto error;
934+
935+ // add openMouse()
936+ func = make_new_mfun( "int", "openMouse", HidIn_open_mouse );
937+ func->add_arg( "int", "num" );
938+ if( !type_engine_import_mfun( env, func ) ) goto error;
939+
940+ // add openKeyboard()
941+ func = make_new_mfun( "int", "openKeyboard", HidIn_open_keyboard );
942+ func->add_arg( "int", "num" );
943+ if( !type_engine_import_mfun( env, func ) ) goto error;
944+
945+ // add openTiltSensor()
946+ func = make_new_mfun( "int", "openTiltSensor", HidIn_open_tiltsensor );
947+ if( !type_engine_import_mfun( env, func ) ) goto error;
948+
949+ // add good()
950+ func = make_new_mfun( "int", "good", HidIn_good );
951+ if( !type_engine_import_mfun( env, func ) ) goto error;
952+
953+ // add num()
954+ func = make_new_mfun( "int", "num", HidIn_num );
955+ if( !type_engine_import_mfun( env, func ) ) goto error;
956+
957+ // add name()
958+ func = make_new_mfun( "string", "name", HidIn_name );
959+ if( !type_engine_import_mfun( env, func ) ) goto error;
960+
961+ // add printerr()
962+ func = make_new_mfun( "void", "printerr", HidIn_printerr );
963+ func->add_arg( "int", "print_or_not" );
964+ if( !type_engine_import_mfun( env, func ) ) goto error;
965+
966+ // add recv()
967+ func = make_new_mfun( "int", "recv", HidIn_recv );
968+ func->add_arg( "HidMsg", "msg" );
969+ if( !type_engine_import_mfun( env, func ) ) goto error;
970+
971+ // add read()
972+ func = make_new_mfun( "int", "read", HidIn_read );
973+ func->add_arg( "int", "type" );
974+ func->add_arg( "int", "which" );
975+ func->add_arg( "HidMsg", "msg" );
976+ if( !type_engine_import_mfun( env, func ) ) goto error;
977+
978+ // add send()
979+ func = make_new_mfun( "int", "send", HidIn_send );
980+ func->add_arg( "HidMsg", "msg" );
981+ if( !type_engine_import_mfun( env, func ) ) goto error;
982+
983+ // add can_wait()
984+ func = make_new_mfun( "int", "can_wait", HidIn_can_wait );
985+ if( !type_engine_import_mfun( env, func ) ) goto error;
986+
987+ // add readTiltSensor()
988+ func = make_new_sfun( "int[]", "readTiltSensor", HidIn_read_tilt_sensor );
989+ if( !type_engine_import_sfun( env, func ) ) goto error;
990+
991+ // add globalTiltPollRate()
992+ func = make_new_sfun( "dur", "globalTiltPollRate", HidIn_ctrl_tiltPollRate );
993+ func->add_arg( "dur", "d" );
994+ if( !type_engine_import_sfun( env, func ) ) goto error;
995+
996+ // add globalTiltPollRate()
997+ func = make_new_sfun( "dur", "globalTiltPollRate", HidIn_cget_tiltPollRate );
998+ if( !type_engine_import_sfun( env, func ) ) goto error;
999+
1000+ // add startCursorTrack()
1001+ func = make_new_sfun( "int", "startCursorTrack", HidIn_start_cursor_track );
1002+ if( !type_engine_import_sfun( env, func ) ) goto error;
1003+
1004+ // add stopCursorTrack()
1005+ func = make_new_sfun( "int", "stopCursorTrack", HidIn_stop_cursor_track );
1006+ if( !type_engine_import_sfun( env, func ) ) goto error;
1007+
1008+ // add member variable
1009+ HidIn_offset_data = type_engine_import_mvar( env, "int", "@Hid_data", FALSE );
1010+ if( HidIn_offset_data == CK_INVALID_OFFSET ) goto error;
1011+
1012+ // add static member variable joystick
1013+ if( type_engine_import_svar( env, "int", "JOYSTICK", TRUE,
1014+ ( t_CKUINT ) &CK_HID_DEV_JOYSTICK ) == FALSE )
1015+ goto error;
1016+
1017+ // add static member variable keyboard
1018+ if( type_engine_import_svar( env, "int", "KEYBOARD", TRUE,
1019+ ( t_CKUINT ) &CK_HID_DEV_KEYBOARD ) == FALSE )
1020+ goto error;
1021+
1022+ // add static member variable mouse
1023+ if( type_engine_import_svar( env, "int", "MOUSE", TRUE,
1024+ ( t_CKUINT ) &CK_HID_DEV_MOUSE ) == FALSE )
1025+ goto error;
1026+
1027+ // add static member variable wii_remote
1028+ if( type_engine_import_svar( env, "int", "WII_REMOTE", TRUE,
1029+ ( t_CKUINT ) &CK_HID_DEV_WIIREMOTE ) == FALSE )
1030+ goto error;
1031+
1032+ // add static member variable wii_remote
1033+ if( type_engine_import_svar( env, "int", "TILT_SENSOR", TRUE,
1034+ ( t_CKUINT ) &CK_HID_DEV_TILTSENSOR ) == FALSE )
1035+ goto error;
1036+
1037+ // add static member variable tablet
1038+ if( type_engine_import_svar( env, "int", "TABLET", TRUE,
1039+ ( t_CKUINT ) &CK_HID_DEV_TABLET ) == FALSE )
1040+ goto error;
1041+
1042+ // add static member variable axisMotion
1043+ if( type_engine_import_svar( env, "int", "AXIS_MOTION", TRUE,
1044+ ( t_CKUINT ) &CK_HID_JOYSTICK_AXIS ) == FALSE )
1045+ goto error;
1046+
1047+ // add static member variable buttonDown
1048+ if( type_engine_import_svar( env, "int", "BUTTON_DOWN", TRUE,
1049+ ( t_CKUINT ) &CK_HID_BUTTON_DOWN ) == FALSE )
1050+ goto error;
1051+
1052+ // add static member variable buttonUp
1053+ if( type_engine_import_svar( env, "int", "BUTTON_UP", TRUE,
1054+ ( t_CKUINT ) &CK_HID_BUTTON_UP ) == FALSE )
1055+ goto error;
1056+
1057+ // add static member variable joystickHat
1058+ if( type_engine_import_svar( env, "int", "JOYSTICK_HAT", TRUE,
1059+ ( t_CKUINT ) &CK_HID_JOYSTICK_HAT ) == FALSE )
1060+ goto error;
1061+
1062+ // add static member variable JOYSTICK_BALL
1063+ if( type_engine_import_svar( env, "int", "JOYSTICK_BALL", TRUE,
1064+ ( t_CKUINT ) &CK_HID_JOYSTICK_BALL ) == FALSE )
1065+ goto error;
1066+
1067+ // add static member variable mouseMotion
1068+ if( type_engine_import_svar( env, "int", "MOUSE_MOTION", TRUE,
1069+ ( t_CKUINT ) &CK_HID_MOUSE_MOTION ) == FALSE )
1070+ goto error;
1071+
1072+ // add static member variable mouseWheel
1073+ if( type_engine_import_svar( env, "int", "MOUSE_WHEEL", TRUE,
1074+ ( t_CKUINT ) &CK_HID_MOUSE_WHEEL ) == FALSE )
1075+ goto error;
1076+
1077+ // add static member variable DEVICE_CONNECTED
1078+ if( type_engine_import_svar( env, "int", "DEVICE_CONNECTED", TRUE,
1079+ ( t_CKUINT ) &CK_HID_DEVICE_CONNECTED ) == FALSE )
1080+ goto error;
1081+
1082+ // add static member variable DEVICE_DISCONNECTED
1083+ if( type_engine_import_svar( env, "int", "DEVICE_DISCONNECTED", TRUE,
1084+ ( t_CKUINT ) &CK_HID_DEVICE_DISCONNECTED ) == FALSE )
1085+ goto error;
1086+
1087+ // add static member variable ACCELEROMETER
1088+ if( type_engine_import_svar( env, "int", "ACCELEROMETER", TRUE,
1089+ ( t_CKUINT ) &CK_HID_ACCELEROMETER ) == FALSE )
1090+ goto error;
1091+
1092+ // add static member variable LED
1093+ if( type_engine_import_svar( env, "int", "LED", TRUE,
1094+ ( t_CKUINT ) &CK_HID_LED ) == FALSE )
1095+ goto error;
1096+
1097+ // add static member variable LED
1098+ if( type_engine_import_svar( env, "int", "FORCE_FEEDBACK", TRUE,
1099+ ( t_CKUINT ) &CK_HID_FORCE_FEEDBACK ) == FALSE )
1100+ goto error;
1101+
1102+ // end the class import
1103+ type_engine_import_class_end( env );
1104+
1105+ /*
1106+ // init base class
1107+ if( !type_engine_import_class_begin( env, "HidOut", "Object",
1108+ env->global(), HidOut_ctor ) )
1109+ return FALSE;
1110+
1111+ // add open()
1112+ func = make_new_mfun( "int", "open", HidOut_open );
1113+ func->add_arg( "int", "port" );
1114+ if( !type_engine_import_mfun( env, func ) ) goto error;
1115+
1116+ // add good()
1117+ func = make_new_mfun( "int", "good", HidOut_good );
1118+ if( !type_engine_import_mfun( env, func ) ) goto error;
1119+
1120+ // add num()
1121+ func = make_new_mfun( "int", "num", HidOut_num );
1122+ if( !type_engine_import_mfun( env, func ) ) goto error;
1123+
1124+ // add name()
1125+ func = make_new_mfun( "string", "name", HidOut_name );
1126+ if( !type_engine_import_mfun( env, func ) ) goto error;
1127+
1128+ // add printerr()
1129+ func = make_new_mfun( "void", "printerr", HidOut_printerr );
1130+ func->add_arg( "int", "print_or_not" );
1131+ if( !type_engine_import_mfun( env, func ) ) goto error;
1132+
1133+ // add send()
1134+ func = make_new_mfun( "int", "send", HidOut_send );
1135+ func->add_arg( "HidMsg", "msg" );
1136+ if( !type_engine_import_mfun( env, func ) ) goto error;
1137+
1138+ // add member variable
1139+ HidOut_offset_data = type_engine_import_mvar( env, "int", "@HidOut_data", FALSE );
1140+ if( HidOut_offset_data == CK_INVALID_OFFSET ) goto error;
1141+
1142+ // end the class import
1143+ type_engine_import_class_end( env );
1144+ */
1145+ return TRUE;
1146+
1147+error:
1148+
1149+ // end the class import
1150+ type_engine_import_class_end( env );
1151+
1152+ return FALSE;
1153+}
1154+
1155+
1156+
1157+
1158+
1159+// static
1160+static t_CKUINT MidiRW_offset_data = 0;
1161+static t_CKUINT MidiMsgOut_offset_data = 0;
1162+static t_CKUINT MidiMsgIn_offset_data = 0;
1163+//-----------------------------------------------------------------------------
1164+// name: init_class_MidiRW()
1165+// desc: ...
1166+//-----------------------------------------------------------------------------
1167+t_CKBOOL init_class_MidiRW( Chuck_Env * env )
1168+{
1169+ Chuck_DL_Func * func = NULL;
1170+
1171+#ifndef __DISABLE_MIDI__
1172+
1173+ // init base class
1174+ if( !type_engine_import_class_begin( env, "MidiRW", "Object",
1175+ env->global(), MidiRW_ctor, MidiRW_dtor ) )
1176+ return FALSE;
1177+
1178+ // add open()
1179+ func = make_new_mfun( "int", "open", MidiRW_open );
1180+ func->add_arg( "string", "filename" );
1181+ if( !type_engine_import_mfun( env, func ) ) goto error;
1182+
1183+ // add close()
1184+ func = make_new_mfun( "int", "close", MidiRW_close );
1185+ if( !type_engine_import_mfun( env, func ) ) goto error;
1186+
1187+ // add write()
1188+ func = make_new_mfun( "int", "write", MidiRW_write );
1189+ func->add_arg( "MidiMsg", "msg" );
1190+ func->add_arg( "time", "t" );
1191+ if( !type_engine_import_mfun( env, func ) ) goto error;
1192+
1193+ // add read()
1194+ func = make_new_mfun( "int", "read", MidiRW_read );
1195+ func->add_arg( "MidiMsg", "msg" );
1196+ //func->add_arg( "time", "t" );
1197+ if( !type_engine_import_mfun( env, func ) ) goto error;
1198+
1199+ // add member variable
1200+ MidiRW_offset_data = type_engine_import_mvar( env, "int", "@MidiRW_data", FALSE );
1201+ if( MidiRW_offset_data == CK_INVALID_OFFSET ) goto error;
1202+
1203+ // end the class import
1204+ type_engine_import_class_end( env );
1205+
1206+ // init base class
1207+ if( !type_engine_import_class_begin( env, "MidiMsgOut", "Object",
1208+ env->global(), MidiMsgOut_ctor, MidiMsgOut_dtor ) )
1209+ return FALSE;
1210+
1211+ // add open()
1212+ func = make_new_mfun( "int", "open", MidiMsgOut_open );
1213+ func->add_arg( "string", "filename" );
1214+ if( !type_engine_import_mfun( env, func ) ) goto error;
1215+
1216+ // add close()
1217+ func = make_new_mfun( "int", "close", MidiMsgOut_close );
1218+ if( !type_engine_import_mfun( env, func ) ) goto error;
1219+
1220+ // add write()
1221+ func = make_new_mfun( "int", "write", MidiMsgOut_write );
1222+ func->add_arg( "MidiMsg", "msg" );
1223+ func->add_arg( "time", "t" );
1224+ if( !type_engine_import_mfun( env, func ) ) goto error;
1225+
1226+ // add member variable
1227+ MidiMsgOut_offset_data = type_engine_import_mvar( env, "int", "@MidiMsgOut_data", FALSE );
1228+ if( MidiMsgOut_offset_data == CK_INVALID_OFFSET ) goto error;
1229+
1230+ // end the class import
1231+ type_engine_import_class_end( env );
1232+
1233+ // init base class
1234+ if( !type_engine_import_class_begin( env, "MidiMsgIn", "Object",
1235+ env->global(), MidiMsgIn_ctor, MidiMsgIn_dtor ) )
1236+ return FALSE;
1237+
1238+ // add open()
1239+ func = make_new_mfun( "int", "open", MidiMsgIn_open );
1240+ func->add_arg( "string", "filename" );
1241+ if( !type_engine_import_mfun( env, func ) ) goto error;
1242+
1243+ // add close()
1244+ func = make_new_mfun( "int", "close", MidiMsgIn_close );
1245+ if( !type_engine_import_mfun( env, func ) ) goto error;
1246+
1247+ // add read()
1248+ func = make_new_mfun( "int", "read", MidiMsgIn_read );
1249+ func->add_arg( "MidiMsg", "msg" );
1250+ //func->add_arg( "time", "t" );
1251+ if( !type_engine_import_mfun( env, func ) ) goto error;
1252+
1253+ // add member variable
1254+ MidiMsgIn_offset_data = type_engine_import_mvar( env, "int", "@MidiMsgIn_data", FALSE );
1255+ if( MidiMsgIn_offset_data == CK_INVALID_OFFSET ) goto error;
1256+
1257+ // end the class import
1258+ type_engine_import_class_end( env );
1259+
1260+#endif // __DISABLE_MIDI__
1261+
1262+ // initialize
1263+ // HidInManager::init();
1264+
1265+ return TRUE;
1266+
1267+error:
1268+
1269+ // end the class import
1270+ type_engine_import_class_end( env );
1271+
1272+ return FALSE;
1273+}
1274+
1275+
1276+
1277+
1278+
1279+
1280+//-----------------------------------------------------------------------------
1281+// IO API
1282+//-----------------------------------------------------------------------------
1283+CK_DLL_MFUN( io_dummy )
1284+{
1285+ EM_error3( "(IO): internal error! inside an abstract function! help!" );
1286+ EM_error3( " note: please hunt down someone (e.g., Ge) to fix this..." );
1287+ assert( FALSE );
1288+ RETURN->v_int = 0;
1289+}
1290+
1291+CK_DLL_SFUN( io_newline )
1292+{
1293+ RETURN->v_string = g_newline;
1294+}
1295+
1296+
1297+//-----------------------------------------------------------------------------
1298+// FileIO API
1299+//-----------------------------------------------------------------------------
1300+CK_DLL_CTOR( fileio_ctor )
1301+{ }
1302+
1303+CK_DLL_DTOR( fileio_dtor )
1304+{ }
1305+
1306+CK_DLL_MFUN( fileio_open )
1307+{
1308+ std::string filename = GET_NEXT_STRING(ARGS)->str();
1309+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1310+ t_CKINT default_flags =
1311+ Chuck_IO_File::FLAG_READ_WRITE | Chuck_IO_File::TYPE_ASCII;
1312+
1313+ RETURN->v_int = f->open(filename, default_flags);
1314+}
1315+
1316+CK_DLL_MFUN( fileio_openflags )
1317+{
1318+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1319+ std::string filename = GET_NEXT_STRING(ARGS)->str();
1320+ t_CKINT flags = GET_NEXT_INT(ARGS);
1321+
1322+ RETURN->v_int = f->open(filename, flags);
1323+}
1324+
1325+CK_DLL_MFUN( fileio_close )
1326+{
1327+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1328+ f->close();
1329+}
1330+
1331+CK_DLL_MFUN( fileio_good )
1332+{
1333+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1334+ RETURN->v_int = f->good();
1335+}
1336+
1337+CK_DLL_MFUN( fileio_flush )
1338+{
1339+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1340+ f->flush();
1341+}
1342+
1343+CK_DLL_MFUN( fileio_getmode )
1344+{
1345+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1346+ RETURN->v_int = f->mode();
1347+}
1348+
1349+CK_DLL_MFUN( fileio_setmode )
1350+{
1351+ t_CKINT flag = GET_NEXT_INT(ARGS);
1352+
1353+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1354+ f->mode( flag );
1355+ RETURN->v_int = 0;
1356+}
1357+
1358+CK_DLL_MFUN( fileio_size )
1359+{
1360+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1361+ RETURN->v_int = f->size();
1362+}
1363+
1364+CK_DLL_MFUN( fileio_seek )
1365+{
1366+ t_CKINT pos = GET_NEXT_INT(ARGS);
1367+
1368+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1369+ f->seek(pos);
1370+}
1371+
1372+CK_DLL_MFUN( fileio_tell )
1373+{
1374+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1375+ RETURN->v_int = f->tell();
1376+}
1377+
1378+CK_DLL_MFUN( fileio_isdir )
1379+{
1380+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1381+ RETURN->v_int = f->isDir();
1382+}
1383+
1384+CK_DLL_MFUN( fileio_dirlist )
1385+{
1386+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1387+ Chuck_Array4 * a = f->dirList();
1388+ RETURN->v_object = a;
1389+}
1390+
1391+/*
1392+ CK_DLL_MFUN( fileio_read )
1393+ {
1394+ t_CKINT len = GET_NEXT_INT(ARGS);
1395+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1396+
1397+ Chuck_String * s = f->read( len );
1398+ RETURN->v_object = s;
1399+ }
1400+ */
1401+
1402+CK_DLL_MFUN( fileio_readline )
1403+{
1404+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1405+ Chuck_String * ret = f->readLine();
1406+ RETURN->v_object = ret;
1407+}
1408+
1409+CK_DLL_MFUN( fileio_readint )
1410+{
1411+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1412+ t_CKINT defaultflags = Chuck_IO::INT32;
1413+
1414+ /* (ATODO: doesn't look like asynchronous reading will work)
1415+ if (f->mode() == Chuck_IO::MODE_ASYNC)
1416+ {
1417+ // set up arguments
1418+ Chuck_IO::async_args *args = new Chuck_IO::async_args;
1419+ args->RETURN = (void *)RETURN;
1420+ args->fileio_obj = f;
1421+ args->intArg = defaultflags;
1422+ // set shred to wait for I/O completion
1423+ f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
1424+ // start thread
1425+ bool ret = f->m_thread->start( f->readInt_thread, (void *)args );
1426+ if (!ret) {
1427+ cerr << "m_thread->start failed; recreating m_thread" << endl;
1428+ delete f->m_thread;
1429+ f->m_thread = new XThread;
1430+ ret = f->m_thread->start( f->readInt_thread, (void *)args );
1431+ if (!ret) {
1432+ EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
1433+ }
1434+ }
1435+ } else {*/
1436+ t_CKINT ret = f->readInt( defaultflags );
1437+ RETURN->v_int = ret;
1438+ //}
1439+ // ATODO: Debug
1440+ //sleep(1);
1441+ //cerr << "fileio_readint exiting" << endl;
1442+}
1443+
1444+CK_DLL_MFUN( fileio_readintflags )
1445+{
1446+ t_CKINT flags = GET_NEXT_INT(ARGS);
1447+
1448+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1449+ t_CKINT ret = f->readInt( flags );
1450+
1451+ RETURN->v_int = ret;
1452+}
1453+
1454+CK_DLL_MFUN( fileio_readfloat )
1455+{
1456+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1457+ t_CKFLOAT ret = f->readFloat();
1458+ RETURN->v_float = ret;
1459+}
1460+
1461+CK_DLL_MFUN( fileio_eof )
1462+{
1463+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1464+ t_CKBOOL ret = f->eof();
1465+ RETURN->v_int = ret;
1466+}
1467+
1468+CK_DLL_MFUN( fileio_more )
1469+{
1470+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1471+ t_CKBOOL ret = !f->eof();
1472+ RETURN->v_int = ret;
1473+}
1474+
1475+CK_DLL_MFUN( fileio_writestring )
1476+{
1477+ std::string val = GET_NEXT_STRING(ARGS)->str();
1478+
1479+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1480+ if (f->mode() == Chuck_IO::MODE_ASYNC)
1481+ {
1482+ // set up arguments
1483+ Chuck_IO::async_args *args = new Chuck_IO::async_args;
1484+ args->RETURN = (void *)RETURN;
1485+ args->fileio_obj = f;
1486+ args->stringArg = std::string(val);
1487+ // set shred to wait for I/O completion
1488+ assert( SHRED != NULL );
1489+ f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
1490+ // start thread
1491+ bool ret = f->m_thread->start( f->writeStr_thread, (void *)args );
1492+ if (!ret) {
1493+ // for some reason, the XThread object needs to be
1494+ // deleted and reconstructed every time after call #375
1495+ delete f->m_thread;
1496+ f->m_thread = new XThread;
1497+ ret = f->m_thread->start( f->writeStr_thread, (void *)args );
1498+ if (!ret) {
1499+ EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
1500+ }
1501+ }
1502+ } else {
1503+ f->write(val);
1504+ }
1505+}
1506+
1507+CK_DLL_MFUN( fileio_writeint )
1508+{
1509+ t_CKINT val = GET_NEXT_INT(ARGS);
1510+
1511+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1512+ if (f->mode() == Chuck_IO::MODE_ASYNC)
1513+ {
1514+ // set up arguments
1515+ Chuck_IO::async_args *args = new Chuck_IO::async_args;
1516+ args->RETURN = (void *)RETURN;
1517+ args->fileio_obj = f;
1518+ args->intArg = val;
1519+ // set shred to wait for I/O completion
1520+ assert( SHRED != NULL );
1521+ f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
1522+ // start thread
1523+ bool ret = f->m_thread->start( f->writeInt_thread, (void *)args );
1524+ if (!ret) {
1525+ // for some reason, the XThread object needs to be
1526+ // deleted and reconstructed every time after call #375
1527+ delete f->m_thread;
1528+ f->m_thread = new XThread;
1529+ ret = f->m_thread->start( f->writeInt_thread, (void *)args );
1530+ if (!ret) {
1531+ EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
1532+ }
1533+ }
1534+ } else {
1535+ f->write(val);
1536+ }
1537+}
1538+
1539+CK_DLL_MFUN( fileio_writeintflags )
1540+{
1541+ t_CKINT val = GET_NEXT_INT(ARGS);
1542+ t_CKINT flags = GET_NEXT_INT(ARGS);
1543+
1544+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1545+ if (f->mode() == Chuck_IO::MODE_ASYNC)
1546+ {
1547+ // TODO: pass flags in args
1548+ // set up arguments
1549+ Chuck_IO::async_args *args = new Chuck_IO::async_args;
1550+ args->RETURN = (void *)RETURN;
1551+ args->fileio_obj = f;
1552+ args->intArg = val;
1553+ // set shred to wait for I/O completion
1554+ assert( SHRED != NULL );
1555+ f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
1556+ // start thread
1557+ bool ret = f->m_thread->start( f->writeInt_thread, (void *)args );
1558+ if (!ret) {
1559+ // for some reason, the XThread object needs to be
1560+ // deleted and reconstructed every time after call #375
1561+ delete f->m_thread;
1562+ f->m_thread = new XThread;
1563+ ret = f->m_thread->start( f->writeInt_thread, (void *)args );
1564+ if (!ret) {
1565+ EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
1566+ }
1567+ }
1568+ } else {
1569+ f->write(val, flags);
1570+ }
1571+}
1572+
1573+CK_DLL_MFUN( fileio_writefloat )
1574+{
1575+ t_CKFLOAT val = GET_NEXT_FLOAT(ARGS);
1576+
1577+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1578+ if (f->mode() == Chuck_IO::MODE_ASYNC)
1579+ {
1580+ // set up arguments
1581+ Chuck_IO::async_args *args = new Chuck_IO::async_args;
1582+ args->RETURN = (void *)RETURN;
1583+ args->fileio_obj = f;
1584+ args->floatArg = val;
1585+ // set shred to wait for I/O completion
1586+ assert( SHRED != NULL );
1587+ f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
1588+ // start thread
1589+ bool ret = f->m_thread->start( f->writeFloat_thread, (void *)args );
1590+ if (!ret) {
1591+ // for some reason, the XThread object needs to be
1592+ // deleted and reconstructed every time after call #375
1593+ delete f->m_thread;
1594+ f->m_thread = new XThread;
1595+ ret = f->m_thread->start( f->writeFloat_thread, (void *)args );
1596+ if (!ret) {
1597+ EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
1598+ }
1599+ }
1600+ } else {
1601+ f->write(val);
1602+ }
1603+}
1604+
1605+
1606+//-----------------------------------------------------------------------------
1607+// Chout API
1608+//-----------------------------------------------------------------------------
1609+CK_DLL_MFUN( chout_close )
1610+{
1611+ // problem
1612+ CK_FPRINTF_STDERR( "[chuck]: cannot close 'chout'...\n" );
1613+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1614+ c->close();
1615+}
1616+
1617+CK_DLL_MFUN( chout_good )
1618+{
1619+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1620+ RETURN->v_int = c->good();
1621+}
1622+
1623+CK_DLL_MFUN( chout_flush )
1624+{
1625+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1626+ c->flush();
1627+}
1628+
1629+CK_DLL_MFUN( chout_getmode )
1630+{
1631+ // problem
1632+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1633+ RETURN->v_int = c->mode();
1634+}
1635+
1636+CK_DLL_MFUN( chout_setmode )
1637+{
1638+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1639+ c->mode( GET_NEXT_INT(ARGS) );
1640+ RETURN->v_int = c->mode();
1641+}
1642+
1643+/*
1644+ CK_DLL_MFUN( chout_read )
1645+ {
1646+ t_CKINT len = GET_NEXT_INT(ARGS);
1647+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1648+
1649+ Chuck_String * s = f->read( len );
1650+ RETURN->v_object = s;
1651+ }
1652+ */
1653+
1654+CK_DLL_MFUN( chout_readline )
1655+{
1656+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1657+ Chuck_String * ret = c->readLine();
1658+ RETURN->v_object = ret;
1659+}
1660+
1661+CK_DLL_MFUN( chout_readint )
1662+{
1663+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1664+ RETURN->v_int = c->readInt( Chuck_IO::INT32 );
1665+}
1666+
1667+CK_DLL_MFUN( chout_readintflags )
1668+{
1669+ t_CKINT flags = GET_NEXT_INT(ARGS);
1670+
1671+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1672+ t_CKINT ret = c->readInt( flags );
1673+
1674+ RETURN->v_int = ret;
1675+}
1676+
1677+CK_DLL_MFUN( chout_readfloat )
1678+{
1679+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1680+ t_CKFLOAT ret = c->readFloat();
1681+ RETURN->v_float = ret;
1682+}
1683+
1684+CK_DLL_MFUN( chout_eof )
1685+{
1686+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1687+ t_CKBOOL ret = c->eof();
1688+ RETURN->v_int = ret;
1689+}
1690+
1691+CK_DLL_MFUN( chout_more )
1692+{
1693+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1694+ t_CKBOOL ret = !c->eof();
1695+ RETURN->v_int = ret;
1696+}
1697+
1698+CK_DLL_MFUN( chout_writestring )
1699+{
1700+ std::string val = GET_NEXT_STRING(ARGS)->str();
1701+
1702+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1703+ c->write( val );
1704+}
1705+
1706+CK_DLL_MFUN( chout_writeint )
1707+{
1708+ t_CKINT val = GET_NEXT_INT(ARGS);
1709+
1710+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1711+ c->write(val);
1712+}
1713+
1714+CK_DLL_MFUN( chout_writefloat )
1715+{
1716+ t_CKFLOAT val = GET_NEXT_FLOAT(ARGS);
1717+
1718+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1719+ c->write(val);
1720+}
1721+
1722+
1723+
1724+
1725+//-----------------------------------------------------------------------------
1726+// Cherr API
1727+//-----------------------------------------------------------------------------
1728+CK_DLL_MFUN( cherr_close )
1729+{
1730+ // problem
1731+ CK_FPRINTF_STDERR( "[chuck]: cannot close 'cherr'...\n" );
1732+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1733+ c->close();
1734+}
1735+
1736+CK_DLL_MFUN( cherr_good )
1737+{
1738+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1739+ RETURN->v_int = c->good();
1740+}
1741+
1742+CK_DLL_MFUN( cherr_flush )
1743+{
1744+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1745+ c->flush();
1746+}
1747+
1748+CK_DLL_MFUN( cherr_getmode )
1749+{
1750+ // problem
1751+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1752+ RETURN->v_int = c->mode();
1753+}
1754+
1755+CK_DLL_MFUN( cherr_setmode )
1756+{
1757+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1758+ c->mode( GET_NEXT_INT(ARGS) );
1759+ RETURN->v_int = c->mode();
1760+}
1761+
1762+/*
1763+ CK_DLL_MFUN( cherr_read )
1764+ {
1765+ t_CKINT len = GET_NEXT_INT(ARGS);
1766+ Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1767+
1768+ Chuck_String * s = f->read( len );
1769+ RETURN->v_object = s;
1770+ }
1771+ */
1772+
1773+CK_DLL_MFUN( cherr_readline )
1774+{
1775+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1776+ Chuck_String * ret = c->readLine();
1777+ RETURN->v_object = ret;
1778+}
1779+
1780+CK_DLL_MFUN( cherr_readint )
1781+{
1782+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1783+ RETURN->v_int = c->readInt( Chuck_IO::INT32 );
1784+}
1785+
1786+CK_DLL_MFUN( cherr_readintflags )
1787+{
1788+ t_CKINT flags = GET_NEXT_INT(ARGS);
1789+
1790+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1791+ t_CKINT ret = c->readInt( flags );
1792+
1793+ RETURN->v_int = ret;
1794+}
1795+
1796+CK_DLL_MFUN( cherr_readfloat )
1797+{
1798+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1799+ t_CKFLOAT ret = c->readFloat();
1800+ RETURN->v_float = ret;
1801+}
1802+
1803+CK_DLL_MFUN( cherr_eof )
1804+{
1805+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1806+ t_CKBOOL ret = c->eof();
1807+ RETURN->v_int = ret;
1808+}
1809+
1810+CK_DLL_MFUN( cherr_more )
1811+{
1812+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1813+ t_CKBOOL ret = !c->eof();
1814+ RETURN->v_int = ret;
1815+}
1816+
1817+CK_DLL_MFUN( cherr_writestring )
1818+{
1819+ std::string val = GET_NEXT_STRING(ARGS)->str();
1820+
1821+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1822+ c->write( val );
1823+}
1824+
1825+CK_DLL_MFUN( cherr_writeint )
1826+{
1827+ t_CKINT val = GET_NEXT_INT(ARGS);
1828+
1829+ Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1830+ c->write(val);
1831+}
1832+
1833+CK_DLL_MFUN( cherr_writefloat )
1834+{
1835+ t_CKFLOAT val = GET_NEXT_FLOAT(ARGS);
1836+
1837+ Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1838+ c->write(val);
1839+}
1840+
1841+
1842+
1843+
1844+#ifndef __DISABLE_MIDI__
1845+
1846+//-----------------------------------------------------------------------------
1847+// MidiIn API
1848+//-----------------------------------------------------------------------------
1849+CK_DLL_CTOR( MidiIn_ctor )
1850+{
1851+ MidiIn * min = new MidiIn;
1852+ min->SELF = SELF;
1853+ OBJ_MEMBER_INT(SELF, MidiIn_offset_data) = (t_CKINT)min;
1854+}
1855+
1856+CK_DLL_DTOR( MidiIn_dtor )
1857+{
1858+ delete (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1859+ OBJ_MEMBER_INT(SELF, MidiIn_offset_data) = 0;
1860+}
1861+
1862+CK_DLL_MFUN( MidiIn_open )
1863+{
1864+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1865+ t_CKINT port = GET_CK_INT(ARGS);
1866+ RETURN->v_int = min->open( SHRED->vm_ref, port );
1867+}
1868+
1869+CK_DLL_MFUN( MidiIn_open_named ) // added 1.3.0.0
1870+{
1871+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1872+ Chuck_String * name = GET_CK_STRING(ARGS);
1873+ RETURN->v_int = min->open( SHRED->vm_ref, name->str() );
1874+}
1875+
1876+CK_DLL_MFUN( MidiIn_good )
1877+{
1878+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1879+ RETURN->v_int = (t_CKINT)min->good();
1880+}
1881+
1882+CK_DLL_MFUN( MidiIn_num )
1883+{
1884+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1885+ RETURN->v_int = min->num();
1886+}
1887+
1888+CK_DLL_MFUN( MidiIn_printerr )
1889+{
1890+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1891+ t_CKINT print_or_not = GET_CK_INT(ARGS);
1892+ min->set_suppress( !print_or_not );
1893+}
1894+
1895+CK_DLL_MFUN( MidiIn_name )
1896+{
1897+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1898+ // TODO: memory leak, please fix, Thanks.
1899+ Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1900+ // only if valid
1901+ if( min->good() )
1902+ a->set( min->min->getPortName( min->num() ) );
1903+ RETURN->v_string = a;
1904+}
1905+
1906+CK_DLL_MFUN( MidiIn_recv )
1907+{
1908+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1909+ Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);
1910+ MidiMsg the_msg;
1911+ RETURN->v_int = min->recv( &the_msg );
1912+ if( RETURN->v_int )
1913+ {
1914+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1) = the_msg.data[0];
1915+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2) = the_msg.data[1];
1916+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3) = the_msg.data[2];
1917+ }
1918+}
1919+
1920+
1921+CK_DLL_MFUN( MidiIn_can_wait )
1922+{
1923+ MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1924+ RETURN->v_int = min->empty();
1925+}
1926+
1927+
1928+//-----------------------------------------------------------------------------
1929+// MidiOut API
1930+//-----------------------------------------------------------------------------
1931+CK_DLL_CTOR( MidiOut_ctor )
1932+{
1933+ OBJ_MEMBER_INT(SELF, MidiOut_offset_data) = (t_CKUINT)new MidiOut;
1934+}
1935+
1936+CK_DLL_DTOR( MidiOut_dtor )
1937+{
1938+ delete (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1939+ OBJ_MEMBER_INT(SELF, MidiOut_offset_data) = 0;
1940+}
1941+
1942+CK_DLL_MFUN( MidiOut_open )
1943+{
1944+ MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1945+ t_CKINT port = GET_CK_INT(ARGS);
1946+ RETURN->v_int = mout->open( port );
1947+}
1948+
1949+CK_DLL_MFUN( MidiOut_open_named ) // added 1.3.0.0
1950+{
1951+ MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1952+ Chuck_String * name = GET_CK_STRING(ARGS);
1953+ RETURN->v_int = mout->open( name->str() );
1954+}
1955+
1956+CK_DLL_MFUN( MidiOut_good )
1957+{
1958+ MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1959+ RETURN->v_int = (t_CKINT)mout->good();
1960+}
1961+
1962+CK_DLL_MFUN( MidiOut_num )
1963+{
1964+ MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1965+ RETURN->v_int = mout->num();
1966+}
1967+
1968+CK_DLL_MFUN( MidiOut_name )
1969+{
1970+ MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1971+ // TODO: memory leak, please fix, Thanks.
1972+ Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1973+ // only if valid
1974+ if( mout->good() )
1975+ a->set( mout->mout->getPortName( mout->num() ) );
1976+ RETURN->v_string = a;
1977+}
1978+
1979+CK_DLL_MFUN( MidiOut_printerr )
1980+{
1981+ MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1982+ t_CKINT print_or_not = GET_CK_INT(ARGS);
1983+ mout->set_suppress( !print_or_not );
1984+}
1985+
1986+CK_DLL_MFUN( MidiOut_send )
1987+{
1988+ MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1989+ Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);
1990+ MidiMsg the_msg;
1991+ the_msg.data[0] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1);
1992+ the_msg.data[1] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2);
1993+ the_msg.data[2] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3);
1994+ RETURN->v_int = mout->send( &the_msg );
1995+}
1996+
1997+#endif // __DISABLE_MIDI__
1998+
1999+
2000+//-----------------------------------------------------------------------------
2001+// HidMsg API
2002+//-----------------------------------------------------------------------------
2003+CK_DLL_MFUN( HidMsg_is_axis_motion )
2004+{
2005+ RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
2006+ CK_HID_JOYSTICK_AXIS ? 1 : 0 );
2007+}
2008+
2009+CK_DLL_MFUN( HidMsg_is_button_down )
2010+{
2011+ RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
2012+ CK_HID_BUTTON_DOWN ? 1 : 0 );
2013+}
2014+
2015+CK_DLL_MFUN( HidMsg_is_button_up )
2016+{
2017+ RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
2018+ CK_HID_BUTTON_UP ? 1 : 0 );
2019+}
2020+
2021+CK_DLL_MFUN( HidMsg_is_mouse_motion )
2022+{
2023+ RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
2024+ CK_HID_MOUSE_MOTION ? 1 : 0 );
2025+}
2026+
2027+CK_DLL_MFUN( HidMsg_is_hat_motion )
2028+{
2029+ RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
2030+ CK_HID_JOYSTICK_HAT ? 1 : 0 );
2031+}
2032+
2033+CK_DLL_MFUN( HidMsg_is_wheel_motion )
2034+{
2035+ RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
2036+ CK_HID_MOUSE_WHEEL ? 1 : 0 );
2037+}
2038+
2039+//-----------------------------------------------------------------------------
2040+// HidIn API
2041+//-----------------------------------------------------------------------------
2042+CK_DLL_CTOR( HidIn_ctor )
2043+{
2044+ HidIn * min = new HidIn;
2045+ min->SELF = SELF;
2046+ OBJ_MEMBER_INT(SELF, HidIn_offset_data) = (t_CKINT)min;
2047+}
2048+
2049+CK_DLL_DTOR( HidIn_dtor )
2050+{
2051+ delete (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2052+ OBJ_MEMBER_INT(SELF, HidIn_offset_data) = 0;
2053+}
2054+
2055+CK_DLL_MFUN( HidIn_open )
2056+{
2057+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2058+ t_CKINT type = GET_NEXT_INT(ARGS);
2059+ t_CKINT num = GET_NEXT_INT(ARGS);
2060+ // CK_FPRINTF_STDERR( "HidIn_open %li %li\n", type, num );
2061+ RETURN->v_int = min->open( SHRED->vm_ref, type, num );
2062+}
2063+
2064+CK_DLL_MFUN( HidIn_open_named )
2065+{
2066+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2067+ Chuck_String * name = GET_NEXT_STRING(ARGS);
2068+ std::string s = name->str();
2069+ RETURN->v_int = min->open( SHRED->vm_ref, s );
2070+}
2071+
2072+CK_DLL_MFUN( HidIn_open_joystick )
2073+{
2074+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2075+ t_CKINT num = GET_NEXT_INT(ARGS);
2076+ RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_JOYSTICK, num );
2077+}
2078+
2079+CK_DLL_MFUN( HidIn_open_mouse )
2080+{
2081+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2082+ t_CKINT num = GET_NEXT_INT(ARGS);
2083+ RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_MOUSE, num );
2084+}
2085+
2086+CK_DLL_MFUN( HidIn_open_keyboard )
2087+{
2088+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2089+ t_CKINT num = GET_NEXT_INT(ARGS);
2090+ RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_KEYBOARD, num );
2091+}
2092+
2093+CK_DLL_MFUN( HidIn_open_tiltsensor )
2094+{
2095+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2096+ RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_TILTSENSOR, 0 );
2097+}
2098+
2099+CK_DLL_MFUN( HidIn_good )
2100+{
2101+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2102+ RETURN->v_int = (t_CKINT)min->good();
2103+}
2104+
2105+CK_DLL_MFUN( HidIn_num )
2106+{
2107+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2108+ RETURN->v_int = min->num();
2109+}
2110+
2111+CK_DLL_MFUN( HidIn_printerr )
2112+{
2113+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2114+ t_CKINT print_or_not = GET_CK_INT(ARGS);
2115+ min->set_suppress( !print_or_not );
2116+}
2117+
2118+CK_DLL_MFUN( HidIn_name )
2119+{
2120+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2121+ // TODO: memory leak, please fix, Thanks.
2122+ // Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
2123+ // only if valid
2124+ // if( min->good() )
2125+ // a->str = min->phin->getPortName( min->num() );
2126+ // TODO: is null problem?
2127+ RETURN->v_string = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
2128+ RETURN->v_string->set( min->name() );
2129+}
2130+
2131+CK_DLL_MFUN( HidIn_recv )
2132+{
2133+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2134+ Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);
2135+ HidMsg the_msg;
2136+ RETURN->v_int = min->recv( &the_msg );
2137+ if( RETURN->v_int )
2138+ {
2139+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_type) = the_msg.device_type;
2140+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_num) = the_msg.device_num;
2141+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_type) = the_msg.type;
2142+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_which) = the_msg.eid;
2143+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_idata) = the_msg.idata[0];
2144+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_fdata) = the_msg.fdata[0];
2145+
2146+ // mouse motion specific member variables
2147+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltax) = the_msg.idata[0];
2148+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltay) = the_msg.idata[1];
2149+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursorx) = the_msg.idata[2];
2150+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursory) = the_msg.idata[3];
2151+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursorx) = the_msg.fdata[0];
2152+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursory) = the_msg.fdata[1];
2153+
2154+ // axis motion specific member variables
2155+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_axis_position) = the_msg.idata[0];
2156+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaled_axis_position) = the_msg.fdata[0];
2157+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_axis_position2) = the_msg.fdata[0];
2158+
2159+ // hat motion specific variables
2160+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_hat_position) = the_msg.idata[0];
2161+
2162+ // keyboard specific variables
2163+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_key) = the_msg.idata[1];
2164+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_ascii) = the_msg.idata[2];
2165+
2166+ // accelerometer (tilt sensor, wii remote) specific members
2167+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_x) = the_msg.idata[0];
2168+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_y) = the_msg.idata[1];
2169+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_z) = the_msg.idata[2];
2170+
2171+ // multitouch stuff - added 1.3.0.0
2172+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_touchx) = the_msg.fdata[0];
2173+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_touchy) = the_msg.fdata[1];
2174+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_touchsize) = the_msg.fdata[2];
2175+ }
2176+}
2177+
2178+CK_DLL_MFUN( HidIn_read )
2179+{
2180+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2181+ t_CKINT type = GET_NEXT_INT(ARGS);
2182+ t_CKINT num = GET_NEXT_INT(ARGS);
2183+ Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
2184+
2185+ HidMsg the_msg;
2186+
2187+ RETURN->v_int = min->read( type, num, &the_msg );
2188+
2189+ if( RETURN->v_int )
2190+ {
2191+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_type) = the_msg.device_type;
2192+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_num) = the_msg.device_num;
2193+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_type) = the_msg.type;
2194+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_which) = the_msg.eid;
2195+
2196+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_idata) = the_msg.idata[0];
2197+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_fdata) = the_msg.fdata[0];
2198+
2199+ // mouse motion specific member members
2200+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltax) = the_msg.idata[0];
2201+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltay) = the_msg.idata[1];
2202+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursorx) = the_msg.idata[2];
2203+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursory) = the_msg.idata[3];
2204+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursorx) = the_msg.fdata[0];
2205+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursory) = the_msg.fdata[1];
2206+
2207+ // joystick axis specific member members
2208+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_axis_position) = the_msg.idata[0];
2209+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaled_axis_position) = the_msg.fdata[0];
2210+ OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_axis_position2) = the_msg.fdata[0];
2211+
2212+ // joystick hat specific member members
2213+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_hat_position) = the_msg.idata[0];
2214+
2215+ // keyboard specific members
2216+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_key) = the_msg.idata[1];
2217+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_ascii) = the_msg.idata[2];
2218+
2219+ // accelerometer (tilt sensor, wii remote) specific members
2220+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_x) = the_msg.idata[0];
2221+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_y) = the_msg.idata[1];
2222+ OBJ_MEMBER_INT(fake_msg, HidMsg_offset_z) = the_msg.idata[2];
2223+ }
2224+}
2225+
2226+CK_DLL_MFUN( HidIn_send )
2227+{
2228+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2229+ Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
2230+
2231+ HidMsg the_msg;
2232+ the_msg.device_type = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_device_type );
2233+ the_msg.device_num = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_device_num );
2234+ the_msg.type = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_type );
2235+ the_msg.eid = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_which );
2236+ the_msg.idata[0] = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_idata );
2237+
2238+ RETURN->v_int = min->send( &the_msg );
2239+}
2240+
2241+CK_DLL_MFUN( HidIn_can_wait )
2242+{
2243+ HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2244+ RETURN->v_int = min->empty();
2245+}
2246+
2247+CK_DLL_SFUN( HidIn_read_tilt_sensor )
2248+{
2249+ static HidIn * hi;
2250+ static t_CKBOOL hi_good = TRUE;
2251+
2252+ Chuck_Array4 * array = new Chuck_Array4( FALSE, 3 );
2253+ array->set( 0, 0 );
2254+ array->set( 1, 0 );
2255+ array->set( 2, 0 );
2256+
2257+ // TODO: reference count?
2258+ array->add_ref();
2259+ RETURN->v_object = array;
2260+
2261+ if( hi_good == FALSE )
2262+ return;
2263+
2264+ if( !hi )
2265+ {
2266+ hi = new HidIn;
2267+ if( !hi->open( SHRED->vm_ref, CK_HID_DEV_TILTSENSOR, 0 ) )
2268+ {
2269+ hi_good = FALSE;
2270+ return;
2271+ }
2272+ }
2273+
2274+ HidMsg msg;
2275+
2276+ if( !hi->read( CK_HID_ACCELEROMETER, 0, &msg ) )
2277+ {
2278+ return;
2279+ }
2280+
2281+ array->set( 0, msg.idata[0] );
2282+ array->set( 1, msg.idata[1] );
2283+ array->set( 2, msg.idata[2] );
2284+}
2285+
2286+CK_DLL_SFUN( HidIn_ctrl_tiltPollRate )
2287+{
2288+ // get srate
2289+ if( !SHRED || !SHRED->vm_ref )
2290+ {
2291+ // problem
2292+ CK_FPRINTF_STDERR( "[chuck](via HID): can't set tiltPollRate on NULL shred/VM...\n" );
2293+ RETURN->v_dur = 0;
2294+ return;
2295+ }
2296+ t_CKFLOAT srate = SHRED->vm_ref->srate();
2297+
2298+ // get arg
2299+ t_CKDUR v = GET_NEXT_DUR( ARGS );
2300+
2301+ // get in microseconds
2302+ t_CKINT usec = (t_CKINT)( v / srate * 1000000 );
2303+
2304+ // make sure it's nonnegative
2305+ if( usec < 0 ) usec = 0;
2306+
2307+ // go
2308+ RETURN->v_dur = TiltSensor_setPollRate( usec ) * srate / 1000000;
2309+}
2310+
2311+CK_DLL_SFUN( HidIn_cget_tiltPollRate )
2312+{
2313+ // get srate
2314+ if( !SHRED || !SHRED->vm_ref )
2315+ {
2316+ // problem
2317+ CK_FPRINTF_STDERR( "[chuck](via HID): can't get tiltPollRate on NULL shred/VM...\n" );
2318+ RETURN->v_dur = 0;
2319+ return;
2320+ }
2321+ t_CKFLOAT srate = SHRED->vm_ref->srate();
2322+
2323+ RETURN->v_dur = TiltSensor_getPollRate() * srate / 1000000;
2324+}
2325+
2326+CK_DLL_SFUN( HidIn_start_cursor_track )
2327+{
2328+ RETURN->v_int = !Mouse_start_cursor_track();
2329+}
2330+
2331+CK_DLL_SFUN( HidIn_stop_cursor_track )
2332+{
2333+ RETURN->v_int = !Mouse_stop_cursor_track();
2334+}
2335+
2336+//-----------------------------------------------------------------------------
2337+// HidOut API
2338+//-----------------------------------------------------------------------------
2339+CK_DLL_CTOR( HidOut_ctor )
2340+{
2341+ OBJ_MEMBER_INT(SELF, HidOut_offset_data) = (t_CKUINT)new HidOut;
2342+}
2343+
2344+CK_DLL_DTOR( HidOut_dtor )
2345+{
2346+ delete (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2347+ OBJ_MEMBER_INT(SELF, HidOut_offset_data) = 0;
2348+}
2349+
2350+CK_DLL_MFUN( HidOut_open )
2351+{
2352+ HidOut * mout = (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2353+ t_CKINT num = GET_CK_INT(ARGS);
2354+ RETURN->v_int = mout->open( num );
2355+}
2356+
2357+CK_DLL_MFUN( HidOut_good )
2358+{
2359+ HidOut * mout = (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2360+ RETURN->v_int = (t_CKINT)mout->good();
2361+}
2362+
2363+CK_DLL_MFUN( HidOut_num )
2364+{
2365+ HidOut * mout = (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2366+ RETURN->v_int = mout->num();
2367+}
2368+
2369+CK_DLL_MFUN( HidOut_name )
2370+{
2371+ // HidOut * mout = (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2372+ // TODO: memory leak, please fix, Thanks.
2373+ Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
2374+ // only if valid
2375+ // if( mout->good() )
2376+ // a->str = mout->mout->getPortName( mout->num() );
2377+ RETURN->v_string = a;
2378+}
2379+
2380+CK_DLL_MFUN( HidOut_printerr )
2381+{
2382+ HidOut * mout = (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2383+ t_CKINT print_or_not = GET_CK_INT(ARGS);
2384+ mout->set_suppress( !print_or_not );
2385+}
2386+
2387+CK_DLL_MFUN( HidOut_send )
2388+{
2389+ HidOut * mout = (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2390+ // Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);
2391+ HidMsg the_msg;
2392+ // the_msg.data[0] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, HidMsg_offset_data1);
2393+ // the_msg.data[1] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, HidMsg_offset_data2);
2394+ // the_msg.data[2] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, HidMsg_offset_data3);
2395+ RETURN->v_int = mout->send( &the_msg );
2396+}
2397+
2398+
2399+//-----------------------------------------------------------------------------
2400+// MidiRW API
2401+//-----------------------------------------------------------------------------
2402+CK_DLL_CTOR( MidiRW_ctor )
2403+{
2404+#ifndef __DISABLE_MIDI__
2405+ OBJ_MEMBER_INT(SELF, MidiRW_offset_data) = (t_CKUINT)new MidiRW;
2406+#endif // __DISABLE_MIDI__
2407+}
2408+
2409+CK_DLL_DTOR( MidiRW_dtor )
2410+{
2411+#ifndef __DISABLE_MIDI__
2412+ delete (MidiRW *)OBJ_MEMBER_INT(SELF, MidiRW_offset_data);
2413+ OBJ_MEMBER_INT(SELF, MidiRW_offset_data) = 0;
2414+#endif // __DISABLE_MIDI__
2415+}
2416+
2417+CK_DLL_MFUN( MidiRW_open )
2418+{
2419+#ifndef __DISABLE_MIDI__
2420+ MidiRW * mrw = (MidiRW *)OBJ_MEMBER_INT(SELF, MidiRW_offset_data);
2421+ const char * filename = GET_CK_STRING(ARGS)->str().c_str();
2422+ RETURN->v_int = mrw->open( filename );
2423+#endif // __DISABLE_MIDI__
2424+}
2425+
2426+CK_DLL_MFUN( MidiRW_close )
2427+{
2428+#ifndef __DISABLE_MIDI__
2429+ MidiRW * mrw = (MidiRW *)OBJ_MEMBER_INT(SELF, MidiRW_offset_data);
2430+ RETURN->v_int = mrw->close();
2431+#endif // __DISABLE_MIDI__
2432+}
2433+
2434+CK_DLL_MFUN( MidiRW_read )
2435+{
2436+#ifndef __DISABLE_MIDI__
2437+ MidiRW * mrw = (MidiRW *)OBJ_MEMBER_INT(SELF, MidiRW_offset_data);
2438+ Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
2439+ MidiMsg the_msg;
2440+ t_CKTIME time = 0.0;
2441+ RETURN->v_int = mrw->read( &the_msg, &time );
2442+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1) = the_msg.data[0];
2443+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2) = the_msg.data[1];
2444+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3) = the_msg.data[2];
2445+ OBJ_MEMBER_TIME(fake_msg, MidiMsg_offset_when) = time;
2446+#endif // __DISABLE_MIDI__
2447+}
2448+
2449+CK_DLL_MFUN( MidiRW_write )
2450+{
2451+#ifndef __DISABLE_MIDI__
2452+ MidiRW * mrw = (MidiRW *)OBJ_MEMBER_INT(SELF, MidiRW_offset_data);
2453+ Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
2454+ t_CKTIME time = GET_NEXT_TIME(ARGS);
2455+ MidiMsg the_msg;
2456+ the_msg.data[0] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1);
2457+ the_msg.data[1] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2);
2458+ the_msg.data[2] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3);
2459+ RETURN->v_int = mrw->write( &the_msg, &time );
2460+#endif // __DISABLE_MIDI__
2461+}
2462+
2463+
2464+//-----------------------------------------------------------------------------
2465+// MidiMsgOut API
2466+//-----------------------------------------------------------------------------
2467+CK_DLL_CTOR( MidiMsgOut_ctor )
2468+{
2469+#ifndef __DISABLE_MIDI__
2470+ OBJ_MEMBER_INT(SELF, MidiMsgOut_offset_data) = (t_CKUINT)new MidiMsgOut;
2471+#endif // __DISABLE_MIDI__
2472+}
2473+
2474+CK_DLL_DTOR( MidiMsgOut_dtor )
2475+{
2476+#ifndef __DISABLE_MIDI__
2477+ delete (MidiMsgOut *)OBJ_MEMBER_INT(SELF, MidiMsgOut_offset_data);
2478+ OBJ_MEMBER_INT(SELF, MidiMsgOut_offset_data) = 0;
2479+#endif // __DISABLE_MIDI__
2480+}
2481+
2482+CK_DLL_MFUN( MidiMsgOut_open )
2483+{
2484+#ifndef __DISABLE_MIDI__
2485+ MidiMsgOut * mrw = (MidiMsgOut *)OBJ_MEMBER_INT(SELF, MidiMsgOut_offset_data);
2486+ const char * filename = GET_CK_STRING(ARGS)->str().c_str();
2487+ RETURN->v_int = mrw->open( filename );
2488+#endif // __DISABLE_MIDI__
2489+}
2490+
2491+CK_DLL_MFUN( MidiMsgOut_close )
2492+{
2493+#ifndef __DISABLE_MIDI__
2494+ MidiMsgOut * mrw = (MidiMsgOut *)OBJ_MEMBER_INT(SELF, MidiMsgOut_offset_data);
2495+ RETURN->v_int = mrw->close();
2496+#endif // __DISABLE_MIDI__
2497+}
2498+
2499+CK_DLL_MFUN( MidiMsgOut_write )
2500+{
2501+#ifndef __DISABLE_MIDI__
2502+ MidiMsgOut * mrw = (MidiMsgOut *)OBJ_MEMBER_INT(SELF, MidiMsgOut_offset_data);
2503+ Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
2504+ t_CKTIME time = GET_NEXT_TIME(ARGS);
2505+ MidiMsg the_msg;
2506+ the_msg.data[0] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1);
2507+ the_msg.data[1] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2);
2508+ the_msg.data[2] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3);
2509+ RETURN->v_int = mrw->write( &the_msg, &time );
2510+#endif // __DISABLE_MIDI__
2511+}
2512+
2513+
2514+//-----------------------------------------------------------------------------
2515+// MidiMsgIn API
2516+//-----------------------------------------------------------------------------
2517+CK_DLL_CTOR( MidiMsgIn_ctor )
2518+{
2519+#ifndef __DISABLE_MIDI__
2520+ OBJ_MEMBER_INT(SELF, MidiMsgIn_offset_data) = (t_CKUINT)new MidiMsgIn;
2521+#endif // __DISABLE_MIDI__
2522+}
2523+
2524+CK_DLL_DTOR( MidiMsgIn_dtor )
2525+{
2526+#ifndef __DISABLE_MIDI__
2527+ delete (MidiMsgIn *)OBJ_MEMBER_INT(SELF, MidiMsgIn_offset_data);
2528+ OBJ_MEMBER_INT(SELF, MidiMsgIn_offset_data) = 0;
2529+#endif // __DISABLE_MIDI__
2530+}
2531+
2532+CK_DLL_MFUN( MidiMsgIn_open )
2533+{
2534+#ifndef __DISABLE_MIDI__
2535+ MidiMsgIn * mrw = (MidiMsgIn *)OBJ_MEMBER_INT(SELF, MidiMsgIn_offset_data);
2536+ const char * filename = GET_CK_STRING(ARGS)->str().c_str();
2537+ RETURN->v_int = mrw->open( filename );
2538+#endif // __DISABLE_MIDI__
2539+}
2540+
2541+CK_DLL_MFUN( MidiMsgIn_close )
2542+{
2543+#ifndef __DISABLE_MIDI__
2544+ MidiMsgIn * mrw = (MidiMsgIn *)OBJ_MEMBER_INT(SELF, MidiMsgIn_offset_data);
2545+ RETURN->v_int = mrw->close();
2546+#endif // __DISABLE_MIDI__
2547+}
2548+
2549+CK_DLL_MFUN( MidiMsgIn_read )
2550+{
2551+#ifndef __DISABLE_MIDI__
2552+ MidiMsgIn * mrw = (MidiMsgIn *)OBJ_MEMBER_INT(SELF, MidiMsgIn_offset_data);
2553+ Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
2554+ MidiMsg the_msg;
2555+ t_CKTIME time = 0.0;
2556+ RETURN->v_int = mrw->read( &the_msg, &time );
2557+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1) = the_msg.data[0];
2558+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2) = the_msg.data[1];
2559+ OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3) = the_msg.data[2];
2560+ OBJ_MEMBER_TIME(fake_msg, MidiMsg_offset_when) = time;
2561+#endif // __DISABLE_MIDI__
2562+}
2563+
2564+
2565+
682566
692567 // available baud rates
702568 const t_CKUINT Chuck_IO_Serial::CK_BAUD_2400 = 2400;
src/core/chuck_io.h+220−2
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333 #define __CHUCK_IO_H__
3434
3535 #include "chuck_oo.h"
36+#include "chuck_dl.h"
3637 #include "util_thread.h"
3738 #include "util_buffers.h"
3839 #include <list>
@@ -40,6 +41,225 @@ · 1 unmodified line
4041
4142
4243
44+// class initialization
45+t_CKBOOL init_class_Midi( Chuck_Env * env );
46+t_CKBOOL init_class_MidiRW( Chuck_Env * env );
47+t_CKBOOL init_class_HID( Chuck_Env * env );
48+t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type );
49+t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type );
50+// added 1.3.0.0 -- moved to be full-fledged class
51+t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type );
52+// added 1.3.0.0 -- moved to be full-fledged class
53+t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type );
54+ // added 1.3.1
55+t_CKBOOL init_class_serialio( Chuck_Env * env );
56+
57+
58+
59+
60+
61+//-----------------------------------------------------------------------------
62+// io API
63+//-----------------------------------------------------------------------------
64+CK_DLL_MFUN( io_dummy );
65+CK_DLL_SFUN( io_newline );
66+CK_DLL_SFUN( io_openfile );
67+
68+
69+//-----------------------------------------------------------------------------
70+// fileio API
71+//-----------------------------------------------------------------------------
72+CK_DLL_CTOR( fileio_ctor );
73+CK_DLL_DTOR( fileio_dtor );
74+CK_DLL_MFUN( fileio_open );
75+CK_DLL_MFUN( fileio_openflags );
76+CK_DLL_MFUN( fileio_good );
77+CK_DLL_MFUN( fileio_close );
78+CK_DLL_MFUN( fileio_flush );
79+CK_DLL_MFUN( fileio_getmode );
80+CK_DLL_MFUN( fileio_setmode );
81+CK_DLL_MFUN( fileio_size );
82+CK_DLL_MFUN( fileio_seek );
83+CK_DLL_MFUN( fileio_tell );
84+CK_DLL_MFUN( fileio_isdir );
85+CK_DLL_MFUN( fileio_dirlist );
86+CK_DLL_MFUN( fileio_read );
87+CK_DLL_MFUN( fileio_readline );
88+CK_DLL_MFUN( fileio_readint );
89+CK_DLL_MFUN( fileio_readintflags );
90+CK_DLL_MFUN( fileio_readfloat );
91+CK_DLL_MFUN( fileio_eof );
92+CK_DLL_MFUN( fileio_more );
93+CK_DLL_MFUN( fileio_writestring );
94+CK_DLL_MFUN( fileio_writeint );
95+CK_DLL_MFUN( fileio_writeintflags );
96+CK_DLL_MFUN( fileio_writefloat );
97+
98+
99+//-----------------------------------------------------------------------------
100+// chout API -- added 1.3.0.0 as full class
101+//-----------------------------------------------------------------------------
102+CK_DLL_MFUN( chout_good );
103+CK_DLL_MFUN( chout_close );
104+CK_DLL_MFUN( chout_flush );
105+CK_DLL_MFUN( chout_getmode );
106+CK_DLL_MFUN( chout_setmode );
107+CK_DLL_MFUN( chout_read );
108+CK_DLL_MFUN( chout_readline );
109+CK_DLL_MFUN( chout_readint );
110+CK_DLL_MFUN( chout_readintflags );
111+CK_DLL_MFUN( chout_readfloat );
112+CK_DLL_MFUN( chout_eof );
113+CK_DLL_MFUN( chout_more );
114+CK_DLL_MFUN( chout_writestring );
115+CK_DLL_MFUN( chout_writeint );
116+CK_DLL_MFUN( chout_writefloat );
117+
118+
119+//-----------------------------------------------------------------------------
120+// cherr API -- added 1.3.0.0 as full class
121+//-----------------------------------------------------------------------------
122+CK_DLL_MFUN( cherr_good );
123+CK_DLL_MFUN( cherr_close );
124+CK_DLL_MFUN( cherr_flush );
125+CK_DLL_MFUN( cherr_getmode );
126+CK_DLL_MFUN( cherr_setmode );
127+CK_DLL_MFUN( cherr_read );
128+CK_DLL_MFUN( cherr_readline );
129+CK_DLL_MFUN( cherr_readint );
130+CK_DLL_MFUN( cherr_readintflags );
131+CK_DLL_MFUN( cherr_readfloat );
132+CK_DLL_MFUN( cherr_eof );
133+CK_DLL_MFUN( cherr_more );
134+CK_DLL_MFUN( cherr_writestring );
135+CK_DLL_MFUN( cherr_writeint );
136+CK_DLL_MFUN( cherr_writefloat );
137+
138+
139+
140+//-----------------------------------------------------------------------------
141+// MidiMsg API
142+//-----------------------------------------------------------------------------
143+CK_DLL_CTOR( MidiMsg_ctor );
144+
145+extern t_CKUINT MidiMsg_offset_data1;
146+extern t_CKUINT MidiMsg_offset_data2;
147+extern t_CKUINT MidiMsg_offset_data3;
148+extern t_CKUINT MidiMsg_offset_when;
149+
150+//-----------------------------------------------------------------------------
151+// MidiRW API
152+//-----------------------------------------------------------------------------
153+CK_DLL_CTOR( MidiRW_ctor );
154+CK_DLL_DTOR( MidiRW_dtor );
155+CK_DLL_MFUN( MidiRW_open );
156+CK_DLL_MFUN( MidiRW_close );
157+CK_DLL_MFUN( MidiRW_read );
158+CK_DLL_MFUN( MidiRW_write );
159+
160+
161+//-----------------------------------------------------------------------------
162+// MidiMsgOut API
163+//-----------------------------------------------------------------------------
164+CK_DLL_CTOR( MidiMsgOut_ctor );
165+CK_DLL_DTOR( MidiMsgOut_dtor );
166+CK_DLL_MFUN( MidiMsgOut_open );
167+CK_DLL_MFUN( MidiMsgOut_close );
168+CK_DLL_MFUN( MidiMsgOut_write );
169+
170+
171+//-----------------------------------------------------------------------------
172+// MidiMsgIn API
173+//-----------------------------------------------------------------------------
174+CK_DLL_CTOR( MidiMsgIn_ctor );
175+CK_DLL_DTOR( MidiMsgIn_dtor );
176+CK_DLL_MFUN( MidiMsgIn_open );
177+CK_DLL_MFUN( MidiMsgIn_close );
178+CK_DLL_MFUN( MidiMsgIn_read );
179+
180+
181+//-----------------------------------------------------------------------------
182+// MidiIn API
183+//-----------------------------------------------------------------------------
184+CK_DLL_CTOR( MidiIn_ctor );
185+CK_DLL_DTOR( MidiIn_dtor );
186+CK_DLL_MFUN( MidiIn_open );
187+CK_DLL_MFUN( MidiIn_open_named ); // added 1.3.0.0
188+CK_DLL_MFUN( MidiIn_open_named_i ); // added 1.3.0.0
189+CK_DLL_MFUN( MidiIn_good );
190+CK_DLL_MFUN( MidiIn_num );
191+CK_DLL_MFUN( MidiIn_name );
192+CK_DLL_MFUN( MidiIn_printerr );
193+CK_DLL_MFUN( MidiIn_recv );
194+CK_DLL_MFUN( MidiIn_can_wait );
195+
196+
197+//-----------------------------------------------------------------------------
198+// MidiOut API
199+//-----------------------------------------------------------------------------
200+CK_DLL_CTOR( MidiOut_ctor );
201+CK_DLL_DTOR( MidiOut_dtor );
202+CK_DLL_MFUN( MidiOut_open );
203+CK_DLL_MFUN( MidiOut_open_named ); // added 1.3.0.0
204+CK_DLL_MFUN( MidiOut_open_named_i); // added 1.3.0.0
205+CK_DLL_MFUN( MidiOut_good );
206+CK_DLL_MFUN( MidiOut_num );
207+CK_DLL_MFUN( MidiOut_name );
208+CK_DLL_MFUN( MidiOut_printerr );
209+CK_DLL_MFUN( MidiOut_send );
210+
211+
212+//-----------------------------------------------------------------------------
213+// HidMsg API
214+//-----------------------------------------------------------------------------
215+CK_DLL_MFUN( HidMsg_is_axis_motion );
216+CK_DLL_MFUN( HidMsg_is_button_down );
217+CK_DLL_MFUN( HidMsg_is_button_up );
218+CK_DLL_MFUN( HidMsg_is_mouse_motion );
219+CK_DLL_MFUN( HidMsg_is_hat_motion );
220+CK_DLL_MFUN( HidMsg_is_wheel_motion );
221+
222+//-----------------------------------------------------------------------------
223+// HidIn API
224+//-----------------------------------------------------------------------------
225+CK_DLL_CTOR( HidIn_ctor );
226+CK_DLL_DTOR( HidIn_dtor );
227+CK_DLL_MFUN( HidIn_open );
228+CK_DLL_MFUN( HidIn_open_named );
229+CK_DLL_MFUN( HidIn_open_named_i ); // added 1.3.0.0
230+CK_DLL_MFUN( HidIn_open_joystick );
231+CK_DLL_MFUN( HidIn_open_mouse );
232+CK_DLL_MFUN( HidIn_open_keyboard );
233+CK_DLL_MFUN( HidIn_open_tiltsensor );
234+CK_DLL_MFUN( HidIn_good );
235+CK_DLL_MFUN( HidIn_num );
236+CK_DLL_MFUN( HidIn_name );
237+CK_DLL_MFUN( HidIn_printerr );
238+CK_DLL_MFUN( HidIn_recv );
239+CK_DLL_MFUN( HidIn_read );
240+CK_DLL_MFUN( HidIn_send );
241+CK_DLL_MFUN( HidIn_can_wait );
242+CK_DLL_SFUN( HidIn_read_tilt_sensor );
243+CK_DLL_SFUN( HidIn_ctrl_tiltPollRate );
244+CK_DLL_SFUN( HidIn_cget_tiltPollRate );
245+CK_DLL_SFUN( HidIn_start_cursor_track );
246+CK_DLL_SFUN( HidIn_stop_cursor_track );
247+
248+
249+//-----------------------------------------------------------------------------
250+// HidOut API
251+//-----------------------------------------------------------------------------
252+CK_DLL_CTOR( HidOut_ctor );
253+CK_DLL_DTOR( HidOut_dtor );
254+CK_DLL_MFUN( HidOut_open );
255+CK_DLL_MFUN( HidOut_good );
256+CK_DLL_MFUN( HidOut_num );
257+CK_DLL_MFUN( HidOut_name );
258+CK_DLL_MFUN( HidOut_printerr );
259+CK_DLL_MFUN( HidOut_send );
260+
261+
262+
43263 //-----------------------------------------------------------------------------
44264 // name: struct Chuck_IO_Serial
45265 // desc: chuck serial I/O
@@ -195,8 +415,6 @@ protected: · 149 unmodified lines
195415 };
196416
197417
198−// initialize
199−t_CKBOOL init_class_serialio( Chuck_Env * env ); // added 1.3.1
200418
201419
202420
src/core/chuck_lang.cpp+1229−3751
@@ -38,21 +38,8 @@ · 37 unmodified lines
3838 #include "chuck_vm.h"
3939 #include "chuck_errmsg.h"
4040 #include "chuck_ugen.h"
41−
42−#ifndef __DISABLE_HID__
43−#include "hidio_sdl.h"
44−#endif
45−
4641 #include "util_string.h"
4742
48−#ifndef __DISABLE_SERIAL__
49−#include "util_serial.h"
50−#endif
51−
52−#ifndef __DISABLE_MIDI__
53−#include "midiio_rtmidi.h"
54−#endif
55−
5643 #include <math.h>
5744 #include <iostream>
5845 #include <iomanip>
@@ -64,12 +51,6 @@ CK_DLL_TICK(__ugen_tick) { *out = in; return TRUE; } · 5 unmodified lines
6451 // object string offset
6552 static t_CKUINT Object_offset_string = 0;
6653
67−// global
68−static Chuck_String * g_newline = new Chuck_String();
69−
70−
71−
72−
7354
7455
7556
@@ -708,135 +689,204 @@ error: · 632 unmodified lines
708689
709690
710691 //-----------------------------------------------------------------------------
711−// name: init_class_io()
692+// name: init_class_string()
712693 // desc: ...
713694 //-----------------------------------------------------------------------------
714−t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type )
695+t_CKBOOL init_class_string( Chuck_Env * env, Chuck_Type * type )
715696 {
716697 // init as base class
717698 Chuck_DL_Func * func = NULL;
718−
699+
719700 // log
720− EM_log( CK_LOG_SEVERE, "class 'io'" );
721−
701+ EM_log( CK_LOG_SEVERE, "class 'string'" );
702+
703+ const char * doc = "The string class holds textual data as a sequence of characters, and provides a number of functions for manipulating text.";
704+
722705 // init as base class
723− // TODO: ctor/dtor?
724− // TODO: replace dummy with pure function
725− if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
706+ // TODO: ctor/dtor
707+ if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
726708 return FALSE;
727−
728− // add good()
729− func = make_new_mfun( "int", "good", io_dummy );
709+
710+ // add length()
711+ func = make_new_mfun( "int", "length", string_length );
712+ func->doc = "Return the number of characters of the string.";
713+ if( !type_engine_import_mfun( env, func ) ) goto error;
714+
715+ // add upper()
716+ func = make_new_mfun( "string", "upper", string_upper );
717+ func->doc = "Return a new string in which the lowercase characters of the original string have been converted to uppercase.";
718+ if( !type_engine_import_mfun( env, func ) ) goto error;
719+
720+ // add lower()
721+ func = make_new_mfun( "string", "lower", string_lower );
722+ func->doc = "Return a new string in which the uppercase characters of the original string have been converted to lowercase.";
723+ if( !type_engine_import_mfun( env, func ) ) goto error;
724+
725+ // add ltrim()
726+ func = make_new_mfun( "string", "ltrim", string_ltrim );
727+ func->doc = "Return a new string in which leading whitespace has been removed.";
730728 if( !type_engine_import_mfun( env, func ) ) goto error;
731729
732− // add close()
733− func = make_new_mfun( "void", "close", io_dummy );
730+ // add rtrim()
731+ func = make_new_mfun( "string", "rtrim", string_rtrim );
732+ func->doc = "Return a new string in which trailing whitespace has been removed.";
734733 if( !type_engine_import_mfun( env, func ) ) goto error;
735734
736− // add flush()
737− func = make_new_mfun( "void", "flush", io_dummy );
735+ // add trim()
736+ func = make_new_mfun( "string", "trim", string_trim );
737+ func->doc = "Return a new string in which leading and trailing whitespace has been removed.";
738738 if( !type_engine_import_mfun( env, func ) ) goto error;
739739
740− // add mode(int)
741− func = make_new_mfun( "int", "mode", io_dummy );
742− func->add_arg( "int", "flag" );
740+ // add toString()
741+ func = make_new_mfun( "string", "toString", string_toString );
743742 if( !type_engine_import_mfun( env, func ) ) goto error;
744743
745− // add mode()
746− func = make_new_mfun( "int", "mode", io_dummy );
744+ // add charAt()
745+ func = make_new_mfun( "int", "charAt", string_charAt );
746+ func->add_arg("int", "index");
747+ func->doc = "Return a character at the specified index.";
747748 if( !type_engine_import_mfun( env, func ) ) goto error;
748749
749− // TODO: add this later?
750− // add read()
751− // func = make_new_mfun( "string", "read", io_dummy );
752− // func->add_arg( "int", "length" );
753− // if( !type_engine_import_mfun( env, func ) ) goto error;
750+ // add setCharAt()
751+ func = make_new_mfun( "int", "setCharAt", string_setCharAt );
752+ func->add_arg("int", "index");
753+ func->add_arg("int", "theChar");
754+ func->doc = "Set the character at the specified index.";
755+ if( !type_engine_import_mfun( env, func ) ) goto error;
754756
755− // add readLine()
756− func = make_new_mfun( "string", "readLine", io_dummy );
757+ // add substring()
758+ func = make_new_mfun( "string", "substring", string_substring );
759+ func->add_arg("int", "start");
760+ func->doc = "Return a new string containing the substring from the start index to the end of the string.";
757761 if( !type_engine_import_mfun( env, func ) ) goto error;
758762
759− // add readInt()
760− func = make_new_mfun( "int", "readInt", io_dummy );
761− func->add_arg( "int", "flags" );
763+ // add substring()
764+ func = make_new_mfun( "string", "substring", string_substringN );
765+ func->add_arg("int", "start");
766+ func->add_arg("int", "length");
767+ func->doc = "Return a new string containing the substring from the start index of the specified length.";
762768 if( !type_engine_import_mfun( env, func ) ) goto error;
763769
764− // add readFloat()
765− // func = make_new_mfun( "float", "readFloat", io_dummy );
766− // if( !type_engine_import_mfun( env, func ) ) goto error;
770+ // add insert()
771+ func = make_new_mfun( "void", "insert", string_insert );
772+ func->add_arg("int", "position");
773+ func->add_arg("string", "str");
774+ func->doc = "Insert str at the specified position.";
775+ if( !type_engine_import_mfun( env, func ) ) goto error;
767776
768− // add eof()
769− func = make_new_mfun( "int", "eof", io_dummy );
777+ // add replace()
778+ func = make_new_mfun( "void", "replace", string_replace );
779+ func->add_arg( "int", "position" );
780+ func->add_arg( "string", "str" );
781+ func->doc = "Replace characters from the start position to the end of the string with str.";
770782 if( !type_engine_import_mfun( env, func ) ) goto error;
771−
772− // add more()
773− func = make_new_mfun( "int", "more", io_dummy );
774− if( !type_engine_import_mfun( env, func ) ) goto error;
775783
776− // add write(string)
777− func = make_new_mfun( "void", "write", io_dummy );
778− func->add_arg( "string", "val" );
784+ // add replace()
785+ func = make_new_mfun( "void", "replace", string_replaceN );
786+ func->add_arg( "int", "position" );
787+ func->add_arg( "int", "length" );
788+ func->add_arg( "string", "str" );
789+ func->doc = "Replace length characters from the start position with str.";
779790 if( !type_engine_import_mfun( env, func ) ) goto error;
780791
781− // add write(int)
782− func = make_new_mfun( "void", "write", io_dummy );
783− func->add_arg( "int", "val" );
792+ // add find()
793+ func = make_new_mfun( "int", "find", string_find );
794+ func->add_arg( "int", "theChar" );
795+ func->doc = "Return the index of the first occurence of theChar, or -1 if theChar is not found.";
784796 if( !type_engine_import_mfun( env, func ) ) goto error;
785797
786− // add write(float)
787− func = make_new_mfun( "void", "write", io_dummy );
788− func->add_arg( "float", "val" );
798+ // add find()
799+ func = make_new_mfun( "int", "find", string_findStart );
800+ func->add_arg( "int", "theChar" );
801+ func->add_arg( "int", "start" );
802+ func->doc = "Return the index of the first occurence of theChar at or after the start position, or -1 if theChar is not found.";
789803 if( !type_engine_import_mfun( env, func ) ) goto error;
790804
791− // add newline
792− func = make_new_sfun( "string", "newline", io_newline );
793− if( !type_engine_import_sfun( env, func ) ) goto error;
794− func = make_new_sfun( "string", "nl", io_newline );
795− if( !type_engine_import_sfun( env, func ) ) goto error;
796− func = make_new_sfun( "string", "newlineEx2VistaHWNDVisualFoxProA", io_newline );
797− if( !type_engine_import_sfun( env, func ) ) goto error;
798− initialize_object( g_newline, env->t_string );
799− g_newline->set( "\n" );
805+ // add find()
806+ func = make_new_mfun( "int", "find", string_findStr );
807+ func->add_arg( "string", "str" );
808+ func->doc = "Return the index of the first occurence of str, or -1 if str is not found.";
809+ if( !type_engine_import_mfun( env, func ) ) goto error;
800810
801− // add READ_INT32
802− if( !type_engine_import_svar( env, "int", "READ_INT32",
803− TRUE, (t_CKUINT)&Chuck_IO::INT32 ) ) goto error;
811+ // add find()
812+ func = make_new_mfun( "int", "find", string_findStrStart );
813+ func->add_arg( "string", "str" );
814+ func->add_arg( "int", "start" );
815+ func->doc = "Return the index of the first occurence of str at or after the start position, or -1 if str is not found.";
816+ if( !type_engine_import_mfun( env, func ) ) goto error;
804817
805− // add READ_INT16
806− if( !type_engine_import_svar( env, "int", "READ_INT16",
807− TRUE, (t_CKUINT)&Chuck_IO::INT16 ) ) goto error;
818+ // add rfind()
819+ func = make_new_mfun( "int", "rfind", string_rfind );
820+ func->add_arg( "int", "theChar" );
821+ func->doc = "Return the index of the last occurence of theChar, or -1 if theChar is not found.";
822+ if( !type_engine_import_mfun( env, func ) ) goto error;
808823
809− // add READ_INT8
810− if( !type_engine_import_svar( env, "int", "READ_INT8",
811− TRUE, (t_CKUINT)&Chuck_IO::INT8 ) ) goto error;
824+ // add rfind()
825+ func = make_new_mfun( "int", "rfind", string_rfindStart );
826+ func->add_arg( "int", "theChar" );
827+ func->add_arg( "int", "start" );
828+ func->doc = "Return the index of the last occurence of theChar at or before the start position, or -1 if theChar is not found.";
829+ if( !type_engine_import_mfun( env, func ) ) goto error;
812830
813− // add INT32
814− if( !type_engine_import_svar( env, "int", "INT32",
815− TRUE, (t_CKUINT)&Chuck_IO::INT32 ) ) goto error;
831+ // add rfind()
832+ func = make_new_mfun( "int", "rfind", string_rfindStr );
833+ func->add_arg( "string", "str" );
834+ func->doc = "Return the index of the last occurence of str, or -1 if str is not found.";
835+ if( !type_engine_import_mfun( env, func ) ) goto error;
816836
817− // add INT16
818− if( !type_engine_import_svar( env, "int", "INT16",
819− TRUE, (t_CKUINT)&Chuck_IO::INT16 ) ) goto error;
837+ // add rfind()
838+ func = make_new_mfun( "int", "rfind", string_rfindStrStart );
839+ func->add_arg( "string", "str" );
840+ func->add_arg( "int", "start" );
841+ func->doc = "Return the index of the last occurence of str at or before the start position, or -1 if str is not found.";
842+ if( !type_engine_import_mfun( env, func ) ) goto error;
820843
821− // add INT8
822− if( !type_engine_import_svar( env, "int", "INT8",
823− TRUE, (t_CKUINT)&Chuck_IO::INT8 ) ) goto error;
844+ // add erase()
845+ func = make_new_mfun( "void", "erase", string_erase );
846+ func->add_arg( "int", "start" );
847+ func->add_arg( "int", "length" );
848+ func->doc = "Erase length characters of the string from start position.";
849+ if( !type_engine_import_mfun( env, func ) ) goto error;
850+
851+ // add toInt()
852+ func = make_new_mfun( "int", "toInt", string_toInt );
853+ func->doc = "Attempt to convert the contents of the string to an integer and return the result, or 0 if conversion failed.";
854+ if( !type_engine_import_mfun( env, func ) ) goto error;
855+
856+ // add toFloat()
857+ func = make_new_mfun( "float", "toFloat", string_toFloat );
858+ func->doc = "Attempt to convert the contents of the string to an float and return the result, or 0 if conversion failed.";
859+ if( !type_engine_import_mfun( env, func ) ) goto error;
824860
825− // add MODE_SYNC
826− if( !type_engine_import_svar( env, "int", "MODE_SYNC",
827− TRUE, (t_CKUINT)&Chuck_IO::MODE_SYNC ) ) goto error;
861+ // add parent()
862+ // disable for now
863+// func = make_new_mfun( "string", "parent", string_parent );
864+// if( !type_engine_import_mfun( env, func ) ) goto error;
828865
829− // add MODE_ASYNC
830− if( !type_engine_import_svar( env, "int", "MODE_ASYNC",
831− TRUE, (t_CKUINT)&Chuck_IO::MODE_ASYNC ) ) goto error;
866+// // add toTime()
867+// func = make_new_mfun( "float", "toTime", string_toFloat );
868+// if( !type_engine_import_mfun( env, func ) ) goto error;
869+//
870+// // add toDur()
871+// func = make_new_mfun( "float", "toDur", string_toFloat );
872+// if( !type_engine_import_mfun( env, func ) ) goto error;
832873
874+/* // add at()
875+ func = make_new_mfun( "int", "ch", string_set_at );
876+ func->add_arg( "int", "index" );
877+ func->add_arg( "int", "val" );
878+ if( !type_engine_import_mfun( env, func ) ) goto error;
879+ func = make_new_mfun( "int", "ch", string_get_at );
880+ func->add_arg( "int", "index" );
881+ if( !type_engine_import_mfun( env, func ) ) goto error;
882+*/
833883 // end the class import
834884 type_engine_import_class_end( env );
835885
836886 return TRUE;
837−
887+
838888 error:
839−
889+
840890 // end the class import
841891 type_engine_import_class_end( env );
842892
@@ -846,4094 +896,1522 @@ error: · 3 unmodified lines
846896
847897
848898
849−#ifndef __DISABLE_FILEIO__
850899 //-----------------------------------------------------------------------------
851−// name: init_class_fileio()
900+// name: init_class_array()
852901 // desc: ...
853902 //-----------------------------------------------------------------------------
854−t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type )
903+t_CKBOOL init_class_array( Chuck_Env * env, Chuck_Type * type )
855904 {
856905 // init as base class
857906 Chuck_DL_Func * func = NULL;
858907
859908 // log
860− EM_log( CK_LOG_SEVERE, "class 'fileio'" );
909+ EM_log( CK_LOG_SEVERE, "class 'array'" );
861910
862911 // init as base class
863912 // TODO: ctor/dtor?
864− // TODO: replace dummy with pure function
865− if( !type_engine_import_class_begin( env, type, env->global(), fileio_ctor, fileio_dtor ) )
913+ const char *doc = "The array class is used to store linear sequences of data, also providing capabilities for stack and map data structures.";
914+ if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
866915 return FALSE;
867916
868− // add open(string)
869− func = make_new_mfun( "int", "open", fileio_open );
870− func->add_arg( "string", "path" );
871− if( !type_engine_import_mfun( env, func ) ) goto error;
872−
873− // add open(string, flags)
874− func = make_new_mfun( "int", "open", fileio_openflags );
875− func->add_arg( "string", "path" );
876− func->add_arg( "int", "flags" );
877− if( !type_engine_import_mfun( env, func ) ) goto error;
878−
879− // add good()
880− func = make_new_mfun( "int", "good", fileio_good );
881− if( !type_engine_import_mfun( env, func ) ) goto error;
882−
883− // add close()
884− func = make_new_mfun( "void", "close", fileio_close );
885− if( !type_engine_import_mfun( env, func ) ) goto error;
886−
887− // add flush()
888− func = make_new_mfun( "void", "flush", fileio_flush );
917+ // add clear()
918+ func = make_new_mfun( "void", "clear", array_clear );
919+ func->doc = "Clear the contents of the array.";
889920 if( !type_engine_import_mfun( env, func ) ) goto error;
890921
891− // add mode()
892− func = make_new_mfun( "int", "mode", fileio_getmode );
922+ // add reset()
923+ func = make_new_mfun( "void", "reset", array_reset );
924+ func->doc = "Reset array to original state; clears the array and sets capacity to 8.";
893925 if( !type_engine_import_mfun( env, func ) ) goto error;
894926
895− // add mode(int)
896− func = make_new_mfun( "int", "mode", fileio_setmode );
897− func->add_arg( "int", "flag" );
927+ // add popBack()
928+ func = make_new_mfun( "void", "popBack", array_pop_back );
929+ func->doc = "Remove the last item of the array";
898930 if( !type_engine_import_mfun( env, func ) ) goto error;
899931
900932 // add size()
901− func = make_new_mfun( "int", "size", fileio_size );
902− if( !type_engine_import_mfun( env, func ) ) goto error;
903−
904− // add seek(int)
905− func = make_new_mfun( "void", "seek", fileio_seek );
906− func->add_arg( "int", "pos" );
907− if( !type_engine_import_mfun( env, func ) ) goto error;
908−
909− // add tell()
910− func = make_new_mfun( "int", "tell", fileio_tell );
911− if( !type_engine_import_mfun( env, func ) ) goto error;
912−
913− // add isDir()
914− func = make_new_mfun( "int", "isDir", fileio_isdir );
933+ func = make_new_mfun( "int", "size", array_get_size );
934+ func->doc = "Return the number of elements in the array.";
915935 if( !type_engine_import_mfun( env, func ) ) goto error;
916−
917− // add dirList()
918− func = make_new_mfun( "string[]", "dirList", fileio_dirlist );
936+ // add size()
937+ func = make_new_mfun( "int", "size", array_set_size );
938+ func->add_arg( "int", "newSize" );
939+ func->doc = "Set the size of the array. If the new size is less than the current size, elements will be deleted from the end; if the new size is larger than the current size, 0 or null elements will be added to the end.";
919940 if( !type_engine_import_mfun( env, func ) ) goto error;
920941
921− // add read()
922− // func = make_new_mfun( "string", "read", fileio_read );
923− // func->add_arg( "int", "length" );
924− // if( !type_engine_import_mfun( env, func ) ) goto error;
925−
926− // add readLine()
927− func = make_new_mfun( "string", "readLine", fileio_readline );
942+ // add cap()
943+ func = make_new_mfun( "int", "cap", array_get_capacity_hack );
944+ func->doc = "Return current capacity of the array (number of elements that can be held without reallocating internal buffer). ";
928945 if( !type_engine_import_mfun( env, func ) ) goto error;
929946
930− // add readInt()
931− // func = make_new_mfun( "int", "readInt", fileio_readint );
947+ // add capacity()
948+ // func = make_new_mfun( "int", "capacity", array_get_capacity );
932949 // if( !type_engine_import_mfun( env, func ) ) goto error;
933−
934− // add readInt(int)
935− func = make_new_mfun( "int", "readInt", fileio_readintflags );
936− func->add_arg( "int", "flags" );
937− if( !type_engine_import_mfun( env, func ) ) goto error;
938−
939− // add readFloat()
940− // func = make_new_mfun( "float", "readFloat", fileio_readfloat );
950+ // func = make_new_mfun( "int", "capacity", array_set_capacity );
951+ // func->add_arg( "int", "val" );
941952 // if( !type_engine_import_mfun( env, func ) ) goto error;
942953
943− // add eof()
944− func = make_new_mfun( "int", "eof", fileio_eof );
945− if( !type_engine_import_mfun( env, func ) ) goto error;
946−
947− // add more()
948− func = make_new_mfun( "int", "more", fileio_more );
949− if( !type_engine_import_mfun( env, func ) ) goto error;
950−
951− // add write(string)
952− func = make_new_mfun( "void", "write", fileio_writestring );
953− func->add_arg( "string", "val" );
954+ // add find()
955+ func = make_new_mfun( "int", "find", array_find );
956+ func->add_arg( "string", "key" );
957+ func->doc = "Return number of elements with the specified key. ";
954958 if( !type_engine_import_mfun( env, func ) ) goto error;
955959
956− // add write(int)
957− func = make_new_mfun( "void", "write", fileio_writeint );
958− func->add_arg( "int", "val" );
960+ // add erase()
961+ func = make_new_mfun( "int", "erase", array_erase );
962+ func->add_arg( "string", "key" );
963+ func->doc = "Erase all elements with the specified key. ";
959964 if( !type_engine_import_mfun( env, func ) ) goto error;
960965
961− // add write(int,flags)
962− func = make_new_mfun( "void", "write", fileio_writeintflags );
963− func->add_arg( "int", "val" );
964− func->add_arg( "int", "flags" );
965− if( !type_engine_import_mfun( env, func ) ) goto error;
966+ // add examples
967+ if( !type_engine_import_add_ex( env, "array/array_argument.ck" ) ) goto error;
968+ if( !type_engine_import_add_ex( env, "array/array_assign.ck" ) ) goto error;
969+ if( !type_engine_import_add_ex( env, "array/array_dynamic.ck" ) ) goto error;
970+ if( !type_engine_import_add_ex( env, "array/array_mdim.ck" ) ) goto error;
971+ if( !type_engine_import_add_ex( env, "array/array_mmixed.ck" ) ) goto error;
972+ if( !type_engine_import_add_ex( env, "array/array_resize.ck" ) ) goto error;
973+ if( !type_engine_import_add_ex( env, "array/array_storage.ck" ) ) goto error;
974+ if( !type_engine_import_add_ex( env, "array/array_sub_assign.ck" ) ) goto error;
975+
976+ type_engine_import_class_end( env );
966977
967− // add write(float)
968− func = make_new_mfun( "void", "write", fileio_writefloat );
969− func->add_arg( "float", "val" );
970− if( !type_engine_import_mfun( env, func ) ) goto error;
978+ return TRUE;
971979
972− // add FLAG_READ_WRITE
973− if( !type_engine_import_svar( env, "int", "READ_WRITE",
974− TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_READ_WRITE ) ) goto error;
980+error:
975981
976− // add FLAG_READONLY
977− if( !type_engine_import_svar( env, "int", "READ",
978− TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_READONLY ) ) goto error;
982+ // end the class import
983+ type_engine_import_class_end( env );
984+
985+ return FALSE;
986+}
979987
980− // add FLAG_WRITEONLY
981− if( !type_engine_import_svar( env, "int", "WRITE",
982− TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_WRITEONLY ) ) goto error;
983988
984− // add FLAG_APPEND
985− if( !type_engine_import_svar( env, "int", "APPEND",
986− TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_APPEND ) ) goto error;
987989
988− // add TYPE_ASCII
989− if( !type_engine_import_svar( env, "int", "ASCII",
990− TRUE, (t_CKUINT)&Chuck_IO_File::TYPE_ASCII ) ) goto error;
991990
992− // add TYPE_BINARY
993− if( !type_engine_import_svar( env, "int", "BINARY",
994− TRUE, (t_CKUINT)&Chuck_IO_File::TYPE_BINARY ) ) goto error;
995−
996− // end the class import
997− type_engine_import_class_end( env );
998−
999− return TRUE;
1000−
1001−error:
1002−
1003− // end the class import
1004− type_engine_import_class_end( env );
1005−
1006− return FALSE;
1007−}
1008−#endif
1009−
1010−
1011−
1012−
1013−//-----------------------------------------------------------------------------
1014−// name: init_class_chout()
1015−// desc: added 1.3.0.0 as full class
1016−//-----------------------------------------------------------------------------
1017−t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type )
1018−{
1019− // init as base class
1020− Chuck_DL_Func * func = NULL;
1021−
1022− // log
1023− EM_log( CK_LOG_SEVERE, "class 'chout'" );
1024−
1025− // TODO: ctor/dtor?
1026− if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
1027− return FALSE;
1028−
1029− // add good()
1030− func = make_new_mfun( "int", "good", chout_good );
1031− if( !type_engine_import_mfun( env, func ) ) goto error;
1032−
1033− // add close()
1034− func = make_new_mfun( "void", "close", chout_close );
1035− if( !type_engine_import_mfun( env, func ) ) goto error;
1036−
1037− // add flush()
1038− func = make_new_mfun( "void", "flush", chout_flush );
1039− if( !type_engine_import_mfun( env, func ) ) goto error;
1040−
1041− // add mode()
1042− func = make_new_mfun( "int", "mode", chout_getmode );
1043− if( !type_engine_import_mfun( env, func ) ) goto error;
1044−
1045− // add mode(int)
1046− func = make_new_mfun( "int", "mode", chout_setmode );
1047− func->add_arg( "int", "flag" );
1048− if( !type_engine_import_mfun( env, func ) ) goto error;
1049−
1050− // add readLine()
1051− func = make_new_mfun( "string", "readLine", chout_readline );
1052− if( !type_engine_import_mfun( env, func ) ) goto error;
1053−
1054− // add readInt()
1055− // func = make_new_mfun( "int", "readInt", chout_readint );
1056− // if( !type_engine_import_mfun( env, func ) ) goto error;
1057−
1058− // add readInt(int)
1059− func = make_new_mfun( "int", "readInt", chout_readintflags );
1060− func->add_arg( "int", "flags" );
1061− if( !type_engine_import_mfun( env, func ) ) goto error;
1062−
1063− // add readFloat()
1064− // func = make_new_mfun( "float", "readFloat", chout_readfloat );
1065− // if( !type_engine_import_mfun( env, func ) ) goto error;
1066−
1067− // add eof()
1068− func = make_new_mfun( "int", "eof", chout_eof );
1069− if( !type_engine_import_mfun( env, func ) ) goto error;
1070−
1071− // add more()
1072− func = make_new_mfun( "int", "more", chout_more );
1073− if( !type_engine_import_mfun( env, func ) ) goto error;
1074−
1075− // add write(string)
1076− func = make_new_mfun( "void", "write", chout_writestring );
1077− func->add_arg( "string", "val" );
1078− if( !type_engine_import_mfun( env, func ) ) goto error;
1079−
1080− // add write(int)
1081− func = make_new_mfun( "void", "write", chout_writeint );
1082− func->add_arg( "int", "val" );
1083− if( !type_engine_import_mfun( env, func ) ) goto error;
1084−
1085− // add write(float)
1086− func = make_new_mfun( "void", "write", chout_writefloat );
1087− func->add_arg( "float", "val" );
1088− if( !type_engine_import_mfun( env, func ) ) goto error;
1089−
1090− // end the class import
1091− type_engine_import_class_end( env );
1092−
1093− return TRUE;
1094−
1095−error:
1096−
1097− // end the class import
1098− type_engine_import_class_end( env );
1099−
1100− return FALSE;
1101−}
1102−
1103−
1104−
1105−
1106−//-----------------------------------------------------------------------------
1107−// name: init_class_cherr()
1108−// desc: added 1.3.0.0 -- as full class
1109−//-----------------------------------------------------------------------------
1110−t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type )
1111−{
1112− // init as base class
1113− Chuck_DL_Func * func = NULL;
1114−
1115− // log
1116− EM_log( CK_LOG_SEVERE, "class 'cherr'" );
1117−
1118− // TODO: ctor/dtor?
1119− if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
1120− return FALSE;
1121−
1122− // add good()
1123− func = make_new_mfun( "int", "good", cherr_good );
1124− if( !type_engine_import_mfun( env, func ) ) goto error;
1125−
1126− // add close()
1127− func = make_new_mfun( "void", "close", cherr_close );
1128− if( !type_engine_import_mfun( env, func ) ) goto error;
1129−
1130− // add flush()
1131− func = make_new_mfun( "void", "flush", cherr_flush );
1132− if( !type_engine_import_mfun( env, func ) ) goto error;
1133−
1134− // add mode()
1135− func = make_new_mfun( "int", "mode", cherr_getmode );
1136− if( !type_engine_import_mfun( env, func ) ) goto error;
1137−
1138− // add mode(int)
1139− func = make_new_mfun( "int", "mode", cherr_setmode );
1140− func->add_arg( "int", "flag" );
1141− if( !type_engine_import_mfun( env, func ) ) goto error;
1142−
1143− // add readLine()
1144− func = make_new_mfun( "string", "readLine", cherr_readline );
1145− if( !type_engine_import_mfun( env, func ) ) goto error;
1146−
1147− // add readInt()
1148− // func = make_new_mfun( "int", "readInt", cherr_readint );
1149− // if( !type_engine_import_mfun( env, func ) ) goto error;
1150−
1151− // add readInt(int)
1152− func = make_new_mfun( "int", "readInt", cherr_readintflags );
1153− func->add_arg( "int", "flags" );
1154− if( !type_engine_import_mfun( env, func ) ) goto error;
1155−
1156− // add readFloat()
1157− // func = make_new_mfun( "float", "readFloat", cherr_readfloat );
1158− // if( !type_engine_import_mfun( env, func ) ) goto error;
1159−
1160− // add eof()
1161− func = make_new_mfun( "int", "eof", cherr_eof );
1162− if( !type_engine_import_mfun( env, func ) ) goto error;
1163−
1164− // add more()
1165− func = make_new_mfun( "int", "more", cherr_more );
1166− if( !type_engine_import_mfun( env, func ) ) goto error;
1167−
1168− // add write(string)
1169− func = make_new_mfun( "void", "write", cherr_writestring );
1170− func->add_arg( "string", "val" );
1171− if( !type_engine_import_mfun( env, func ) ) goto error;
1172−
1173− // add write(int)
1174− func = make_new_mfun( "void", "write", cherr_writeint );
1175− func->add_arg( "int", "val" );
1176− if( !type_engine_import_mfun( env, func ) ) goto error;
1177−
1178− // add write(float)
1179− func = make_new_mfun( "void", "write", cherr_writefloat );
1180− func->add_arg( "float", "val" );
1181− if( !type_engine_import_mfun( env, func ) ) goto error;
1182−
1183− // end the class import
1184− type_engine_import_class_end( env );
1185−
1186− return TRUE;
1187−
1188−error:
1189−
1190− // end the class import
1191− type_engine_import_class_end( env );
1192−
1193− return FALSE;
1194−}
1195−
1196−
1197−//-----------------------------------------------------------------------------
1198−// name: init_class_string()
1199−// desc: ...
1200−//-----------------------------------------------------------------------------
1201−t_CKBOOL init_class_string( Chuck_Env * env, Chuck_Type * type )
1202−{
1203− // init as base class
1204− Chuck_DL_Func * func = NULL;
1205−
1206− // log
1207− EM_log( CK_LOG_SEVERE, "class 'string'" );
1208−
1209− const char * doc = "The string class holds textual data as a sequence of characters, and provides a number of functions for manipulating text.";
1210−
1211− // init as base class
1212− // TODO: ctor/dtor
1213− if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
1214− return FALSE;
1215−
1216− // add length()
1217− func = make_new_mfun( "int", "length", string_length );
1218− func->doc = "Return the number of characters of the string.";
1219− if( !type_engine_import_mfun( env, func ) ) goto error;
1220−
1221− // add upper()
1222− func = make_new_mfun( "string", "upper", string_upper );
1223− func->doc = "Return a new string in which the lowercase characters of the original string have been converted to uppercase.";
1224− if( !type_engine_import_mfun( env, func ) ) goto error;
1225−
1226− // add lower()
1227− func = make_new_mfun( "string", "lower", string_lower );
1228− func->doc = "Return a new string in which the uppercase characters of the original string have been converted to lowercase.";
1229− if( !type_engine_import_mfun( env, func ) ) goto error;
1230−
1231− // add ltrim()
1232− func = make_new_mfun( "string", "ltrim", string_ltrim );
1233− func->doc = "Return a new string in which leading whitespace has been removed.";
1234− if( !type_engine_import_mfun( env, func ) ) goto error;
1235−
1236− // add rtrim()
1237− func = make_new_mfun( "string", "rtrim", string_rtrim );
1238− func->doc = "Return a new string in which trailing whitespace has been removed.";
1239− if( !type_engine_import_mfun( env, func ) ) goto error;
1240−
1241− // add trim()
1242− func = make_new_mfun( "string", "trim", string_trim );
1243− func->doc = "Return a new string in which leading and trailing whitespace has been removed.";
1244− if( !type_engine_import_mfun( env, func ) ) goto error;
1245−
1246− // add toString()
1247− func = make_new_mfun( "string", "toString", string_toString );
1248− if( !type_engine_import_mfun( env, func ) ) goto error;
1249−
1250− // add charAt()
1251− func = make_new_mfun( "int", "charAt", string_charAt );
1252− func->add_arg("int", "index");
1253− func->doc = "Return a character at the specified index.";
1254− if( !type_engine_import_mfun( env, func ) ) goto error;
1255−
1256− // add setCharAt()
1257− func = make_new_mfun( "int", "setCharAt", string_setCharAt );
1258− func->add_arg("int", "index");
1259− func->add_arg("int", "theChar");
1260− func->doc = "Set the character at the specified index.";
1261− if( !type_engine_import_mfun( env, func ) ) goto error;
1262−
1263− // add substring()
1264− func = make_new_mfun( "string", "substring", string_substring );
1265− func->add_arg("int", "start");
1266− func->doc = "Return a new string containing the substring from the start index to the end of the string.";
1267− if( !type_engine_import_mfun( env, func ) ) goto error;
1268−
1269− // add substring()
1270− func = make_new_mfun( "string", "substring", string_substringN );
1271− func->add_arg("int", "start");
1272− func->add_arg("int", "length");
1273− func->doc = "Return a new string containing the substring from the start index of the specified length.";
1274− if( !type_engine_import_mfun( env, func ) ) goto error;
1275−
1276− // add insert()
1277− func = make_new_mfun( "void", "insert", string_insert );
1278− func->add_arg("int", "position");
1279− func->add_arg("string", "str");
1280− func->doc = "Insert str at the specified position.";
1281− if( !type_engine_import_mfun( env, func ) ) goto error;
1282−
1283− // add replace()
1284− func = make_new_mfun( "void", "replace", string_replace );
1285− func->add_arg( "int", "position" );
1286− func->add_arg( "string", "str" );
1287− func->doc = "Replace characters from the start position to the end of the string with str.";
1288− if( !type_engine_import_mfun( env, func ) ) goto error;
1289−
1290− // add replace()
1291− func = make_new_mfun( "void", "replace", string_replaceN );
1292− func->add_arg( "int", "position" );
1293− func->add_arg( "int", "length" );
1294− func->add_arg( "string", "str" );
1295− func->doc = "Replace length characters from the start position with str.";
1296− if( !type_engine_import_mfun( env, func ) ) goto error;
1297−
1298− // add find()
1299− func = make_new_mfun( "int", "find", string_find );
1300− func->add_arg( "int", "theChar" );
1301− func->doc = "Return the index of the first occurence of theChar, or -1 if theChar is not found.";
1302− if( !type_engine_import_mfun( env, func ) ) goto error;
1303−
1304− // add find()
1305− func = make_new_mfun( "int", "find", string_findStart );
1306− func->add_arg( "int", "theChar" );
1307− func->add_arg( "int", "start" );
1308− func->doc = "Return the index of the first occurence of theChar at or after the start position, or -1 if theChar is not found.";
1309− if( !type_engine_import_mfun( env, func ) ) goto error;
1310−
1311− // add find()
1312− func = make_new_mfun( "int", "find", string_findStr );
1313− func->add_arg( "string", "str" );
1314− func->doc = "Return the index of the first occurence of str, or -1 if str is not found.";
1315− if( !type_engine_import_mfun( env, func ) ) goto error;
1316−
1317− // add find()
1318− func = make_new_mfun( "int", "find", string_findStrStart );
1319− func->add_arg( "string", "str" );
1320− func->add_arg( "int", "start" );
1321− func->doc = "Return the index of the first occurence of str at or after the start position, or -1 if str is not found.";
1322− if( !type_engine_import_mfun( env, func ) ) goto error;
1323−
1324− // add rfind()
1325− func = make_new_mfun( "int", "rfind", string_rfind );
1326− func->add_arg( "int", "theChar" );
1327− func->doc = "Return the index of the last occurence of theChar, or -1 if theChar is not found.";
1328− if( !type_engine_import_mfun( env, func ) ) goto error;
1329−
1330− // add rfind()
1331− func = make_new_mfun( "int", "rfind", string_rfindStart );
1332− func->add_arg( "int", "theChar" );
1333− func->add_arg( "int", "start" );
1334− func->doc = "Return the index of the last occurence of theChar at or before the start position, or -1 if theChar is not found.";
1335− if( !type_engine_import_mfun( env, func ) ) goto error;
1336−
1337− // add rfind()
1338− func = make_new_mfun( "int", "rfind", string_rfindStr );
1339− func->add_arg( "string", "str" );
1340− func->doc = "Return the index of the last occurence of str, or -1 if str is not found.";
1341− if( !type_engine_import_mfun( env, func ) ) goto error;
1342−
1343− // add rfind()
1344− func = make_new_mfun( "int", "rfind", string_rfindStrStart );
1345− func->add_arg( "string", "str" );
1346− func->add_arg( "int", "start" );
1347− func->doc = "Return the index of the last occurence of str at or before the start position, or -1 if str is not found.";
1348− if( !type_engine_import_mfun( env, func ) ) goto error;
1349−
1350− // add erase()
1351− func = make_new_mfun( "void", "erase", string_erase );
1352− func->add_arg( "int", "start" );
1353− func->add_arg( "int", "length" );
1354− func->doc = "Erase length characters of the string from start position.";
1355− if( !type_engine_import_mfun( env, func ) ) goto error;
1356−
1357− // add toInt()
1358− func = make_new_mfun( "int", "toInt", string_toInt );
1359− func->doc = "Attempt to convert the contents of the string to an integer and return the result, or 0 if conversion failed.";
1360− if( !type_engine_import_mfun( env, func ) ) goto error;
1361−
1362− // add toFloat()
1363− func = make_new_mfun( "float", "toFloat", string_toFloat );
1364− func->doc = "Attempt to convert the contents of the string to an float and return the result, or 0 if conversion failed.";
1365− if( !type_engine_import_mfun( env, func ) ) goto error;
1366−
1367− // add parent()
1368− // disable for now
1369−// func = make_new_mfun( "string", "parent", string_parent );
1370−// if( !type_engine_import_mfun( env, func ) ) goto error;
1371−
1372−// // add toTime()
1373−// func = make_new_mfun( "float", "toTime", string_toFloat );
1374−// if( !type_engine_import_mfun( env, func ) ) goto error;
1375−//
1376−// // add toDur()
1377−// func = make_new_mfun( "float", "toDur", string_toFloat );
1378−// if( !type_engine_import_mfun( env, func ) ) goto error;
1379−
1380−/* // add at()
1381− func = make_new_mfun( "int", "ch", string_set_at );
1382− func->add_arg( "int", "index" );
1383− func->add_arg( "int", "val" );
1384− if( !type_engine_import_mfun( env, func ) ) goto error;
1385− func = make_new_mfun( "int", "ch", string_get_at );
1386− func->add_arg( "int", "index" );
1387− if( !type_engine_import_mfun( env, func ) ) goto error;
1388−*/
1389− // end the class import
1390− type_engine_import_class_end( env );
1391−
1392− return TRUE;
1393−
1394−error:
1395−
1396− // end the class import
1397− type_engine_import_class_end( env );
1398−
1399− return FALSE;
1400−}
1401−
1402−
1403−
1404−
1405−//-----------------------------------------------------------------------------
1406−// name: init_class_array()
1407−// desc: ...
1408−//-----------------------------------------------------------------------------
1409−t_CKBOOL init_class_array( Chuck_Env * env, Chuck_Type * type )
1410−{
1411− // init as base class
1412− Chuck_DL_Func * func = NULL;
1413−
1414− // log
1415− EM_log( CK_LOG_SEVERE, "class 'array'" );
1416−
1417− // init as base class
1418− // TODO: ctor/dtor?
1419− const char *doc = "The array class is used to store linear sequences of data, also providing capabilities for stack and map data structures.";
1420− if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
1421− return FALSE;
1422−
1423− // add clear()
1424− func = make_new_mfun( "void", "clear", array_clear );
1425− func->doc = "Clear the contents of the array.";
1426− if( !type_engine_import_mfun( env, func ) ) goto error;
1427−
1428− // add reset()
1429− func = make_new_mfun( "void", "reset", array_reset );
1430− func->doc = "Reset array to original state; clears the array and sets capacity to 8.";
1431− if( !type_engine_import_mfun( env, func ) ) goto error;
1432−
1433− // add popBack()
1434− func = make_new_mfun( "void", "popBack", array_pop_back );
1435− func->doc = "Remove the last item of the array";
1436− if( !type_engine_import_mfun( env, func ) ) goto error;
1437−
1438− // add size()
1439− func = make_new_mfun( "int", "size", array_get_size );
1440− func->doc = "Return the number of elements in the array.";
1441− if( !type_engine_import_mfun( env, func ) ) goto error;
1442− // add size()
1443− func = make_new_mfun( "int", "size", array_set_size );
1444− func->add_arg( "int", "newSize" );
1445− func->doc = "Set the size of the array. If the new size is less than the current size, elements will be deleted from the end; if the new size is larger than the current size, 0 or null elements will be added to the end.";
1446− if( !type_engine_import_mfun( env, func ) ) goto error;
1447−
1448− // add cap()
1449− func = make_new_mfun( "int", "cap", array_get_capacity_hack );
1450− func->doc = "Return current capacity of the array (number of elements that can be held without reallocating internal buffer). ";
1451− if( !type_engine_import_mfun( env, func ) ) goto error;
1452−
1453− // add capacity()
1454− // func = make_new_mfun( "int", "capacity", array_get_capacity );
1455− // if( !type_engine_import_mfun( env, func ) ) goto error;
1456− // func = make_new_mfun( "int", "capacity", array_set_capacity );
1457− // func->add_arg( "int", "val" );
1458− // if( !type_engine_import_mfun( env, func ) ) goto error;
1459−
1460− // add find()
1461− func = make_new_mfun( "int", "find", array_find );
1462− func->add_arg( "string", "key" );
1463− func->doc = "Return number of elements with the specified key. ";
1464− if( !type_engine_import_mfun( env, func ) ) goto error;
1465−
1466− // add erase()
1467− func = make_new_mfun( "int", "erase", array_erase );
1468− func->add_arg( "string", "key" );
1469− func->doc = "Erase all elements with the specified key. ";
1470− if( !type_engine_import_mfun( env, func ) ) goto error;
1471−
1472− // add examples
1473− if( !type_engine_import_add_ex( env, "array/array_argument.ck" ) ) goto error;
1474− if( !type_engine_import_add_ex( env, "array/array_assign.ck" ) ) goto error;
1475− if( !type_engine_import_add_ex( env, "array/array_dynamic.ck" ) ) goto error;
1476− if( !type_engine_import_add_ex( env, "array/array_mdim.ck" ) ) goto error;
1477− if( !type_engine_import_add_ex( env, "array/array_mmixed.ck" ) ) goto error;
1478− if( !type_engine_import_add_ex( env, "array/array_resize.ck" ) ) goto error;
1479− if( !type_engine_import_add_ex( env, "array/array_storage.ck" ) ) goto error;
1480− if( !type_engine_import_add_ex( env, "array/array_sub_assign.ck" ) ) goto error;
1481−
1482− type_engine_import_class_end( env );
1483−
1484− return TRUE;
1485−
1486−error:
1487−
1488− // end the class import
1489− type_engine_import_class_end( env );
1490−
1491− return FALSE;
1492−}
1493−
1494−
1495−
1496−// static
1497−static t_CKUINT MidiIn_offset_data = 0;
1498−t_CKUINT MidiMsg_offset_data1 = 0;
1499−t_CKUINT MidiMsg_offset_data2 = 0;
1500−t_CKUINT MidiMsg_offset_data3 = 0;
1501−t_CKUINT MidiMsg_offset_when = 0;
1502−static t_CKUINT MidiOut_offset_data = 0;
1503−
1504−//-----------------------------------------------------------------------------
1505−// name: init_class_Midi()
1506−// desc: ...
1507−//-----------------------------------------------------------------------------
1508−t_CKBOOL init_class_Midi( Chuck_Env * env )
1509−{
1510− Chuck_DL_Func * func = NULL;
1511−
1512− // init base class
1513− // TODO: ctor/dtor?
1514− if( !type_engine_import_class_begin( env, "MidiMsg", "Object",
1515− env->global(), NULL, NULL ) )
1516− return FALSE;
1517−
1518− // add member variable
1519− MidiMsg_offset_data1 = type_engine_import_mvar( env, "int", "data1", FALSE );
1520− if( MidiMsg_offset_data1 == CK_INVALID_OFFSET ) goto error;
1521−
1522− // add member variable
1523− MidiMsg_offset_data2 = type_engine_import_mvar( env, "int", "data2", FALSE );
1524− if( MidiMsg_offset_data2 == CK_INVALID_OFFSET ) goto error;
1525−
1526− // add member variable
1527− MidiMsg_offset_data3 = type_engine_import_mvar( env, "int", "data3", FALSE );
1528− if( MidiMsg_offset_data3 == CK_INVALID_OFFSET ) goto error;
1529−
1530− // add member variable
1531− MidiMsg_offset_when = type_engine_import_mvar( env, "dur", "when", FALSE );
1532− if( MidiMsg_offset_when == CK_INVALID_OFFSET ) goto error;
1533−
1534− // end the class import
1535− type_engine_import_class_end( env );
1536−
1537−#ifndef __DISABLE_MIDI__
1538− // init base class
1539− if( !type_engine_import_class_begin( env, "MidiIn", "Event",
1540− env->global(), MidiIn_ctor, MidiIn_dtor ) )
1541− return FALSE;
1542−
1543− // add open()
1544− func = make_new_mfun( "int", "open", MidiIn_open );
1545− func->add_arg( "int", "port" );
1546− if( !type_engine_import_mfun( env, func ) ) goto error;
1547−
1548− // add open() (added 1.3.0.0)
1549− func = make_new_mfun( "int", "open", MidiIn_open_named );
1550− func->add_arg( "string", "name" );
1551− if( !type_engine_import_mfun( env, func ) ) goto error;
1552−
1553− // add good()
1554− func = make_new_mfun( "int", "good", MidiIn_good );
1555− if( !type_engine_import_mfun( env, func ) ) goto error;
1556−
1557− // add num()
1558− func = make_new_mfun( "int", "num", MidiIn_num );
1559− if( !type_engine_import_mfun( env, func ) ) goto error;
1560−
1561− // add name()
1562− func = make_new_mfun( "string", "name", MidiIn_name );
1563− if( !type_engine_import_mfun( env, func ) ) goto error;
1564−
1565− // add printerr()
1566− func = make_new_mfun( "void", "printerr", MidiIn_printerr );
1567− func->add_arg( "int", "print_or_not" );
1568− if( !type_engine_import_mfun( env, func ) ) goto error;
1569−
1570− // add recv()
1571− func = make_new_mfun( "int", "recv", MidiIn_recv );
1572− func->add_arg( "MidiMsg", "msg" );
1573− if( !type_engine_import_mfun( env, func ) ) goto error;
1574−
1575− // add can_wait()
1576− func = make_new_mfun( "int", "can_wait", MidiIn_can_wait );
1577− if( !type_engine_import_mfun( env, func ) ) goto error;
1578−
1579− // add member variable
1580− MidiIn_offset_data = type_engine_import_mvar( env, "int", "@MidiIn_data", FALSE );
1581− if( MidiIn_offset_data == CK_INVALID_OFFSET ) goto error;
1582−
1583− // end the class import
1584− type_engine_import_class_end( env );
1585−
1586− // init base class
1587− if( !type_engine_import_class_begin( env, "MidiOut", "Object",
1588− env->global(), MidiOut_ctor, MidiOut_dtor ) )
1589− return FALSE;
1590−
1591− // add open()
1592− func = make_new_mfun( "int", "open", MidiOut_open );
1593− func->add_arg( "int", "port" );
1594− if( !type_engine_import_mfun( env, func ) ) goto error;
1595−
1596− // add open() (added 1.3.0.0)
1597− func = make_new_mfun( "int", "open", MidiOut_open_named );
1598− func->add_arg( "string", "name" );
1599− if( !type_engine_import_mfun( env, func ) ) goto error;
1600−
1601− // add good()
1602− func = make_new_mfun( "int", "good", MidiOut_good );
1603− if( !type_engine_import_mfun( env, func ) ) goto error;
1604−
1605− // add num()
1606− func = make_new_mfun( "int", "num", MidiOut_num );
1607− if( !type_engine_import_mfun( env, func ) ) goto error;
1608−
1609− // add name()
1610− func = make_new_mfun( "string", "name", MidiOut_name );
1611− if( !type_engine_import_mfun( env, func ) ) goto error;
1612−
1613− // add printerr()
1614− func = make_new_mfun( "void", "printerr", MidiOut_printerr );
1615− func->add_arg( "int", "print_or_not" );
1616− if( !type_engine_import_mfun( env, func ) ) goto error;
1617−
1618− // add send()
1619− func = make_new_mfun( "int", "send", MidiOut_send );
1620− func->add_arg( "MidiMsg", "msg" );
1621− if( !type_engine_import_mfun( env, func ) ) goto error;
1622−
1623− // add member variable
1624− MidiOut_offset_data = type_engine_import_mvar( env, "int", "@MidiOut_data", FALSE );
1625− if( MidiOut_offset_data == CK_INVALID_OFFSET ) goto error;
1626−
1627− // end the class import
1628− type_engine_import_class_end( env );
1629−
1630−#endif // __DISABLE_MIDI__
1631−
1632− return TRUE;
1633−
1634−error:
1635−
1636− // end the class import
1637− type_engine_import_class_end( env );
1638−
1639− return FALSE;
1640−}
1641−
1642−
1643−
1644−
1645−#ifndef __DISABLE_HID__
1646−// static
1647−static t_CKUINT HidIn_offset_data = 0;
1648−
1649−static t_CKUINT HidMsg_offset_device_type = 0;
1650−static t_CKUINT HidMsg_offset_device_num = 0;
1651−static t_CKUINT HidMsg_offset_type = 0;
1652−static t_CKUINT HidMsg_offset_which = 0;
1653−static t_CKUINT HidMsg_offset_idata = 0;
1654−static t_CKUINT HidMsg_offset_fdata = 0;
1655−static t_CKUINT HidMsg_offset_when = 0;
1656−static t_CKUINT HidMsg_offset_deltax = 0;
1657−static t_CKUINT HidMsg_offset_deltay = 0;
1658−static t_CKUINT HidMsg_offset_axis_position = 0; // deprecated
1659−static t_CKUINT HidMsg_offset_axis_position2 = 0;
1660−static t_CKUINT HidMsg_offset_scaled_axis_position = 0; // deprecated
1661−static t_CKUINT HidMsg_offset_hat_position = 0;
1662−static t_CKUINT HidMsg_offset_cursorx = 0;
1663−static t_CKUINT HidMsg_offset_cursory = 0;
1664−static t_CKUINT HidMsg_offset_scaledcursorx = 0;
1665−static t_CKUINT HidMsg_offset_scaledcursory = 0;
1666−static t_CKUINT HidMsg_offset_x = 0;
1667−static t_CKUINT HidMsg_offset_y = 0;
1668−static t_CKUINT HidMsg_offset_z = 0;
1669−static t_CKUINT HidMsg_offset_touchx = 0; // added 1.3.0.0
1670−static t_CKUINT HidMsg_offset_touchy = 0; // added 1.3.0.0
1671−static t_CKUINT HidMsg_offset_touchsize = 0; // added 1.3.0.0
1672−static t_CKUINT HidMsg_offset_ascii = 0;
1673−static t_CKUINT HidMsg_offset_key = 0;
1674−
1675−static t_CKUINT HidOut_offset_data = 0;
1676−
1677−//-----------------------------------------------------------------------------
1678−// name: init_class_HID()
1679−// desc: ...
1680−//-----------------------------------------------------------------------------
1681−t_CKBOOL init_class_HID( Chuck_Env * env )
1682−{
1683− Chuck_DL_Func * func = NULL;
1684−
1685− // init base class
1686− if( !type_engine_import_class_begin( env, "HidMsg", "Object",
1687− env->global(), NULL, NULL ) )
1688− return FALSE;
1689−
1690− // add member variable
1691− HidMsg_offset_device_type = type_engine_import_mvar( env, "int", "deviceType", FALSE );
1692− if( HidMsg_offset_device_type == CK_INVALID_OFFSET ) goto error;
1693−
1694− // add member variable
1695− HidMsg_offset_device_num = type_engine_import_mvar( env, "int", "deviceNum", FALSE );
1696− if( HidMsg_offset_device_num == CK_INVALID_OFFSET ) goto error;
1697−
1698− // add member variable
1699− HidMsg_offset_type = type_engine_import_mvar( env, "int", "type", FALSE );
1700− if( HidMsg_offset_type == CK_INVALID_OFFSET ) goto error;
1701−
1702− // add member variable
1703− HidMsg_offset_which = type_engine_import_mvar( env, "int", "which", FALSE );
1704− if( HidMsg_offset_which == CK_INVALID_OFFSET ) goto error;
1705−
1706− // add member variable
1707− HidMsg_offset_idata = type_engine_import_mvar( env, "int", "idata", FALSE );
1708− if( HidMsg_offset_idata == CK_INVALID_OFFSET ) goto error;
1709−
1710− // add member variable
1711− HidMsg_offset_fdata = type_engine_import_mvar( env, "float", "fdata", FALSE );
1712− if( HidMsg_offset_fdata == CK_INVALID_OFFSET ) goto error;
1713−
1714− // add member variable
1715− HidMsg_offset_when = type_engine_import_mvar( env, "time", "when", FALSE );
1716− if( HidMsg_offset_when == CK_INVALID_OFFSET ) goto error;
1717−
1718− // add member variable
1719− HidMsg_offset_deltax = type_engine_import_mvar( env, "int", "deltaX", FALSE );
1720− if( HidMsg_offset_deltax == CK_INVALID_OFFSET ) goto error;
1721−
1722− // add member variable
1723− HidMsg_offset_deltay = type_engine_import_mvar( env, "int", "deltaY", FALSE );
1724− if( HidMsg_offset_deltay == CK_INVALID_OFFSET ) goto error;
1725−
1726− // add member variable
1727− HidMsg_offset_cursorx = type_engine_import_mvar( env, "int", "cursorX", FALSE );
1728− if( HidMsg_offset_cursorx == CK_INVALID_OFFSET ) goto error;
1729−
1730− // add member variable
1731− HidMsg_offset_cursory = type_engine_import_mvar( env, "int", "cursorY", FALSE );
1732− if( HidMsg_offset_cursory == CK_INVALID_OFFSET ) goto error;
1733−
1734− // add member variable
1735− HidMsg_offset_scaledcursorx = type_engine_import_mvar( env, "float", "scaledCursorX", FALSE );
1736− if( HidMsg_offset_scaledcursorx == CK_INVALID_OFFSET ) goto error;
1737−
1738− // add member variable
1739− HidMsg_offset_scaledcursory = type_engine_import_mvar( env, "float", "scaledCursorY", FALSE );
1740− if( HidMsg_offset_scaledcursory == CK_INVALID_OFFSET ) goto error;
1741−
1742− // add member variable
1743− HidMsg_offset_x = type_engine_import_mvar( env, "int", "x", FALSE );
1744− if( HidMsg_offset_x == CK_INVALID_OFFSET ) goto error;
1745−
1746− // add member variable
1747− HidMsg_offset_y = type_engine_import_mvar( env, "int", "y", FALSE );
1748− if( HidMsg_offset_y == CK_INVALID_OFFSET ) goto error;
1749−
1750− // add member variable
1751− HidMsg_offset_z = type_engine_import_mvar( env, "int", "z", FALSE );
1752− if( HidMsg_offset_z == CK_INVALID_OFFSET ) goto error;
1753−
1754− // add member variable (added 1.3.0.0)
1755− HidMsg_offset_touchx = type_engine_import_mvar( env, "float", "touchX", FALSE );
1756− if( HidMsg_offset_touchx == CK_INVALID_OFFSET ) goto error;
1757−
1758− // add member variable (added 1.3.0.0)
1759− HidMsg_offset_touchy = type_engine_import_mvar( env, "float", "touchY", FALSE );
1760− if( HidMsg_offset_touchy == CK_INVALID_OFFSET ) goto error;
1761−
1762− // add member variable (added 1.3.0.0)
1763− HidMsg_offset_touchsize = type_engine_import_mvar( env, "float", "touchSize", FALSE );
1764− if( HidMsg_offset_touchsize == CK_INVALID_OFFSET ) goto error;
1765−
1766− // add member variable
1767− HidMsg_offset_axis_position = type_engine_import_mvar( env, "int", "axis_position", FALSE );
1768− if( HidMsg_offset_axis_position == CK_INVALID_OFFSET ) goto error;
1769−
1770− // add member variable
1771− HidMsg_offset_axis_position2 = type_engine_import_mvar( env, "float", "axisPosition", FALSE );
1772− if( HidMsg_offset_axis_position2 == CK_INVALID_OFFSET ) goto error;
1773−
1774− // add member variable
1775− HidMsg_offset_hat_position = type_engine_import_mvar( env, "int", "hatPosition", FALSE );
1776− if( HidMsg_offset_hat_position == CK_INVALID_OFFSET ) goto error;
1777−
1778− // add member variable
1779− HidMsg_offset_ascii = type_engine_import_mvar( env, "int", "ascii", FALSE );
1780− if( HidMsg_offset_ascii == CK_INVALID_OFFSET ) goto error;
1781−
1782− // add member variable
1783− HidMsg_offset_key = type_engine_import_mvar( env, "int", "key", FALSE );
1784− if( HidMsg_offset_key == CK_INVALID_OFFSET ) goto error;
1785−
1786− // add member variable
1787− HidMsg_offset_scaled_axis_position = type_engine_import_mvar( env, "float", "scaled_axis_position", FALSE );
1788− if( HidMsg_offset_scaled_axis_position == CK_INVALID_OFFSET ) goto error;
1789−
1790− // add is_axis_motion()
1791− func = make_new_mfun( "int", "is_axis_motion", HidMsg_is_axis_motion ); // deprecated
1792− if( !type_engine_import_mfun( env, func ) ) goto error;
1793−
1794− // add isAxisMotion()
1795− func = make_new_mfun( "int", "isAxisMotion", HidMsg_is_axis_motion );
1796− if( !type_engine_import_mfun( env, func ) ) goto error;
1797−
1798− // add is_button_down()
1799− func = make_new_mfun( "int", "is_button_down", HidMsg_is_button_down ); // deprecated
1800− if( !type_engine_import_mfun( env, func ) ) goto error;
1801−
1802− // add isButtonDown()
1803− func = make_new_mfun( "int", "isButtonDown", HidMsg_is_button_down );
1804− if( !type_engine_import_mfun( env, func ) ) goto error;
1805−
1806− // add is_button_up()
1807− func = make_new_mfun( "int", "is_button_up", HidMsg_is_button_up ); // deprecated
1808− if( !type_engine_import_mfun( env, func ) ) goto error;
1809−
1810− // add isButtonUp()
1811− func = make_new_mfun( "int", "isButtonUp", HidMsg_is_button_up );
1812− if( !type_engine_import_mfun( env, func ) ) goto error;
1813−
1814− // add is_mouse_motion()
1815− func = make_new_mfun( "int", "is_mouse_motion", HidMsg_is_mouse_motion ); // deprecated
1816− if( !type_engine_import_mfun( env, func ) ) goto error;
1817−
1818− // add isMouseMotion()
1819− func = make_new_mfun( "int", "isMouseMotion", HidMsg_is_mouse_motion );
1820− if( !type_engine_import_mfun( env, func ) ) goto error;
1821−
1822− // add is_hat_motion()
1823− func = make_new_mfun( "int", "is_hat_motion", HidMsg_is_hat_motion ); // deprecated
1824− if( !type_engine_import_mfun( env, func ) ) goto error;
1825−
1826− // add isHatMotion()
1827− func = make_new_mfun( "int", "isHatMotion", HidMsg_is_hat_motion );
1828− if( !type_engine_import_mfun( env, func ) ) goto error;
1829−
1830− // add isWheelMotion()
1831− func = make_new_mfun( "int", "isWheelMotion", HidMsg_is_wheel_motion );
1832− if( !type_engine_import_mfun( env, func ) ) goto error;
1833−
1834− // end the class import
1835− type_engine_import_class_end( env );
1836−
1837−
1838− // register deprecate
1839− type_engine_register_deprecate( env, "HidIn", "Hid" );
1840−
1841− // init base class Hid (copy of HidIn + constants)
1842− if( !type_engine_import_class_begin( env, "Hid", "Event",
1843− env->global(), HidIn_ctor, HidIn_dtor ) )
1844− return FALSE;
1845−
1846− // add open()
1847− func = make_new_mfun( "int", "open", HidIn_open );
1848− func->add_arg( "int", "type" );
1849− func->add_arg( "int", "num" );
1850− if( !type_engine_import_mfun( env, func ) ) goto error;
1851−
1852− // add open()
1853− func = make_new_mfun( "int", "open", HidIn_open_named );
1854− func->add_arg( "string", "name" );
1855− if( !type_engine_import_mfun( env, func ) ) goto error;
1856−
1857− // add openJoystick()
1858− func = make_new_mfun( "int", "openJoystick", HidIn_open_joystick );
1859− func->add_arg( "int", "num" );
1860− if( !type_engine_import_mfun( env, func ) ) goto error;
1861−
1862− // add openMouse()
1863− func = make_new_mfun( "int", "openMouse", HidIn_open_mouse );
1864− func->add_arg( "int", "num" );
1865− if( !type_engine_import_mfun( env, func ) ) goto error;
1866−
1867− // add openKeyboard()
1868− func = make_new_mfun( "int", "openKeyboard", HidIn_open_keyboard );
1869− func->add_arg( "int", "num" );
1870− if( !type_engine_import_mfun( env, func ) ) goto error;
1871−
1872− // add openTiltSensor()
1873− func = make_new_mfun( "int", "openTiltSensor", HidIn_open_tiltsensor );
1874− if( !type_engine_import_mfun( env, func ) ) goto error;
1875−
1876− // add good()
1877− func = make_new_mfun( "int", "good", HidIn_good );
1878− if( !type_engine_import_mfun( env, func ) ) goto error;
1879−
1880− // add num()
1881− func = make_new_mfun( "int", "num", HidIn_num );
1882− if( !type_engine_import_mfun( env, func ) ) goto error;
1883−
1884− // add name()
1885− func = make_new_mfun( "string", "name", HidIn_name );
1886− if( !type_engine_import_mfun( env, func ) ) goto error;
1887−
1888− // add printerr()
1889− func = make_new_mfun( "void", "printerr", HidIn_printerr );
1890− func->add_arg( "int", "print_or_not" );
1891− if( !type_engine_import_mfun( env, func ) ) goto error;
1892−
1893− // add recv()
1894− func = make_new_mfun( "int", "recv", HidIn_recv );
1895− func->add_arg( "HidMsg", "msg" );
1896− if( !type_engine_import_mfun( env, func ) ) goto error;
1897−
1898− // add read()
1899− func = make_new_mfun( "int", "read", HidIn_read );
1900− func->add_arg( "int", "type" );
1901− func->add_arg( "int", "which" );
1902− func->add_arg( "HidMsg", "msg" );
1903− if( !type_engine_import_mfun( env, func ) ) goto error;
1904−
1905− // add send()
1906− func = make_new_mfun( "int", "send", HidIn_send );
1907− func->add_arg( "HidMsg", "msg" );
1908− if( !type_engine_import_mfun( env, func ) ) goto error;
1909−
1910− // add can_wait()
1911− func = make_new_mfun( "int", "can_wait", HidIn_can_wait );
1912− if( !type_engine_import_mfun( env, func ) ) goto error;
1913−
1914− // add readTiltSensor()
1915− func = make_new_sfun( "int[]", "readTiltSensor", HidIn_read_tilt_sensor );
1916− if( !type_engine_import_sfun( env, func ) ) goto error;
1917−
1918− // add globalTiltPollRate()
1919− func = make_new_sfun( "dur", "globalTiltPollRate", HidIn_ctrl_tiltPollRate );
1920− func->add_arg( "dur", "d" );
1921− if( !type_engine_import_sfun( env, func ) ) goto error;
1922−
1923− // add globalTiltPollRate()
1924− func = make_new_sfun( "dur", "globalTiltPollRate", HidIn_cget_tiltPollRate );
1925− if( !type_engine_import_sfun( env, func ) ) goto error;
1926−
1927− // add startCursorTrack()
1928− func = make_new_sfun( "int", "startCursorTrack", HidIn_start_cursor_track );
1929− if( !type_engine_import_sfun( env, func ) ) goto error;
1930−
1931− // add stopCursorTrack()
1932− func = make_new_sfun( "int", "stopCursorTrack", HidIn_stop_cursor_track );
1933− if( !type_engine_import_sfun( env, func ) ) goto error;
1934−
1935− // add member variable
1936− HidIn_offset_data = type_engine_import_mvar( env, "int", "@Hid_data", FALSE );
1937− if( HidIn_offset_data == CK_INVALID_OFFSET ) goto error;
1938−
1939− // add static member variable joystick
1940− if( type_engine_import_svar( env, "int", "JOYSTICK", TRUE,
1941− ( t_CKUINT ) &CK_HID_DEV_JOYSTICK ) == FALSE )
1942− goto error;
1943−
1944− // add static member variable keyboard
1945− if( type_engine_import_svar( env, "int", "KEYBOARD", TRUE,
1946− ( t_CKUINT ) &CK_HID_DEV_KEYBOARD ) == FALSE )
1947− goto error;
1948−
1949− // add static member variable mouse
1950− if( type_engine_import_svar( env, "int", "MOUSE", TRUE,
1951− ( t_CKUINT ) &CK_HID_DEV_MOUSE ) == FALSE )
1952− goto error;
1953−
1954− // add static member variable wii_remote
1955− if( type_engine_import_svar( env, "int", "WII_REMOTE", TRUE,
1956− ( t_CKUINT ) &CK_HID_DEV_WIIREMOTE ) == FALSE )
1957− goto error;
1958−
1959− // add static member variable wii_remote
1960− if( type_engine_import_svar( env, "int", "TILT_SENSOR", TRUE,
1961− ( t_CKUINT ) &CK_HID_DEV_TILTSENSOR ) == FALSE )
1962− goto error;
1963−
1964− // add static member variable tablet
1965− if( type_engine_import_svar( env, "int", "TABLET", TRUE,
1966− ( t_CKUINT ) &CK_HID_DEV_TABLET ) == FALSE )
1967− goto error;
1968−
1969− // add static member variable axisMotion
1970− if( type_engine_import_svar( env, "int", "AXIS_MOTION", TRUE,
1971− ( t_CKUINT ) &CK_HID_JOYSTICK_AXIS ) == FALSE )
1972− goto error;
1973−
1974− // add static member variable buttonDown
1975− if( type_engine_import_svar( env, "int", "BUTTON_DOWN", TRUE,
1976− ( t_CKUINT ) &CK_HID_BUTTON_DOWN ) == FALSE )
1977− goto error;
1978−
1979− // add static member variable buttonUp
1980− if( type_engine_import_svar( env, "int", "BUTTON_UP", TRUE,
1981− ( t_CKUINT ) &CK_HID_BUTTON_UP ) == FALSE )
1982− goto error;
1983−
1984− // add static member variable joystickHat
1985− if( type_engine_import_svar( env, "int", "JOYSTICK_HAT", TRUE,
1986− ( t_CKUINT ) &CK_HID_JOYSTICK_HAT ) == FALSE )
1987− goto error;
1988−
1989− // add static member variable JOYSTICK_BALL
1990− if( type_engine_import_svar( env, "int", "JOYSTICK_BALL", TRUE,
1991− ( t_CKUINT ) &CK_HID_JOYSTICK_BALL ) == FALSE )
1992− goto error;
1993−
1994− // add static member variable mouseMotion
1995− if( type_engine_import_svar( env, "int", "MOUSE_MOTION", TRUE,
1996− ( t_CKUINT ) &CK_HID_MOUSE_MOTION ) == FALSE )
1997− goto error;
1998−
1999− // add static member variable mouseWheel
2000− if( type_engine_import_svar( env, "int", "MOUSE_WHEEL", TRUE,
2001− ( t_CKUINT ) &CK_HID_MOUSE_WHEEL ) == FALSE )
2002− goto error;
2003−
2004− // add static member variable DEVICE_CONNECTED
2005− if( type_engine_import_svar( env, "int", "DEVICE_CONNECTED", TRUE,
2006− ( t_CKUINT ) &CK_HID_DEVICE_CONNECTED ) == FALSE )
2007− goto error;
2008−
2009− // add static member variable DEVICE_DISCONNECTED
2010− if( type_engine_import_svar( env, "int", "DEVICE_DISCONNECTED", TRUE,
2011− ( t_CKUINT ) &CK_HID_DEVICE_DISCONNECTED ) == FALSE )
2012− goto error;
2013−
2014− // add static member variable ACCELEROMETER
2015− if( type_engine_import_svar( env, "int", "ACCELEROMETER", TRUE,
2016− ( t_CKUINT ) &CK_HID_ACCELEROMETER ) == FALSE )
2017− goto error;
2018−
2019− // add static member variable LED
2020− if( type_engine_import_svar( env, "int", "LED", TRUE,
2021− ( t_CKUINT ) &CK_HID_LED ) == FALSE )
2022− goto error;
2023−
2024− // add static member variable LED
2025− if( type_engine_import_svar( env, "int", "FORCE_FEEDBACK", TRUE,
2026− ( t_CKUINT ) &CK_HID_FORCE_FEEDBACK ) == FALSE )
2027− goto error;
2028−
2029− // end the class import
2030− type_engine_import_class_end( env );
2031−
2032− /*
2033− // init base class
2034− if( !type_engine_import_class_begin( env, "HidOut", "Object",
2035− env->global(), HidOut_ctor ) )
2036− return FALSE;
2037−
2038− // add open()
2039− func = make_new_mfun( "int", "open", HidOut_open );
2040− func->add_arg( "int", "port" );
2041− if( !type_engine_import_mfun( env, func ) ) goto error;
2042−
2043− // add good()
2044− func = make_new_mfun( "int", "good", HidOut_good );
2045− if( !type_engine_import_mfun( env, func ) ) goto error;
2046−
2047− // add num()
2048− func = make_new_mfun( "int", "num", HidOut_num );
2049− if( !type_engine_import_mfun( env, func ) ) goto error;
2050−
2051− // add name()
2052− func = make_new_mfun( "string", "name", HidOut_name );
2053− if( !type_engine_import_mfun( env, func ) ) goto error;
2054−
2055− // add printerr()
2056− func = make_new_mfun( "void", "printerr", HidOut_printerr );
2057− func->add_arg( "int", "print_or_not" );
2058− if( !type_engine_import_mfun( env, func ) ) goto error;
2059−
2060− // add send()
2061− func = make_new_mfun( "int", "send", HidOut_send );
2062− func->add_arg( "HidMsg", "msg" );
2063− if( !type_engine_import_mfun( env, func ) ) goto error;
2064−
2065− // add member variable
2066− HidOut_offset_data = type_engine_import_mvar( env, "int", "@HidOut_data", FALSE );
2067− if( HidOut_offset_data == CK_INVALID_OFFSET ) goto error;
2068−
2069− // end the class import
2070− type_engine_import_class_end( env );
2071− */
2072− return TRUE;
2073−
2074−error:
2075−
2076− // end the class import
2077− type_engine_import_class_end( env );
2078−
2079− return FALSE;
2080−}
2081−#endif
2082−
2083−
2084−
2085−
2086−// static
2087−static t_CKUINT MidiRW_offset_data = 0;
2088−static t_CKUINT MidiMsgOut_offset_data = 0;
2089−static t_CKUINT MidiMsgIn_offset_data = 0;
2090−//-----------------------------------------------------------------------------
2091−// name: init_class_MidiRW()
2092−// desc: ...
2093−//-----------------------------------------------------------------------------
2094−t_CKBOOL init_class_MidiRW( Chuck_Env * env )
2095−{
2096− Chuck_DL_Func * func = NULL;
2097−
2098−#ifndef __DISABLE_MIDI__
2099−
2100− // init base class
2101− if( !type_engine_import_class_begin( env, "MidiRW", "Object",
2102− env->global(), MidiRW_ctor, MidiRW_dtor ) )
2103− return FALSE;
2104−
2105− // add open()
2106− func = make_new_mfun( "int", "open", MidiRW_open );
2107− func->add_arg( "string", "filename" );
2108− if( !type_engine_import_mfun( env, func ) ) goto error;
2109−
2110− // add close()
2111− func = make_new_mfun( "int", "close", MidiRW_close );
2112− if( !type_engine_import_mfun( env, func ) ) goto error;
2113−
2114− // add write()
2115− func = make_new_mfun( "int", "write", MidiRW_write );
2116− func->add_arg( "MidiMsg", "msg" );
2117− func->add_arg( "time", "t" );
2118− if( !type_engine_import_mfun( env, func ) ) goto error;
2119−
2120− // add read()
2121− func = make_new_mfun( "int", "read", MidiRW_read );
2122− func->add_arg( "MidiMsg", "msg" );
2123− //func->add_arg( "time", "t" );
2124− if( !type_engine_import_mfun( env, func ) ) goto error;
2125−
2126− // add member variable
2127− MidiRW_offset_data = type_engine_import_mvar( env, "int", "@MidiRW_data", FALSE );
2128− if( MidiRW_offset_data == CK_INVALID_OFFSET ) goto error;
2129−
2130− // end the class import
2131− type_engine_import_class_end( env );
2132−
2133− // init base class
2134− if( !type_engine_import_class_begin( env, "MidiMsgOut", "Object",
2135− env->global(), MidiMsgOut_ctor, MidiMsgOut_dtor ) )
2136− return FALSE;
2137−
2138− // add open()
2139− func = make_new_mfun( "int", "open", MidiMsgOut_open );
2140− func->add_arg( "string", "filename" );
2141− if( !type_engine_import_mfun( env, func ) ) goto error;
2142−
2143− // add close()
2144− func = make_new_mfun( "int", "close", MidiMsgOut_close );
2145− if( !type_engine_import_mfun( env, func ) ) goto error;
2146−
2147− // add write()
2148− func = make_new_mfun( "int", "write", MidiMsgOut_write );
2149− func->add_arg( "MidiMsg", "msg" );
2150− func->add_arg( "time", "t" );
2151− if( !type_engine_import_mfun( env, func ) ) goto error;
2152−
2153− // add member variable
2154− MidiMsgOut_offset_data = type_engine_import_mvar( env, "int", "@MidiMsgOut_data", FALSE );
2155− if( MidiMsgOut_offset_data == CK_INVALID_OFFSET ) goto error;
2156−
2157− // end the class import
2158− type_engine_import_class_end( env );
2159−
2160− // init base class
2161− if( !type_engine_import_class_begin( env, "MidiMsgIn", "Object",
2162− env->global(), MidiMsgIn_ctor, MidiMsgIn_dtor ) )
2163− return FALSE;
2164−
2165− // add open()
2166− func = make_new_mfun( "int", "open", MidiMsgIn_open );
2167− func->add_arg( "string", "filename" );
2168− if( !type_engine_import_mfun( env, func ) ) goto error;
2169−
2170− // add close()
2171− func = make_new_mfun( "int", "close", MidiMsgIn_close );
2172− if( !type_engine_import_mfun( env, func ) ) goto error;
2173−
2174− // add read()
2175− func = make_new_mfun( "int", "read", MidiMsgIn_read );
2176− func->add_arg( "MidiMsg", "msg" );
2177− //func->add_arg( "time", "t" );
2178− if( !type_engine_import_mfun( env, func ) ) goto error;
2179−
2180− // add member variable
2181− MidiMsgIn_offset_data = type_engine_import_mvar( env, "int", "@MidiMsgIn_data", FALSE );
2182− if( MidiMsgIn_offset_data == CK_INVALID_OFFSET ) goto error;
2183−
2184− // end the class import
2185− type_engine_import_class_end( env );
2186−
2187−#endif // __DISABLE_MIDI__
2188−
2189− // initialize
2190− // HidInManager::init();
2191−
2192− return TRUE;
2193−
2194−error:
2195−
2196− // end the class import
2197− type_engine_import_class_end( env );
2198−
2199− return FALSE;
2200−}
2201−
2202−
2203−
2204−
2205−
2206−
2207−// Object ctor
2208−CK_DLL_CTOR( object_ctor )
2209−{
2210− // log
2211− // EM_log( CK_LOG_FINEST, "Object constructor..." );
2212−
2213− // initialize
2214− OBJ_MEMBER_UINT(SELF, Object_offset_string) = 0;
2215−}
2216−
2217−
2218−// Object dtor
2219−CK_DLL_DTOR( object_dtor )
2220−{
2221− // log
2222− // EM_log( CK_LOG_FINEST, "Object destructor..." );
2223−
2224− // get the string
2225− Chuck_String * str = (Chuck_String *)OBJ_MEMBER_UINT(SELF, Object_offset_string);
2226− // release
2227− SAFE_RELEASE( str );
2228−}
2229−
2230−
2231−// toString
2232−CK_DLL_MFUN( object_toString )
2233−{
2234− // get the string
2235− Chuck_String * str = (Chuck_String *)OBJ_MEMBER_UINT(SELF, Object_offset_string);
2236− // allocate
2237− if( !str )
2238− {
2239− // new it
2240− str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
2241− // check it
2242− if( !str )
2243− {
2244− // TODO: make this exception
2245− CK_FPRINTF_STDERR( "[chuck]: Object.toString() out of memory!\n" );
2246− RETURN->v_object = NULL;
2247− return;
2248− }
2249− // set it
2250− ostringstream strout( ostringstream::out );
2251− // get the type
2252− Chuck_Type * type = SELF->type_ref;
2253− // write
2254− strout.setf( ios::hex, ios::basefield );
2255− strout << ((type != NULL) ? type->c_name() : "[VOID]") << ":" << (t_CKUINT)SELF;
2256− strout.flush();
2257−
2258− // done
2259− str->set( strout.str() );
2260− }
2261−
2262− // set return
2263− RETURN->v_object = str;
2264−}
2265−
2266−
2267−// ctor
2268−CK_DLL_CTOR( ugen_ctor )
2269−{
2270−}
2271−
2272−CK_DLL_DTOR( ugen_dtor )
2273−{
2274− // get as ugen
2275− // Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2276−}
2277−
2278−CK_DLL_MFUN( ugen_op )
2279−{
2280− // get as ugen
2281− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2282− // get arg
2283− t_CKINT op = GET_CK_INT( ARGS );
2284− // set op
2285− ugen->m_op = op;
2286− // set return
2287− RETURN->v_int = ugen->m_op;
2288−
2289− // for multiple channels
2290− Chuck_DL_Return ret;
2291− // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
2292− for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
2293− ugen_op( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
2294− // added 1.3.0.2 -- apply op to subgraph outlet
2295− if( ugen->inlet() )
2296− ugen->inlet()->m_op = op;
2297− if( ugen->outlet() )
2298− ugen->outlet()->m_op = op;
2299−}
2300−
2301−CK_DLL_MFUN( ugen_cget_op )
2302−{
2303− // get as ugen
2304− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2305− // set return
2306− RETURN->v_int = ugen->m_op;
2307−}
2308−
2309−CK_DLL_MFUN( ugen_last )
2310−{
2311− // get as ugen
2312− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2313− // set return
2314− // added 1.3.0.2 -- ugen outlet() last if subgraph
2315− if( ugen->outlet() )
2316− RETURN->v_float = (t_CKFLOAT) ugen->outlet()->m_last;
2317− else
2318− RETURN->v_float = (t_CKFLOAT)ugen->m_last;
2319−}
2320−
2321−CK_DLL_MFUN( ugen_next )
2322−{
2323− // get as ugen
2324− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2325− // get arg
2326− t_CKFLOAT next = GET_CK_FLOAT( ARGS );
2327− // set op
2328− ugen->m_next = (SAMPLE)next;
2329− ugen->m_use_next = TRUE;
2330− // set return
2331− RETURN->v_float = (t_CKFLOAT)ugen->m_next;
2332−
2333− // for multiple channels
2334− Chuck_DL_Return ret;
2335− // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
2336− for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
2337− ugen_next( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
2338− // added 1.3.0.2 -- apply op to subgraph outlet
2339− if( ugen->outlet() )
2340− {
2341− ugen->outlet()->m_next = (SAMPLE) next;
2342− ugen->outlet()->m_use_next = TRUE;
2343− }
2344−}
2345−
2346−CK_DLL_MFUN( ugen_cget_next )
2347−{
2348− // get as ugen
2349− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2350− // set return
2351− RETURN->v_float = ugen->m_use_next ? (t_CKFLOAT)ugen->m_next : 0.0f;
2352−}
2353−
2354−CK_DLL_MFUN( ugen_gain )
2355−{
2356− // get as ugen
2357− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2358− // get arg
2359− t_CKFLOAT gain = GET_CK_FLOAT( ARGS );
2360− // set op
2361− ugen->m_gain = (SAMPLE)gain;
2362− // set return
2363− RETURN->v_float = (t_CKFLOAT)ugen->m_gain;
2364−
2365− // for multiple channels
2366− Chuck_DL_Return ret;
2367− // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
2368− for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
2369− ugen_gain( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
2370− // added 1.3.0.2 -- apply gain to subgraph outlet
2371− if( ugen->outlet() )
2372− ugen->outlet()->m_gain = (SAMPLE) gain;
2373−}
2374−
2375−CK_DLL_MFUN( ugen_cget_gain )
2376−{
2377− // get as ugen
2378− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2379− // set return
2380− RETURN->v_float = (t_CKFLOAT)ugen->m_gain;
2381−}
2382−
2383−CK_DLL_CTRL( ugen_numChannels )
2384−{
2385− // get ugen
2386− //Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2387− // error
2388− EM_error3( "setting .numChannels is not yet supported (use the command line)..." );
2389−}
2390−
2391−CK_DLL_CGET( ugen_cget_numChannels )
2392−{
2393− // get ugen
2394− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2395− // return
2396− RETURN->v_int = ugen->m_multi_chan_size == 0 ? 1 : ugen->m_multi_chan_size;
2397−}
2398−
2399−CK_DLL_CTRL( ugen_chan )
2400−{
2401− // get ugen
2402− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2403− t_CKINT num = GET_NEXT_INT(ARGS);
2404− // check
2405− if( !ugen->m_multi_chan_size && num == 0 )
2406− RETURN->v_object = ugen;
2407− else if( num >= 0 && num < ugen->m_multi_chan_size )
2408− RETURN->v_object = ugen->m_multi_chan[num];
2409− else
2410− RETURN->v_object = NULL;
2411−}
2412−
2413−CK_DLL_CTRL( ugen_connected )
2414−{
2415− // get ugen
2416− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2417− Chuck_UGen * right = (Chuck_UGen *)GET_NEXT_OBJECT(ARGS);
2418−
2419− // sanity
2420− t_CKINT ret = FALSE;
2421− if( !right )
2422− {
2423− ret = FALSE;
2424− }
2425− else
2426− {
2427− ret = right->is_connected_from( ugen );
2428− }
2429−
2430− RETURN->v_int = ret;
2431−}
2432−
2433−CK_DLL_MFUN( ugen_buffered )
2434−{
2435− // get as ugen
2436− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2437− // get arg
2438− t_CKINT buffered = GET_CK_INT( ARGS );
2439− // set op
2440− ugen->set_is_buffered( buffered );
2441− // set return
2442− RETURN->v_int = ugen->m_is_buffered;
2443−
2444− // for multiple channels
2445− Chuck_DL_Return ret;
2446− for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
2447− ugen_buffered( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
2448− // added 1.3.0.2 -- apply op to subgraph outlet
2449− if( ugen->inlet() )
2450− ugen->inlet()->m_is_buffered = buffered;
2451− if( ugen->outlet() )
2452− ugen->outlet()->m_is_buffered = buffered;
2453−}
2454−
2455−CK_DLL_MFUN( ugen_cget_buffered )
2456−{
2457− // get as ugen
2458− Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2459− // set return
2460− RETURN->v_int = ugen->m_is_buffered;
2461−}
2462−
2463−
2464−// ctor
2465−CK_DLL_CTOR( uana_ctor )
2466−{
2467− // make an actual blob
2468− Chuck_Object * blob = instantiate_and_initialize_object( SHRED->vm_ref->env()->t_uanablob, SHRED );
2469− // TODO: check out of memory
2470− assert( blob != NULL );
2471− // make a blob proxy
2472− Chuck_UAnaBlobProxy * proxy = new Chuck_UAnaBlobProxy( blob );
2473− // remember it
2474− OBJ_MEMBER_INT(SELF, uana_offset_blob) = (t_CKINT)proxy;
2475− // HACK: DANGER: manually call blob's ctor (added 1.3.0.0 -- Chuck_DL_Api::Api::instance())
2476− uanablob_ctor( blob, NULL, VM, SHRED, API );
2477−}
2478−
2479−CK_DLL_DTOR( uana_dtor )
2480−{
2481− // TODO: GC should release the blob!
2482−}
2483−
2484−CK_DLL_MFUN( uana_upchuck )
2485−{
2486− // get as uana
2487− Chuck_UAna * uana = (Chuck_UAna *)SELF;
2488− // get shred
2489− Chuck_VM_Shred * derhs = SHRED;
2490− // make sure it's not NULL
2491− if( !derhs )
2492− {
2493− EM_error3( "UAna.upchuck() encountered NULL shred; operation aborting!" );
2494− return;
2495− }
2496−
2497− // get VM
2498− Chuck_VM * vm = derhs->vm_ref;
2499− // ensure
2500− if( !vm )
2501− {
2502− EM_error3( "UAna.upchuck() encountered NULL VM ref; operation aborting!" );
2503− return;
2504− }
2505−
2506− // check if time
2507− if( uana->m_uana_time < vm->shreduler()->now_system )
2508− {
2509− // for multiple channels
2510− Chuck_DL_Return ret;
2511− // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
2512− for( t_CKUINT i = 0; i < uana->m_multi_chan_size; i++ )
2513− uana_upchuck( uana->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
2514−
2515− // tock it (TODO: order relative to multiple channels?)
2516− uana->system_tock( vm->shreduler()->now_system );
2517− }
2518−
2519− // return
2520− RETURN->v_object = uana->blobProxy()->realblob();
2521−}
2522−
2523−/* CK_DLL_MFUN( uana_blob )
2524−{
2525− // get as uana
2526− Chuck_UAna * uana = (Chuck_UAna *)SELF;
2527−
2528− // TODO: return
2529− RETURN->v_object = NULL;
2530−} */
2531−
2532−CK_DLL_MFUN( uana_fvals )
2533−{
2534− // get the fvals array
2535− Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
2536− RETURN->v_object = &blob->fvals();
2537−}
2538−
2539−CK_DLL_MFUN( uana_cvals )
2540−{
2541− // get the fvals array
2542− Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
2543− RETURN->v_object = &blob->cvals();
2544−}
2545−
2546−CK_DLL_MFUN( uana_fval )
2547−{
2548− // get index
2549− t_CKINT i = GET_NEXT_INT(ARGS);
2550− // get the fvals array
2551− Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
2552− Chuck_Array8 & fvals = blob->fvals();
2553− // check caps
2554− if( i < 0 || fvals.size() <= i ) RETURN->v_float = 0;
2555− else
2556− {
2557− // get
2558− t_CKFLOAT val;
2559− fvals.get( i, &val );
2560− RETURN->v_float = val;
2561− }
2562−}
2563−
2564−CK_DLL_MFUN( uana_cval )
2565−{
2566− // get index
2567− t_CKINT i = GET_NEXT_INT(ARGS);
2568− // get the fvals array
2569− Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
2570− Chuck_Array16 & cvals = blob->cvals();
2571− // check caps
2572− if( i < 0 || cvals.size() <= i ) RETURN->v_complex.re = RETURN->v_complex.im = 0;
2573− else
2574− {
2575− // get
2576− t_CKCOMPLEX val;
2577− cvals.get( i, &val );
2578− RETURN->v_complex = val;
2579− }
2580−}
2581−
2582−CK_DLL_MFUN( uana_connected )
2583−{
2584− // get ugen
2585− Chuck_UAna * uana = (Chuck_UAna *)SELF;
2586− Chuck_UAna * right = (Chuck_UAna *)GET_NEXT_OBJECT(ARGS);
2587−
2588− // sanity
2589− t_CKINT ret = FALSE;
2590− if( !right )
2591− {
2592− ret = FALSE;
2593− }
2594− else
2595− {
2596− ret = right->is_up_connected_from( uana );
2597− }
2598−
2599− RETURN->v_int = ret;
2600−}
2601−
2602−
2603−// blob proxy implementation
2604−Chuck_UAnaBlobProxy::Chuck_UAnaBlobProxy( Chuck_Object * blob )
2605−{
2606− m_blob = blob;
2607− assert( m_blob != NULL );
2608− // add reference
2609− m_blob->add_ref();
2610−}
2611−
2612−Chuck_UAnaBlobProxy::~Chuck_UAnaBlobProxy()
2613−{
2614− // release
2615− SAFE_RELEASE( m_blob );
2616−}
2617−
2618−t_CKTIME & Chuck_UAnaBlobProxy::when()
2619−{
2620− // TODO: DANGER: is this actually returning correct reference?!
2621− return OBJ_MEMBER_TIME(m_blob, uanablob_offset_when);
2622−}
2623−
2624−Chuck_Array8 & Chuck_UAnaBlobProxy::fvals()
2625−{
2626− // TODO: DANGER: is this actually returning correct reference?!
2627− Chuck_Array8 * arr8 = (Chuck_Array8 *)OBJ_MEMBER_INT(m_blob, uanablob_offset_fvals);
2628− assert( arr8 != NULL );
2629− return *arr8;
2630−}
2631−
2632−Chuck_Array16 & Chuck_UAnaBlobProxy::cvals()
2633−{
2634− // TODO: DANGER: is this actually returning correct reference?!
2635− Chuck_Array16 * arr16 = (Chuck_Array16 *)OBJ_MEMBER_INT(m_blob, uanablob_offset_cvals);
2636− assert( arr16 != NULL );
2637− return *arr16;
2638−}
2639−
2640−// get proxy
2641−Chuck_UAnaBlobProxy * getBlobProxy( const Chuck_UAna * uana )
2642−{
2643− return (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(uana, uana_offset_blob);
2644−}
2645−
2646−// ctor
2647−CK_DLL_CTOR( uanablob_ctor )
2648−{
2649− // when
2650− OBJ_MEMBER_TIME(SELF, uanablob_offset_when) = 0;
2651− // fvals
2652− Chuck_Array8 * arr8 = new Chuck_Array8( 8 );
2653− initialize_object( arr8, SHRED->vm_ref->env()->t_array );
2654− // TODO: check out of memory
2655− arr8->add_ref();
2656− OBJ_MEMBER_INT(SELF, uanablob_offset_fvals) = (t_CKINT)arr8;
2657− // cvals
2658− Chuck_Array16 * arr16 = new Chuck_Array16( 8 );
2659− initialize_object( arr16, SHRED->vm_ref->env()->t_array );
2660− // TODO: check out of memory
2661− arr16->add_ref();
2662− OBJ_MEMBER_INT(SELF, uanablob_offset_cvals) = (t_CKINT)arr16;
2663−}
2664−
2665−// dtor
2666−CK_DLL_DTOR( uanablob_dtor )
2667−{
2668− // get array
2669− Chuck_Array8 * arr8 = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
2670− // release it
2671− arr8->release();
2672− OBJ_MEMBER_INT(SELF, uanablob_offset_fvals) = 0;
2673−
2674− // get array
2675− Chuck_Array16 * arr16 = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
2676− // release it
2677− arr16->release();
2678− OBJ_MEMBER_INT(SELF, uanablob_offset_cvals) = 0;
2679−
2680− OBJ_MEMBER_TIME(SELF, uanablob_offset_when) = 0;
2681−}
2682−
2683−CK_DLL_MFUN( uanablob_when )
2684−{
2685− // set return
2686− RETURN->v_time = OBJ_MEMBER_TIME(SELF, uanablob_offset_when);
2687−}
2688−
2689−CK_DLL_MFUN( uanablob_fvals )
2690−{
2691− // set return
2692− RETURN->v_object = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
2693−}
2694−
2695−CK_DLL_MFUN( uanablob_fval )
2696−{
2697− // get index
2698− t_CKINT i = GET_NEXT_INT(ARGS);
2699− // get the fvals array
2700− Chuck_Array8 * fvals = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
2701− // check caps
2702− if( i < 0 || fvals->size() <= i ) RETURN->v_float = 0;
2703− else
2704− {
2705− // get
2706− t_CKFLOAT val;
2707− fvals->get( i, &val );
2708− RETURN->v_float = val;
2709− }
2710−}
2711−
2712−CK_DLL_MFUN( uanablob_cval )
2713−{
2714− // get index
2715− t_CKINT i = GET_NEXT_INT(ARGS);
2716− // get the fvals array
2717− Chuck_Array16 * cvals = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
2718− // check caps
2719− if( i < 0 || cvals->size() <= i ) RETURN->v_complex.re = RETURN->v_complex.im = 0;
2720− else
2721− {
2722− // get
2723− t_CKCOMPLEX val;
2724− cvals->get( i, &val );
2725− RETURN->v_complex = val;
2726− }
2727−}
2728−
2729−CK_DLL_MFUN( uanablob_cvals )
2730−{
2731− // set return
2732− RETURN->v_object = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
2733−}
2734−
2735−// ctor
2736−CK_DLL_CTOR( event_ctor )
2737−{
2738−// OBJ_MEMBER_INT(SELF, event_offset_data) = (t_CKUINT)new Data_Event;
2739−// Chuck_Event * event = (Chuck_Event *)SELF;
2740−}
2741−
2742−
2743−CK_DLL_DTOR( event_dtor )
2744−{
2745−// delete (Data_Event *)OBJ_MEMBER_INT(SELF, event_offset_data);
2746−}
2747−
2748−CK_DLL_MFUN( event_signal )
2749−{
2750− Chuck_Event * d = (Chuck_Event *)SELF;
2751− d->signal();
2752− d->signal_global();
2753−}
2754−
2755−CK_DLL_MFUN( event_broadcast )
2756−{
2757− Chuck_Event * d = (Chuck_Event *)SELF;
2758− d->broadcast();
2759− d->broadcast_global();
2760−}
2761−
2762−CK_DLL_MFUN( event_wait )
2763−{
2764− // Chuck_Event * d = (Chuck_Event *)SELF;
2765− assert( FALSE );
2766−}
2767−
2768−CK_DLL_MFUN( event_can_wait )
2769−{
2770− RETURN->v_int = TRUE;
2771−}
2772−
2773−
2774−//-----------------------------------------------------------------------------
2775−// vec3 API
2776−//-----------------------------------------------------------------------------
2777−CK_DLL_MFUN( vec3_set )
2778−{
2779− // HACK: this is a particularly horrid cast from (Chuck_Object *)
2780− // t_CKVEC3 is neither a super- or sub-class of Chuck_Object...
2781− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2782− // get index
2783− vec3->x = GET_NEXT_FLOAT(ARGS);
2784− vec3->y = GET_NEXT_FLOAT(ARGS);
2785− vec3->z = GET_NEXT_FLOAT(ARGS);
2786−}
2787−
2788−CK_DLL_MFUN( vec3_setAll )
2789−{
2790− // get data pointer
2791− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2792− // get index
2793− vec3->x = vec3->y = vec3->z = GET_NEXT_FLOAT(ARGS);
2794−}
2795−
2796−CK_DLL_MFUN( vec3_magnitude )
2797−{
2798− // get data pointer
2799− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2800− // compute magnitude
2801− t_CKFLOAT mag = ::sqrt( vec3->x*vec3->x + vec3->y*vec3->y + vec3->z*vec3->z );
2802− // return
2803− RETURN->v_float = mag;
2804−}
2805−
2806−CK_DLL_MFUN( vec3_normalize )
2807−{
2808− // get data pointer
2809− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2810− // compute magnitude
2811− t_CKFLOAT mag = ::sqrt( vec3->x*vec3->x + vec3->y*vec3->y + vec3->z*vec3->z );
2812− // check for zero
2813− if( mag > 0 )
2814− {
2815− vec3->x /= mag;
2816− vec3->y /= mag;
2817− vec3->z /= mag;
2818− }
2819−}
2820−
2821−CK_DLL_MFUN( vec3_interp )
2822−{
2823− // get data pointer
2824− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2825− // update value based on goal and slew
2826− vec3->x = (vec3->y - vec3->x) * vec3->z + vec3->x;
2827− // set return to value so it can used right after if desired
2828− RETURN->v_float = vec3->x;
2829−}
2830−
2831−CK_DLL_MFUN( vec3_interp_delta_float )
2832−{
2833− // get data pointer
2834− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2835− // get index
2836− t_CKFLOAT delta = GET_NEXT_FLOAT(ARGS);
2837− // update value based on goal and slew
2838− vec3->x = (vec3->y - vec3->x) * vec3->z * delta + vec3->x;
2839− // set return to value so it can used right after if desired
2840− RETURN->v_float = vec3->x;
2841−}
2842−
2843−CK_DLL_MFUN( vec3_interp_delta_dur )
2844−{
2845− // get data pointer
2846− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2847− // get index
2848− t_CKDUR delta = GET_NEXT_DUR(ARGS);
2849− // get srate
2850− t_CKFLOAT srate = SHRED->vm_ref->srate();
2851− // update value based on goal and slew
2852− vec3->x = (vec3->y - vec3->x) * vec3->z * (delta / srate) + vec3->x;
2853− // set return to value so it can used right after if desired
2854− RETURN->v_float = vec3->x;
2855−}
2856−
2857−CK_DLL_MFUN( vec3_update_goal )
2858−{
2859− // get data pointer
2860− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2861− // get index
2862− t_CKDUR goal = GET_NEXT_DUR(ARGS);
2863− // set goal
2864− vec3->y = goal;
2865−}
2866−
2867−CK_DLL_MFUN( vec3_update_goal_slew )
2868−{
2869− // get data pointer
2870− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2871− // get goal
2872− t_CKDUR goal = GET_NEXT_DUR(ARGS);
2873− // get slew
2874− t_CKDUR slew = GET_NEXT_DUR(ARGS);
2875− // set goal
2876− vec3->y = goal;
2877− // set slew
2878− vec3->z = slew;
2879−}
2880−
2881−CK_DLL_MFUN( vec3_updateSet_goalAndValue )
2882−{
2883− // get data pointer
2884− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2885− // get goal
2886− t_CKDUR goalAndValue = GET_NEXT_DUR(ARGS);
2887− // set goal and value
2888− vec3->y = vec3->x = goalAndValue;
2889−}
2890−
2891−CK_DLL_MFUN( vec3_updateSet_goalAndValue_slew )
2892−{
2893− // get data pointer
2894− t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
2895− // get goal
2896− t_CKDUR goalAndValue = GET_NEXT_DUR(ARGS);
2897− // get slew
2898− t_CKDUR slew = GET_NEXT_DUR(ARGS);
2899− // set goal and value
2900− vec3->y = vec3->x = goalAndValue;
2901− // set slew
2902− vec3->z = slew;
2903−}
2904−
2905−
2906−//-----------------------------------------------------------------------------
2907−// vec4 API
2908−//-----------------------------------------------------------------------------
2909−CK_DLL_MFUN( vec4_set )
2910−{
2911− // HACK: this is a particularly horrid cast from (Chuck_Object *)
2912− // t_CKVEC3 is neither a super- or sub-class of Chuck_Object...
2913− t_CKVEC4 * vec3 = (t_CKVEC4 *)SELF;
2914− // get index
2915− vec3->x = GET_NEXT_FLOAT(ARGS);
2916− vec3->y = GET_NEXT_FLOAT(ARGS);
2917− vec3->z = GET_NEXT_FLOAT(ARGS);
2918− vec3->w = GET_NEXT_FLOAT(ARGS);
2919−}
2920−
2921−CK_DLL_MFUN( vec4_setAll )
2922−{
2923− // get data pointer
2924− t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
2925− // get index
2926− vec4->x = vec4->y = vec4->z = vec4->w = GET_NEXT_FLOAT(ARGS);
2927−}
2928−
2929−CK_DLL_MFUN( vec4_magnitude )
2930−{
2931− // get data pointer
2932− t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
2933− // compute magnitude
2934− t_CKFLOAT mag = ::sqrt( vec4->x*vec4->x + vec4->y*vec4->y
2935− + vec4->z*vec4->z + vec4->w*vec4->w );
2936− // return
2937− RETURN->v_float = mag;
2938−}
2939−
2940−CK_DLL_MFUN( vec4_normalize )
2941−{
2942− // get data pointer
2943− t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
2944− // compute magnitude
2945− t_CKFLOAT mag = ::sqrt( vec4->x*vec4->x + vec4->y*vec4->y
2946− + vec4->z*vec4->z + vec4->w*vec4->w );
2947− // check for zero
2948− if( mag > 0 )
2949− {
2950− vec4->x /= mag;
2951− vec4->y /= mag;
2952− vec4->z /= mag;
2953− vec4->w /= mag;
2954− }
2955−}
2956−
2957−
2958−//-----------------------------------------------------------------------------
2959−// IO API
2960−//-----------------------------------------------------------------------------
2961−CK_DLL_MFUN( io_dummy )
2962−{
2963− EM_error3( "(IO): internal error! inside an abstract function! help!" );
2964− EM_error3( " note: please hunt down someone (e.g., Ge) to fix this..." );
2965− assert( FALSE );
2966− RETURN->v_int = 0;
2967−}
2968−
2969−CK_DLL_SFUN( io_newline )
2970−{
2971− RETURN->v_string = g_newline;
2972−}
2973−
2974−
2975−
2976−
2977−#ifndef __DISABLE_FILEIO__
2978−//-----------------------------------------------------------------------------
2979−// FileIO API
2980−//-----------------------------------------------------------------------------
2981−CK_DLL_CTOR( fileio_ctor )
2982−{ }
2983−
2984−CK_DLL_DTOR( fileio_dtor )
2985−{ }
2986−
2987−CK_DLL_MFUN( fileio_open )
2988−{
2989− std::string filename = GET_NEXT_STRING(ARGS)->str();
2990− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
2991− t_CKINT default_flags =
2992− Chuck_IO_File::FLAG_READ_WRITE | Chuck_IO_File::TYPE_ASCII;
2993−
2994− RETURN->v_int = f->open(filename, default_flags);
2995−}
2996−
2997−CK_DLL_MFUN( fileio_openflags )
2998−{
2999− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3000− std::string filename = GET_NEXT_STRING(ARGS)->str();
3001− t_CKINT flags = GET_NEXT_INT(ARGS);
3002−
3003− RETURN->v_int = f->open(filename, flags);
3004−}
3005−
3006−CK_DLL_MFUN( fileio_close )
3007−{
3008− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3009− f->close();
3010−}
3011−
3012−CK_DLL_MFUN( fileio_good )
3013−{
3014− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3015− RETURN->v_int = f->good();
3016−}
3017−
3018−CK_DLL_MFUN( fileio_flush )
3019−{
3020− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3021− f->flush();
3022−}
3023−
3024−CK_DLL_MFUN( fileio_getmode )
3025−{
3026− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3027− RETURN->v_int = f->mode();
3028−}
3029−
3030−CK_DLL_MFUN( fileio_setmode )
3031−{
3032− t_CKINT flag = GET_NEXT_INT(ARGS);
3033−
3034− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3035− f->mode( flag );
3036− RETURN->v_int = 0;
3037−}
3038−
3039−CK_DLL_MFUN( fileio_size )
3040−{
3041− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3042− RETURN->v_int = f->size();
3043−}
3044−
3045−CK_DLL_MFUN( fileio_seek )
3046−{
3047− t_CKINT pos = GET_NEXT_INT(ARGS);
3048−
3049− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3050− f->seek(pos);
3051−}
3052−
3053−CK_DLL_MFUN( fileio_tell )
3054−{
3055− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3056− RETURN->v_int = f->tell();
3057−}
3058−
3059−CK_DLL_MFUN( fileio_isdir )
3060−{
3061− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3062− RETURN->v_int = f->isDir();
3063−}
3064−
3065−CK_DLL_MFUN( fileio_dirlist )
3066−{
3067− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3068− Chuck_Array4 * a = f->dirList();
3069− RETURN->v_object = a;
3070−}
3071−
3072−/*
3073−CK_DLL_MFUN( fileio_read )
3074−{
3075− t_CKINT len = GET_NEXT_INT(ARGS);
3076− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3077−
3078− Chuck_String * s = f->read( len );
3079− RETURN->v_object = s;
3080−}
3081−*/
3082−
3083−CK_DLL_MFUN( fileio_readline )
3084−{
3085− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3086− Chuck_String * ret = f->readLine();
3087− RETURN->v_object = ret;
3088−}
3089−
3090−CK_DLL_MFUN( fileio_readint )
3091−{
3092− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3093− t_CKINT defaultflags = Chuck_IO::INT32;
3094−
3095− /* (ATODO: doesn't look like asynchronous reading will work)
3096− if (f->mode() == Chuck_IO::MODE_ASYNC)
3097− {
3098− // set up arguments
3099− Chuck_IO::async_args *args = new Chuck_IO::async_args;
3100− args->RETURN = (void *)RETURN;
3101− args->fileio_obj = f;
3102− args->intArg = defaultflags;
3103− // set shred to wait for I/O completion
3104− f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
3105− // start thread
3106− bool ret = f->m_thread->start( f->readInt_thread, (void *)args );
3107− if (!ret) {
3108− cerr << "m_thread->start failed; recreating m_thread" << endl;
3109− delete f->m_thread;
3110− f->m_thread = new XThread;
3111− ret = f->m_thread->start( f->readInt_thread, (void *)args );
3112− if (!ret) {
3113− EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
3114− }
3115− }
3116− } else {*/
3117− t_CKINT ret = f->readInt( defaultflags );
3118− RETURN->v_int = ret;
3119− //}
3120− // ATODO: Debug
3121− //sleep(1);
3122− //cerr << "fileio_readint exiting" << endl;
3123−}
3124−
3125−CK_DLL_MFUN( fileio_readintflags )
991+// Object ctor
992+CK_DLL_CTOR( object_ctor )
3126993 {
3127− t_CKINT flags = GET_NEXT_INT(ARGS);
3128−
3129− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3130− t_CKINT ret = f->readInt( flags );
3131−
3132− RETURN->v_int = ret;
3133−}
994+ // log
995+ // EM_log( CK_LOG_FINEST, "Object constructor..." );
3134996
3135−CK_DLL_MFUN( fileio_readfloat )
3136−{
3137− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3138− t_CKFLOAT ret = f->readFloat();
3139− RETURN->v_float = ret;
997+ // initialize
998+ OBJ_MEMBER_UINT(SELF, Object_offset_string) = 0;
3140999 }
31411000
3142−CK_DLL_MFUN( fileio_eof )
3143−{
3144− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3145− t_CKBOOL ret = f->eof();
3146− RETURN->v_int = ret;
3147−}
31481001
3149−CK_DLL_MFUN( fileio_more )
1002+// Object dtor
1003+CK_DLL_DTOR( object_dtor )
31501004 {
3151− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3152− t_CKBOOL ret = !f->eof();
3153− RETURN->v_int = ret;
3154−}
1005+ // log
1006+ // EM_log( CK_LOG_FINEST, "Object destructor..." );
31551007
3156−CK_DLL_MFUN( fileio_writestring )
3157−{
3158− std::string val = GET_NEXT_STRING(ARGS)->str();
3159−
3160− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3161− #ifndef __DISABLE_THREADS__
3162− if (f->mode() == Chuck_IO::MODE_ASYNC)
3163− {
3164− // set up arguments
3165− Chuck_IO::async_args *args = new Chuck_IO::async_args;
3166− args->RETURN = (void *)RETURN;
3167− args->fileio_obj = f;
3168− args->stringArg = std::string(val);
3169− // set shred to wait for I/O completion
3170− assert( SHRED != NULL );
3171− f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
3172− // start thread
3173− bool ret = f->m_thread->start( f->writeStr_thread, (void *)args );
3174− if (!ret) {
3175− // for some reason, the XThread object needs to be
3176− // deleted and reconstructed every time after call #375
3177− delete f->m_thread;
3178− f->m_thread = new XThread;
3179− ret = f->m_thread->start( f->writeStr_thread, (void *)args );
3180− if (!ret) {
3181− EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
3182− }
3183− }
3184− } else {
3185− f->write(val);
3186− }
3187− #else
3188− f->write( val );
3189− #endif
1008+ // get the string
1009+ Chuck_String * str = (Chuck_String *)OBJ_MEMBER_UINT(SELF, Object_offset_string);
1010+ // release
1011+ SAFE_RELEASE( str );
31901012 }
31911013
3192−CK_DLL_MFUN( fileio_writeint )
3193−{
3194− t_CKINT val = GET_NEXT_INT(ARGS);
3195−
3196− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3197− #ifndef __DISABLE_THREADS__
3198− if (f->mode() == Chuck_IO::MODE_ASYNC)
3199− {
3200− // set up arguments
3201− Chuck_IO::async_args *args = new Chuck_IO::async_args;
3202− args->RETURN = (void *)RETURN;
3203− args->fileio_obj = f;
3204− args->intArg = val;
3205− // set shred to wait for I/O completion
3206− assert( SHRED != NULL );
3207− f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
3208− // start thread
3209− bool ret = f->m_thread->start( f->writeInt_thread, (void *)args );
3210− if (!ret) {
3211− // for some reason, the XThread object needs to be
3212− // deleted and reconstructed every time after call #375
3213− delete f->m_thread;
3214− f->m_thread = new XThread;
3215− ret = f->m_thread->start( f->writeInt_thread, (void *)args );
3216− if (!ret) {
3217− EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
3218− }
3219− }
3220− } else {
3221− f->write(val);
3222− }
3223− #else
3224− f->write( val );
3225− #endif
3226−}
32271014
3228−CK_DLL_MFUN( fileio_writeintflags )
1015+// toString
1016+CK_DLL_MFUN( object_toString )
32291017 {
3230− t_CKINT val = GET_NEXT_INT(ARGS);
3231− t_CKINT flags = GET_NEXT_INT(ARGS);
3232−
3233− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3234− #ifndef __DISABLE_THREADS__
3235− if (f->mode() == Chuck_IO::MODE_ASYNC)
1018+ // get the string
1019+ Chuck_String * str = (Chuck_String *)OBJ_MEMBER_UINT(SELF, Object_offset_string);
1020+ // allocate
1021+ if( !str )
32361022 {
3237− // TODO: pass flags in args
3238− // set up arguments
3239− Chuck_IO::async_args *args = new Chuck_IO::async_args;
3240− args->RETURN = (void *)RETURN;
3241− args->fileio_obj = f;
3242− args->intArg = val;
3243− // set shred to wait for I/O completion
3244− assert( SHRED != NULL );
3245− f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
3246− // start thread
3247− bool ret = f->m_thread->start( f->writeInt_thread, (void *)args );
3248− if (!ret) {
3249− // for some reason, the XThread object needs to be
3250− // deleted and reconstructed every time after call #375
3251− delete f->m_thread;
3252− f->m_thread = new XThread;
3253− ret = f->m_thread->start( f->writeInt_thread, (void *)args );
3254− if (!ret) {
3255− EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
3256− }
1023+ // new it
1024+ str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1025+ // check it
1026+ if( !str )
1027+ {
1028+ // TODO: make this exception
1029+ CK_FPRINTF_STDERR( "[chuck]: Object.toString() out of memory!\n" );
1030+ RETURN->v_object = NULL;
1031+ return;
32571032 }
3258− } else {
3259− f->write(val, flags);
3260− }
3261− #else
3262− f->write( val, flags );
3263− #endif
3264−}
1033+ // set it
1034+ ostringstream strout( ostringstream::out );
1035+ // get the type
1036+ Chuck_Type * type = SELF->type_ref;
1037+ // write
1038+ strout.setf( ios::hex, ios::basefield );
1039+ strout << ((type != NULL) ? type->c_name() : "[VOID]") << ":" << (t_CKUINT)SELF;
1040+ strout.flush();
32651041
3266−CK_DLL_MFUN( fileio_writefloat )
3267−{
3268− t_CKFLOAT val = GET_NEXT_FLOAT(ARGS);
3269−
3270− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3271− #ifndef __DISABLE_THREADS__
3272− if (f->mode() == Chuck_IO::MODE_ASYNC)
3273− {
3274− // set up arguments
3275− Chuck_IO::async_args *args = new Chuck_IO::async_args;
3276− args->RETURN = (void *)RETURN;
3277− args->fileio_obj = f;
3278− args->floatArg = val;
3279− // set shred to wait for I/O completion
3280− assert( SHRED != NULL );
3281− f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );
3282− // start thread
3283− bool ret = f->m_thread->start( f->writeFloat_thread, (void *)args );
3284− if (!ret) {
3285− // for some reason, the XThread object needs to be
3286− // deleted and reconstructed every time after call #375
3287− delete f->m_thread;
3288− f->m_thread = new XThread;
3289− ret = f->m_thread->start( f->writeFloat_thread, (void *)args );
3290− if (!ret) {
3291− EM_error3( "(FileIO): failed to start thread for asynchronous mode I/O" );
3292− }
3293− }
3294− } else {
3295− f->write(val);
1042+ // done
1043+ str->set( strout.str() );
32961044 }
3297− #else
3298− f->write( val );
3299− #endif
3300−}
3301−#endif
3302−
3303−
3304−
3305−
3306−//-----------------------------------------------------------------------------
3307−// Chout API
3308−//-----------------------------------------------------------------------------
3309−CK_DLL_MFUN( chout_close )
3310−{
3311− // problem
3312− CK_FPRINTF_STDERR( "[chuck]: cannot close 'chout'...\n" );
3313− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3314− c->close();
3315−}
3316−
3317−CK_DLL_MFUN( chout_good )
3318−{
3319− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3320− RETURN->v_int = c->good();
3321−}
3322−
3323−CK_DLL_MFUN( chout_flush )
3324−{
3325− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3326− c->flush();
3327−}
3328−
3329−CK_DLL_MFUN( chout_getmode )
3330−{
3331− // problem
3332− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3333− RETURN->v_int = c->mode();
3334−}
3335−
3336−CK_DLL_MFUN( chout_setmode )
3337−{
3338− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3339− c->mode( GET_NEXT_INT(ARGS) );
3340− RETURN->v_int = c->mode();
3341−}
3342−
3343−/*
3344− CK_DLL_MFUN( chout_read )
3345− {
3346− t_CKINT len = GET_NEXT_INT(ARGS);
3347− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3348−
3349− Chuck_String * s = f->read( len );
3350− RETURN->v_object = s;
3351− }
3352− */
3353−
3354−CK_DLL_MFUN( chout_readline )
3355−{
3356− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3357− Chuck_String * ret = c->readLine();
3358− RETURN->v_object = ret;
3359−}
3360−
3361−CK_DLL_MFUN( chout_readint )
3362−{
3363− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3364− RETURN->v_int = c->readInt( Chuck_IO::INT32 );
3365−}
3366−
3367−CK_DLL_MFUN( chout_readintflags )
3368−{
3369− t_CKINT flags = GET_NEXT_INT(ARGS);
3370−
3371− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3372− t_CKINT ret = c->readInt( flags );
3373−
3374− RETURN->v_int = ret;
3375−}
3376−
3377−CK_DLL_MFUN( chout_readfloat )
3378−{
3379− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3380− t_CKFLOAT ret = c->readFloat();
3381− RETURN->v_float = ret;
3382−}
3383−
3384−CK_DLL_MFUN( chout_eof )
3385−{
3386− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3387− t_CKBOOL ret = c->eof();
3388− RETURN->v_int = ret;
3389−}
3390−
3391−CK_DLL_MFUN( chout_more )
3392−{
3393− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3394− t_CKBOOL ret = !c->eof();
3395− RETURN->v_int = ret;
3396−}
3397−
3398−CK_DLL_MFUN( chout_writestring )
3399−{
3400− std::string val = GET_NEXT_STRING(ARGS)->str();
3401−
3402− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3403− c->write( val );
3404−}
3405−
3406−CK_DLL_MFUN( chout_writeint )
3407−{
3408− t_CKINT val = GET_NEXT_INT(ARGS);
3409−
3410− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3411− c->write(val);
3412−}
3413−
3414−CK_DLL_MFUN( chout_writefloat )
3415−{
3416− t_CKFLOAT val = GET_NEXT_FLOAT(ARGS);
3417−
3418− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3419− c->write(val);
3420−}
3421−
3422−
3423−
3424−
3425−//-----------------------------------------------------------------------------
3426−// Cherr API
3427−//-----------------------------------------------------------------------------
3428−CK_DLL_MFUN( cherr_close )
3429−{
3430− // problem
3431− CK_FPRINTF_STDERR( "[chuck]: cannot close 'cherr'...\n" );
3432− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3433− c->close();
3434−}
34351045
3436−CK_DLL_MFUN( cherr_good )
3437−{
3438− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3439− RETURN->v_int = c->good();
3440−}
3441−
3442−CK_DLL_MFUN( cherr_flush )
3443−{
3444− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3445− c->flush();
3446−}
3447−
3448−CK_DLL_MFUN( cherr_getmode )
3449−{
3450− // problem
3451− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3452− RETURN->v_int = c->mode();
3453−}
3454−
3455−CK_DLL_MFUN( cherr_setmode )
3456−{
3457− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3458− c->mode( GET_NEXT_INT(ARGS) );
3459− RETURN->v_int = c->mode();
3460−}
3461−
3462−/*
3463− CK_DLL_MFUN( cherr_read )
3464− {
3465− t_CKINT len = GET_NEXT_INT(ARGS);
3466− Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3467−
3468− Chuck_String * s = f->read( len );
3469− RETURN->v_object = s;
3470− }
3471− */
3472−
3473−CK_DLL_MFUN( cherr_readline )
3474−{
3475− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3476− Chuck_String * ret = c->readLine();
3477− RETURN->v_object = ret;
3478−}
3479−
3480−CK_DLL_MFUN( cherr_readint )
3481−{
3482− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3483− RETURN->v_int = c->readInt( Chuck_IO::INT32 );
3484−}
3485−
3486−CK_DLL_MFUN( cherr_readintflags )
3487−{
3488− t_CKINT flags = GET_NEXT_INT(ARGS);
3489−
3490− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3491− t_CKINT ret = c->readInt( flags );
3492−
3493− RETURN->v_int = ret;
3494−}
3495−
3496−CK_DLL_MFUN( cherr_readfloat )
3497−{
3498− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3499− t_CKFLOAT ret = c->readFloat();
3500− RETURN->v_float = ret;
3501−}
3502−
3503−CK_DLL_MFUN( cherr_eof )
3504−{
3505− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3506− t_CKBOOL ret = c->eof();
3507− RETURN->v_int = ret;
3508−}
3509−
3510−CK_DLL_MFUN( cherr_more )
3511−{
3512− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3513− t_CKBOOL ret = !c->eof();
3514− RETURN->v_int = ret;
3515−}
3516−
3517−CK_DLL_MFUN( cherr_writestring )
3518−{
3519− std::string val = GET_NEXT_STRING(ARGS)->str();
3520−
3521− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3522− c->write( val );
3523−}
3524−
3525−CK_DLL_MFUN( cherr_writeint )
3526−{
3527− t_CKINT val = GET_NEXT_INT(ARGS);
3528−
3529− Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3530− c->write(val);
3531−}
3532−
3533−CK_DLL_MFUN( cherr_writefloat )
3534−{
3535− t_CKFLOAT val = GET_NEXT_FLOAT(ARGS);
3536−
3537− Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3538− c->write(val);
3539−}
3540−
3541−
3542−
3543−
3544−//-----------------------------------------------------------------------------
3545−// Shred API
3546−//-----------------------------------------------------------------------------
3547−
3548−//CK_DLL_CTOR( shred_ctor );
3549−//CK_DLL_DTOR( shred_dtor ); //
3550−
3551−CK_DLL_MFUN( shred_exit )
3552−{
3553− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3554− // end the shred
3555− derhs->is_done = TRUE;
3556− derhs->is_running = FALSE;
1046+ // set return
1047+ RETURN->v_object = str;
35571048 }
35581049
3559−CK_DLL_MFUN( shred_running )
3560−{
3561− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3562− RETURN->v_int = derhs->is_running;
3563−}
35641050
3565−CK_DLL_MFUN( shred_done )
1051+// ctor
1052+CK_DLL_CTOR( ugen_ctor )
35661053 {
3567− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3568− RETURN->v_int = derhs->is_done;
35691054 }
35701055
3571−CK_DLL_MFUN( shred_clone )
1056+CK_DLL_DTOR( ugen_dtor )
35721057 {
1058+ // get as ugen
1059+ // Chuck_UGen * ugen = (Chuck_UGen *)SELF;
35731060 }
35741061
3575−CK_DLL_MFUN( shred_id )
1062+CK_DLL_MFUN( ugen_op )
35761063 {
3577− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3578− // return the id
3579− RETURN->v_int = derhs->xid;
1064+ // get as ugen
1065+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1066+ // get arg
1067+ t_CKINT op = GET_CK_INT( ARGS );
1068+ // set op
1069+ ugen->m_op = op;
1070+ // set return
1071+ RETURN->v_int = ugen->m_op;
1072+
1073+ // for multiple channels
1074+ Chuck_DL_Return ret;
1075+ // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
1076+ for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
1077+ ugen_op( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
1078+ // added 1.3.0.2 -- apply op to subgraph outlet
1079+ if( ugen->inlet() )
1080+ ugen->inlet()->m_op = op;
1081+ if( ugen->outlet() )
1082+ ugen->outlet()->m_op = op;
35801083 }
35811084
3582−CK_DLL_MFUN( shred_yield )
1085+CK_DLL_MFUN( ugen_cget_op )
35831086 {
3584− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3585− Chuck_VM * vm = derhs->vm_ref;
3586−
3587− // suspend
3588− derhs->is_running = FALSE;
3589− // reshredule
3590− vm->shreduler()->shredule( derhs, derhs->now );
1087+ // get as ugen
1088+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1089+ // set return
1090+ RETURN->v_int = ugen->m_op;
35911091 }
35921092
3593−CK_DLL_MFUN( shred_numArgs )
1093+CK_DLL_MFUN( ugen_last )
35941094 {
3595− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3596−
3597− // get the number of arguments
3598− RETURN->v_int = derhs->args.size();
1095+ // get as ugen
1096+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1097+ // set return
1098+ // added 1.3.0.2 -- ugen outlet() last if subgraph
1099+ if( ugen->outlet() )
1100+ RETURN->v_float = (t_CKFLOAT) ugen->outlet()->m_last;
1101+ else
1102+ RETURN->v_float = (t_CKFLOAT)ugen->m_last;
35991103 }
36001104
3601−CK_DLL_MFUN( shred_getArg )
1105+CK_DLL_MFUN( ugen_next )
36021106 {
3603− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3604−
3605− // get index
3606− t_CKINT i = GET_NEXT_INT(ARGS);
3607− // total
3608− t_CKINT num = derhs->args.size();
1107+ // get as ugen
1108+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1109+ // get arg
1110+ t_CKFLOAT next = GET_CK_FLOAT( ARGS );
1111+ // set op
1112+ ugen->m_next = (SAMPLE)next;
1113+ ugen->m_use_next = TRUE;
1114+ // set return
1115+ RETURN->v_float = (t_CKFLOAT)ugen->m_next;
36091116
3610− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3611− str->set( ( i < num ? derhs->args[i] : "" ) );
3612− RETURN->v_string = str;
1117+ // for multiple channels
1118+ Chuck_DL_Return ret;
1119+ // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
1120+ for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
1121+ ugen_next( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
1122+ // added 1.3.0.2 -- apply op to subgraph outlet
1123+ if( ugen->outlet() )
1124+ {
1125+ ugen->outlet()->m_next = (SAMPLE) next;
1126+ ugen->outlet()->m_use_next = TRUE;
1127+ }
36131128 }
36141129
3615−CK_DLL_MFUN( shred_sourcePath ) // added 1.3.0.0
1130+CK_DLL_MFUN( ugen_cget_next )
36161131 {
3617− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3618−
3619− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3620− str->set( derhs->code->filename );
3621− RETURN->v_string = str;
1132+ // get as ugen
1133+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1134+ // set return
1135+ RETURN->v_float = ugen->m_use_next ? (t_CKFLOAT)ugen->m_next : 0.0f;
36221136 }
36231137
3624−CK_DLL_MFUN( shred_sourceDir ) // added 1.3.0.0
1138+CK_DLL_MFUN( ugen_gain )
36251139 {
3626− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3627−
3628− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3629−
3630− str->set( extract_filepath_dir(derhs->code->filename) );
3631−
3632− RETURN->v_string = str;
1140+ // get as ugen
1141+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1142+ // get arg
1143+ t_CKFLOAT gain = GET_CK_FLOAT( ARGS );
1144+ // set op
1145+ ugen->m_gain = (SAMPLE)gain;
1146+ // set return
1147+ RETURN->v_float = (t_CKFLOAT)ugen->m_gain;
1148+
1149+ // for multiple channels
1150+ Chuck_DL_Return ret;
1151+ // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
1152+ for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
1153+ ugen_gain( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
1154+ // added 1.3.0.2 -- apply gain to subgraph outlet
1155+ if( ugen->outlet() )
1156+ ugen->outlet()->m_gain = (SAMPLE) gain;
36331157 }
36341158
3635−CK_DLL_MFUN( shred_sourceDir2 ) // added 1.3.2.0
1159+CK_DLL_MFUN( ugen_cget_gain )
36361160 {
3637− Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3638− // get num up
3639− t_CKINT i = GET_NEXT_INT(ARGS);
3640− // abs
3641− if( i < 0 ) i = -i;
3642−
3643− // new chuck string
3644− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3645− // set the content
3646− str->set( extract_filepath_dir(derhs->code->filename) );
3647− // up
3648− str->set( dir_go_up( str->str(), i ) );
3649−
3650− RETURN->v_string = str;
1161+ // get as ugen
1162+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1163+ // set return
1164+ RETURN->v_float = (t_CKFLOAT)ugen->m_gain;
36511165 }
36521166
3653−
3654−CK_DLL_SFUN( shred_fromId ) // added 1.3.2.0
1167+CK_DLL_CTRL( ugen_numChannels )
36551168 {
3656− t_CKINT shred_id = GET_NEXT_INT(ARGS);
3657−
3658− Chuck_VM_Shred * derhs = SHRED->vm_ref->shreduler()->lookup(shred_id);
3659−
3660− RETURN->v_object = derhs;
1169+ // get ugen
1170+ //Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1171+ // error
1172+ EM_error3( "setting .numChannels is not yet supported (use the command line)..." );
36611173 }
36621174
3663−
3664−CK_DLL_MFUN( string_length )
1175+CK_DLL_CGET( ugen_cget_numChannels )
36651176 {
3666− Chuck_String * s = (Chuck_String *)SELF;
3667− RETURN->v_int = s->str().length();
1177+ // get ugen
1178+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1179+ // return
1180+ RETURN->v_int = ugen->m_multi_chan_size == 0 ? 1 : ugen->m_multi_chan_size;
36681181 }
36691182
3670−CK_DLL_MFUN( string_upper )
1183+CK_DLL_CTRL( ugen_chan )
36711184 {
3672− Chuck_String * s = (Chuck_String *)SELF;
3673− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3674− str->set( toupper( s->str() ) );
3675− RETURN->v_string = str;
1185+ // get ugen
1186+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1187+ t_CKINT num = GET_NEXT_INT(ARGS);
1188+ // check
1189+ if( !ugen->m_multi_chan_size && num == 0 )
1190+ RETURN->v_object = ugen;
1191+ else if( num >= 0 && num < ugen->m_multi_chan_size )
1192+ RETURN->v_object = ugen->m_multi_chan[num];
1193+ else
1194+ RETURN->v_object = NULL;
36761195 }
36771196
3678−CK_DLL_MFUN( string_lower )
1197+CK_DLL_CTRL( ugen_connected )
36791198 {
3680− Chuck_String * s = (Chuck_String *)SELF;
3681− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3682− str->set( tolower( s->str() ) );
3683− RETURN->v_string = str;
1199+ // get ugen
1200+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1201+ Chuck_UGen * right = (Chuck_UGen *)GET_NEXT_OBJECT(ARGS);
1202+
1203+ // sanity
1204+ t_CKINT ret = FALSE;
1205+ if( !right )
1206+ {
1207+ ret = FALSE;
1208+ }
1209+ else
1210+ {
1211+ ret = right->is_connected_from( ugen );
1212+ }
1213+
1214+ RETURN->v_int = ret;
36841215 }
36851216
3686−CK_DLL_MFUN( string_ltrim )
1217+CK_DLL_MFUN( ugen_buffered )
36871218 {
3688− Chuck_String * s = (Chuck_String *)SELF;
3689− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3690− str->set( ltrim( s->str() ) );
3691− RETURN->v_string = str;
1219+ // get as ugen
1220+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1221+ // get arg
1222+ t_CKINT buffered = GET_CK_INT( ARGS );
1223+ // set op
1224+ ugen->set_is_buffered( buffered );
1225+ // set return
1226+ RETURN->v_int = ugen->m_is_buffered;
1227+
1228+ // for multiple channels
1229+ Chuck_DL_Return ret;
1230+ for( t_CKUINT i = 0; i < ugen->m_multi_chan_size; i++ )
1231+ ugen_buffered( ugen->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
1232+ // added 1.3.0.2 -- apply op to subgraph outlet
1233+ if( ugen->inlet() )
1234+ ugen->inlet()->m_is_buffered = buffered;
1235+ if( ugen->outlet() )
1236+ ugen->outlet()->m_is_buffered = buffered;
36921237 }
36931238
3694−CK_DLL_MFUN( string_rtrim )
1239+CK_DLL_MFUN( ugen_cget_buffered )
36951240 {
3696− Chuck_String * s = (Chuck_String *)SELF;
3697− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3698− str->set( rtrim( s->str() ) );
3699− RETURN->v_string = str;
1241+ // get as ugen
1242+ Chuck_UGen * ugen = (Chuck_UGen *)SELF;
1243+ // set return
1244+ RETURN->v_int = ugen->m_is_buffered;
37001245 }
37011246
3702−CK_DLL_MFUN( string_trim )
1247+
1248+// ctor
1249+CK_DLL_CTOR( uana_ctor )
37031250 {
3704− Chuck_String * s = (Chuck_String *)SELF;
3705− Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3706− str->set( trim( s->str() ) );
3707− RETURN->v_string = str;
1251+ // make an actual blob
1252+ Chuck_Object * blob = instantiate_and_initialize_object( SHRED->vm_ref->env()->t_uanablob, SHRED );
1253+ // TODO: check out of memory
1254+ assert( blob != NULL );
1255+ // make a blob proxy
1256+ Chuck_UAnaBlobProxy * proxy = new Chuck_UAnaBlobProxy( blob );
1257+ // remember it
1258+ OBJ_MEMBER_INT(SELF, uana_offset_blob) = (t_CKINT)proxy;
1259+ // HACK: DANGER: manually call blob's ctor (added 1.3.0.0 -- Chuck_DL_Api::Api::instance())
1260+ uanablob_ctor( blob, NULL, VM, SHRED, API );
37081261 }
37091262
3710−CK_DLL_MFUN( string_toString )
1263+CK_DLL_DTOR( uana_dtor )
37111264 {
3712− Chuck_String * s = (Chuck_String *)SELF;
3713− RETURN->v_string = s;
1265+ // TODO: GC should release the blob!
37141266 }
37151267
3716−CK_DLL_MFUN(string_charAt)
1268+CK_DLL_MFUN( uana_upchuck )
37171269 {
3718− Chuck_String * str = (Chuck_String *) SELF;
3719− t_CKINT index = GET_NEXT_INT(ARGS);
3720−
3721− if(index < 0 || index >= str->str().length())
1270+ // get as uana
1271+ Chuck_UAna * uana = (Chuck_UAna *)SELF;
1272+ // get shred
1273+ Chuck_VM_Shred * derhs = SHRED;
1274+ // make sure it's not NULL
1275+ if( !derhs )
37221276 {
3723− throw_exception(SHRED, "IndexOutOfBoundsException", index);
3724− RETURN->v_int = -1;
1277+ EM_error3( "UAna.upchuck() encountered NULL shred; operation aborting!" );
37251278 return;
37261279 }
37271280
3728− RETURN->v_int = str->str().at(index);
3729−}
3730−
3731−CK_DLL_MFUN(string_setCharAt)
3732−{
3733− Chuck_String * str = (Chuck_String *) SELF;
3734− t_CKINT index = GET_NEXT_INT(ARGS);
3735− t_CKINT the_char = GET_NEXT_INT(ARGS);
3736−
3737− if(index < 0 || index >= str->str().length())
1281+ // get VM
1282+ Chuck_VM * vm = derhs->vm_ref;
1283+ // ensure
1284+ if( !vm )
37381285 {
3739− throw_exception(SHRED, "IndexOutOfBoundsException", index);
3740− RETURN->v_int = -1;
1286+ EM_error3( "UAna.upchuck() encountered NULL VM ref; operation aborting!" );
37411287 return;
37421288 }
37431289
3744− // str->str.at(index) = the_char;
3745− std::string s = str->str();
3746− s.at(index) = the_char;
3747− str->set( s );
3748− RETURN->v_int = str->str().at(index);
3749−}
3750−
3751−CK_DLL_MFUN(string_substring)
3752−{
3753− Chuck_String * str = (Chuck_String *) SELF;
3754− t_CKINT start = GET_NEXT_INT(ARGS);
3755−
3756− if(start < 0 || start >= str->str().length())
1290+ // check if time
1291+ if( uana->m_uana_time < vm->shreduler()->now_system )
37571292 {
3758− throw_exception(SHRED, "IndexOutOfBoundsException", start);
3759− RETURN->v_string = NULL;
3760− return;
1293+ // for multiple channels
1294+ Chuck_DL_Return ret;
1295+ // added 1.3.0.0 -- Chuck_DL_Api::Api::instance()
1296+ for( t_CKUINT i = 0; i < uana->m_multi_chan_size; i++ )
1297+ uana_upchuck( uana->m_multi_chan[i], ARGS, &ret, VM, SHRED, API );
1298+
1299+ // tock it (TODO: order relative to multiple channels?)
1300+ uana->system_tock( vm->shreduler()->now_system );
37611301 }
37621302
3763− Chuck_String * ss = (Chuck_String *) instantiate_and_initialize_object(SHRED->vm_ref->env()->t_string, SHRED);
3764− ss->set( str->str().substr(start) );
3765−
3766− RETURN->v_string = ss;
1303+ // return
1304+ RETURN->v_object = uana->blobProxy()->realblob();
37671305 }
37681306
3769−CK_DLL_MFUN(string_substringN)
1307+/* CK_DLL_MFUN( uana_blob )
37701308 {
3771− Chuck_String * str = (Chuck_String *) SELF;
3772− t_CKINT start = GET_NEXT_INT(ARGS);
3773− t_CKINT length = GET_NEXT_INT(ARGS);
1309+ // get as uana
1310+ Chuck_UAna * uana = (Chuck_UAna *)SELF;
37741311
3775− if(start < 0 || start >= str->str().length())
3776− {
3777− throw_exception(SHRED, "IndexOutOfBoundsException", start);
3778− RETURN->v_string = NULL;
3779− return;
3780− }
1312+ // TODO: return
1313+ RETURN->v_object = NULL;
1314+} */
37811315
3782− if(length < 0 || start+length > str->str().length())
3783− {
3784− throw_exception(SHRED, "IndexOutOfBoundsException", length);
3785− RETURN->v_string = NULL;
3786− return;
3787− }
3788−
3789− Chuck_String * ss = (Chuck_String *) instantiate_and_initialize_object(SHRED->vm_ref->env()->t_string, SHRED);
3790− ss->set( str->str().substr(start, length) );
3791−
3792− RETURN->v_string = ss;
1316+CK_DLL_MFUN( uana_fvals )
1317+{
1318+ // get the fvals array
1319+ Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
1320+ RETURN->v_object = &blob->fvals();
37931321 }
37941322
3795−CK_DLL_MFUN(string_insert)
1323+CK_DLL_MFUN( uana_cvals )
37961324 {
3797− Chuck_String * str = (Chuck_String *) SELF;
3798− t_CKINT position = GET_NEXT_INT(ARGS);
3799− Chuck_String * str2 = GET_NEXT_STRING(ARGS);
3800−
3801− if(position < 0 || position >= str->str().length())
3802− {
3803− throw_exception(SHRED, "IndexOutOfBoundsException", position);
3804− return;
3805− }
3806− if(str2 == NULL)
3807− {
3808− throw_exception(SHRED, "NullPointerException");
3809− return;
3810− }
3811−
3812− // str->str.insert(position, str2->str);
3813− std::string s = str->str();
3814− s.insert( position, str2->str() );
3815− str->set( s );
1325+ // get the fvals array
1326+ Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
1327+ RETURN->v_object = &blob->cvals();
38161328 }
38171329
3818−CK_DLL_MFUN(string_replace)
1330+CK_DLL_MFUN( uana_fval )
38191331 {
3820− Chuck_String * str = (Chuck_String *) SELF;
3821− t_CKINT position = GET_NEXT_INT(ARGS);
3822− Chuck_String * str2 = GET_NEXT_STRING(ARGS);
3823−
3824− if(position < 0 || position >= str->str().length())
3825− {
3826− throw_exception(SHRED, "IndexOutOfBoundsException", position);
3827− return;
3828− }
3829− if(str2 == NULL)
1332+ // get index
1333+ t_CKINT i = GET_NEXT_INT(ARGS);
1334+ // get the fvals array
1335+ Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
1336+ Chuck_Array8 & fvals = blob->fvals();
1337+ // check caps
1338+ if( i < 0 || fvals.size() <= i ) RETURN->v_float = 0;
1339+ else
38301340 {
3831− throw_exception(SHRED, "NullPointerException");
3832− return;
1341+ // get
1342+ t_CKFLOAT val;
1343+ fvals.get( i, &val );
1344+ RETURN->v_float = val;
38331345 }
3834−
3835− string::size_type length;
3836− if(position + str2->str().length() > str->str().length())
3837− length = str->str().length() - position;
3838− else
3839− length = str2->str().length();
3840−
3841− // str->str.replace(position, length, str2->str);
3842− std::string s = str->str();
3843− s.replace( position, length, str2->str() );
3844− str->set( s );
38451346 }
38461347
3847−CK_DLL_MFUN(string_replaceN)
1348+CK_DLL_MFUN( uana_cval )
38481349 {
3849− Chuck_String * str = (Chuck_String *) SELF;
3850− t_CKINT position = GET_NEXT_INT(ARGS);
3851− t_CKINT length = GET_NEXT_INT(ARGS);
3852− Chuck_String * str2 = GET_NEXT_STRING(ARGS);
3853−
3854− if(position < 0 || position >= str->str().length())
1350+ // get index
1351+ t_CKINT i = GET_NEXT_INT(ARGS);
1352+ // get the fvals array
1353+ Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
1354+ Chuck_Array16 & cvals = blob->cvals();
1355+ // check caps
1356+ if( i < 0 || cvals.size() <= i ) RETURN->v_complex.re = RETURN->v_complex.im = 0;
1357+ else
38551358 {
3856− throw_exception(SHRED, "IndexOutOfBoundsException", position);
3857− return;
1359+ // get
1360+ t_CKCOMPLEX val;
1361+ cvals.get( i, &val );
1362+ RETURN->v_complex = val;
38581363 }
1364+}
38591365
3860− if(length < 0 || position+length > str->str().length())
1366+CK_DLL_MFUN( uana_connected )
1367+{
1368+ // get ugen
1369+ Chuck_UAna * uana = (Chuck_UAna *)SELF;
1370+ Chuck_UAna * right = (Chuck_UAna *)GET_NEXT_OBJECT(ARGS);
1371+
1372+ // sanity
1373+ t_CKINT ret = FALSE;
1374+ if( !right )
38611375 {
3862− throw_exception(SHRED, "IndexOutOfBoundsException", length);
3863− return;
1376+ ret = FALSE;
38641377 }
3865−
3866− if(str2 == NULL)
1378+ else
38671379 {
3868− throw_exception(SHRED, "NullPointerException");
3869− return;
1380+ ret = right->is_up_connected_from( uana );
38701381 }
38711382
3872− // str->str.replace(position, length, str2->str);
3873− std::string s = str->str();
3874− s.replace( position, length, str2->str() );
3875− str->set( s );
1383+ RETURN->v_int = ret;
38761384 }
38771385
3878−CK_DLL_MFUN(string_find)
1386+
1387+// blob proxy implementation
1388+Chuck_UAnaBlobProxy::Chuck_UAnaBlobProxy( Chuck_Object * blob )
38791389 {
3880− Chuck_String * str = (Chuck_String *) SELF;
3881− t_CKINT the_char = GET_NEXT_INT(ARGS);
3882−
3883− string::size_type index = str->str().find(the_char);
3884−
3885− if(index == string::npos)
3886− RETURN->v_int = -1;
3887− else
3888− RETURN->v_int = index;
1390+ m_blob = blob;
1391+ assert( m_blob != NULL );
1392+ // add reference
1393+ m_blob->add_ref();
38891394 }
38901395
3891−CK_DLL_MFUN(string_findStart)
1396+Chuck_UAnaBlobProxy::~Chuck_UAnaBlobProxy()
38921397 {
3893− Chuck_String * str = (Chuck_String *) SELF;
3894− t_CKINT the_char = GET_NEXT_INT(ARGS);
3895− t_CKINT start = GET_NEXT_INT(ARGS);
3896−
3897− if(start < 0 || start >= str->str().length())
3898− {
3899− throw_exception(SHRED, "IndexOutOfBoundsException", start);
3900− RETURN->v_int = -1;
3901− return;
3902− }
3903−
3904− string::size_type index = str->str().find(the_char, start);
3905−
3906− if(index == string::npos)
3907− RETURN->v_int = -1;
3908− else
3909− RETURN->v_int = index;
1398+ // release
1399+ SAFE_RELEASE( m_blob );
39101400 }
39111401
3912−CK_DLL_MFUN(string_findStr)
1402+t_CKTIME & Chuck_UAnaBlobProxy::when()
39131403 {
3914− Chuck_String * str = (Chuck_String *) SELF;
3915− Chuck_String * the_str = GET_NEXT_STRING(ARGS);
3916−
3917− string::size_type index = str->str().find(the_str->str());
3918−
3919− if(index == string::npos)
3920− RETURN->v_int = -1;
3921− else
3922− RETURN->v_int = index;
1404+ // TODO: DANGER: is this actually returning correct reference?!
1405+ return OBJ_MEMBER_TIME(m_blob, uanablob_offset_when);
39231406 }
39241407
3925−CK_DLL_MFUN(string_findStrStart)
1408+Chuck_Array8 & Chuck_UAnaBlobProxy::fvals()
39261409 {
3927− Chuck_String * str = (Chuck_String *) SELF;
3928− Chuck_String * the_str = GET_NEXT_STRING(ARGS);
3929− t_CKINT start = GET_NEXT_INT(ARGS);
3930−
3931− if(start < 0 || start >= str->str().length())
3932− {
3933− throw_exception(SHRED, "IndexOutOfBoundsException", start);
3934− RETURN->v_int = -1;
3935− return;
3936− }
3937−
3938− string::size_type index = str->str().find(the_str->str(), start);
3939−
3940− if(index == string::npos)
3941− RETURN->v_int = -1;
3942− else
3943− RETURN->v_int = index;
1410+ // TODO: DANGER: is this actually returning correct reference?!
1411+ Chuck_Array8 * arr8 = (Chuck_Array8 *)OBJ_MEMBER_INT(m_blob, uanablob_offset_fvals);
1412+ assert( arr8 != NULL );
1413+ return *arr8;
39441414 }
39451415
3946−CK_DLL_MFUN(string_rfind)
1416+Chuck_Array16 & Chuck_UAnaBlobProxy::cvals()
39471417 {
3948− Chuck_String * str = (Chuck_String *) SELF;
3949− t_CKINT the_char = GET_NEXT_INT(ARGS);
3950−
3951− string::size_type index = str->str().rfind(the_char);
3952−
3953− if(index == string::npos)
3954− RETURN->v_int = -1;
3955− else
3956− RETURN->v_int = index;
1418+ // TODO: DANGER: is this actually returning correct reference?!
1419+ Chuck_Array16 * arr16 = (Chuck_Array16 *)OBJ_MEMBER_INT(m_blob, uanablob_offset_cvals);
1420+ assert( arr16 != NULL );
1421+ return *arr16;
39571422 }
39581423
3959−CK_DLL_MFUN(string_rfindStart)
1424+// get proxy
1425+Chuck_UAnaBlobProxy * getBlobProxy( const Chuck_UAna * uana )
39601426 {
3961− Chuck_String * str = (Chuck_String *) SELF;
3962− t_CKINT the_char = GET_NEXT_INT(ARGS);
3963− t_CKINT start = GET_NEXT_INT(ARGS);
3964−
3965− if(start < 0 || start >= str->str().length())
3966− {
3967− throw_exception(SHRED, "IndexOutOfBoundsException", start);
3968− RETURN->v_int = -1;
3969− return;
3970− }
3971−
3972− string::size_type index = str->str().rfind(the_char, start);
3973−
3974− if(index == string::npos)
3975− RETURN->v_int = -1;
3976− else
3977− RETURN->v_int = index;
1427+ return (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(uana, uana_offset_blob);
39781428 }
39791429
3980−CK_DLL_MFUN(string_rfindStr)
1430+// ctor
1431+CK_DLL_CTOR( uanablob_ctor )
39811432 {
3982− Chuck_String * str = (Chuck_String *) SELF;
3983− Chuck_String * the_str = GET_NEXT_STRING(ARGS);
3984−
3985− string::size_type index = str->str().rfind(the_str->str());
3986−
3987− if(index == string::npos)
3988− RETURN->v_int = -1;
3989− else
3990− RETURN->v_int = index;
1433+ // when
1434+ OBJ_MEMBER_TIME(SELF, uanablob_offset_when) = 0;
1435+ // fvals
1436+ Chuck_Array8 * arr8 = new Chuck_Array8( 8 );
1437+ initialize_object( arr8, SHRED->vm_ref->env()->t_array );
1438+ // TODO: check out of memory
1439+ arr8->add_ref();
1440+ OBJ_MEMBER_INT(SELF, uanablob_offset_fvals) = (t_CKINT)arr8;
1441+ // cvals
1442+ Chuck_Array16 * arr16 = new Chuck_Array16( 8 );
1443+ initialize_object( arr16, SHRED->vm_ref->env()->t_array );
1444+ // TODO: check out of memory
1445+ arr16->add_ref();
1446+ OBJ_MEMBER_INT(SELF, uanablob_offset_cvals) = (t_CKINT)arr16;
39911447 }
39921448
3993−CK_DLL_MFUN(string_rfindStrStart)
1449+// dtor
1450+CK_DLL_DTOR( uanablob_dtor )
39941451 {
3995− Chuck_String * str = (Chuck_String *) SELF;
3996− Chuck_String * the_str = GET_NEXT_STRING(ARGS);
3997− t_CKINT start = GET_NEXT_INT(ARGS);
3998−
3999− if(start < 0 || start >= str->str().length())
4000− {
4001− throw_exception(SHRED, "IndexOutOfBoundsException", start);
4002− RETURN->v_int = -1;
4003− return;
4004− }
1452+ // get array
1453+ Chuck_Array8 * arr8 = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
1454+ // release it
1455+ arr8->release();
1456+ OBJ_MEMBER_INT(SELF, uanablob_offset_fvals) = 0;
40051457
4006− string::size_type index = str->str().rfind(the_str->str(), start);
1458+ // get array
1459+ Chuck_Array16 * arr16 = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
1460+ // release it
1461+ arr16->release();
1462+ OBJ_MEMBER_INT(SELF, uanablob_offset_cvals) = 0;
40071463
4008− if(index == string::npos)
4009− RETURN->v_int = -1;
4010− else
4011− RETURN->v_int = index;
1464+ OBJ_MEMBER_TIME(SELF, uanablob_offset_when) = 0;
40121465 }
40131466
4014−CK_DLL_MFUN(string_erase)
1467+CK_DLL_MFUN( uanablob_when )
40151468 {
4016− Chuck_String * str = (Chuck_String *) SELF;
4017− t_CKINT start = GET_NEXT_INT(ARGS);
4018− t_CKINT length = GET_NEXT_INT(ARGS);
4019−
4020− if(start < 0 || start >= str->str().length())
4021− {
4022− throw_exception(SHRED, "IndexOutOfBoundsException", start);
4023− return;
4024− }
4025−
4026− if(length < 0 || start+length > str->str().length())
4027− {
4028− throw_exception(SHRED, "IndexOutOfBoundsException", length);
4029− return;
4030− }
4031−
4032− // str->str.erase(start, length);
4033− std::string s = str->str();
4034− s.erase( start, length );
4035− str->set( s );
1469+ // set return
1470+ RETURN->v_time = OBJ_MEMBER_TIME(SELF, uanablob_offset_when);
40361471 }
40371472
4038−CK_DLL_MFUN( string_toInt )
1473+CK_DLL_MFUN( uanablob_fvals )
40391474 {
4040− // get pointer to self
4041− Chuck_String * str = (Chuck_String *)SELF;
4042− // convert to int
4043− RETURN->v_int = ::atoi( str->str().c_str() );
1475+ // set return
1476+ RETURN->v_object = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
40441477 }
40451478
4046−CK_DLL_MFUN( string_toFloat )
1479+CK_DLL_MFUN( uanablob_fval )
40471480 {
4048− // get pointer to self
4049− Chuck_String * str = (Chuck_String *)SELF;
4050− // convert to int
4051− RETURN->v_float = (t_CKFLOAT)::atof( str->str().c_str() );
1481+ // get index
1482+ t_CKINT i = GET_NEXT_INT(ARGS);
1483+ // get the fvals array
1484+ Chuck_Array8 * fvals = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
1485+ // check caps
1486+ if( i < 0 || fvals->size() <= i ) RETURN->v_float = 0;
1487+ else
1488+ {
1489+ // get
1490+ t_CKFLOAT val;
1491+ fvals->get( i, &val );
1492+ RETURN->v_float = val;
1493+ }
40521494 }
40531495
4054−CK_DLL_MFUN( string_parent )
1496+CK_DLL_MFUN( uanablob_cval )
40551497 {
4056− Chuck_String * str = (Chuck_String *) SELF;
4057−
4058− string::size_type i = str->str().rfind('/', str->str().length()-2);
4059−#ifdef WIN32
4060− // SPENCERTODO: make this legit on windows
4061− if(i == string::npos)
4062− i = str->str().rfind('\\', str->str().length()-2);
4063−#endif // WIN32
4064−
4065− Chuck_String * parent = (Chuck_String *) instantiate_and_initialize_object(SHRED->vm_ref->env()->t_string, SHRED);
4066−
4067− if(i != string::npos)
1498+ // get index
1499+ t_CKINT i = GET_NEXT_INT(ARGS);
1500+ // get the fvals array
1501+ Chuck_Array16 * cvals = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
1502+ // check caps
1503+ if( i < 0 || cvals->size() <= i ) RETURN->v_complex.re = RETURN->v_complex.im = 0;
1504+ else
40681505 {
4069− if(i == 0)
4070− parent->set( "/" );
4071− else
4072− parent->set( str->str().substr(0, i) );
1506+ // get
1507+ t_CKCOMPLEX val;
1508+ cvals->get( i, &val );
1509+ RETURN->v_complex = val;
40731510 }
4074−
4075− RETURN->v_string = parent;
40761511 }
40771512
4078−/*
4079−CK_DLL_MFUN( string_set_at )
1513+CK_DLL_MFUN( uanablob_cvals )
40801514 {
4081− Chuck_String * s = (Chuck_String *)SELF;
4082− t_CKINT c = GET_CK_INT(
4083− RETURN->v_int = s->str.length();
1515+ // set return
1516+ RETURN->v_object = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
40841517 }
40851518
4086−CK_DLL_MFUN( string_get_at )
1519+// ctor
1520+CK_DLL_CTOR( event_ctor )
40871521 {
4088− Chuck_String * s = (Chuck_String *)SELF;
4089− RETURN->v_int = s->str.length();
1522+// OBJ_MEMBER_INT(SELF, event_offset_data) = (t_CKUINT)new Data_Event;
1523+// Chuck_Event * event = (Chuck_Event *)SELF;
40901524 }
4091−*/
40921525
40931526
4094−// array.size()
4095−CK_DLL_MFUN( array_get_size )
1527+CK_DLL_DTOR( event_dtor )
40961528 {
4097− Chuck_Array * array = (Chuck_Array *)SELF;
4098− RETURN->v_int = array->size();
1529+// delete (Data_Event *)OBJ_MEMBER_INT(SELF, event_offset_data);
40991530 }
41001531
4101−// array.size()
4102−CK_DLL_MFUN( array_set_size )
1532+CK_DLL_MFUN( event_signal )
41031533 {
4104− Chuck_Array * array = (Chuck_Array *)SELF;
4105− t_CKINT size = GET_NEXT_INT(ARGS);
4106− if( size < 0 )
4107− {
4108− // TODO: make this exception
4109− CK_FPRINTF_STDERR( "[chuck](via array): attempt to set negative array size!\n" );
4110− RETURN->v_int = 0;
4111− }
4112− else
4113− {
4114− array->set_size( size );
4115− RETURN->v_int = array->size();
4116− }
4117− RETURN->v_int = array->size();
1534+ Chuck_Event * d = (Chuck_Event *)SELF;
1535+ d->signal();
1536+ d->signal_global();
41181537 }
41191538
4120−// array.clear()
4121−CK_DLL_MFUN( array_clear )
1539+CK_DLL_MFUN( event_broadcast )
41221540 {
4123− Chuck_Array * array = (Chuck_Array *)SELF;
4124− array->clear();
1541+ Chuck_Event * d = (Chuck_Event *)SELF;
1542+ d->broadcast();
1543+ d->broadcast_global();
41251544 }
41261545
4127−// array.reset()
4128−CK_DLL_MFUN( array_reset )
1546+CK_DLL_MFUN( event_wait )
41291547 {
4130− Chuck_Array * array = (Chuck_Array *)SELF;
4131− array->clear();
4132− // default capacity
4133− array->set_capacity( 8 );
1548+ // Chuck_Event * d = (Chuck_Event *)SELF;
1549+ assert( FALSE );
41341550 }
41351551
4136−// array.cap()
4137−CK_DLL_MFUN( array_set_capacity )
1552+CK_DLL_MFUN( event_can_wait )
41381553 {
4139− Chuck_Array * array = (Chuck_Array *)SELF;
4140− t_CKINT capacity = GET_NEXT_INT(ARGS);
4141− if( capacity < 0 )
4142− {
4143− // TODO: make this exception
4144− CK_FPRINTF_STDERR( "[chuck](via array): attempt to set negative array capacity!\n" );
4145− RETURN->v_int = 0;
4146− }
4147− else
4148− {
4149− array->set_capacity( capacity );
4150− RETURN->v_int = array->capacity();
4151− }
1554+ RETURN->v_int = TRUE;
41521555 }
41531556
4154−// array.cap()
4155−CK_DLL_MFUN( array_get_capacity_hack )
1557+
1558+//-----------------------------------------------------------------------------
1559+// vec3 API
1560+//-----------------------------------------------------------------------------
1561+CK_DLL_MFUN( vec3_set )
41561562 {
4157− Chuck_Array * array = (Chuck_Array *)SELF;
4158− RETURN->v_int = array->size();
1563+ // HACK: this is a particularly horrid cast from (Chuck_Object *)
1564+ // t_CKVEC3 is neither a super- or sub-class of Chuck_Object...
1565+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1566+ // get index
1567+ vec3->x = GET_NEXT_FLOAT(ARGS);
1568+ vec3->y = GET_NEXT_FLOAT(ARGS);
1569+ vec3->z = GET_NEXT_FLOAT(ARGS);
41591570 }
41601571
4161−// array.capacity()
4162−CK_DLL_MFUN( array_get_capacity )
1572+CK_DLL_MFUN( vec3_setAll )
41631573 {
4164− Chuck_Array * array = (Chuck_Array *)SELF;
4165− RETURN->v_int = array->capacity();
1574+ // get data pointer
1575+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1576+ // get index
1577+ vec3->x = vec3->y = vec3->z = GET_NEXT_FLOAT(ARGS);
41661578 }
41671579
4168−// array.find()
4169−CK_DLL_MFUN( array_find )
1580+CK_DLL_MFUN( vec3_magnitude )
41701581 {
4171− Chuck_Array * array = (Chuck_Array *)SELF;
4172− Chuck_String * name = GET_NEXT_STRING( ARGS );
4173− RETURN->v_int = array->find( name->str() );
1582+ // get data pointer
1583+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1584+ // compute magnitude
1585+ t_CKFLOAT mag = ::sqrt( vec3->x*vec3->x + vec3->y*vec3->y + vec3->z*vec3->z );
1586+ // return
1587+ RETURN->v_float = mag;
41741588 }
41751589
4176−// array.erase()
4177−CK_DLL_MFUN( array_erase )
1590+CK_DLL_MFUN( vec3_normalize )
41781591 {
4179− Chuck_Array * array = (Chuck_Array *)SELF;
4180− Chuck_String * name = GET_NEXT_STRING( ARGS );
4181− RETURN->v_int = array->erase( name->str() );
1592+ // get data pointer
1593+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1594+ // compute magnitude
1595+ t_CKFLOAT mag = ::sqrt( vec3->x*vec3->x + vec3->y*vec3->y + vec3->z*vec3->z );
1596+ // check for zero
1597+ if( mag > 0 )
1598+ {
1599+ vec3->x /= mag;
1600+ vec3->y /= mag;
1601+ vec3->z /= mag;
1602+ }
41821603 }
41831604
4184−// array.push_back()
4185−CK_DLL_MFUN( array_push_back )
1605+CK_DLL_MFUN( vec3_interp )
41861606 {
4187− Chuck_Array * array = (Chuck_Array *)SELF;
4188− // ISSUE: 64-bit (fixed 1.3.1.0 using data kind)
4189− if( array->data_type_kind() == CHUCK_ARRAY4_DATAKIND )
4190− RETURN->v_int = ((Chuck_Array4 *)array)->push_back( GET_NEXT_UINT( ARGS ) );
4191− else if( array->data_type_kind() == CHUCK_ARRAY8_DATAKIND )
4192− RETURN->v_int = ((Chuck_Array8 *)array)->push_back( GET_NEXT_FLOAT( ARGS ) );
4193− else if( array->data_type_kind() == CHUCK_ARRAY16_DATAKIND )
4194− RETURN->v_int = ((Chuck_Array16 *)array)->push_back( GET_NEXT_COMPLEX( ARGS ) );
4195− else
4196− assert( FALSE );
1607+ // get data pointer
1608+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1609+ // update value based on goal and slew
1610+ vec3->x = (vec3->y - vec3->x) * vec3->z + vec3->x;
1611+ // set return to value so it can used right after if desired
1612+ RETURN->v_float = vec3->x;
41971613 }
41981614
4199−// array.pop_back()
4200−CK_DLL_MFUN( array_pop_back )
1615+CK_DLL_MFUN( vec3_interp_delta_float )
42011616 {
4202− Chuck_Array * array = (Chuck_Array *)SELF;
4203− // ISSUE: 64-bit (fixed 1.3.1.0 using data kind)
4204− if( array->data_type_kind() == CHUCK_ARRAY4_DATAKIND )
4205− RETURN->v_int = ((Chuck_Array4 *)array)->pop_back( );
4206− else if( array->data_type_kind() == CHUCK_ARRAY8_DATAKIND )
4207− RETURN->v_int = ((Chuck_Array8 *)array)->pop_back( );
4208− else if( array->data_type_kind() == CHUCK_ARRAY16_DATAKIND )
4209− RETURN->v_int = ((Chuck_Array16 *)array)->pop_back( );
4210− else
4211− assert( FALSE );
1617+ // get data pointer
1618+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1619+ // get index
1620+ t_CKFLOAT delta = GET_NEXT_FLOAT(ARGS);
1621+ // update value based on goal and slew
1622+ vec3->x = (vec3->y - vec3->x) * vec3->z * delta + vec3->x;
1623+ // set return to value so it can used right after if desired
1624+ RETURN->v_float = vec3->x;
42121625 }
42131626
4214−
4215−#ifndef __DISABLE_MIDI__
4216−
4217−//-----------------------------------------------------------------------------
4218−// MidiIn API
4219−//-----------------------------------------------------------------------------
4220−CK_DLL_CTOR( MidiIn_ctor )
1627+CK_DLL_MFUN( vec3_interp_delta_dur )
42211628 {
4222− MidiIn * min = new MidiIn;
4223− min->SELF = SELF;
4224− OBJ_MEMBER_INT(SELF, MidiIn_offset_data) = (t_CKINT)min;
1629+ // get data pointer
1630+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1631+ // get index
1632+ t_CKDUR delta = GET_NEXT_DUR(ARGS);
1633+ // get srate
1634+ t_CKFLOAT srate = SHRED->vm_ref->srate();
1635+ // update value based on goal and slew
1636+ vec3->x = (vec3->y - vec3->x) * vec3->z * (delta / srate) + vec3->x;
1637+ // set return to value so it can used right after if desired
1638+ RETURN->v_float = vec3->x;
42251639 }
42261640
4227−CK_DLL_DTOR( MidiIn_dtor )
1641+CK_DLL_MFUN( vec3_update_goal )
42281642 {
4229− delete (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4230− OBJ_MEMBER_INT(SELF, MidiIn_offset_data) = 0;
1643+ // get data pointer
1644+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1645+ // get index
1646+ t_CKDUR goal = GET_NEXT_DUR(ARGS);
1647+ // set goal
1648+ vec3->y = goal;
42311649 }
42321650
4233−CK_DLL_MFUN( MidiIn_open )
1651+CK_DLL_MFUN( vec3_update_goal_slew )
42341652 {
4235− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4236− t_CKINT port = GET_CK_INT(ARGS);
4237− RETURN->v_int = min->open( SHRED->vm_ref, port );
1653+ // get data pointer
1654+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1655+ // get goal
1656+ t_CKDUR goal = GET_NEXT_DUR(ARGS);
1657+ // get slew
1658+ t_CKDUR slew = GET_NEXT_DUR(ARGS);
1659+ // set goal
1660+ vec3->y = goal;
1661+ // set slew
1662+ vec3->z = slew;
42381663 }
42391664
4240−CK_DLL_MFUN( MidiIn_open_named ) // added 1.3.0.0
1665+CK_DLL_MFUN( vec3_updateSet_goalAndValue )
42411666 {
4242− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4243− Chuck_String * name = GET_CK_STRING(ARGS);
4244− RETURN->v_int = min->open( SHRED->vm_ref, name->str() );
1667+ // get data pointer
1668+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1669+ // get goal
1670+ t_CKDUR goalAndValue = GET_NEXT_DUR(ARGS);
1671+ // set goal and value
1672+ vec3->y = vec3->x = goalAndValue;
42451673 }
42461674
4247−CK_DLL_MFUN( MidiIn_good )
1675+CK_DLL_MFUN( vec3_updateSet_goalAndValue_slew )
42481676 {
4249− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4250− RETURN->v_int = (t_CKINT)min->good();
1677+ // get data pointer
1678+ t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1679+ // get goal
1680+ t_CKDUR goalAndValue = GET_NEXT_DUR(ARGS);
1681+ // get slew
1682+ t_CKDUR slew = GET_NEXT_DUR(ARGS);
1683+ // set goal and value
1684+ vec3->y = vec3->x = goalAndValue;
1685+ // set slew
1686+ vec3->z = slew;
42511687 }
42521688
4253−CK_DLL_MFUN( MidiIn_num )
1689+
1690+//-----------------------------------------------------------------------------
1691+// vec4 API
1692+//-----------------------------------------------------------------------------
1693+CK_DLL_MFUN( vec4_set )
42541694 {
4255− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4256− RETURN->v_int = min->num();
1695+ // HACK: this is a particularly horrid cast from (Chuck_Object *)
1696+ // t_CKVEC3 is neither a super- or sub-class of Chuck_Object...
1697+ t_CKVEC4 * vec3 = (t_CKVEC4 *)SELF;
1698+ // get index
1699+ vec3->x = GET_NEXT_FLOAT(ARGS);
1700+ vec3->y = GET_NEXT_FLOAT(ARGS);
1701+ vec3->z = GET_NEXT_FLOAT(ARGS);
1702+ vec3->w = GET_NEXT_FLOAT(ARGS);
42571703 }
42581704
4259−CK_DLL_MFUN( MidiIn_printerr )
1705+CK_DLL_MFUN( vec4_setAll )
42601706 {
4261− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4262− t_CKINT print_or_not = GET_CK_INT(ARGS);
4263− min->set_suppress( !print_or_not );
1707+ // get data pointer
1708+ t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
1709+ // get index
1710+ vec4->x = vec4->y = vec4->z = vec4->w = GET_NEXT_FLOAT(ARGS);
42641711 }
42651712
4266−CK_DLL_MFUN( MidiIn_name )
1713+CK_DLL_MFUN( vec4_magnitude )
42671714 {
4268− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4269− // TODO: memory leak, please fix, Thanks.
4270− Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4271− // only if valid
4272− if( min->good() )
4273− a->set( min->min->getPortName( min->num() ) );
4274− RETURN->v_string = a;
1715+ // get data pointer
1716+ t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
1717+ // compute magnitude
1718+ t_CKFLOAT mag = ::sqrt( vec4->x*vec4->x + vec4->y*vec4->y
1719+ + vec4->z*vec4->z + vec4->w*vec4->w );
1720+ // return
1721+ RETURN->v_float = mag;
42751722 }
42761723
4277−CK_DLL_MFUN( MidiIn_recv )
1724+CK_DLL_MFUN( vec4_normalize )
42781725 {
4279− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4280− Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);
4281− MidiMsg the_msg;
4282− RETURN->v_int = min->recv( &the_msg );
4283− if( RETURN->v_int )
1726+ // get data pointer
1727+ t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
1728+ // compute magnitude
1729+ t_CKFLOAT mag = ::sqrt( vec4->x*vec4->x + vec4->y*vec4->y
1730+ + vec4->z*vec4->z + vec4->w*vec4->w );
1731+ // check for zero
1732+ if( mag > 0 )
42841733 {
4285− OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1) = the_msg.data[0];
4286− OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2) = the_msg.data[1];
4287− OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3) = the_msg.data[2];
1734+ vec4->x /= mag;
1735+ vec4->y /= mag;
1736+ vec4->z /= mag;
1737+ vec4->w /= mag;
42881738 }
42891739 }
42901740
42911741
4292−CK_DLL_MFUN( MidiIn_can_wait )
4293−{
4294− MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4295− RETURN->v_int = min->empty();
4296−}
42971742
42981743
42991744 //-----------------------------------------------------------------------------
4300−// MidiOut API
1745+// Shred API
43011746 //-----------------------------------------------------------------------------
4302−CK_DLL_CTOR( MidiOut_ctor )
1747+
1748+//CK_DLL_CTOR( shred_ctor );
1749+//CK_DLL_DTOR( shred_dtor );
1750+
1751+CK_DLL_MFUN( shred_exit )
43031752 {
4304− OBJ_MEMBER_INT(SELF, MidiOut_offset_data) = (t_CKUINT)new MidiOut;
1753+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1754+ // end the shred
1755+ derhs->is_done = TRUE;
1756+ derhs->is_running = FALSE;
43051757 }
43061758
4307−CK_DLL_DTOR( MidiOut_dtor )
1759+CK_DLL_MFUN( shred_running )
43081760 {
4309− delete (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4310− OBJ_MEMBER_INT(SELF, MidiOut_offset_data) = 0;
1761+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1762+ RETURN->v_int = derhs->is_running;
43111763 }
43121764
4313−CK_DLL_MFUN( MidiOut_open )
1765+CK_DLL_MFUN( shred_done )
43141766 {
4315− MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4316− t_CKINT port = GET_CK_INT(ARGS);
4317− RETURN->v_int = mout->open( port );
1767+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1768+ RETURN->v_int = derhs->is_done;
43181769 }
43191770
4320−CK_DLL_MFUN( MidiOut_open_named ) // added 1.3.0.0
1771+CK_DLL_MFUN( shred_clone )
43211772 {
4322− MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4323− Chuck_String * name = GET_CK_STRING(ARGS);
4324− RETURN->v_int = mout->open( name->str() );
43251773 }
43261774
4327−CK_DLL_MFUN( MidiOut_good )
1775+CK_DLL_MFUN( shred_id )
43281776 {
4329− MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4330− RETURN->v_int = (t_CKINT)mout->good();
1777+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1778+ // return the id
1779+ RETURN->v_int = derhs->xid;
43311780 }
43321781
4333−CK_DLL_MFUN( MidiOut_num )
1782+CK_DLL_MFUN( shred_yield )
43341783 {
4335− MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4336− RETURN->v_int = mout->num();
1784+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1785+ Chuck_VM * vm = derhs->vm_ref;
1786+
1787+ // suspend
1788+ derhs->is_running = FALSE;
1789+ // reshredule
1790+ vm->shreduler()->shredule( derhs, derhs->now );
43371791 }
43381792
4339−CK_DLL_MFUN( MidiOut_name )
1793+CK_DLL_MFUN( shred_numArgs )
43401794 {
4341− MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4342− // TODO: memory leak, please fix, Thanks.
4343− Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4344− // only if valid
4345− if( mout->good() )
4346− a->set( mout->mout->getPortName( mout->num() ) );
4347− RETURN->v_string = a;
1795+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1796+
1797+ // get the number of arguments
1798+ RETURN->v_int = derhs->args.size();
43481799 }
43491800
4350−CK_DLL_MFUN( MidiOut_printerr )
1801+CK_DLL_MFUN( shred_getArg )
43511802 {
4352− MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4353− t_CKINT print_or_not = GET_CK_INT(ARGS);
4354− mout->set_suppress( !print_or_not );
1803+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1804+
1805+ // get index
1806+ t_CKINT i = GET_NEXT_INT(ARGS);
1807+ // total
1808+ t_CKINT num = derhs->args.size();
1809+
1810+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1811+ str->set( ( i < num ? derhs->args[i] : "" ) );
1812+ RETURN->v_string = str;
43551813 }
43561814
4357−CK_DLL_MFUN( MidiOut_send )
1815+CK_DLL_MFUN( shred_sourcePath ) // added 1.3.0.0
43581816 {
4359− MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
4360− Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);
4361− MidiMsg the_msg;
4362− the_msg.data[0] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1);
4363− the_msg.data[1] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2);
4364− the_msg.data[2] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3);
4365− RETURN->v_int = mout->send( &the_msg );
1817+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1818+
1819+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1820+ str->set( derhs->code->filename );
1821+ RETURN->v_string = str;
43661822 }
43671823
4368−#endif // __DISABLE_MIDI__
4369−
4370−
4371−
4372−
4373−#ifndef __DISABLE_HID__
4374−//-----------------------------------------------------------------------------
4375−// HidMsg API
4376−//-----------------------------------------------------------------------------
4377−CK_DLL_MFUN( HidMsg_is_axis_motion )
1824+CK_DLL_MFUN( shred_sourceDir ) // added 1.3.0.0
43781825 {
4379− RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
4380− CK_HID_JOYSTICK_AXIS ? 1 : 0 );
1826+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1827+
1828+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1829+
1830+ str->set( extract_filepath_dir(derhs->code->filename) );
1831+
1832+ RETURN->v_string = str;
43811833 }
43821834
4383−CK_DLL_MFUN( HidMsg_is_button_down )
1835+CK_DLL_MFUN( shred_sourceDir2 ) // added 1.3.2.0
43841836 {
4385− RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
4386− CK_HID_BUTTON_DOWN ? 1 : 0 );
4387−}
1837+ Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
1838+ // get num up
1839+ t_CKINT i = GET_NEXT_INT(ARGS);
1840+ // abs
1841+ if( i < 0 ) i = -i;
43881842
4389−CK_DLL_MFUN( HidMsg_is_button_up )
4390−{
4391− RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
4392− CK_HID_BUTTON_UP ? 1 : 0 );
1843+ // new chuck string
1844+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1845+ // set the content
1846+ str->set( extract_filepath_dir(derhs->code->filename) );
1847+ // up
1848+ str->set( dir_go_up( str->str(), i ) );
1849+
1850+ RETURN->v_string = str;
43931851 }
43941852
4395−CK_DLL_MFUN( HidMsg_is_mouse_motion )
4396−{
4397− RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
4398− CK_HID_MOUSE_MOTION ? 1 : 0 );
4399−}
44001853
4401−CK_DLL_MFUN( HidMsg_is_hat_motion )
1854+CK_DLL_SFUN( shred_fromId ) // added 1.3.2.0
44021855 {
4403− RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
4404− CK_HID_JOYSTICK_HAT ? 1 : 0 );
1856+ t_CKINT shred_id = GET_NEXT_INT(ARGS);
1857+
1858+ Chuck_VM_Shred * derhs = SHRED->vm_ref->shreduler()->lookup(shred_id);
1859+
1860+ RETURN->v_object = derhs;
44051861 }
44061862
4407−CK_DLL_MFUN( HidMsg_is_wheel_motion )
4408−{
4409− RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==
4410− CK_HID_MOUSE_WHEEL ? 1 : 0 );
4411−}
44121863
44131864 //-----------------------------------------------------------------------------
4414−// HidIn API
1865+// string API
44151866 //-----------------------------------------------------------------------------
4416−CK_DLL_CTOR( HidIn_ctor )
1867+CK_DLL_MFUN( string_length )
44171868 {
4418− HidIn * min = new HidIn;
4419− min->SELF = SELF;
4420− OBJ_MEMBER_INT(SELF, HidIn_offset_data) = (t_CKINT)min;
1869+ Chuck_String * s = (Chuck_String *)SELF;
1870+ RETURN->v_int = s->str().length();
44211871 }
44221872
4423−CK_DLL_DTOR( HidIn_dtor )
1873+CK_DLL_MFUN( string_upper )
44241874 {
4425− delete (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4426− OBJ_MEMBER_INT(SELF, HidIn_offset_data) = 0;
1875+ Chuck_String * s = (Chuck_String *)SELF;
1876+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1877+ str->set( toupper( s->str() ) );
1878+ RETURN->v_string = str;
44271879 }
44281880
4429−CK_DLL_MFUN( HidIn_open )
1881+CK_DLL_MFUN( string_lower )
44301882 {
4431− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4432− t_CKINT type = GET_NEXT_INT(ARGS);
4433− t_CKINT num = GET_NEXT_INT(ARGS);
4434− // CK_FPRINTF_STDERR( "HidIn_open %li %li\n", type, num );
4435− RETURN->v_int = min->open( SHRED->vm_ref, type, num );
1883+ Chuck_String * s = (Chuck_String *)SELF;
1884+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1885+ str->set( tolower( s->str() ) );
1886+ RETURN->v_string = str;
44361887 }
44371888
4438−CK_DLL_MFUN( HidIn_open_named )
1889+CK_DLL_MFUN( string_ltrim )
44391890 {
4440− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4441− Chuck_String * name = GET_NEXT_STRING(ARGS);
4442− std::string s = name->str();
4443− RETURN->v_int = min->open( SHRED->vm_ref, s );
1891+ Chuck_String * s = (Chuck_String *)SELF;
1892+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1893+ str->set( ltrim( s->str() ) );
1894+ RETURN->v_string = str;
44441895 }
44451896
4446−CK_DLL_MFUN( HidIn_open_joystick )
1897+CK_DLL_MFUN( string_rtrim )
44471898 {
4448− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4449− t_CKINT num = GET_NEXT_INT(ARGS);
4450− RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_JOYSTICK, num );
1899+ Chuck_String * s = (Chuck_String *)SELF;
1900+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1901+ str->set( rtrim( s->str() ) );
1902+ RETURN->v_string = str;
44511903 }
44521904
4453−CK_DLL_MFUN( HidIn_open_mouse )
1905+CK_DLL_MFUN( string_trim )
44541906 {
4455− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4456− t_CKINT num = GET_NEXT_INT(ARGS);
4457− RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_MOUSE, num );
1907+ Chuck_String * s = (Chuck_String *)SELF;
1908+ Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
1909+ str->set( trim( s->str() ) );
1910+ RETURN->v_string = str;
44581911 }
44591912
4460−CK_DLL_MFUN( HidIn_open_keyboard )
1913+CK_DLL_MFUN( string_toString )
44611914 {
4462− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4463− t_CKINT num = GET_NEXT_INT(ARGS);
4464− RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_KEYBOARD, num );
1915+ Chuck_String * s = (Chuck_String *)SELF;
1916+ RETURN->v_string = s;
44651917 }
44661918
4467−CK_DLL_MFUN( HidIn_open_tiltsensor )
1919+CK_DLL_MFUN(string_charAt)
44681920 {
4469− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4470− RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_TILTSENSOR, 0 );
1921+ Chuck_String * str = (Chuck_String *) SELF;
1922+ t_CKINT index = GET_NEXT_INT(ARGS);
1923+
1924+ if(index < 0 || index >= str->str().length())
1925+ {
1926+ throw_exception(SHRED, "IndexOutOfBoundsException", index);
1927+ RETURN->v_int = -1;
1928+ return;
1929+ }
1930+
1931+ RETURN->v_int = str->str().at(index);
44711932 }
44721933
4473−CK_DLL_MFUN( HidIn_good )
1934+CK_DLL_MFUN(string_setCharAt)
44741935 {
4475− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4476− RETURN->v_int = (t_CKINT)min->good();
4477−}
1936+ Chuck_String * str = (Chuck_String *) SELF;
1937+ t_CKINT index = GET_NEXT_INT(ARGS);
1938+ t_CKINT the_char = GET_NEXT_INT(ARGS);
1939+
1940+ if(index < 0 || index >= str->str().length())
1941+ {
1942+ throw_exception(SHRED, "IndexOutOfBoundsException", index);
1943+ RETURN->v_int = -1;
1944+ return;
1945+ }
44781946
4479−CK_DLL_MFUN( HidIn_num )
4480−{
4481− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4482− RETURN->v_int = min->num();
1947+ // str->str.at(index) = the_char;
1948+ std::string s = str->str();
1949+ s.at(index) = the_char;
1950+ str->set( s );
1951+ RETURN->v_int = str->str().at(index);
44831952 }
44841953
4485−CK_DLL_MFUN( HidIn_printerr )
1954+CK_DLL_MFUN(string_substring)
44861955 {
4487− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4488− t_CKINT print_or_not = GET_CK_INT(ARGS);
4489− min->set_suppress( !print_or_not );
4490−}
1956+ Chuck_String * str = (Chuck_String *) SELF;
1957+ t_CKINT start = GET_NEXT_INT(ARGS);
1958+
1959+ if(start < 0 || start >= str->str().length())
1960+ {
1961+ throw_exception(SHRED, "IndexOutOfBoundsException", start);
1962+ RETURN->v_string = NULL;
1963+ return;
1964+ }
44911965
4492−CK_DLL_MFUN( HidIn_name )
4493−{
4494− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4495− // TODO: memory leak, please fix, Thanks.
4496− // Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4497− // only if valid
4498− // if( min->good() )
4499− // a->str = min->phin->getPortName( min->num() );
4500− // TODO: is null problem?
4501− RETURN->v_string = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4502− RETURN->v_string->set( min->name() );
1966+ Chuck_String * ss = (Chuck_String *) instantiate_and_initialize_object(SHRED->vm_ref->env()->t_string, SHRED);
1967+ ss->set( str->str().substr(start) );
1968+
1969+ RETURN->v_string = ss;
45031970 }
45041971
4505−CK_DLL_MFUN( HidIn_recv )
1972+CK_DLL_MFUN(string_substringN)
45061973 {
4507− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4508− Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);
4509− HidMsg the_msg;
4510− RETURN->v_int = min->recv( &the_msg );
4511− if( RETURN->v_int )
1974+ Chuck_String * str = (Chuck_String *) SELF;
1975+ t_CKINT start = GET_NEXT_INT(ARGS);
1976+ t_CKINT length = GET_NEXT_INT(ARGS);
1977+
1978+ if(start < 0 || start >= str->str().length())
45121979 {
4513− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_type) = the_msg.device_type;
4514− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_num) = the_msg.device_num;
4515− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_type) = the_msg.type;
4516− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_which) = the_msg.eid;
4517− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_idata) = the_msg.idata[0];
4518− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_fdata) = the_msg.fdata[0];
4519−
4520− // mouse motion specific member variables
4521− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltax) = the_msg.idata[0];
4522− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltay) = the_msg.idata[1];
4523− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursorx) = the_msg.idata[2];
4524− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursory) = the_msg.idata[3];
4525− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursorx) = the_msg.fdata[0];
4526− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursory) = the_msg.fdata[1];
4527−
4528− // axis motion specific member variables
4529− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_axis_position) = the_msg.idata[0];
4530− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaled_axis_position) = the_msg.fdata[0];
4531− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_axis_position2) = the_msg.fdata[0];
4532−
4533− // hat motion specific variables
4534− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_hat_position) = the_msg.idata[0];
4535−
4536− // keyboard specific variables
4537− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_key) = the_msg.idata[1];
4538− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_ascii) = the_msg.idata[2];
4539−
4540− // accelerometer (tilt sensor, wii remote) specific members
4541− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_x) = the_msg.idata[0];
4542− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_y) = the_msg.idata[1];
4543− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_z) = the_msg.idata[2];
4544−
4545− // multitouch stuff - added 1.3.0.0
4546− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_touchx) = the_msg.fdata[0];
4547− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_touchy) = the_msg.fdata[1];
4548− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_touchsize) = the_msg.fdata[2];
1980+ throw_exception(SHRED, "IndexOutOfBoundsException", start);
1981+ RETURN->v_string = NULL;
1982+ return;
45491983 }
4550−}
4551−
4552−CK_DLL_MFUN( HidIn_read )
4553−{
4554− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4555− t_CKINT type = GET_NEXT_INT(ARGS);
4556− t_CKINT num = GET_NEXT_INT(ARGS);
4557− Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
4558−
4559− HidMsg the_msg;
45601984
4561− RETURN->v_int = min->read( type, num, &the_msg );
4562−
4563− if( RETURN->v_int )
1985+ if(length < 0 || start+length > str->str().length())
45641986 {
4565− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_type) = the_msg.device_type;
4566− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_num) = the_msg.device_num;
4567− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_type) = the_msg.type;
4568− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_which) = the_msg.eid;
4569−
4570− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_idata) = the_msg.idata[0];
4571− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_fdata) = the_msg.fdata[0];
4572−
4573− // mouse motion specific member members
4574− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltax) = the_msg.idata[0];
4575− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_deltay) = the_msg.idata[1];
4576− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursorx) = the_msg.idata[2];
4577− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_cursory) = the_msg.idata[3];
4578− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursorx) = the_msg.fdata[0];
4579− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaledcursory) = the_msg.fdata[1];
4580−
4581− // joystick axis specific member members
4582− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_axis_position) = the_msg.idata[0];
4583− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_scaled_axis_position) = the_msg.fdata[0];
4584− OBJ_MEMBER_FLOAT(fake_msg, HidMsg_offset_axis_position2) = the_msg.fdata[0];
4585−
4586− // joystick hat specific member members
4587− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_hat_position) = the_msg.idata[0];
4588−
4589− // keyboard specific members
4590− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_key) = the_msg.idata[1];
4591− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_ascii) = the_msg.idata[2];
4592−
4593− // accelerometer (tilt sensor, wii remote) specific members
4594− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_x) = the_msg.idata[0];
4595− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_y) = the_msg.idata[1];
4596− OBJ_MEMBER_INT(fake_msg, HidMsg_offset_z) = the_msg.idata[2];
1987+ throw_exception(SHRED, "IndexOutOfBoundsException", length);
1988+ RETURN->v_string = NULL;
1989+ return;
45971990 }
1991+
1992+ Chuck_String * ss = (Chuck_String *) instantiate_and_initialize_object(SHRED->vm_ref->env()->t_string, SHRED);
1993+ ss->set( str->str().substr(start, length) );
1994+
1995+ RETURN->v_string = ss;
45981996 }
45991997
4600−CK_DLL_MFUN( HidIn_send )
1998+CK_DLL_MFUN(string_insert)
46011999 {
4602− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4603− Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);
4604−
4605− HidMsg the_msg;
4606− the_msg.device_type = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_device_type );
4607− the_msg.device_num = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_device_num );
4608− the_msg.type = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_type );
4609− the_msg.eid = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_which );
4610− the_msg.idata[0] = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_idata );
2000+ Chuck_String * str = (Chuck_String *) SELF;
2001+ t_CKINT position = GET_NEXT_INT(ARGS);
2002+ Chuck_String * str2 = GET_NEXT_STRING(ARGS);
2003+
2004+ if(position < 0 || position >= str->str().length())
2005+ {
2006+ throw_exception(SHRED, "IndexOutOfBoundsException", position);
2007+ return;
2008+ }
2009+ if(str2 == NULL)
2010+ {
2011+ throw_exception(SHRED, "NullPointerException");
2012+ return;
2013+ }
46112014
4612− RETURN->v_int = min->send( &the_msg );
2015+ // str->str.insert(position, str2->str);
2016+ std::string s = str->str();
2017+ s.insert( position, str2->str() );
2018+ str->set( s );
46132019 }
46142020
4615−CK_DLL_MFUN( HidIn_can_wait )
2021+CK_DLL_MFUN(string_replace)
46162022 {
4617− HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
4618− RETURN->v_int = min->empty();
2023+ Chuck_String * str = (Chuck_String *) SELF;
2024+ t_CKINT position = GET_NEXT_INT(ARGS);
2025+ Chuck_String * str2 = GET_NEXT_STRING(ARGS);
2026+
2027+ if(position < 0 || position >= str->str().length())
2028+ {
2029+ throw_exception(SHRED, "IndexOutOfBoundsException", position);
2030+ return;
2031+ }
2032+ if(str2 == NULL)
2033+ {
2034+ throw_exception(SHRED, "NullPointerException");
2035+ return;
2036+ }
2037+
2038+ string::size_type length;
2039+ if(position + str2->str().length() > str->str().length())
2040+ length = str->str().length() - position;
2041+ else
2042+ length = str2->str().length();
2043+
2044+ // str->str.replace(position, length, str2->str);
2045+ std::string s = str->str();
2046+ s.replace( position, length, str2->str() );
2047+ str->set( s );
46192048 }
46202049
4621−CK_DLL_SFUN( HidIn_read_tilt_sensor )
2050+CK_DLL_MFUN(string_replaceN)
46222051 {
4623− static HidIn * hi;
4624− static t_CKBOOL hi_good = TRUE;
4625−
4626− Chuck_Array4 * array = new Chuck_Array4( FALSE, 3 );
4627− array->set( 0, 0 );
4628− array->set( 1, 0 );
4629− array->set( 2, 0 );
4630−
4631− // TODO: reference count?
4632− array->add_ref();
4633− RETURN->v_object = array;
2052+ Chuck_String * str = (Chuck_String *) SELF;
2053+ t_CKINT position = GET_NEXT_INT(ARGS);
2054+ t_CKINT length = GET_NEXT_INT(ARGS);
2055+ Chuck_String * str2 = GET_NEXT_STRING(ARGS);
46342056
4635− if( hi_good == FALSE )
2057+ if(position < 0 || position >= str->str().length())
2058+ {
2059+ throw_exception(SHRED, "IndexOutOfBoundsException", position);
46362060 return;
2061+ }
46372062
4638− if( !hi )
2063+ if(length < 0 || position+length > str->str().length())
46392064 {
4640− hi = new HidIn;
4641− if( !hi->open( SHRED->vm_ref, CK_HID_DEV_TILTSENSOR, 0 ) )
4642− {
4643− hi_good = FALSE;
4644− return;
4645− }
2065+ throw_exception(SHRED, "IndexOutOfBoundsException", length);
2066+ return;
46462067 }
46472068
4648− HidMsg msg;
4649−
4650− if( !hi->read( CK_HID_ACCELEROMETER, 0, &msg ) )
2069+ if(str2 == NULL)
46512070 {
2071+ throw_exception(SHRED, "NullPointerException");
46522072 return;
46532073 }
46542074
4655− array->set( 0, msg.idata[0] );
4656− array->set( 1, msg.idata[1] );
4657− array->set( 2, msg.idata[2] );
2075+ // str->str.replace(position, length, str2->str);
2076+ std::string s = str->str();
2077+ s.replace( position, length, str2->str() );
2078+ str->set( s );
46582079 }
46592080
4660−CK_DLL_SFUN( HidIn_ctrl_tiltPollRate )
2081+CK_DLL_MFUN(string_find)
46612082 {
4662− // get srate
4663− if( !SHRED || !SHRED->vm_ref )
2083+ Chuck_String * str = (Chuck_String *) SELF;
2084+ t_CKINT the_char = GET_NEXT_INT(ARGS);
2085+
2086+ string::size_type index = str->str().find(the_char);
2087+
2088+ if(index == string::npos)
2089+ RETURN->v_int = -1;
2090+ else
2091+ RETURN->v_int = index;
2092+}
2093+
2094+CK_DLL_MFUN(string_findStart)
2095+{
2096+ Chuck_String * str = (Chuck_String *) SELF;
2097+ t_CKINT the_char = GET_NEXT_INT(ARGS);
2098+ t_CKINT start = GET_NEXT_INT(ARGS);
2099+
2100+ if(start < 0 || start >= str->str().length())
46642101 {
4665− // problem
4666− CK_FPRINTF_STDERR( "[chuck](via HID): can't set tiltPollRate on NULL shred/VM...\n" );
4667− RETURN->v_dur = 0;
2102+ throw_exception(SHRED, "IndexOutOfBoundsException", start);
2103+ RETURN->v_int = -1;
46682104 return;
46692105 }
4670− t_CKFLOAT srate = SHRED->vm_ref->srate();
4671−
4672− // get arg
4673− t_CKDUR v = GET_NEXT_DUR( ARGS );
4674−
4675− // get in microseconds
4676− t_CKINT usec = (t_CKINT)( v / srate * 1000000 );
46772106
4678− // make sure it's nonnegative
4679− if( usec < 0 ) usec = 0;
2107+ string::size_type index = str->str().find(the_char, start);
2108+

495 more lines aren’t shown here.

src/core/chuck_lang.h+0−214
@@ -59,17 +59,6 @@ t_CKBOOL init_class_array( Chuck_Env * env, Chuck_Type * type ); · 58 unmodified lines
5959 t_CKBOOL init_class_vec3( Chuck_Env * env, Chuck_Type * type ); // 1.3.5.3
6060 t_CKBOOL init_class_vec4( Chuck_Env * env, Chuck_Type * type ); // 1.3.5.3
6161
62−t_CKBOOL init_class_Midi( Chuck_Env * env );
63−t_CKBOOL init_class_MidiRW( Chuck_Env * env );
64−t_CKBOOL init_class_HID( Chuck_Env * env );
65−t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type );
66−#ifndef __DISABLE_FILEIO__
67−t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type );
68−#endif
69−// added 1.3.0.0 -- moved to be full-fledged class
70−t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type );
71−// added 1.3.0.0 -- moved to be full-fledged class
72−t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type );
7362
7463
7564
@@ -208,86 +197,6 @@ CK_DLL_MFUN( event_wait ); · 132 unmodified lines
208197 CK_DLL_MFUN( event_can_wait );
209198
210199
211−//-----------------------------------------------------------------------------
212−// io API
213−//-----------------------------------------------------------------------------
214−CK_DLL_MFUN( io_dummy );
215−CK_DLL_SFUN( io_newline );
216−CK_DLL_SFUN( io_openfile );
217−
218−
219−#ifndef __DISABLE_FILEIO__
220−//-----------------------------------------------------------------------------
221−// fileio API
222−//-----------------------------------------------------------------------------
223−CK_DLL_CTOR( fileio_ctor );
224−CK_DLL_DTOR( fileio_dtor );
225−CK_DLL_MFUN( fileio_open );
226−CK_DLL_MFUN( fileio_openflags );
227−CK_DLL_MFUN( fileio_good );
228−CK_DLL_MFUN( fileio_close );
229−CK_DLL_MFUN( fileio_flush );
230−CK_DLL_MFUN( fileio_getmode );
231−CK_DLL_MFUN( fileio_setmode );
232−CK_DLL_MFUN( fileio_size );
233−CK_DLL_MFUN( fileio_seek );
234−CK_DLL_MFUN( fileio_tell );
235−CK_DLL_MFUN( fileio_isdir );
236−CK_DLL_MFUN( fileio_dirlist );
237−CK_DLL_MFUN( fileio_read );
238−CK_DLL_MFUN( fileio_readline );
239−CK_DLL_MFUN( fileio_readint );
240−CK_DLL_MFUN( fileio_readintflags );
241−CK_DLL_MFUN( fileio_readfloat );
242−CK_DLL_MFUN( fileio_eof );
243−CK_DLL_MFUN( fileio_more );
244−CK_DLL_MFUN( fileio_writestring );
245−CK_DLL_MFUN( fileio_writeint );
246−CK_DLL_MFUN( fileio_writeintflags );
247−CK_DLL_MFUN( fileio_writefloat );
248−#endif
249−
250−
251−//-----------------------------------------------------------------------------
252−// chout API -- added 1.3.0.0 as full class
253−//-----------------------------------------------------------------------------
254−CK_DLL_MFUN( chout_good );
255−CK_DLL_MFUN( chout_close );
256−CK_DLL_MFUN( chout_flush );
257−CK_DLL_MFUN( chout_getmode );
258−CK_DLL_MFUN( chout_setmode );
259−CK_DLL_MFUN( chout_read );
260−CK_DLL_MFUN( chout_readline );
261−CK_DLL_MFUN( chout_readint );
262−CK_DLL_MFUN( chout_readintflags );
263−CK_DLL_MFUN( chout_readfloat );
264−CK_DLL_MFUN( chout_eof );
265−CK_DLL_MFUN( chout_more );
266−CK_DLL_MFUN( chout_writestring );
267−CK_DLL_MFUN( chout_writeint );
268−CK_DLL_MFUN( chout_writefloat );
269−
270−
271−//-----------------------------------------------------------------------------
272−// cherr API -- added 1.3.0.0 as full class
273−//-----------------------------------------------------------------------------
274−CK_DLL_MFUN( cherr_good );
275−CK_DLL_MFUN( cherr_close );
276−CK_DLL_MFUN( cherr_flush );
277−CK_DLL_MFUN( cherr_getmode );
278−CK_DLL_MFUN( cherr_setmode );
279−CK_DLL_MFUN( cherr_read );
280−CK_DLL_MFUN( cherr_readline );
281−CK_DLL_MFUN( cherr_readint );
282−CK_DLL_MFUN( cherr_readintflags );
283−CK_DLL_MFUN( cherr_readfloat );
284−CK_DLL_MFUN( cherr_eof );
285−CK_DLL_MFUN( cherr_more );
286−CK_DLL_MFUN( cherr_writestring );
287−CK_DLL_MFUN( cherr_writeint );
288−CK_DLL_MFUN( cherr_writefloat );
289−
290−
291200 //-----------------------------------------------------------------------------
292201 // string API
293202 //-----------------------------------------------------------------------------
@@ -360,129 +269,6 @@ public: · 66 unmodified lines
360269 //-----------------------------------------------------------------------------
361270
362271
363−//-----------------------------------------------------------------------------
364−// MidiMsg API
365−//-----------------------------------------------------------------------------
366−CK_DLL_CTOR( MidiMsg_ctor );
367−
368−extern t_CKUINT MidiMsg_offset_data1;
369−extern t_CKUINT MidiMsg_offset_data2;
370−extern t_CKUINT MidiMsg_offset_data3;
371−extern t_CKUINT MidiMsg_offset_when;
372−
373−//-----------------------------------------------------------------------------
374−// MidiRW API
375−//-----------------------------------------------------------------------------
376−CK_DLL_CTOR( MidiRW_ctor );
377−CK_DLL_DTOR( MidiRW_dtor );
378−CK_DLL_MFUN( MidiRW_open );
379−CK_DLL_MFUN( MidiRW_close );
380−CK_DLL_MFUN( MidiRW_read );
381−CK_DLL_MFUN( MidiRW_write );
382−
383−
384−//-----------------------------------------------------------------------------
385−// MidiMsgOut API
386−//-----------------------------------------------------------------------------
387−CK_DLL_CTOR( MidiMsgOut_ctor );
388−CK_DLL_DTOR( MidiMsgOut_dtor );
389−CK_DLL_MFUN( MidiMsgOut_open );
390−CK_DLL_MFUN( MidiMsgOut_close );
391−CK_DLL_MFUN( MidiMsgOut_write );
392−
393−
394−//-----------------------------------------------------------------------------
395−// MidiMsgIn API
396−//-----------------------------------------------------------------------------
397−CK_DLL_CTOR( MidiMsgIn_ctor );
398−CK_DLL_DTOR( MidiMsgIn_dtor );
399−CK_DLL_MFUN( MidiMsgIn_open );
400−CK_DLL_MFUN( MidiMsgIn_close );
401−CK_DLL_MFUN( MidiMsgIn_read );
402−
403−
404−//-----------------------------------------------------------------------------
405−// MidiIn API
406−//-----------------------------------------------------------------------------
407−CK_DLL_CTOR( MidiIn_ctor );
408−CK_DLL_DTOR( MidiIn_dtor );
409−CK_DLL_MFUN( MidiIn_open );
410−CK_DLL_MFUN( MidiIn_open_named ); // added 1.3.0.0
411−CK_DLL_MFUN( MidiIn_open_named_i ); // added 1.3.0.0
412−CK_DLL_MFUN( MidiIn_good );
413−CK_DLL_MFUN( MidiIn_num );
414−CK_DLL_MFUN( MidiIn_name );
415−CK_DLL_MFUN( MidiIn_printerr );
416−CK_DLL_MFUN( MidiIn_recv );
417−CK_DLL_MFUN( MidiIn_can_wait );
418−
419−
420−//-----------------------------------------------------------------------------
421−// MidiOut API
422−//-----------------------------------------------------------------------------
423−CK_DLL_CTOR( MidiOut_ctor );
424−CK_DLL_DTOR( MidiOut_dtor );
425−CK_DLL_MFUN( MidiOut_open );
426−CK_DLL_MFUN( MidiOut_open_named ); // added 1.3.0.0
427−CK_DLL_MFUN( MidiOut_open_named_i); // added 1.3.0.0
428−CK_DLL_MFUN( MidiOut_good );
429−CK_DLL_MFUN( MidiOut_num );
430−CK_DLL_MFUN( MidiOut_name );
431−CK_DLL_MFUN( MidiOut_printerr );
432−CK_DLL_MFUN( MidiOut_send );
433−
434−
435−#ifndef __DISABLE_HID__
436−//-----------------------------------------------------------------------------
437−// HidMsg API
438−//-----------------------------------------------------------------------------
439−CK_DLL_MFUN( HidMsg_is_axis_motion );
440−CK_DLL_MFUN( HidMsg_is_button_down );
441−CK_DLL_MFUN( HidMsg_is_button_up );
442−CK_DLL_MFUN( HidMsg_is_mouse_motion );
443−CK_DLL_MFUN( HidMsg_is_hat_motion );
444−CK_DLL_MFUN( HidMsg_is_wheel_motion );
445−
446−//-----------------------------------------------------------------------------
447−// HidIn API
448−//-----------------------------------------------------------------------------
449−CK_DLL_CTOR( HidIn_ctor );
450−CK_DLL_DTOR( HidIn_dtor );
451−CK_DLL_MFUN( HidIn_open );
452−CK_DLL_MFUN( HidIn_open_named );
453−CK_DLL_MFUN( HidIn_open_named_i ); // added 1.3.0.0
454−CK_DLL_MFUN( HidIn_open_joystick );
455−CK_DLL_MFUN( HidIn_open_mouse );
456−CK_DLL_MFUN( HidIn_open_keyboard );
457−CK_DLL_MFUN( HidIn_open_tiltsensor );
458−CK_DLL_MFUN( HidIn_good );
459−CK_DLL_MFUN( HidIn_num );
460−CK_DLL_MFUN( HidIn_name );
461−CK_DLL_MFUN( HidIn_printerr );
462−CK_DLL_MFUN( HidIn_recv );
463−CK_DLL_MFUN( HidIn_read );
464−CK_DLL_MFUN( HidIn_send );
465−CK_DLL_MFUN( HidIn_can_wait );
466−CK_DLL_SFUN( HidIn_read_tilt_sensor );
467−CK_DLL_SFUN( HidIn_ctrl_tiltPollRate );
468−CK_DLL_SFUN( HidIn_cget_tiltPollRate );
469−CK_DLL_SFUN( HidIn_start_cursor_track );
470−CK_DLL_SFUN( HidIn_stop_cursor_track );
471−
472−
473−//-----------------------------------------------------------------------------
474−// HidOut API
475−//-----------------------------------------------------------------------------
476−CK_DLL_CTOR( HidOut_ctor );
477−CK_DLL_DTOR( HidOut_dtor );
478−CK_DLL_MFUN( HidOut_open );
479−CK_DLL_MFUN( HidOut_good );
480−CK_DLL_MFUN( HidOut_num );
481−CK_DLL_MFUN( HidOut_name );
482−CK_DLL_MFUN( HidOut_printerr );
483−CK_DLL_MFUN( HidOut_send );
484−#endif
485−
486272
487273
488274
src/core/chuck_otf.cpp+10−5
@@ -642,12 +642,17 @@ void * otf_cb( void * p ) · 641 unmodified lines
642642 {
643643 // REFACTOR-2017: change g_sock to per-VM socket
644644 client = ck_accept( carrier->otf_socket );
645+
646+ // check for thread shutdown, potentially occured during ck_accept
647+ if(!carrier->otf_thread)
648+ break;
649+
645650 if( !client )
646651 {
647652 if( carrier->vm )
648653 EM_log( CK_LOG_INFO, "[chuck]: socket error during accept()...\n" );
649654 usleep( 40000 );
650− ck_close( client );
655+ // ck_close( client ); don't close NULL client
651656 continue;
652657 }
653658 msg.clear();
@@ -720,9 +725,9 @@ const char * poop[] = { · 66 unmodified lines
720725 "[chuck]: lack of destructors have led to the unrecoverable mass build-up of trash\n"
721726 " the chuck garbage collector will now run, deleting all files (bye.)",
722727 "[chuck]: calling machine.crash()...",
723− "[chuck]: an unknown fatal error has occured. please restart your computer...",
724− "[chuck]: an unknown fatal error has occured. please reinstall your OS...",
725− "[chuck]: an unknown fatal error has occured. please update to chuck-3.0",
728+ "[chuck]: an unknown fatal error has occurred. please restart your computer...",
729+ "[chuck]: an unknown fatal error has occurred. please reinstall your OS...",
730+ "[chuck]: an unknown fatal error has occurred. please update to chuck-3.0",
726731 "[chuck]: internal error: unknown error",
727732 "[chuck]: page fault!!!",
728733 "[chuck]: error printing error message. cannot continue 2#%%HGAFf9a0x"
@@ -744,6 +749,6 @@ void uh( ) · 15 unmodified lines
744749 {
745750 int n = (int)(rand() / (float)RAND_MAX * poop_size);
746751 printf( "%s\n", poop[n] );
747− usleep( (unsigned long)(rand() / (float)RAND_MAX * 2000000) );
752+ usleep( (unsigned long)(rand() / (float)RAND_MAX * 2000000) / 10 );
748753 }
749754 }
src/core/chuck_type.cpp+3−2
@@ -36,6 +36,7 @@ · 35 unmodified lines
3636 #include "chuck_vm.h"
3737 #include "chuck_errmsg.h"
3838 #include "chuck_lang.h"
39+#include "chuck_io.h"
3940 #include "util_string.h"
4041 #include "ugen_xxx.h"
4142
@@ -6160,8 +6161,8 @@ t_CKBOOL type_engine_add_dll( Chuck_Env * env, Chuck_DLL * dll, const string & d · 6118 unmodified lines
61606161 a_Exp exp_decl = new_exp_decl( type_decl, var_decl_list, TRUE, 0 );
61616162 // add addr
61626163 var_decl->addr = (void *)cl->svars[j]->static_addr;
6163− // prepend exp stmt to stmt list
6164− svar_decls = prepend_stmt_list( new_stmt_from_expression( exp_decl, 0 ), svar_decls, 0 );
6164+ // append exp stmt to stmt list
6165+ svar_decls = append_stmt_list( svar_decls, new_stmt_from_expression( exp_decl, 0 ), 0 );
61656166 }
61666167
61676168 // if there are any declarations, prepend them to body
src/core/chuck_win32.c+1927−1814
@@ -1,13 +1,14 @@
1−/* A Bison parser, made by GNU Bison 3.1. */
1+/* A Bison parser, made by GNU Bison 2.3. */
22
3−/* Bison implementation for Yacc-like parsers in C
3+/* Skeleton implementation for Bison's Yacc-like parsers in C
44
5− Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
5+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6+ Free Software Foundation, Inc.
67
7− This program is free software: you can redistribute it and/or modify
8+ This program is free software; you can redistribute it and/or modify
89 it under the terms of the GNU General Public License as published by
9− the Free Software Foundation, either version 3 of the License, or
10− (at your option) any later version.
10+ the Free Software Foundation; either version 2, or (at your option)
11+ any later version.
1112
1213 This program is distributed in the hope that it will be useful,
1314 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +16,9 @@ · 1 unmodified line
1516 GNU General Public License for more details.
1617
1718 You should have received a copy of the GNU General Public License
18− along with this program. If not, see <http://www.gnu.org/licenses/>. */
19+ along with this program; if not, write to the Free Software
20+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
21+ Boston, MA 02110-1301, USA. */
1922
2023 /* As a special exception, you may create a larger work that contains
2124 part or all of the Bison parser skeleton and distribute that work
@@ -44,7 +47,7 @@ · 22 unmodified lines
4447 #define YYBISON 1
4548
4649 /* Bison version. */
47−#define YYBISON_VERSION "3.1"
50+#define YYBISON_VERSION "2.3"
4851
4952 /* Skeleton name. */
5053 #define YYSKELETON_NAME "yacc.c"
@@ -52,17 +55,244 @@ · 1 unmodified line
5255 /* Pure parsers. */
5356 #define YYPURE 0
5457
55−/* Push parsers. */
56−#define YYPUSH 0
58+/* Using locations. */
59+#define YYLSP_NEEDED 0
5760
58−/* Pull parsers. */
59−#define YYPULL 1
61+
62+
63+/* Tokens. */
64+#ifndef YYTOKENTYPE
65+# define YYTOKENTYPE
66+ /* Put the tokens into the symbol table, so that GDB and other debuggers
67+ know about them. */
68+ enum yytokentype {
69+ ID = 258,
70+ STRING_LIT = 259,
71+ CHAR_LIT = 260,
72+ NUM = 261,
73+ FLOAT = 262,
74+ POUND = 263,
75+ COMMA = 264,
76+ COLON = 265,
77+ SEMICOLON = 266,
78+ LPAREN = 267,
79+ RPAREN = 268,
80+ LBRACK = 269,
81+ RBRACK = 270,
82+ LBRACE = 271,
83+ RBRACE = 272,
84+ DOT = 273,
85+ PLUS = 274,
86+ MINUS = 275,
87+ TIMES = 276,
88+ DIVIDE = 277,
89+ PERCENT = 278,
90+ EQ = 279,
91+ NEQ = 280,
92+ LT = 281,
93+ LE = 282,
94+ GT = 283,
95+ GE = 284,
96+ AND = 285,
97+ OR = 286,
98+ ASSIGN = 287,
99+ IF = 288,
100+ THEN = 289,
101+ ELSE = 290,
102+ WHILE = 291,
103+ FOR = 292,
104+ DO = 293,
105+ LOOP = 294,
106+ BREAK = 295,
107+ CONTINUE = 296,
108+ NULL_TOK = 297,
109+ FUNCTION = 298,
110+ RETURN = 299,
111+ QUESTION = 300,
112+ EXCLAMATION = 301,
113+ S_OR = 302,
114+ S_AND = 303,
115+ S_XOR = 304,
116+ PLUSPLUS = 305,
117+ MINUSMINUS = 306,
118+ DOLLAR = 307,
119+ POUNDPAREN = 308,
120+ PERCENTPAREN = 309,
121+ ATPAREN = 310,
122+ SIMULT = 311,
123+ PATTERN = 312,
124+ CODE = 313,
125+ TRANSPORT = 314,
126+ HOST = 315,
127+ TIME = 316,
128+ WHENEVER = 317,
129+ NEXT = 318,
130+ UNTIL = 319,
131+ EXTERNAL = 320,
132+ GLOBAL = 321,
133+ EVERY = 322,
134+ BEFORE = 323,
135+ AFTER = 324,
136+ AT = 325,
137+ AT_SYM = 326,
138+ ATAT_SYM = 327,
139+ NEW = 328,
140+ SIZEOF = 329,
141+ TYPEOF = 330,
142+ SAME = 331,
143+ PLUS_CHUCK = 332,
144+ MINUS_CHUCK = 333,
145+ TIMES_CHUCK = 334,
146+ DIVIDE_CHUCK = 335,
147+ S_AND_CHUCK = 336,
148+ S_OR_CHUCK = 337,
149+ S_XOR_CHUCK = 338,
150+ SHIFT_RIGHT_CHUCK = 339,
151+ SHIFT_LEFT_CHUCK = 340,
152+ PERCENT_CHUCK = 341,
153+ SHIFT_RIGHT = 342,
154+ SHIFT_LEFT = 343,
155+ TILDA = 344,
156+ CHUCK = 345,
157+ COLONCOLON = 346,
158+ S_CHUCK = 347,
159+ AT_CHUCK = 348,
160+ LEFT_S_CHUCK = 349,
161+ UNCHUCK = 350,
162+ UPCHUCK = 351,
163+ CLASS = 352,
164+ INTERFACE = 353,
165+ EXTENDS = 354,
166+ IMPLEMENTS = 355,
167+ PUBLIC = 356,
168+ PROTECTED = 357,
169+ PRIVATE = 358,
170+ STATIC = 359,
171+ ABSTRACT = 360,
172+ CONST = 361,
173+ SPORK = 362,
174+ ARROW_RIGHT = 363,
175+ ARROW_LEFT = 364,
176+ L_HACK = 365,
177+ R_HACK = 366
178+ };
179+#endif
180+/* Tokens. */
181+#define ID 258
182+#define STRING_LIT 259
183+#define CHAR_LIT 260
184+#define NUM 261
185+#define FLOAT 262
186+#define POUND 263
187+#define COMMA 264
188+#define COLON 265
189+#define SEMICOLON 266
190+#define LPAREN 267
191+#define RPAREN 268
192+#define LBRACK 269
193+#define RBRACK 270
194+#define LBRACE 271
195+#define RBRACE 272
196+#define DOT 273
197+#define PLUS 274
198+#define MINUS 275
199+#define TIMES 276
200+#define DIVIDE 277
201+#define PERCENT 278
202+#define EQ 279
203+#define NEQ 280
204+#define LT 281
205+#define LE 282
206+#define GT 283
207+#define GE 284
208+#define AND 285
209+#define OR 286
210+#define ASSIGN 287
211+#define IF 288
212+#define THEN 289
213+#define ELSE 290
214+#define WHILE 291
215+#define FOR 292
216+#define DO 293
217+#define LOOP 294
218+#define BREAK 295
219+#define CONTINUE 296
220+#define NULL_TOK 297
221+#define FUNCTION 298
222+#define RETURN 299
223+#define QUESTION 300
224+#define EXCLAMATION 301
225+#define S_OR 302
226+#define S_AND 303
227+#define S_XOR 304
228+#define PLUSPLUS 305
229+#define MINUSMINUS 306
230+#define DOLLAR 307
231+#define POUNDPAREN 308
232+#define PERCENTPAREN 309
233+#define ATPAREN 310
234+#define SIMULT 311
235+#define PATTERN 312
236+#define CODE 313
237+#define TRANSPORT 314
238+#define HOST 315
239+#define TIME 316
240+#define WHENEVER 317
241+#define NEXT 318
242+#define UNTIL 319
243+#define EXTERNAL 320
244+#define GLOBAL 321
245+#define EVERY 322
246+#define BEFORE 323
247+#define AFTER 324
248+#define AT 325
249+#define AT_SYM 326
250+#define ATAT_SYM 327
251+#define NEW 328
252+#define SIZEOF 329
253+#define TYPEOF 330
254+#define SAME 331
255+#define PLUS_CHUCK 332
256+#define MINUS_CHUCK 333
257+#define TIMES_CHUCK 334
258+#define DIVIDE_CHUCK 335
259+#define S_AND_CHUCK 336
260+#define S_OR_CHUCK 337
261+#define S_XOR_CHUCK 338
262+#define SHIFT_RIGHT_CHUCK 339
263+#define SHIFT_LEFT_CHUCK 340
264+#define PERCENT_CHUCK 341
265+#define SHIFT_RIGHT 342
266+#define SHIFT_LEFT 343
267+#define TILDA 344
268+#define CHUCK 345
269+#define COLONCOLON 346
270+#define S_CHUCK 347
271+#define AT_CHUCK 348
272+#define LEFT_S_CHUCK 349
273+#define UNCHUCK 350
274+#define UPCHUCK 351
275+#define CLASS 352
276+#define INTERFACE 353
277+#define EXTENDS 354
278+#define IMPLEMENTS 355
279+#define PUBLIC 356
280+#define PROTECTED 357
281+#define PRIVATE 358
282+#define STATIC 359
283+#define ABSTRACT 360
284+#define CONST 361
285+#define SPORK 362
286+#define ARROW_RIGHT 363
287+#define ARROW_LEFT 364
288+#define L_HACK 365
289+#define R_HACK 366
60290
61291
62292
63293
64294 /* Copy the first part of user declarations. */
65−#line 1 "chuck.y" /* yacc.c:339 */
295+#line 1 "chuck.y"
66296
67297
68298 /*----------------------------------------------------------------------------
@@ -103,9 +333,6 @@ · 34 unmodified lines
103333 #include <stdio.h>
104334 #include <string.h>
105335 #include <stdlib.h>
106−#ifndef __PLATFORM_WIN32__
107−#include <unistd.h>
108−#endif
109336 #include "chuck_utils.h"
110337 #include "chuck_errmsg.h"
111338 #include "chuck_absyn.h"
@@ -121,15 +348,11 @@ void yyerror( char *s ) · 9 unmodified lines
121348 a_Program g_program = NULL;
122349
123350
124−#line 123 "chuck.tab.c" /* yacc.c:339 */
125351
126−# ifndef YY_NULLPTR
127−# if defined __cplusplus && 201103L <= __cplusplus
128−# define YY_NULLPTR nullptr
129−# else
130−# define YY_NULLPTR 0
131−# endif
132−# endif
352+/* Enabling traces. */
353+#ifndef YYDEBUG
354+# define YYDEBUG 0
355+#endif
133356
134357 /* Enabling verbose error messages. */
135358 #ifdef YYERROR_VERBOSE
@@ -139,142 +362,15 @@ a_Program g_program = NULL; · 3 unmodified lines
139362 # define YYERROR_VERBOSE 0
140363 #endif
141364
142−/* In a future release of Bison, this section will be replaced
143− by #include "chuck.tab.h". */
144−#ifndef YY_YY_CHUCK_TAB_H_INCLUDED
145−# define YY_YY_CHUCK_TAB_H_INCLUDED
146−/* Debug traces. */
147−#ifndef YYDEBUG
148−# define YYDEBUG 0
149−#endif
150−#if YYDEBUG
151−extern int yydebug;
365+/* Enabling the token table. */
366+#ifndef YYTOKEN_TABLE
367+# define YYTOKEN_TABLE 0
152368 #endif
153369
154−/* Token type. */
155−#ifndef YYTOKENTYPE
156−# define YYTOKENTYPE
157− enum yytokentype
158− {
159− ID = 258,
160− STRING_LIT = 259,
161− CHAR_LIT = 260,
162− NUM = 261,
163− FLOAT = 262,
164− POUND = 263,
165− COMMA = 264,
166− COLON = 265,
167− SEMICOLON = 266,
168− LPAREN = 267,
169− RPAREN = 268,
170− LBRACK = 269,
171− RBRACK = 270,
172− LBRACE = 271,
173− RBRACE = 272,
174− DOT = 273,
175− PLUS = 274,
176− MINUS = 275,
177− TIMES = 276,
178− DIVIDE = 277,
179− PERCENT = 278,
180− EQ = 279,
181− NEQ = 280,
182− LT = 281,
183− LE = 282,
184− GT = 283,
185− GE = 284,
186− AND = 285,
187− OR = 286,
188− ASSIGN = 287,
189− IF = 288,
190− THEN = 289,
191− ELSE = 290,
192− WHILE = 291,
193− FOR = 292,
194− DO = 293,
195− LOOP = 294,
196− BREAK = 295,
197− CONTINUE = 296,
198− NULL_TOK = 297,
199− FUNCTION = 298,
200− RETURN = 299,
201− QUESTION = 300,
202− EXCLAMATION = 301,
203− S_OR = 302,
204− S_AND = 303,
205− S_XOR = 304,
206− PLUSPLUS = 305,
207− MINUSMINUS = 306,
208− DOLLAR = 307,
209− POUNDPAREN = 308,
210− PERCENTPAREN = 309,
211− ATPAREN = 310,
212− SIMULT = 311,
213− PATTERN = 312,
214− CODE = 313,
215− TRANSPORT = 314,
216− HOST = 315,
217− TIME = 316,
218− WHENEVER = 317,
219− NEXT = 318,
220− UNTIL = 319,
221− EXTERNAL = 320,
222− GLOBAL = 321,
223− EVERY = 322,
224− BEFORE = 323,
225− AFTER = 324,
226− AT = 325,
227− AT_SYM = 326,
228− ATAT_SYM = 327,
229− NEW = 328,
230− SIZEOF = 329,
231− TYPEOF = 330,
232− SAME = 331,
233− PLUS_CHUCK = 332,
234− MINUS_CHUCK = 333,
235− TIMES_CHUCK = 334,
236− DIVIDE_CHUCK = 335,
237− S_AND_CHUCK = 336,
238− S_OR_CHUCK = 337,
239− S_XOR_CHUCK = 338,
240− SHIFT_RIGHT_CHUCK = 339,
241− SHIFT_LEFT_CHUCK = 340,
242− PERCENT_CHUCK = 341,
243− SHIFT_RIGHT = 342,
244− SHIFT_LEFT = 343,
245− TILDA = 344,
246− CHUCK = 345,
247− COLONCOLON = 346,
248− S_CHUCK = 347,
249− AT_CHUCK = 348,
250− LEFT_S_CHUCK = 349,
251− UNCHUCK = 350,
252− UPCHUCK = 351,
253− CLASS = 352,
254− INTERFACE = 353,
255− EXTENDS = 354,
256− IMPLEMENTS = 355,
257− PUBLIC = 356,
258− PROTECTED = 357,
259− PRIVATE = 358,
260− STATIC = 359,
261− ABSTRACT = 360,
262− CONST = 361,
263− SPORK = 362,
264− ARROW_RIGHT = 363,
265− ARROW_LEFT = 364,
266− L_HACK = 365,
267− R_HACK = 366
268− };
269−#endif
270−
271−/* Value type. */
272370 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
273−
274−union YYSTYPE
371+typedef union YYSTYPE
372+#line 59 "chuck.y"
275373 {
276−#line 60 "chuck.y" /* yacc.c:355 */
277−
278374 int pos;
279375 int ival;
280376 double fval;
@@ -298,25 +394,22 @@ union YYSTYPE · 17 unmodified lines
298394 a_Complex complex_exp;
299395 a_Polar polar_exp;
300396 a_Vec vec_exp; // ge: added 1.3.5.3
301−
302−#line 301 "chuck.tab.c" /* yacc.c:355 */
303−};
304−
305−typedef union YYSTYPE YYSTYPE;
306−# define YYSTYPE_IS_TRIVIAL 1
397+}
398+/* Line 193 of yacc.c. */
399+#line 400 "chuck.tab.c"
400+ YYSTYPE;
401+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
307402 # define YYSTYPE_IS_DECLARED 1
403+# define YYSTYPE_IS_TRIVIAL 1
308404 #endif
309405
310406
311−extern YYSTYPE yylval;
312−
313−int yyparse (void);
314−
315−#endif /* !YY_YY_CHUCK_TAB_H_INCLUDED */
316407
317408 /* Copy the second part of user declarations. */
318409
319−#line 318 "chuck.tab.c" /* yacc.c:358 */
410+
411+/* Line 216 of yacc.c. */
412+#line 413 "chuck.tab.c"
320413
321414 #ifdef short
322415 # undef short
@@ -330,20 +423,23 @@ typedef unsigned char yytype_uint8; · 7 unmodified lines
330423
331424 #ifdef YYTYPE_INT8
332425 typedef YYTYPE_INT8 yytype_int8;
333−#else
426+#elif (defined __STDC__ || defined __C99__FUNC__ \
427+ || defined __cplusplus || defined _MSC_VER)
334428 typedef signed char yytype_int8;
429+#else
430+typedef short int yytype_int8;
335431 #endif
336432
337433 #ifdef YYTYPE_UINT16
338434 typedef YYTYPE_UINT16 yytype_uint16;
339435 #else
340−typedef unsigned short yytype_uint16;
436+typedef unsigned short int yytype_uint16;
341437 #endif
342438
343439 #ifdef YYTYPE_INT16
344440 typedef YYTYPE_INT16 yytype_int16;
345441 #else
346−typedef short yytype_int16;
442+typedef short int yytype_int16;
347443 #endif
348444
349445 #ifndef YYSIZE_T
@@ -351,11 +447,12 @@ typedef short yytype_int16; · 1 unmodified line
351447 # define YYSIZE_T __SIZE_TYPE__
352448 # elif defined size_t
353449 # define YYSIZE_T size_t
354−# elif ! defined YYSIZE_T
450+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
451+ || defined __cplusplus || defined _MSC_VER)
355452 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
356453 # define YYSIZE_T size_t
357454 # else
358−# define YYSIZE_T unsigned
455+# define YYSIZE_T unsigned int
359456 # endif
360457 #endif
361458
@@ -365,68 +462,39 @@ typedef short yytype_int16; · 3 unmodified lines
365462 # if defined YYENABLE_NLS && YYENABLE_NLS
366463 # if ENABLE_NLS
367464 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
368−# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
465+# define YY_(msgid) dgettext ("bison-runtime", msgid)
369466 # endif
370467 # endif
371468 # ifndef YY_
372−# define YY_(Msgid) Msgid
373−# endif
374−#endif
375−
376−#ifndef YY_ATTRIBUTE
377−# if (defined __GNUC__ \
378− && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
379− || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
380−# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
381−# else
382−# define YY_ATTRIBUTE(Spec) /* empty */
383−# endif
384−#endif
385−
386−#ifndef YY_ATTRIBUTE_PURE
387−# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
388−#endif
389−
390−#ifndef YY_ATTRIBUTE_UNUSED
391−# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
392−#endif
393−
394−#if !defined _Noreturn \
395− && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
396−# if defined _MSC_VER && 1200 <= _MSC_VER
397−# define _Noreturn __declspec (noreturn)
398−# else
399−# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
469+# define YY_(msgid) msgid
400470 # endif
401471 #endif
402472
403473 /* Suppress unused-variable warnings by "using" E. */
404474 #if ! defined lint || defined __GNUC__
405−# define YYUSE(E) ((void) (E))
475+# define YYUSE(e) ((void) (e))
406476 #else
407−# define YYUSE(E) /* empty */
477+# define YYUSE(e) /* empty */
408478 #endif
409479
410−#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
411−/* Suppress an incorrect diagnostic about yylval being uninitialized. */
412−# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
413− _Pragma ("GCC diagnostic push") \
414− _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
415− _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
416−# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
417− _Pragma ("GCC diagnostic pop")
480+/* Identity function, used to suppress warnings about constant conditions. */
481+#ifndef lint
482+# define YYID(n) (n)
418483 #else
419−# define YY_INITIAL_VALUE(Value) Value
420−#endif
421−#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
422−# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
423−# define YY_IGNORE_MAYBE_UNINITIALIZED_END
484+#if (defined __STDC__ || defined __C99__FUNC__ \
485+ || defined __cplusplus || defined _MSC_VER)
486+static int
487+YYID (int i)
488+#else
489+static int
490+YYID (i)
491+ int i;
424492 #endif
425−#ifndef YY_INITIAL_VALUE
426−# define YY_INITIAL_VALUE(Value) /* Nothing. */
493+{
494+ return i;
495+}
427496 #endif
428497
429−
430498 #if ! defined yyoverflow || YYERROR_VERBOSE
431499
432500 /* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -444,11 +512,11 @@ typedef short yytype_int16; · 11 unmodified lines
444512 # define alloca _alloca
445513 # else
446514 # define YYSTACK_ALLOC alloca
447−# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
515+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
516+ || defined __cplusplus || defined _MSC_VER)
448517 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
449− /* Use EXIT_SUCCESS as a witness for stdlib.h. */
450−# ifndef EXIT_SUCCESS
451−# define EXIT_SUCCESS 0
518+# ifndef _STDLIB_H
519+# define _STDLIB_H 1
452520 # endif
453521 # endif
454522 # endif
@@ -456,8 +524,8 @@ typedef short yytype_int16; · 1 unmodified line
456524 # endif
457525
458526 # ifdef YYSTACK_ALLOC
459− /* Pacify GCC's 'empty if-body' warning. */
460−# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
527+ /* Pacify GCC's `empty if-body' warning. */
528+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
461529 # ifndef YYSTACK_ALLOC_MAXIMUM
462530 /* The OS might guarantee only one guard page at the bottom of the stack,
463531 and a page size can be as small as 4096 bytes. So we cannot safely
@@ -471,23 +539,25 @@ typedef short yytype_int16; · 7 unmodified lines
471539 # ifndef YYSTACK_ALLOC_MAXIMUM
472540 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
473541 # endif
474−# if (defined __cplusplus && ! defined EXIT_SUCCESS \
542+# if (defined __cplusplus && ! defined _STDLIB_H \
475543 && ! ((defined YYMALLOC || defined malloc) \
476− && (defined YYFREE || defined free)))
544+ && (defined YYFREE || defined free)))
477545 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
478−# ifndef EXIT_SUCCESS
479−# define EXIT_SUCCESS 0
546+# ifndef _STDLIB_H
547+# define _STDLIB_H 1
480548 # endif
481549 # endif
482550 # ifndef YYMALLOC
483551 # define YYMALLOC malloc
484−# if ! defined malloc && ! defined EXIT_SUCCESS
552+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
553+ || defined __cplusplus || defined _MSC_VER)
485554 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
486555 # endif
487556 # endif
488557 # ifndef YYFREE
489558 # define YYFREE free
490−# if ! defined free && ! defined EXIT_SUCCESS
559+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
560+ || defined __cplusplus || defined _MSC_VER)
491561 void free (void *); /* INFRINGES ON USER NAME SPACE */
492562 # endif
493563 # endif
@@ -497,14 +567,14 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ · 3 unmodified lines
497567
498568 #if (! defined yyoverflow \
499569 && (! defined __cplusplus \
500− || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
570+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
501571
502572 /* A type that is properly aligned for any stack member. */
503573 union yyalloc
504574 {
505− yytype_int16 yyss_alloc;
506− YYSTYPE yyvs_alloc;
507−};
575+ yytype_int16 yyss;
576+ YYSTYPE yyvs;
577+ };
508578
509579 /* The size of the maximum gap between one aligned stack and the next. */
510580 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -515,50 +585,46 @@ union yyalloc · 4 unmodified lines
515585 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
516586 + YYSTACK_GAP_MAXIMUM)
517587
518−# define YYCOPY_NEEDED 1
588+/* Copy COUNT objects from FROM to TO. The source and destination do
589+ not overlap. */
590+# ifndef YYCOPY
591+# if defined __GNUC__ && 1 < __GNUC__
592+# define YYCOPY(To, From, Count) \
593+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
594+# else
595+# define YYCOPY(To, From, Count) \
596+ do \
597+ { \
598+ YYSIZE_T yyi; \
599+ for (yyi = 0; yyi < (Count); yyi++) \
600+ (To)[yyi] = (From)[yyi]; \
601+ } \
602+ while (YYID (0))
603+# endif
604+# endif
519605
520606 /* Relocate STACK from its old location to the new one. The
521607 local variables YYSIZE and YYSTACKSIZE give the old and new number of
522608 elements in the stack, and YYPTR gives the new location of the
523609 stack. Advance YYPTR to a properly aligned location for the next
524610 stack. */
525−# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
526− do \
527− { \
528− YYSIZE_T yynewbytes; \
529− YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
530− Stack = &yyptr->Stack_alloc; \
531− yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
532− yyptr += yynewbytes / sizeof (*yyptr); \
533− } \
534− while (0)
611+# define YYSTACK_RELOCATE(Stack) \
612+ do \
613+ { \
614+ YYSIZE_T yynewbytes; \
615+ YYCOPY (&yyptr->Stack, Stack, yysize); \
616+ Stack = &yyptr->Stack; \
617+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
618+ yyptr += yynewbytes / sizeof (*yyptr); \
619+ } \
620+ while (YYID (0))
535621
536622 #endif
537623
538−#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
539−/* Copy COUNT objects from SRC to DST. The source and destination do
540− not overlap. */
541−# ifndef YYCOPY
542−# if defined __GNUC__ && 1 < __GNUC__
543−# define YYCOPY(Dst, Src, Count) \
544− __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
545−# else
546−# define YYCOPY(Dst, Src, Count) \
547− do \
548− { \
549− YYSIZE_T yyi; \
550− for (yyi = 0; yyi < (Count); yyi++) \
551− (Dst)[yyi] = (Src)[yyi]; \
552− } \
553− while (0)
554−# endif
555−# endif
556−#endif /* !YYCOPY_NEEDED */
557−
558624 /* YYFINAL -- State number of the termination state. */
559625 #define YYFINAL 122
560626 /* YYLAST -- Last index in YYTABLE. */
561−#define YYLAST 1181
627+#define YYLAST 1312
562628
563629 /* YYNTOKENS -- Number of terminals. */
564630 #define YYNTOKENS 112
@@ -566,19 +632,17 @@ union yyalloc · 1 unmodified line
566632 #define YYNNTS 58
567633 /* YYNRULES -- Number of rules. */
568634 #define YYNRULES 184
569−/* YYNSTATES -- Number of states. */
635+/* YYNRULES -- Number of states. */
570636 #define YYNSTATES 319
571637
572−/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
573− by yylex, with out-of-bounds checking. */
638+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
574639 #define YYUNDEFTOK 2
575640 #define YYMAXUTOK 366
576641
577−#define YYTRANSLATE(YYX) \
578− ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
642+#define YYTRANSLATE(YYX) \
643+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
579644
580−/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
581− as returned by yylex, without out-of-bounds checking. */
645+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
582646 static const yytype_uint8 yytranslate[] =
583647 {
584648 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -621,7 +685,97 @@ static const yytype_uint8 yytranslate[] = · 36 unmodified lines
621685 };
622686
623687 #if YYDEBUG
624− /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
688+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
689+ YYRHS. */
690+static const yytype_uint16 yyprhs[] =
691+{
692+ 0, 0, 3, 5, 8, 10, 12, 14, 21, 29,
693+ 36, 44, 47, 52, 55, 60, 62, 63, 65, 68,
694+ 70, 72, 74, 77, 79, 83, 85, 89, 98, 106,
695+ 115, 123, 125, 127, 128, 130, 132, 134, 136, 138,
696+ 140, 141, 143, 146, 150, 155, 157, 159, 161, 164,
697+ 167, 172, 174, 177, 179, 181, 183, 185, 187, 190,
698+ 194, 197, 200, 206, 214, 220, 228, 235, 243, 249,
699+ 257, 263, 266, 270, 272, 275, 277, 281, 283, 287,
700+ 289, 293, 297, 302, 305, 309, 311, 314, 318, 322,
701+ 326, 329, 333, 335, 339, 341, 344, 347, 351, 355,
702+ 359, 361, 363, 365, 367, 369, 371, 373, 375, 377,
703+ 379, 381, 383, 385, 387, 389, 391, 393, 399, 401,
704+ 405, 407, 411, 413, 417, 419, 423, 425, 429, 431,
705+ 435, 439, 441, 445, 449, 453, 457, 459, 463, 467,
706+ 469, 473, 477, 479, 483, 487, 491, 493, 497, 499,
707+ 503, 505, 508, 511, 514, 517, 520, 523, 527, 529,
708+ 531, 533, 535, 537, 540, 542, 546, 548, 551, 555,
709+ 560, 564, 567, 570, 572, 574, 576, 578, 580, 582,
710+ 584, 586, 588, 592, 596
711+};
712+
713+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
714+static const yytype_int16 yyrhs[] =
715+{
716+ 113, 0, -1, 114, -1, 113, 114, -1, 132, -1,
717+ 123, -1, 115, -1, 124, 97, 121, 16, 117, 17,
718+ -1, 124, 97, 121, 116, 16, 117, 17, -1, 124,
719+ 98, 121, 16, 117, 17, -1, 124, 98, 121, 120,
720+ 16, 117, 17, -1, 100, 121, -1, 100, 121, 99,
721+ 122, -1, 99, 122, -1, 99, 122, 100, 121, -1,
722+ 118, -1, -1, 119, -1, 119, 118, -1, 132, -1,
723+ 123, -1, 115, -1, 99, 121, -1, 3, -1, 3,
724+ 9, 121, -1, 3, -1, 3, 18, 122, -1, 125,
725+ 126, 130, 3, 12, 131, 13, 137, -1, 125, 126,
726+ 130, 3, 12, 13, 137, -1, 125, 126, 130, 3,
727+ 12, 131, 13, 11, -1, 125, 126, 130, 3, 12,
728+ 13, 11, -1, 101, -1, 103, -1, -1, 43, -1,
729+ 101, -1, 102, -1, 103, -1, 104, -1, 105, -1,
730+ -1, 3, -1, 3, 71, -1, 26, 122, 28, -1,
731+ 26, 122, 28, 71, -1, 127, -1, 128, -1, 129,
732+ -1, 129, 143, -1, 129, 146, -1, 129, 146, 9,
733+ 131, -1, 133, -1, 132, 133, -1, 138, -1, 136,
734+ -1, 135, -1, 134, -1, 137, -1, 44, 11, -1,
735+ 44, 139, 11, -1, 40, 11, -1, 41, 11, -1,
736+ 33, 12, 139, 13, 133, -1, 33, 12, 139, 13,
737+ 133, 35, 133, -1, 36, 12, 139, 13, 133, -1,
738+ 38, 133, 36, 12, 139, 13, 11, -1, 37, 12,
739+ 138, 138, 13, 133, -1, 37, 12, 138, 138, 139,
740+ 13, 133, -1, 64, 12, 139, 13, 133, -1, 38,
741+ 133, 64, 12, 139, 13, 11, -1, 39, 12, 139,
742+ 13, 133, -1, 16, 17, -1, 16, 132, 17, -1,
743+ 11, -1, 139, 11, -1, 140, -1, 139, 9, 140,
744+ -1, 141, -1, 140, 150, 141, -1, 144, -1, 141,
745+ 151, 144, -1, 14, 139, 15, -1, 14, 139, 15,
746+ 142, -1, 14, 15, -1, 143, 14, 15, -1, 152,
747+ -1, 129, 145, -1, 65, 129, 145, -1, 66, 129,
748+ 145, -1, 104, 129, 145, -1, 76, 145, -1, 104,
749+ 76, 145, -1, 146, -1, 146, 9, 145, -1, 3,
750+ -1, 3, 142, -1, 3, 143, -1, 53, 139, 13,
751+ -1, 54, 139, 13, -1, 55, 139, 13, -1, 90,
752+ -1, 93, -1, 77, -1, 78, -1, 79, -1, 80,
753+ -1, 84, -1, 85, -1, 86, -1, 95, -1, 96,
754+ -1, 81, -1, 82, -1, 83, -1, 109, -1, 108,
755+ -1, 153, -1, 153, 45, 139, 10, 152, -1, 154,
756+ -1, 153, 31, 154, -1, 155, -1, 154, 30, 155,
757+ -1, 156, -1, 155, 47, 156, -1, 157, -1, 156,
758+ 49, 157, -1, 158, -1, 157, 48, 158, -1, 159,
759+ -1, 158, 24, 159, -1, 158, 25, 159, -1, 160,
760+ -1, 159, 26, 160, -1, 159, 28, 160, -1, 159,
761+ 27, 160, -1, 159, 29, 160, -1, 161, -1, 160,
762+ 88, 161, -1, 160, 87, 161, -1, 162, -1, 161,
763+ 19, 162, -1, 161, 20, 162, -1, 163, -1, 162,
764+ 21, 163, -1, 162, 22, 163, -1, 162, 23, 163,
765+ -1, 164, -1, 163, 89, 164, -1, 165, -1, 164,
766+ 52, 129, -1, 167, -1, 50, 165, -1, 51, 165,
767+ -1, 166, 165, -1, 75, 165, -1, 74, 165, -1,
768+ 73, 129, -1, 73, 129, 142, -1, 19, -1, 20,
769+ -1, 89, -1, 46, -1, 21, -1, 107, 89, -1,
770+ 168, -1, 167, 91, 168, -1, 169, -1, 168, 142,
771+ -1, 168, 12, 13, -1, 168, 12, 139, 13, -1,
772+ 168, 18, 3, -1, 168, 50, -1, 168, 51, -1,
773+ 3, -1, 6, -1, 7, -1, 4, -1, 5, -1,
774+ 142, -1, 147, -1, 148, -1, 149, -1, 110, 139,
775+ 111, -1, 12, 139, 13, -1, 12, 13, -1
776+};
777+
778+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
625779 static const yytype_uint16 yyrline[] =
626780 {
627781 0, 184, 184, 185, 189, 190, 191, 195, 197, 199,
@@ -646,7 +800,7 @@ static const yytype_uint16 yyrline[] = · 18 unmodified lines
646800 };
647801 #endif
648802
649−#if YYDEBUG || YYERROR_VERBOSE || 0
803+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
650804 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
651805 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
652806 static const char *const yytname[] =
@@ -683,13 +837,13 @@ static const char *const yytname[] = · 30 unmodified lines
683837 "equality_expression", "relational_expression", "shift_expression",
684838 "additive_expression", "multiplicative_expression", "tilda_expression",
685839 "cast_expression", "unary_expression", "unary_operator",
686− "dur_expression", "postfix_expression", "primary_expression", YY_NULLPTR
840+ "dur_expression", "postfix_expression", "primary_expression", 0
687841 };
688842 #endif
689843
690844 # ifdef YYPRINT
691−/* YYTOKNUM[NUM] -- (External) token number corresponding to the
692− (internal) symbol number NUM (which must be that of a token). */
845+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
846+ token YYLEX-NUM. */
693847 static const yytype_uint16 yytoknum[] =
694848 {
695849 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -707,64 +861,64 @@ static const yytype_uint16 yytoknum[] = · 11 unmodified lines
707861 };
708862 # endif
709863
710−#define YYPACT_NINF -246
711−
712−#define yypact_value_is_default(Yystate) \
713− (!!((Yystate) == (-246)))
714−
715−#define YYTABLE_NINF -42
716−
717−#define yytable_value_is_error(Yytable_value) \
718− 0
864+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
865+static const yytype_uint8 yyr1[] =
866+{
867+ 0, 112, 113, 113, 114, 114, 114, 115, 115, 115,
868+ 115, 116, 116, 116, 116, 117, 117, 118, 118, 119,
869+ 119, 119, 120, 121, 121, 122, 122, 123, 123, 123,
870+ 123, 124, 124, 124, 125, 125, 125, 125, 126, 126,
871+ 126, 127, 127, 128, 128, 129, 129, 130, 130, 131,
872+ 131, 132, 132, 133, 133, 133, 133, 133, 134, 134,
873+ 134, 134, 135, 135, 136, 136, 136, 136, 136, 136,
874+ 136, 137, 137, 138, 138, 139, 139, 140, 140, 141,
875+ 141, 142, 142, 143, 143, 144, 144, 144, 144, 144,
876+ 144, 144, 145, 145, 146, 146, 146, 147, 148, 149,
877+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
878+ 150, 150, 150, 150, 151, 151, 152, 152, 153, 153,
879+ 154, 154, 155, 155, 156, 156, 157, 157, 158, 158,
880+ 158, 159, 159, 159, 159, 159, 160, 160, 160, 161,
881+ 161, 161, 162, 162, 162, 162, 163, 163, 164, 164,
882+ 165, 165, 165, 165, 165, 165, 165, 165, 166, 166,
883+ 166, 166, 166, 166, 167, 167, 168, 168, 168, 168,
884+ 168, 168, 168, 169, 169, 169, 169, 169, 169, 169,
885+ 169, 169, 169, 169, 169
886+};
719887
720− /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
721− STATE-NUM. */
722−static const yytype_int16 yypact[] =
888+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
889+static const yytype_uint8 yyr2[] =
723890 {
724− 419, 15, -246, -246, -246, -246, -246, 639, 1047, 498,
725− -246, -246, -246, 43, 36, 90, 132, 574, 133, 135,
726− 137, -246, 713, -246, 8, 8, 1047, 1047, 1047, 143,
727− 27, 27, 27, 8, 8, 153, -246, -33, -246, -13,
728− 23, 73, 1047, 164, 147, -246, -246, -2, 9, -246,
729− -246, 153, -246, 574, -246, -246, -246, -246, -246, 154,
730− 1060, 19, -246, -246, -246, -246, -246, -246, 6, 139,
731− 123, 125, 124, 106, 83, 29, 114, 50, 86, 126,
732− -246, 8, 88, 38, -246, -246, -246, 168, 162, -246,
733− 165, 171, 166, 1047, 1047, 787, 4, 1047, -246, -246,
734− -246, 181, -246, -246, -246, 183, 186, 190, 1047, 134,
735− 153, 153, 192, -246, -246, 193, -246, 195, 153, 153,
736− -246, 97, -246, -246, 206, 206, -246, -246, 27, -246,
737− -246, -246, 1047, -246, -246, -246, -246, -246, -246, -246,
738− -246, -246, -246, -246, -246, -246, -246, 1047, -246, -246,
739− 1047, 8, 1047, 8, 8, 8, 8, 8, 8, 8,
740− 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
741− 8, 27, -246, 1071, 852, 207, -246, -246, -246, -246,
742− 192, -246, 43, 144, 201, 203, 787, 205, 212, 213,
743− -246, -246, -246, -246, 216, -246, -246, -246, 917, -246,
744− 204, 153, -246, -246, -246, 210, 1, 5, 211, 227,
745− -246, 19, -246, 139, 221, 123, 125, 124, 106, 83,
746− 83, 29, 29, 29, 29, 114, 114, 50, 50, 86,
747− 86, 86, 126, -246, 38, -246, 222, -246, -246, -246,
748− -246, 574, 574, 982, 1047, 1047, 574, 574, -246, 219,
749− -246, 206, 261, 43, 206, 223, 261, 206, 228, 230,
750− 204, 225, 8, -246, 208, -246, 574, 233, 234, 240,
751− -246, -246, -246, -246, -246, 238, -246, 340, -246, -246,
752− 138, 159, 261, 242, -246, 261, 67, -246, 574, -246,
753− 574, 249, 250, -246, -246, 206, 43, 245, -246, 246,
754− 31, 153, 256, -246, -246, -246, -246, -246, -246, -246,
755− -246, -246, -246, 262, 92, 27, -246, -246, -246
891+ 0, 2, 1, 2, 1, 1, 1, 6, 7, 6,
892+ 7, 2, 4, 2, 4, 1, 0, 1, 2, 1,
893+ 1, 1, 2, 1, 3, 1, 3, 8, 7, 8,
894+ 7, 1, 1, 0, 1, 1, 1, 1, 1, 1,
895+ 0, 1, 2, 3, 4, 1, 1, 1, 2, 2,
896+ 4, 1, 2, 1, 1, 1, 1, 1, 2, 3,
897+ 2, 2, 5, 7, 5, 7, 6, 7, 5, 7,
898+ 5, 2, 3, 1, 2, 1, 3, 1, 3, 1,
899+ 3, 3, 4, 2, 3, 1, 2, 3, 3, 3,
900+ 2, 3, 1, 3, 1, 2, 2, 3, 3, 3,
901+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
902+ 1, 1, 1, 1, 1, 1, 1, 5, 1, 3,
903+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
904+ 3, 1, 3, 3, 3, 3, 1, 3, 3, 1,
905+ 3, 3, 1, 3, 3, 3, 1, 3, 1, 3,
906+ 1, 2, 2, 2, 2, 2, 2, 3, 1, 1,
907+ 1, 1, 1, 2, 1, 3, 1, 2, 3, 4,
908+ 3, 2, 2, 1, 1, 1, 1, 1, 1, 1,
909+ 1, 1, 3, 3, 2
756910 };
757911
758− /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
759− Performed when YYTABLE does not specify something else to do. Zero
760− means the default is an error. */
912+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
913+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
914+ means the default is an error. */
761915 static const yytype_uint8 yydefact[] =
762916 {
763917 33, 173, 176, 177, 174, 175, 73, 0, 0, 0,
764918 158, 159, 162, 0, 0, 0, 0, 0, 0, 0,
765919 0, 34, 0, 161, 0, 0, 0, 0, 0, 0,
766920 0, 0, 0, 0, 0, 0, 160, 35, 36, 37,
767− 0, 0, 0, 0, 33, 6, 5, 0, 40, 45,
921+ 0, 0, 0, 33, 2, 6, 5, 0, 40, 45,
768922 46, 0, 4, 51, 56, 55, 54, 57, 53, 0,
769923 75, 77, 178, 79, 179, 180, 181, 85, 116, 118,
770924 120, 122, 124, 126, 128, 131, 136, 139, 142, 146,
@@ -773,7 +927,7 @@ static const yytype_uint8 yydefact[] = · 2 unmodified lines
773927 58, 0, 173, 151, 152, 0, 0, 0, 0, 41,
774928 0, 0, 156, 155, 154, 94, 90, 92, 0, 0,
775929 163, 0, 1, 3, 0, 0, 38, 39, 0, 86,
776− 52, 74, 0, 102, 103, 104, 105, 111, 112, 113,
930+ 52, 0, 74, 102, 103, 104, 105, 111, 112, 113,
777931 106, 107, 108, 100, 101, 109, 110, 0, 115, 114,
778932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
779933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -794,18 +948,7 @@ static const yytype_uint8 yydefact[] = · 14 unmodified lines
794948 10, 30, 28, 49, 0, 0, 29, 27, 50
795949 };
796950
797− /* YYPGOTO[NTERM-NUM]. */
798−static const yytype_int16 yypgoto[] =
799−{
800− -246, 226, -246, 32, -246, -225, 2, -246, -246, -119,
801− -174, 33, -246, -246, -246, -246, -246, -30, -246, -32,
802− 34, -14, -246, -246, -246, -245, -79, -3, -246, 141,
803− -74, 76, 136, -44, -12, -246, -246, -246, -246, -246,
804− 28, -246, 140, 142, 149, 151, 152, -21, -36, -24,
805− -23, -48, 122, 11, -246, -246, 120, -246
806−};
807−
808− /* YYDEFGOTO[NTERM-NUM]. */
951+/* YYDEFGOTO[NTERM-NUM]. */
809952 static const yytype_int16 yydefgoto[] =
810953 {
811954 -1, 43, 44, 274, 255, 275, 276, 277, 258, 206,
@@ -816,65 +959,126 @@ static const yytype_int16 yydefgoto[] = · 4 unmodified lines
816959 77, 78, 79, 80, 81, 82, 83, 84
817960 };
818961
819− /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
820− positive, shift that token. If negative, reduce the rule whose
821− number is the opposite. If YYTABLE_NINF, syntax error. */
962+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
963+ STATE-NUM. */
964+#define YYPACT_NINF -247
965+static const yytype_int16 yypact[] =
966+{
967+ 433, 10, -247, -247, -247, -247, -247, 729, 1137, 512,
968+ -247, -247, -247, 46, 41, 68, 75, 664, 84, 88,
969+ 99, -247, 803, -247, 1202, 1202, 1137, 1137, 1137, 92,
970+ 44, 44, 44, 1202, 1202, 131, -247, -26, -247, 58,
971+ 19, 56, 1137, 147, -247, -247, -247, 81, 32, -247,
972+ -247, 131, 664, -247, -247, -247, -247, -247, -247, 98,
973+ 35, 73, -247, -247, -247, -247, -247, -247, 17, 145,
974+ 125, 128, 141, 200, 177, 142, 215, 193, 103, 144,
975+ -247, 1202, 108, 14, -247, -247, -247, 69, 37, -247,
976+ 588, 176, 198, 1137, 1137, 877, 5, 1137, -247, -247,
977+ -247, 115, -247, -247, -247, 79, 80, 93, 1137, 160,
978+ 131, 131, 225, -247, -247, 233, -247, 244, 131, 131,
979+ -247, 0, -247, -247, 252, 252, -247, -247, 44, -247,
980+ -247, 1137, -247, -247, -247, -247, -247, -247, -247, -247,
981+ -247, -247, -247, -247, -247, -247, -247, 1137, -247, -247,
982+ 1137, 1202, 1137, 1202, 1202, 1202, 1202, 1202, 1202, 1202,
983+ 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202,
984+ 1202, 44, -247, 30, 942, 255, -247, -247, -247, -247,
985+ 225, -247, 46, 190, 114, 120, 877, 250, 251, 130,
986+ -247, -247, -247, -247, 133, -247, -247, -247, 1007, -247,
987+ 253, 131, -247, -247, -247, 257, 1, -2, 254, 261,
988+ 35, 73, -247, 145, 228, 125, 128, 141, 200, 177,
989+ 177, 142, 142, 142, 142, 215, 215, 193, 193, 103,
990+ 103, 103, 144, -247, 14, -247, 135, -247, -247, -247,
991+ -247, 664, 664, 1072, 1137, 1137, 664, 664, -247, 256,
992+ -247, 252, 275, 46, 252, 259, 275, 252, 267, 258,
993+ 253, 260, 1202, -247, 234, -247, 664, 151, 156, 161,
994+ -247, -247, -247, -247, -247, 271, -247, 354, -247, 664,
995+ 170, 178, 275, 273, -247, 275, 60, -247, 664, -247,
996+ 664, 282, 286, -247, -247, 252, 46, 281, -247, 283,
997+ 39, 131, 289, -247, -247, -247, -247, -247, -247, -247,
998+ -247, -247, -247, 290, 40, 44, -247, -247, -247
999+};
1000+
1001+/* YYPGOTO[NTERM-NUM]. */
1002+static const yytype_int16 yypgoto[] =
1003+{
1004+ -247, -247, 241, 15, -247, -225, 26, -247, -247, -119,
1005+ -174, 16, -247, -247, -247, -247, -247, -30, -247, -11,
1006+ 18, -14, -247, -247, -247, -246, -83, -3, 174, 159,
1007+ -72, 101, 157, -44, 9, -247, -247, -247, -247, -247,
1008+ 55, -247, 169, 171, 168, 172, 167, 86, 48, 82,
1009+ 94, 50, 162, -4, -247, -247, 158, -247
1010+};
1011+
1012+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1013+ positive, shift that token. If negative, reduce the rule which
1014+ number is the opposite. If zero, do what YYDEFACT says.
1015+ If YYTABLE_NINF, syntax error. */
1016+#define YYTABLE_NINF -42
8221017 static const yytype_int16 yytable[] =
8231018 {
824− 110, 111, 112, 96, 87, 88, 207, 129, 239, 178,
825− 119, 102, 2, 3, 4, 5, 186, 252, -41, 101,
826− 7, 256, 8, 105, 106, 107, 109, 10, 11, 12,
827− 109, 283, 45, 46, 52, 103, 104, 151, 197, 121,
828− 187, 199, 311, 90, 113, 114, 91, 9, 93, 13,
829− 174, 152, 8, 13, 23, 312, 175, 297, 24, 25,
830− 299, 26, 27, 28, -31, -31, 195, 196, 188, 317,
831− 109, 167, 168, 169, 202, 203, 45, 46, 52, 280,
832− 300, 32, 33, 34, -32, -32, 85, 130, 176, 177,
833− 184, 185, 172, 13, 189, 124, 125, 36, 208, 118,
834− 253, 254, 94, 316, 257, 194, 238, 243, 9, 159,
835− 160, 161, 162, 126, 127, 41, 163, 164, 42, 229,
836− 230, 231, 308, 221, 222, 223, 224, 148, 149, 210,
837− 157, 158, 273, 165, 166, 281, 219, 220, 284, 225,
838− 226, 233, 227, 228, 95, 97, 98, -2, 99, 214,
839− 1, 2, 3, 4, 5, 108, 115, 250, 6, 7,
840− 178, 8, 120, 9, 122, 131, 10, 11, 12, 153,
841− 154, 236, 156, 13, 155, 170, 307, 180, 171, 173,
842− 14, 179, 181, 15, 16, 17, 18, 19, 20, 182,
843− 21, 22, 190, 23, 183, 88, 191, 24, 25, 192,
844− 26, 27, 28, 193, 201, 85, 8, 198, 204, 205,
845− 237, 29, 30, 31, 241, 240, 242, 244, 249, 251,
846− 32, 33, 34, 35, 245, 259, 246, 264, 265, 247,
847− 261, 262, 270, 271, 272, 263, 36, 286, 295, 282,
848− 267, 268, 269, 288, 285, 248, 290, 291, 37, 38,
849− 39, 40, 289, 292, 41, 293, 301, 42, 296, 298,
850− 305, 306, 309, 310, 1, 2, 3, 4, 5, 314,
851− 123, 315, 6, 7, 303, 8, 304, 9, -16, 294,
852− 10, 11, 12, 318, 260, 301, 212, 13, 211, 313,
853− 287, 213, 232, 234, 14, 215, 0, 15, 16, 17,
854− 18, 19, 20, 216, 21, 22, 217, 23, 218, 0,
855− 0, 24, 25, 0, 26, 27, 28, 0, 0, 0,
856− 0, 0, 0, 0, 0, 29, 30, 31, 0, 0,
857− 0, 0, 0, 0, 32, 33, 34, 35, 0, 0,
858− 0, 0, 0, 1, 2, 3, 4, 5, 0, 0,
859− 36, 6, 7, 0, 8, 0, 9, -17, 0, 10,
860− 11, 12, 37, 38, 39, 40, 13, 0, 41, 0,
861− 0, 42, 0, 14, 0, 0, 15, 16, 17, 18,
862− 19, 20, 0, 21, 22, 0, 23, 0, 0, 0,
863− 24, 25, 0, 26, 27, 28, 0, 0, 0, 0,
864− 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,
865− 0, 0, 0, 32, 33, 34, 35, 0, 0, 0,
866− 0, 0, 1, 2, 3, 4, 5, 0, 0, 36,
867− 6, 7, 0, 8, 0, 9, 0, 0, 10, 11,
868− 12, 37, 38, 39, 40, 13, 0, 41, 0, 0,
869− 42, 0, 14, 0, 0, 15, 16, 17, 18, 19,
870− 20, 0, 21, 22, 0, 23, 0, 0, 0, 24,
871− 25, 0, 26, 27, 28, 0, 0, 0, 0, 0,
872− 0, 0, 0, 29, 30, 31, 0, 0, 0, 0,
873− 0, 0, 32, 33, 34, 35, 0, 0, 0, 0,
874− 0, 1, 2, 3, 4, 5, 0, 0, 36, 6,
875− 7, 0, 8, 0, 9, 89, 0, 10, 11, 12,
876− 37, 38, 39, 40, 13, 0, 41, 0, 0, 42,
877− 0, 14, 0, 0, 15, 16, 17, 18, 19, 20,
1019+ 110, 111, 112, 96, 87, 88, 207, 129, 239, 131,
1020+ 119, 178, 186, -41, 256, 45, 46, 252, 52, 101,
1021+ 103, 104, 109, 105, 106, 107, 174, 90, 8, 113,
1022+ 114, 283, 175, 102, 2, 3, 4, 5, 130, 121,
1023+ 197, 187, 7, 199, 8, 13, 131, 109, 151, 91,
1024+ 311, 316, 180, 93, 312, 9, 9, 297, 45, 46,
1025+ 299, 52, 152, 109, 176, 177, 195, 196, 317, 188,
1026+ 13, -31, -31, 300, 202, 203, 130, 172, 131, 280,
1027+ 94, 85, 179, 26, 27, 28, 13, 95, 131, 131,
1028+ 184, 185, 191, 192, 189, 118, 97, 257, 208, 98,
1029+ 253, 254, 131, 243, 108, 194, 193, 131, 238, 132,
1030+ 99, 204, 133, 134, 135, 136, 137, 138, 139, 140,
1031+ 141, 142, 308, 131, 131, 143, 190, 241, 144, 131,
1032+ 145, 146, 273, 242, 115, 281, 126, 127, 284, 131,
1033+ 42, 233, 131, 246, 131, 120, 247, 122, 263, 214,
1034+ 1, 2, 3, 4, 5, -32, -32, 250, 6, 7,
1035+ 131, 8, 178, 9, 290, 131, 10, 11, 12, 291,
1036+ 131, 236, 154, 13, 292, 153, 307, 155, 124, 125,
1037+ 14, 148, 149, 15, 16, 17, 18, 19, 20, 156,
1038+ 21, 22, 170, 23, 182, 88, 171, 24, 25, 173,
1039+ 26, 27, 28, 159, 160, 161, 162, 221, 222, 223,
1040+ 224, 29, 30, 31, 167, 168, 169, 229, 230, 231,
1041+ 32, 33, 34, 35, 157, 158, 183, 264, 265, 163,
1042+ 164, 85, 270, 271, 165, 166, 36, 131, 262, 8,
1043+ 267, 268, 269, 219, 220, 225, 226, 198, 37, 38,
1044+ 39, 40, 289, 201, 41, 205, 301, 42, 237, 227,
1045+ 228, 240, 244, 245, 261, 130, 251, 249, 259, 288,
1046+ 295, 272, 286, 248, 303, 282, 304, 296, 1, 2,
1047+ 3, 4, 5, 285, 123, 301, 6, 7, 293, 8,
1048+ 298, 9, -16, 305, 10, 11, 12, 306, 309, 315,
1049+ 310, 13, 314, 294, 318, 210, 211, 212, 14, 260,
1050+ 313, 15, 16, 17, 18, 19, 20, 287, 21, 22,
1051+ 213, 23, 216, 218, 215, 24, 25, 217, 26, 27,
1052+ 28, 234, 232, 0, 0, 0, 0, 0, 0, 29,
1053+ 30, 31, 0, 0, 0, 0, 0, 0, 32, 33,
1054+ 34, 35, 0, 0, 0, 0, 0, 1, 2, 3,
1055+ 4, 5, 0, 0, 36, 6, 7, 0, 8, 0,
1056+ 9, -17, 0, 10, 11, 12, 37, 38, 39, 40,
1057+ 13, 0, 41, 0, 0, 42, 0, 14, 0, 0,
1058+ 15, 16, 17, 18, 19, 20, 0, 21, 22, 0,
1059+ 23, 0, 0, 0, 24, 25, 0, 26, 27, 28,
1060+ 0, 0, 0, 0, 0, 0, 0, 0, 29, 30,
1061+ 31, 0, 0, 0, 0, 0, 0, 32, 33, 34,
1062+ 35, 0, 0, 0, 0, 0, 1, 2, 3, 4,
1063+ 5, 0, 0, 36, 6, 7, 0, 8, 0, 9,
1064+ 0, 0, 10, 11, 12, 37, 38, 39, 40, 13,
1065+ 0, 41, 0, 0, 42, 0, 14, 0, 0, 15,
1066+ 16, 17, 18, 19, 20, 0, 21, 22, 0, 23,
1067+ 0, 0, 0, 24, 25, 0, 26, 27, 28, 0,
1068+ 0, 0, 0, 0, 0, 0, 0, 29, 30, 31,
1069+ 0, 0, 0, 0, 0, 0, 32, 33, 34, 35,
1070+ 0, 0, 0, 0, 0, 1, 2, 3, 4, 5,
1071+ 0, 0, 36, 6, 7, 0, 8, 0, 9, 89,
1072+ 0, 10, 11, 12, 37, 38, 39, 40, 13, 0,
1073+ 41, 0, 0, 42, 0, 14, 0, 0, 15, 16,
1074+ 17, 18, 19, 20, 0, 0, 22, 0, 23, 0,
1075+ 0, 0, 24, 25, 0, 26, 27, 28, 0, 0,
1076+ 0, 0, 0, 0, 0, 0, 29, 30, 31, 0,
1077+ 0, 0, 0, 0, 0, 32, 33, 34, 35, 0,
1078+ 0, 1, 2, 3, 4, 5, 0, 0, 0, 6,
1079+ 7, 36, 8, 0, 9, 181, 0, 10, 11, 12,
1080+ 0, 0, 0, 0, 13, 0, 40, 0, 0, 41,
1081+ 0, 14, 42, 0, 15, 16, 17, 18, 19, 20,
8781082 0, 0, 22, 0, 23, 0, 0, 0, 24, 25,
8791083 0, 26, 27, 28, 0, 0, 0, 0, 0, 0,
8801084 0, 0, 29, 30, 31, 0, 0, 0, 0, 0,
@@ -927,77 +1131,90 @@ static const yytype_int16 yytable[] = · 46 unmodified lines
9271131 0, 0, 24, 25, 0, 26, 27, 28, 0, 0,
9281132 0, 0, 0, 0, 0, 0, 0, 30, 31, 0,
9291133 1, 2, 3, 4, 5, 32, 33, 34, 35, 7,
930− 0, 8, 0, 0, 0, 0, 10, 11, 12, 132,
931− 0, 36, 0, 13, 102, 2, 3, 4, 5, 0,
932− 0, 0, 0, 7, 0, 8, 40, 0, 0, 41,
1134+ 0, 8, 0, 0, 0, 0, 10, 11, 12, 0,
1135+ 0, 36, 0, 13, 0, 0, 0, 0, 0, 0,
1136+ 0, 0, 0, 0, 0, 0, 40, 0, 0, 41,
9331137 0, 0, 42, 23, 0, 0, 0, 24, 25, 0,
9341138 26, 27, 28, 0, 0, 0, 0, 0, 0, 0,
935− 0, 0, 30, 31, 0, 0, 0, 0, 0, 0,
936− 32, 33, 34, 35, 26, 27, 28, 0, 0, 0,
937− 0, 0, 0, 0, 0, 0, 36, 133, 134, 135,
938− 136, 137, 138, 139, 140, 141, 142, 0, 0, 0,
939− 143, 40, 0, 144, 41, 145, 146, 42, 0, 0,
1139+ 0, 0, 30, 31, 0, 102, 2, 3, 4, 5,
1140+ 32, 33, 34, 35, 7, 0, 8, 0, 0, 0,
1141+ 0, 10, 11, 12, 0, 0, 36, 0, 0, 0,
9401142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1143+ 0, 40, 0, 0, 41, 0, 0, 42, 23, 0,
1144+ 0, 0, 24, 25, 0, 26, 27, 28, 0, 0,
9411145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
942− 0, 42
1146+ 0, 0, 0, 0, 0, 32, 33, 34, 0, 0,
1147+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1148+ 0, 36, 0, 0, 0, 0, 0, 0, 0, 0,
1149+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 41,
1150+ 0, 0, 42
9431151 };
9441152
9451153 static const yytype_int16 yycheck[] =
9461154 {
947− 30, 31, 32, 17, 7, 8, 125, 51, 182, 83,
948− 40, 3, 4, 5, 6, 7, 95, 16, 3, 22,
949− 12, 16, 14, 26, 27, 28, 3, 19, 20, 21,
950− 3, 256, 0, 0, 0, 24, 25, 31, 112, 42,
951− 36, 115, 11, 9, 33, 34, 3, 16, 12, 26,
952− 12, 45, 14, 26, 46, 300, 18, 282, 50, 51,
953− 285, 53, 54, 55, 97, 98, 110, 111, 64, 314,
954− 3, 21, 22, 23, 118, 119, 44, 44, 44, 253,
955− 13, 73, 74, 75, 97, 98, 71, 53, 50, 51,
956− 93, 94, 81, 26, 97, 97, 98, 89, 128, 76,
957− 99, 100, 12, 11, 99, 108, 180, 186, 16, 26,
958− 27, 28, 29, 104, 105, 107, 87, 88, 110, 167,
959− 168, 169, 296, 159, 160, 161, 162, 108, 109, 132,
960− 24, 25, 251, 19, 20, 254, 157, 158, 257, 163,
961− 164, 171, 165, 166, 12, 12, 11, 0, 11, 152,
962− 3, 4, 5, 6, 7, 12, 3, 201, 11, 12,
963− 234, 14, 89, 16, 0, 11, 19, 20, 21, 30,
964− 47, 174, 48, 26, 49, 89, 295, 15, 52, 91,
965− 33, 13, 17, 36, 37, 38, 39, 40, 41, 18,
966− 43, 44, 11, 46, 28, 198, 13, 50, 51, 13,
967− 53, 54, 55, 13, 9, 71, 14, 14, 111, 3,
968− 3, 64, 65, 66, 13, 71, 13, 12, 14, 9,
969− 73, 74, 75, 76, 12, 14, 13, 241, 242, 13,
970− 3, 10, 246, 247, 15, 13, 89, 12, 100, 16,
971− 243, 244, 245, 35, 16, 15, 13, 13, 101, 102,
972− 103, 104, 266, 13, 107, 17, 286, 110, 99, 17,
973− 11, 11, 17, 17, 3, 4, 5, 6, 7, 13,
974− 44, 9, 11, 12, 288, 14, 290, 16, 17, 277,
975− 19, 20, 21, 315, 208, 315, 150, 26, 147, 301,
976− 262, 151, 170, 173, 33, 153, -1, 36, 37, 38,
977− 39, 40, 41, 154, 43, 44, 155, 46, 156, -1,
978− -1, 50, 51, -1, 53, 54, 55, -1, -1, -1,
979− -1, -1, -1, -1, -1, 64, 65, 66, -1, -1,
980− -1, -1, -1, -1, 73, 74, 75, 76, -1, -1,
981− -1, -1, -1, 3, 4, 5, 6, 7, -1, -1,
982− 89, 11, 12, -1, 14, -1, 16, 17, -1, 19,
983− 20, 21, 101, 102, 103, 104, 26, -1, 107, -1,
984− -1, 110, -1, 33, -1, -1, 36, 37, 38, 39,
985− 40, 41, -1, 43, 44, -1, 46, -1, -1, -1,
986− 50, 51, -1, 53, 54, 55, -1, -1, -1, -1,
987− -1, -1, -1, -1, 64, 65, 66, -1, -1, -1,
988− -1, -1, -1, 73, 74, 75, 76, -1, -1, -1,
989− -1, -1, 3, 4, 5, 6, 7, -1, -1, 89,
990− 11, 12, -1, 14, -1, 16, -1, -1, 19, 20,
991− 21, 101, 102, 103, 104, 26, -1, 107, -1, -1,
992− 110, -1, 33, -1, -1, 36, 37, 38, 39, 40,
993− 41, -1, 43, 44, -1, 46, -1, -1, -1, 50,
994− 51, -1, 53, 54, 55, -1, -1, -1, -1, -1,
995− -1, -1, -1, 64, 65, 66, -1, -1, -1, -1,
996− -1, -1, 73, 74, 75, 76, -1, -1, -1, -1,
997− -1, 3, 4, 5, 6, 7, -1, -1, 89, 11,
998− 12, -1, 14, -1, 16, 17, -1, 19, 20, 21,
999− 101, 102, 103, 104, 26, -1, 107, -1, -1, 110,
1000− -1, 33, -1, -1, 36, 37, 38, 39, 40, 41,
1155+ 30, 31, 32, 17, 7, 8, 125, 51, 182, 9,
1156+ 40, 83, 95, 3, 16, 0, 0, 16, 0, 22,
1157+ 24, 25, 3, 26, 27, 28, 12, 9, 14, 33,
1158+ 34, 256, 18, 3, 4, 5, 6, 7, 52, 42,
1159+ 112, 36, 12, 115, 14, 26, 9, 3, 31, 3,
1160+ 11, 11, 15, 12, 300, 16, 16, 282, 43, 43,
1161+ 285, 43, 45, 3, 50, 51, 110, 111, 314, 64,
1162+ 26, 97, 98, 13, 118, 119, 90, 81, 9, 253,
1163+ 12, 71, 13, 53, 54, 55, 26, 12, 9, 9,
1164+ 93, 94, 13, 13, 97, 76, 12, 99, 128, 11,
1165+ 99, 100, 9, 186, 12, 108, 13, 9, 180, 11,
1166+ 11, 111, 77, 78, 79, 80, 81, 82, 83, 84,
1167+ 85, 86, 296, 9, 9, 90, 11, 13, 93, 9,
1168+ 95, 96, 251, 13, 3, 254, 104, 105, 257, 9,
1169+ 110, 171, 9, 13, 9, 89, 13, 0, 13, 152,
1170+ 3, 4, 5, 6, 7, 97, 98, 201, 11, 12,
1171+ 9, 14, 234, 16, 13, 9, 19, 20, 21, 13,
1172+ 9, 174, 47, 26, 13, 30, 295, 49, 97, 98,
1173+ 33, 108, 109, 36, 37, 38, 39, 40, 41, 48,
1174+ 43, 44, 89, 46, 18, 198, 52, 50, 51, 91,
1175+ 53, 54, 55, 26, 27, 28, 29, 159, 160, 161,
1176+ 162, 64, 65, 66, 21, 22, 23, 167, 168, 169,
1177+ 73, 74, 75, 76, 24, 25, 28, 241, 242, 87,
1178+ 88, 71, 246, 247, 19, 20, 89, 9, 10, 14,
1179+ 243, 244, 245, 157, 158, 163, 164, 14, 101, 102,
1180+ 103, 104, 266, 9, 107, 3, 286, 110, 3, 165,
1181+ 166, 71, 12, 12, 3, 279, 9, 14, 14, 35,
1182+ 100, 15, 12, 15, 288, 16, 290, 99, 3, 4,
1183+ 5, 6, 7, 16, 43, 315, 11, 12, 17, 14,
1184+ 17, 16, 17, 11, 19, 20, 21, 11, 17, 9,
1185+ 17, 26, 13, 277, 315, 131, 147, 150, 33, 208,
1186+ 301, 36, 37, 38, 39, 40, 41, 262, 43, 44,
1187+ 151, 46, 154, 156, 153, 50, 51, 155, 53, 54,
1188+ 55, 173, 170, -1, -1, -1, -1, -1, -1, 64,
1189+ 65, 66, -1, -1, -1, -1, -1, -1, 73, 74,
1190+ 75, 76, -1, -1, -1, -1, -1, 3, 4, 5,
1191+ 6, 7, -1, -1, 89, 11, 12, -1, 14, -1,
1192+ 16, 17, -1, 19, 20, 21, 101, 102, 103, 104,
1193+ 26, -1, 107, -1, -1, 110, -1, 33, -1, -1,
1194+ 36, 37, 38, 39, 40, 41, -1, 43, 44, -1,
1195+ 46, -1, -1, -1, 50, 51, -1, 53, 54, 55,
1196+ -1, -1, -1, -1, -1, -1, -1, -1, 64, 65,
1197+ 66, -1, -1, -1, -1, -1, -1, 73, 74, 75,
1198+ 76, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1199+ 7, -1, -1, 89, 11, 12, -1, 14, -1, 16,
1200+ -1, -1, 19, 20, 21, 101, 102, 103, 104, 26,
1201+ -1, 107, -1, -1, 110, -1, 33, -1, -1, 36,
1202+ 37, 38, 39, 40, 41, -1, 43, 44, -1, 46,
1203+ -1, -1, -1, 50, 51, -1, 53, 54, 55, -1,
1204+ -1, -1, -1, -1, -1, -1, -1, 64, 65, 66,
1205+ -1, -1, -1, -1, -1, -1, 73, 74, 75, 76,
1206+ -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
1207+ -1, -1, 89, 11, 12, -1, 14, -1, 16, 17,
1208+ -1, 19, 20, 21, 101, 102, 103, 104, 26, -1,
1209+ 107, -1, -1, 110, -1, 33, -1, -1, 36, 37,
1210+ 38, 39, 40, 41, -1, -1, 44, -1, 46, -1,
1211+ -1, -1, 50, 51, -1, 53, 54, 55, -1, -1,
1212+ -1, -1, -1, -1, -1, -1, 64, 65, 66, -1,
1213+ -1, -1, -1, -1, -1, 73, 74, 75, 76, -1,
1214+ -1, 3, 4, 5, 6, 7, -1, -1, -1, 11,
1215+ 12, 89, 14, -1, 16, 17, -1, 19, 20, 21,
1216+ -1, -1, -1, -1, 26, -1, 104, -1, -1, 107,
1217+ -1, 33, 110, -1, 36, 37, 38, 39, 40, 41,
10011218 -1, -1, 44, -1, 46, -1, -1, -1, 50, 51,
10021219 -1, 53, 54, 55, -1, -1, -1, -1, -1, -1,
10031220 -1, -1, 64, 65, 66, -1, -1, -1, -1, -1,
@@ -1050,23 +1267,27 @@ static const yytype_int16 yycheck[] = · 46 unmodified lines
10501267 -1, -1, 50, 51, -1, 53, 54, 55, -1, -1,
10511268 -1, -1, -1, -1, -1, -1, -1, 65, 66, -1,
10521269 3, 4, 5, 6, 7, 73, 74, 75, 76, 12,
1053− -1, 14, -1, -1, -1, -1, 19, 20, 21, 9,
1054− -1, 89, -1, 26, 3, 4, 5, 6, 7, -1,
1055− -1, -1, -1, 12, -1, 14, 104, -1, -1, 107,
1270+ -1, 14, -1, -1, -1, -1, 19, 20, 21, -1,
1271+ -1, 89, -1, 26, -1, -1, -1, -1, -1, -1,
1272+ -1, -1, -1, -1, -1, -1, 104, -1, -1, 107,
10561273 -1, -1, 110, 46, -1, -1, -1, 50, 51, -1,
10571274 53, 54, 55, -1, -1, -1, -1, -1, -1, -1,
1058− -1, -1, 65, 66, -1, -1, -1, -1, -1, -1,
1059− 73, 74, 75, 76, 53, 54, 55, -1, -1, -1,
1060− -1, -1, -1, -1, -1, -1, 89, 77, 78, 79,
1061− 80, 81, 82, 83, 84, 85, 86, -1, -1, -1,
1062− 90, 104, -1, 93, 107, 95, 96, 110, -1, -1,
1275+ -1, -1, 65, 66, -1, 3, 4, 5, 6, 7,
1276+ 73, 74, 75, 76, 12, -1, 14, -1, -1, -1,
1277+ -1, 19, 20, 21, -1, -1, 89, -1, -1, -1,
1278+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1279+ -1, 104, -1, -1, 107, -1, -1, 110, 46, -1,
1280+ -1, -1, 50, 51, -1, 53, 54, 55, -1, -1,
10631281 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1282+ -1, -1, -1, -1, -1, 73, 74, 75, -1, -1,
10641283 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1065− -1, 110
1284+ -1, 89, -1, -1, -1, -1, -1, -1, -1, -1,
1285+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
1286+ -1, -1, 110
10661287 };
10671288
1068− /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1069− symbol of state STATE-NUM. */
1289+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1290+ symbol of state STATE-NUM. */
10701291 static const yytype_uint8 yystos[] =
10711292 {
10721293 0, 3, 4, 5, 6, 7, 11, 12, 14, 16,
@@ -1081,8 +1302,8 @@ static const yytype_uint8 yystos[] = · 8 unmodified lines
10811302 132, 3, 122, 12, 12, 12, 133, 12, 11, 11,
10821303 11, 139, 3, 165, 165, 139, 139, 139, 12, 3,
10831304 129, 129, 129, 165, 165, 3, 145, 146, 76, 129,
1084− 89, 139, 0, 113, 97, 98, 104, 105, 126, 145,
1085− 132, 11, 9, 77, 78, 79, 80, 81, 82, 83,
1305+ 89, 139, 0, 114, 97, 98, 104, 105, 126, 145,
1306+ 133, 9, 11, 77, 78, 79, 80, 81, 82, 83,
10861307 84, 85, 86, 90, 93, 95, 96, 150, 108, 109,
10871308 151, 31, 45, 30, 47, 49, 48, 24, 25, 26,
10881309 27, 28, 29, 87, 88, 19, 20, 21, 22, 23,
@@ -1090,7 +1311,7 @@ static const yytype_uint8 yystos[] = · 1 unmodified line
10901311 15, 17, 18, 28, 139, 139, 138, 36, 64, 139,
10911312 11, 13, 13, 13, 139, 145, 145, 142, 14, 142,
10921313 143, 9, 145, 145, 111, 3, 121, 121, 129, 130,
1093− 139, 141, 144, 154, 139, 155, 156, 157, 158, 159,
1314+ 140, 141, 144, 154, 139, 155, 156, 157, 158, 159,
10941315 159, 160, 160, 160, 160, 161, 161, 162, 162, 163,
10951316 163, 163, 164, 129, 168, 13, 139, 3, 142, 122,
10961317 71, 13, 13, 138, 12, 12, 13, 13, 15, 14,
@@ -1103,90 +1324,96 @@ static const yytype_uint8 yystos[] = · 6 unmodified lines
11031324 17, 11, 137, 146, 13, 9, 11, 137, 131
11041325 };
11051326
1106− /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1107−static const yytype_uint8 yyr1[] =
1108−{
1109− 0, 112, 113, 113, 114, 114, 114, 115, 115, 115,
1110− 115, 116, 116, 116, 116, 117, 117, 118, 118, 119,
1111− 119, 119, 120, 121, 121, 122, 122, 123, 123, 123,
1112− 123, 124, 124, 124, 125, 125, 125, 125, 126, 126,
1113− 126, 127, 127, 128, 128, 129, 129, 130, 130, 131,
1114− 131, 132, 132, 133, 133, 133, 133, 133, 134, 134,
1115− 134, 134, 135, 135, 136, 136, 136, 136, 136, 136,
1116− 136, 137, 137, 138, 138, 139, 139, 140, 140, 141,
1117− 141, 142, 142, 143, 143, 144, 144, 144, 144, 144,
1118− 144, 144, 145, 145, 146, 146, 146, 147, 148, 149,
1119− 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1120− 150, 150, 150, 150, 151, 151, 152, 152, 153, 153,
1121− 154, 154, 155, 155, 156, 156, 157, 157, 158, 158,
1122− 158, 159, 159, 159, 159, 159, 160, 160, 160, 161,
1123− 161, 161, 162, 162, 162, 162, 163, 163, 164, 164,
1124− 165, 165, 165, 165, 165, 165, 165, 165, 166, 166,
1125− 166, 166, 166, 166, 167, 167, 168, 168, 168, 168,
1126− 168, 168, 168, 169, 169, 169, 169, 169, 169, 169,
1127− 169, 169, 169, 169, 169
1128−};
1327+#define yyerrok (yyerrstatus = 0)
1328+#define yyclearin (yychar = YYEMPTY)
1329+#define YYEMPTY (-2)
1330+#define YYEOF 0
11291331
1130− /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1131−static const yytype_uint8 yyr2[] =
1132−{
1133− 0, 2, 1, 2, 1, 1, 1, 6, 7, 6,
1134− 7, 2, 4, 2, 4, 1, 0, 1, 2, 1,
1135− 1, 1, 2, 1, 3, 1, 3, 8, 7, 8,
1136− 7, 1, 1, 0, 1, 1, 1, 1, 1, 1,
1137− 0, 1, 2, 3, 4, 1, 1, 1, 2, 2,
1138− 4, 1, 2, 1, 1, 1, 1, 1, 2, 3,
1139− 2, 2, 5, 7, 5, 7, 6, 7, 5, 7,
1140− 5, 2, 3, 1, 2, 1, 3, 1, 3, 1,
1141− 3, 3, 4, 2, 3, 1, 2, 3, 3, 3,
1142− 2, 3, 1, 3, 1, 2, 2, 3, 3, 3,
1143− 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1144− 1, 1, 1, 1, 1, 1, 1, 5, 1, 3,
1145− 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
1146− 3, 1, 3, 3, 3, 3, 1, 3, 3, 1,
1147− 3, 3, 1, 3, 3, 3, 1, 3, 1, 3,
1148− 1, 2, 2, 2, 2, 2, 2, 3, 1, 1,
1149− 1, 1, 1, 2, 1, 3, 1, 2, 3, 4,
1150− 3, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1151− 1, 1, 3, 3, 2
1152−};
1332+#define YYACCEPT goto yyacceptlab
1333+#define YYABORT goto yyabortlab
1334+#define YYERROR goto yyerrorlab
11531335
11541336
1155−#define yyerrok (yyerrstatus = 0)
1156−#define yyclearin (yychar = YYEMPTY)
1157−#define YYEMPTY (-2)
1158−#define YYEOF 0
1159−
1160−#define YYACCEPT goto yyacceptlab
1161−#define YYABORT goto yyabortlab
1162−#define YYERROR goto yyerrorlab
1337+/* Like YYERROR except do call yyerror. This remains here temporarily
1338+ to ease the transition to the new meaning of YYERROR, for GCC.
1339+ Once GCC version 2 has supplanted version 1, this can go. */
11631340
1341+#define YYFAIL goto yyerrlab
11641342
11651343 #define YYRECOVERING() (!!yyerrstatus)
11661344
1167−#define YYBACKUP(Token, Value) \
1168−do \
1169− if (yychar == YYEMPTY) \
1170− { \
1171− yychar = (Token); \
1172− yylval = (Value); \
1173− YYPOPSTACK (yylen); \
1174− yystate = *yyssp; \
1175− goto yybackup; \
1176− } \
1177− else \
1178− { \
1345+#define YYBACKUP(Token, Value) \
1346+do \
1347+ if (yychar == YYEMPTY && yylen == 1) \
1348+ { \
1349+ yychar = (Token); \
1350+ yylval = (Value); \
1351+ yytoken = YYTRANSLATE (yychar); \
1352+ YYPOPSTACK (1); \
1353+ goto yybackup; \
1354+ } \
1355+ else \
1356+ { \
11791357 yyerror (YY_("syntax error: cannot back up")); \
1180− YYERROR; \
1181− } \
1182−while (0)
1358+ YYERROR; \
1359+ } \
1360+while (YYID (0))
1361+
1362+
1363+#define YYTERROR 1
1364+#define YYERRCODE 256
1365+
1366+
1367+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1368+ If N is 0, then set CURRENT to the empty location which ends
1369+ the previous symbol: RHS[0] (always defined). */
1370+
1371+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1372+#ifndef YYLLOC_DEFAULT
1373+# define YYLLOC_DEFAULT(Current, Rhs, N) \
1374+ do \
1375+ if (YYID (N)) \
1376+ { \
1377+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1378+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1379+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1380+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1381+ } \
1382+ else \
1383+ { \
1384+ (Current).first_line = (Current).last_line = \
1385+ YYRHSLOC (Rhs, 0).last_line; \
1386+ (Current).first_column = (Current).last_column = \
1387+ YYRHSLOC (Rhs, 0).last_column; \
1388+ } \
1389+ while (YYID (0))
1390+#endif
11831391
1184−/* Error token number */
1185−#define YYTERROR 1
1186−#define YYERRCODE 256
11871392
1393+/* YY_LOCATION_PRINT -- Print the location on the stream.
1394+ This macro was not mandated originally: define only if we know
1395+ we won't break user code: when these are the locations we know. */
1396+
1397+#ifndef YY_LOCATION_PRINT
1398+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1399+# define YY_LOCATION_PRINT(File, Loc) \
1400+ fprintf (File, "%d.%d-%d.%d", \
1401+ (Loc).first_line, (Loc).first_column, \
1402+ (Loc).last_line, (Loc).last_column)
1403+# else
1404+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1405+# endif
1406+#endif
11881407
11891408
1409+/* YYLEX -- calling `yylex' with the right arguments. */
1410+
1411+#ifdef YYLEX_PARAM
1412+# define YYLEX yylex (YYLEX_PARAM)
1413+#else
1414+# define YYLEX yylex ()
1415+#endif
1416+
11901417 /* Enable debugging if requested. */
11911418 #if YYDEBUG
11921419
@@ -1195,46 +1422,54 @@ while (0) · 2 unmodified lines
11951422 # define YYFPRINTF fprintf
11961423 # endif
11971424
1198−# define YYDPRINTF(Args) \
1199−do { \
1200− if (yydebug) \
1201− YYFPRINTF Args; \
1202−} while (0)
1203−
1204−/* This macro is provided for backward compatibility. */
1205−#ifndef YY_LOCATION_PRINT
1206−# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1207−#endif
1208−
1425+# define YYDPRINTF(Args) \
1426+do { \
1427+ if (yydebug) \
1428+ YYFPRINTF Args; \
1429+} while (YYID (0))
12091430
1210−# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1211−do { \
1212− if (yydebug) \
1213− { \
1214− YYFPRINTF (stderr, "%s ", Title); \
1215− yy_symbol_print (stderr, \
1216− Type, Value); \
1217− YYFPRINTF (stderr, "\n"); \
1218− } \
1219−} while (0)
1431+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1432+do { \
1433+ if (yydebug) \
1434+ { \
1435+ YYFPRINTF (stderr, "%s ", Title); \
1436+ yy_symbol_print (stderr, \
1437+ Type, Value); \
1438+ YYFPRINTF (stderr, "\n"); \
1439+ } \
1440+} while (YYID (0))
12201441
12211442
1222−/*----------------------------------------.
1223−| Print this symbol's value on YYOUTPUT. |
1224−`----------------------------------------*/
1443+/*--------------------------------.
1444+| Print this symbol on YYOUTPUT. |
1445+`--------------------------------*/
12251446
1447+/*ARGSUSED*/
1448+#if (defined __STDC__ || defined __C99__FUNC__ \
1449+ || defined __cplusplus || defined _MSC_VER)
12261450 static void
12271451 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1452+#else
1453+static void
1454+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1455+ FILE *yyoutput;
1456+ int yytype;
1457+ YYSTYPE const * const yyvaluep;
1458+#endif
12281459 {
1229− FILE *yyo = yyoutput;
1230− YYUSE (yyo);
12311460 if (!yyvaluep)
12321461 return;
12331462 # ifdef YYPRINT
12341463 if (yytype < YYNTOKENS)
12351464 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1465+# else
1466+ YYUSE (yyoutput);
12361467 # endif
1237− YYUSE (yytype);
1468+ switch (yytype)
1469+ {
1470+ default:
1471+ break;
1472+ }
12381473 }
12391474
12401475
@@ -1242,11 +1477,22 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue · 1 unmodified line
12421477 | Print this symbol on YYOUTPUT. |
12431478 `--------------------------------*/
12441479
1480+#if (defined __STDC__ || defined __C99__FUNC__ \
1481+ || defined __cplusplus || defined _MSC_VER)
12451482 static void
12461483 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1484+#else
1485+static void
1486+yy_symbol_print (yyoutput, yytype, yyvaluep)
1487+ FILE *yyoutput;
1488+ int yytype;
1489+ YYSTYPE const * const yyvaluep;
1490+#endif
12471491 {
1248− YYFPRINTF (yyoutput, "%s %s (",
1249− yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1492+ if (yytype < YYNTOKENS)
1493+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1494+ else
1495+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
12501496
12511497 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
12521498 YYFPRINTF (yyoutput, ")");
@@ -1257,54 +1503,66 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) · 4 unmodified lines
12571503 | TOP (included). |
12581504 `------------------------------------------------------------------*/
12591505
1506+#if (defined __STDC__ || defined __C99__FUNC__ \
1507+ || defined __cplusplus || defined _MSC_VER)
12601508 static void
1261−yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1509+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1510+#else
1511+static void
1512+yy_stack_print (bottom, top)
1513+ yytype_int16 *bottom;
1514+ yytype_int16 *top;
1515+#endif
12621516 {
12631517 YYFPRINTF (stderr, "Stack now");
1264− for (; yybottom <= yytop; yybottom++)
1265− {
1266− int yybot = *yybottom;
1267− YYFPRINTF (stderr, " %d", yybot);
1268− }
1518+ for (; bottom <= top; ++bottom)
1519+ YYFPRINTF (stderr, " %d", *bottom);
12691520 YYFPRINTF (stderr, "\n");
12701521 }
12711522
1272−# define YY_STACK_PRINT(Bottom, Top) \
1273−do { \
1274− if (yydebug) \
1275− yy_stack_print ((Bottom), (Top)); \
1276−} while (0)
1523+# define YY_STACK_PRINT(Bottom, Top) \
1524+do { \
1525+ if (yydebug) \
1526+ yy_stack_print ((Bottom), (Top)); \
1527+} while (YYID (0))
12771528
12781529
12791530 /*------------------------------------------------.
12801531 | Report that the YYRULE is going to be reduced. |
12811532 `------------------------------------------------*/
12821533
1534+#if (defined __STDC__ || defined __C99__FUNC__ \
1535+ || defined __cplusplus || defined _MSC_VER)
1536+static void
1537+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1538+#else
12831539 static void
1284−yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1540+yy_reduce_print (yyvsp, yyrule)
1541+ YYSTYPE *yyvsp;
1542+ int yyrule;
1543+#endif
12851544 {
1286− unsigned long yylno = yyrline[yyrule];
12871545 int yynrhs = yyr2[yyrule];
12881546 int yyi;
1547+ unsigned long int yylno = yyrline[yyrule];
12891548 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1290− yyrule - 1, yylno);
1549+ yyrule - 1, yylno);
12911550 /* The symbols being reduced. */
12921551 for (yyi = 0; yyi < yynrhs; yyi++)
12931552 {
1294− YYFPRINTF (stderr, " $%d = ", yyi + 1);
1295− yy_symbol_print (stderr,
1296− yystos[yyssp[yyi + 1 - yynrhs]],
1297− &(yyvsp[(yyi + 1) - (yynrhs)])
1298− );
1299− YYFPRINTF (stderr, "\n");
1553+ fprintf (stderr, " $%d = ", yyi + 1);
1554+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1555+ &(yyvsp[(yyi + 1) - (yynrhs)])
1556+ );
1557+ fprintf (stderr, "\n");
13001558 }
13011559 }
13021560
1303−# define YY_REDUCE_PRINT(Rule) \
1304−do { \
1305− if (yydebug) \
1306− yy_reduce_print (yyssp, yyvsp, Rule); \
1307−} while (0)
1561+# define YY_REDUCE_PRINT(Rule) \
1562+do { \
1563+ if (yydebug) \
1564+ yy_reduce_print (yyvsp, Rule); \
1565+} while (YYID (0))
13081566
13091567 /* Nonzero means print parse trace. It is left uninitialized so that
13101568 multiple parsers can coexist. */
@@ -1318,7 +1576,7 @@ int yydebug; · 7 unmodified lines
13181576
13191577
13201578 /* YYINITDEPTH -- initial size of the parser's stacks. */
1321−#ifndef YYINITDEPTH
1579+#ifndef YYINITDEPTH
13221580 # define YYINITDEPTH 200
13231581 #endif
13241582
@@ -1333,6 +1591,7 @@ int yydebug; · 8 unmodified lines
13331591 # define YYMAXDEPTH 10000
13341592 #endif
13351593
1594+
13361595
13371596 #if YYERROR_VERBOSE
13381597
@@ -1341,8 +1600,15 @@ int yydebug; · 2 unmodified lines
13411600 # define yystrlen strlen
13421601 # else
13431602 /* Return the length of YYSTR. */
1603+#if (defined __STDC__ || defined __C99__FUNC__ \
1604+ || defined __cplusplus || defined _MSC_VER)
13441605 static YYSIZE_T
13451606 yystrlen (const char *yystr)
1607+#else
1608+static YYSIZE_T
1609+yystrlen (yystr)
1610+ const char *yystr;
1611+#endif
13461612 {
13471613 YYSIZE_T yylen;
13481614 for (yylen = 0; yystr[yylen]; yylen++)
@@ -1358,8 +1624,16 @@ yystrlen (const char *yystr) · 9 unmodified lines
13581624 # else
13591625 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
13601626 YYDEST. */
1627+#if (defined __STDC__ || defined __C99__FUNC__ \
1628+ || defined __cplusplus || defined _MSC_VER)
13611629 static char *
13621630 yystpcpy (char *yydest, const char *yysrc)
1631+#else
1632+static char *
1633+yystpcpy (yydest, yysrc)
1634+ char *yydest;
1635+ const char *yysrc;
1636+#endif
13631637 {
13641638 char *yyd = yydest;
13651639 const char *yys = yysrc;
@@ -1389,27 +1663,27 @@ yytnamerr (char *yyres, const char *yystr) · 23 unmodified lines
13891663 char const *yyp = yystr;
13901664
13911665 for (;;)
1392− switch (*++yyp)
1393− {
1394− case '\'':
1395− case ',':
1396− goto do_not_strip_quotes;
1397−
1398− case '\\':
1399− if (*++yyp != '\\')
1400− goto do_not_strip_quotes;
1401− /* Fall through. */
1402− default:
1403− if (yyres)
1404− yyres[yyn] = *yyp;
1405− yyn++;
1406− break;
1407−
1408− case '"':
1409− if (yyres)
1410− yyres[yyn] = '\0';
1411− return yyn;
1412− }
1666+ switch (*++yyp)
1667+ {
1668+ case '\'':
1669+ case ',':
1670+ goto do_not_strip_quotes;
1671+
1672+ case '\\':
1673+ if (*++yyp != '\\')
1674+ goto do_not_strip_quotes;
1675+ /* Fall through. */
1676+ default:
1677+ if (yyres)
1678+ yyres[yyn] = *yyp;
1679+ yyn++;
1680+ break;
1681+
1682+ case '"':
1683+ if (yyres)
1684+ yyres[yyn] = '\0';
1685+ return yyn;
1686+ }
14131687 do_not_strip_quotes: ;
14141688 }
14151689
@@ -1420,210 +1694,211 @@ yytnamerr (char *yyres, const char *yystr) · 4 unmodified lines
14201694 }
14211695 # endif
14221696
1423−/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1424− about the unexpected token YYTOKEN for the state stack whose top is
1425− YYSSP.
1426−
1427− Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1428− not large enough to hold the message. In that case, also set
1429− *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1430− required number of bytes is too large to store. */
1431−static int
1432−yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1433− yytype_int16 *yyssp, int yytoken)
1697+/* Copy into YYRESULT an error message about the unexpected token
1698+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
1699+ including the terminating null byte. If YYRESULT is null, do not
1700+ copy anything; just return the number of bytes that would be
1701+ copied. As a special case, return 0 if an ordinary "syntax error"
1702+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1703+ size calculation. */
1704+static YYSIZE_T
1705+yysyntax_error (char *yyresult, int yystate, int yychar)
14341706 {
1435− YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1436− YYSIZE_T yysize = yysize0;
1437− enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1438− /* Internationalized format string. */
1439− const char *yyformat = YY_NULLPTR;
1440− /* Arguments of yyformat. */
1441− char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1442− /* Number of reported tokens (one for the "unexpected", one per
1443− "expected"). */
1444− int yycount = 0;
1445−
1446− /* There are many possibilities here to consider:
1447− - If this state is a consistent state with a default action, then
1448− the only way this function was invoked is if the default action
1449− is an error action. In that case, don't check for expected
1450− tokens because there are none.
1451− - The only way there can be no lookahead present (in yychar) is if
1452− this state is a consistent state with a default action. Thus,
1453− detecting the absence of a lookahead is sufficient to determine
1454− that there is no unexpected or expected token to report. In that
1455− case, just report a simple "syntax error".
1456− - Don't assume there isn't a lookahead just because this state is a
1457− consistent state with a default action. There might have been a
1458− previous inconsistent state, consistent state with a non-default
1459− action, or user semantic action that manipulated yychar.
1460− - Of course, the expected token list depends on states to have
1461− correct lookahead information, and it depends on the parser not
1462− to perform extra reductions after fetching a lookahead from the
1463− scanner and before detecting a syntax error. Thus, state merging
1464− (from LALR or IELR) and default reductions corrupt the expected
1465− token list. However, the list is correct for canonical LR with
1466− one exception: it will still contain any token that will not be
1467− accepted due to an error action in a later state.
1468− */
1469− if (yytoken != YYEMPTY)
1470− {
1471− int yyn = yypact[*yyssp];
1472− yyarg[yycount++] = yytname[yytoken];
1473− if (!yypact_value_is_default (yyn))
1474− {
1475− /* Start YYX at -YYN if negative to avoid negative indexes in
1476− YYCHECK. In other words, skip the first -YYN actions for
1477− this state because they are default actions. */
1478− int yyxbegin = yyn < 0 ? -yyn : 0;
1479− /* Stay within bounds of both yycheck and yytname. */
1480− int yychecklim = YYLAST - yyn + 1;
1481− int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1482− int yyx;
1483−
1484− for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1485− if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1486− && !yytable_value_is_error (yytable[yyx + yyn]))
1487− {
1488− if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1489− {
1490− yycount = 1;
1491− yysize = yysize0;
1492− break;
1493− }
1494− yyarg[yycount++] = yytname[yyx];
1495− {
1496− YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1497− if (! (yysize <= yysize1
1498− && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1499− return 2;
1500− yysize = yysize1;
1501− }
1502− }
1503− }
1504− }
1505−
1506− switch (yycount)
1507− {
1508−# define YYCASE_(N, S) \
1509− case N: \
1510− yyformat = S; \
1511− break
1512− default: /* Avoid compiler warnings. */
1513− YYCASE_(0, YY_("syntax error"));
1514− YYCASE_(1, YY_("syntax error, unexpected %s"));
1515− YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1516− YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1517− YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1518− YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1519−# undef YYCASE_
1520− }
1707+ int yyn = yypact[yystate];
15211708
1522− {
1523− YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1524− if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1525− return 2;
1526− yysize = yysize1;
1527− }
1528−
1529− if (*yymsg_alloc < yysize)
1709+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1710+ return 0;
1711+ else
15301712 {
1531− *yymsg_alloc = 2 * yysize;
1532− if (! (yysize <= *yymsg_alloc
1533− && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1534− *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1535− return 1;
1713+ int yytype = YYTRANSLATE (yychar);
1714+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1715+ YYSIZE_T yysize = yysize0;
1716+ YYSIZE_T yysize1;
1717+ int yysize_overflow = 0;
1718+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1719+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1720+ int yyx;
1721+
1722+# if 0
1723+ /* This is so xgettext sees the translatable formats that are
1724+ constructed on the fly. */
1725+ YY_("syntax error, unexpected %s");
1726+ YY_("syntax error, unexpected %s, expecting %s");
1727+ YY_("syntax error, unexpected %s, expecting %s or %s");
1728+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1729+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1730+# endif
1731+ char *yyfmt;
1732+ char const *yyf;
1733+ static char const yyunexpected[] = "syntax error, unexpected %s";
1734+ static char const yyexpecting[] = ", expecting %s";
1735+ static char const yyor[] = " or %s";
1736+ char yyformat[sizeof yyunexpected
1737+ + sizeof yyexpecting - 1
1738+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1739+ * (sizeof yyor - 1))];
1740+ char const *yyprefix = yyexpecting;
1741+
1742+ /* Start YYX at -YYN if negative to avoid negative indexes in
1743+ YYCHECK. */
1744+ int yyxbegin = yyn < 0 ? -yyn : 0;
1745+
1746+ /* Stay within bounds of both yycheck and yytname. */
1747+ int yychecklim = YYLAST - yyn + 1;
1748+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1749+ int yycount = 1;
1750+
1751+ yyarg[0] = yytname[yytype];
1752+ yyfmt = yystpcpy (yyformat, yyunexpected);
1753+
1754+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1755+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1756+ {
1757+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1758+ {
1759+ yycount = 1;
1760+ yysize = yysize0;
1761+ yyformat[sizeof yyunexpected - 1] = '\0';
1762+ break;
1763+ }
1764+ yyarg[yycount++] = yytname[yyx];
1765+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1766+ yysize_overflow |= (yysize1 < yysize);
1767+ yysize = yysize1;
1768+ yyfmt = yystpcpy (yyfmt, yyprefix);
1769+ yyprefix = yyor;
1770+ }
1771+
1772+ yyf = YY_(yyformat);
1773+ yysize1 = yysize + yystrlen (yyf);
1774+ yysize_overflow |= (yysize1 < yysize);
1775+ yysize = yysize1;
1776+
1777+ if (yysize_overflow)
1778+ return YYSIZE_MAXIMUM;
1779+
1780+ if (yyresult)
1781+ {
1782+ /* Avoid sprintf, as that infringes on the user's name space.
1783+ Don't have undefined behavior even if the translation
1784+ produced a string with the wrong number of "%s"s. */
1785+ char *yyp = yyresult;
1786+ int yyi = 0;
1787+ while ((*yyp = *yyf) != '\0')
1788+ {
1789+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1790+ {
1791+ yyp += yytnamerr (yyp, yyarg[yyi++]);
1792+ yyf += 2;
1793+ }
1794+ else
1795+ {
1796+ yyp++;
1797+ yyf++;
1798+ }
1799+ }
1800+ }
1801+ return yysize;
15361802 }
1537−
1538− /* Avoid sprintf, as that infringes on the user's name space.
1539− Don't have undefined behavior even if the translation
1540− produced a string with the wrong number of "%s"s. */
1541− {
1542− char *yyp = *yymsg;
1543− int yyi = 0;
1544− while ((*yyp = *yyformat) != '\0')
1545− if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1546− {
1547− yyp += yytnamerr (yyp, yyarg[yyi++]);
1548− yyformat += 2;
1549− }
1550− else
1551− {
1552− yyp++;
1553− yyformat++;
1554− }
1555− }
1556− return 0;
15571803 }
15581804 #endif /* YYERROR_VERBOSE */
1805+
15591806
15601807 /*-----------------------------------------------.
15611808 | Release the memory associated to this symbol. |
15621809 `-----------------------------------------------*/
15631810
1811+/*ARGSUSED*/
1812+#if (defined __STDC__ || defined __C99__FUNC__ \
1813+ || defined __cplusplus || defined _MSC_VER)
15641814 static void
15651815 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1816+#else
1817+static void
1818+yydestruct (yymsg, yytype, yyvaluep)
1819+ const char *yymsg;
1820+ int yytype;
1821+ YYSTYPE *yyvaluep;
1822+#endif
15661823 {
15671824 YYUSE (yyvaluep);
1825+
15681826 if (!yymsg)
15691827 yymsg = "Deleting";
15701828 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
15711829
1572− YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1573− YYUSE (yytype);
1574− YY_IGNORE_MAYBE_UNINITIALIZED_END
1830+ switch (yytype)
1831+ {
1832+
1833+ default:
1834+ break;
1835+ }
15751836 }
1837+
15761838
1839+/* Prevent warnings from -Wmissing-prototypes. */
1840+
1841+#ifdef YYPARSE_PARAM
1842+#if defined __STDC__ || defined __cplusplus
1843+int yyparse (void *YYPARSE_PARAM);
1844+#else
1845+int yyparse ();
1846+#endif
1847+#else /* ! YYPARSE_PARAM */
1848+#if defined __STDC__ || defined __cplusplus
1849+int yyparse (void);
1850+#else
1851+int yyparse ();
1852+#endif
1853+#endif /* ! YYPARSE_PARAM */
15771854
15781855
15791856
1580−/* The lookahead symbol. */
1857+/* The look-ahead symbol. */
15811858 int yychar;
15821859
1583−/* The semantic value of the lookahead symbol. */
1860+/* The semantic value of the look-ahead symbol. */
15841861 YYSTYPE yylval;
1862+
15851863 /* Number of syntax errors so far. */
15861864 int yynerrs;
15871865
15881866
1867+
15891868 /*----------.
15901869 | yyparse. |
15911870 `----------*/
15921871
1872+#ifdef YYPARSE_PARAM
1873+#if (defined __STDC__ || defined __C99__FUNC__ \
1874+ || defined __cplusplus || defined _MSC_VER)
1875+int
1876+yyparse (void *YYPARSE_PARAM)
1877+#else
1878+int
1879+yyparse (YYPARSE_PARAM)
1880+ void *YYPARSE_PARAM;
1881+#endif
1882+#else /* ! YYPARSE_PARAM */
1883+#if (defined __STDC__ || defined __C99__FUNC__ \
1884+ || defined __cplusplus || defined _MSC_VER)
15931885 int
15941886 yyparse (void)
1595−{
1596− int yystate;
1597− /* Number of tokens to shift before error messages enabled. */
1598− int yyerrstatus;
1599−
1600− /* The stacks and their tools:
1601− 'yyss': related to states.
1602− 'yyvs': related to semantic values.
1603−
1604− Refer to the stacks through separate pointers, to allow yyoverflow
1605− to reallocate them elsewhere. */
1606−
1607− /* The state stack. */
1608− yytype_int16 yyssa[YYINITDEPTH];
1609− yytype_int16 *yyss;
1610− yytype_int16 *yyssp;
1611−
1612− /* The semantic value stack. */
1613− YYSTYPE yyvsa[YYINITDEPTH];
1614− YYSTYPE *yyvs;
1615− YYSTYPE *yyvsp;
1616−
1617− YYSIZE_T yystacksize;
1887+#else
1888+int
1889+yyparse ()
16181890
1891+#endif
1892+#endif
1893+{
1894+
1895+ int yystate;
16191896 int yyn;
16201897 int yyresult;
1621− /* Lookahead token as an internal (translated) token number. */
1898+ /* Number of tokens to shift before error messages enabled. */
1899+ int yyerrstatus;
1900+ /* Look-ahead token as an internal (translated) token number. */
16221901 int yytoken = 0;
1623− /* The variables used to return semantic value and location from the
1624− action routines. */
1625− YYSTYPE yyval;
1626−
16271902 #if YYERROR_VERBOSE
16281903 /* Buffer for error messages, and its allocated size. */
16291904 char yymsgbuf[128];
@@ -1631,22 +1906,54 @@ yyparse (void) · 1 unmodified line
16311906 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
16321907 #endif
16331908
1909+ /* Three stacks and their tools:
1910+ `yyss': related to states,
1911+ `yyvs': related to semantic values,
1912+ `yyls': related to locations.
1913+
1914+ Refer to the stacks thru separate pointers, to allow yyoverflow
1915+ to reallocate them elsewhere. */
1916+
1917+ /* The state stack. */
1918+ yytype_int16 yyssa[YYINITDEPTH];
1919+ yytype_int16 *yyss = yyssa;
1920+ yytype_int16 *yyssp;
1921+
1922+ /* The semantic value stack. */
1923+ YYSTYPE yyvsa[YYINITDEPTH];
1924+ YYSTYPE *yyvs = yyvsa;
1925+ YYSTYPE *yyvsp;
1926+
1927+
1928+
16341929 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
16351930
1931+ YYSIZE_T yystacksize = YYINITDEPTH;
1932+
1933+ /* The variables used to return semantic value and location from the
1934+ action routines. */
1935+ YYSTYPE yyval;
1936+
1937+
16361938 /* The number of symbols on the RHS of the reduced rule.
16371939 Keep to zero when no symbol should be popped. */
16381940 int yylen = 0;
16391941
1640− yyssp = yyss = yyssa;
1641− yyvsp = yyvs = yyvsa;
1642− yystacksize = YYINITDEPTH;
1643−
16441942 YYDPRINTF ((stderr, "Starting parse\n"));
16451943
16461944 yystate = 0;
16471945 yyerrstatus = 0;
16481946 yynerrs = 0;
1649− yychar = YYEMPTY; /* Cause a token to be read. */
1947+ yychar = YYEMPTY; /* Cause a token to be read. */
1948+
1949+ /* Initialize stack pointers.
1950+ Waste one element of value and location stack
1951+ so that they stay on the same level as the state stack.
1952+ The wasted elements are never initialized. */
1953+
1954+ yyssp = yyss;
1955+ yyvsp = yyvs;
1956+
16501957 goto yysetstate;
16511958
16521959 /*------------------------------------------------------------.
@@ -1667,23 +1974,25 @@ yyparse (void) · 14 unmodified lines
16671974
16681975 #ifdef yyoverflow
16691976 {
1670− /* Give user a chance to reallocate the stack. Use copies of
1671− these so that the &'s don't force the real ones into
1672− memory. */
1673− YYSTYPE *yyvs1 = yyvs;
1674− yytype_int16 *yyss1 = yyss;
1675−
1676− /* Each stack pointer address is followed by the size of the
1677− data in use in that stack, in bytes. This used to be a
1678− conditional around just the two extra args, but that might
1679− be undefined if yyoverflow is a macro. */
1680− yyoverflow (YY_("memory exhausted"),
1681− &yyss1, yysize * sizeof (*yyssp),
1682− &yyvs1, yysize * sizeof (*yyvsp),
1683− &yystacksize);
1684−
1685− yyss = yyss1;
1686− yyvs = yyvs1;
1977+ /* Give user a chance to reallocate the stack. Use copies of
1978+ these so that the &'s don't force the real ones into
1979+ memory. */
1980+ YYSTYPE *yyvs1 = yyvs;
1981+ yytype_int16 *yyss1 = yyss;
1982+
1983+
1984+ /* Each stack pointer address is followed by the size of the
1985+ data in use in that stack, in bytes. This used to be a
1986+ conditional around just the two extra args, but that might
1987+ be undefined if yyoverflow is a macro. */
1988+ yyoverflow (YY_("memory exhausted"),
1989+ &yyss1, yysize * sizeof (*yyssp),
1990+ &yyvs1, yysize * sizeof (*yyvsp),
1991+
1992+ &yystacksize);
1993+
1994+ yyss = yyss1;
1995+ yyvs = yyvs1;
16871996 }
16881997 #else /* no yyoverflow */
16891998 # ifndef YYSTACK_RELOCATE
@@ -1691,22 +2000,23 @@ yyparse (void) · 1 unmodified line
16912000 # else
16922001 /* Extend the stack our own way. */
16932002 if (YYMAXDEPTH <= yystacksize)
1694− goto yyexhaustedlab;
2003+ goto yyexhaustedlab;
16952004 yystacksize *= 2;
16962005 if (YYMAXDEPTH < yystacksize)
1697− yystacksize = YYMAXDEPTH;
2006+ yystacksize = YYMAXDEPTH;
16982007
16992008 {
1700− yytype_int16 *yyss1 = yyss;
1701− union yyalloc *yyptr =
1702− (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1703− if (! yyptr)
1704− goto yyexhaustedlab;
1705− YYSTACK_RELOCATE (yyss_alloc, yyss);
1706− YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2009+ yytype_int16 *yyss1 = yyss;
2010+ union yyalloc *yyptr =
2011+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2012+ if (! yyptr)
2013+ goto yyexhaustedlab;
2014+ YYSTACK_RELOCATE (yyss);
2015+ YYSTACK_RELOCATE (yyvs);
2016+
17072017 # undef YYSTACK_RELOCATE
1708− if (yyss1 != yyssa)
1709− YYSTACK_FREE (yyss1);
2018+ if (yyss1 != yyssa)
2019+ YYSTACK_FREE (yyss1);
17102020 }
17112021 # endif
17122022 #endif /* no yyoverflow */
@@ -1714,18 +2024,16 @@ yyparse (void) · 1 unmodified line
17142024 yyssp = yyss + yysize - 1;
17152025 yyvsp = yyvs + yysize - 1;
17162026
2027+
17172028 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1718− (unsigned long) yystacksize));
2029+ (unsigned long int) yystacksize));
17192030
17202031 if (yyss + yystacksize - 1 <= yyssp)
1721− YYABORT;
2032+ YYABORT;
17222033 }
17232034
17242035 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
17252036
1726− if (yystate == YYFINAL)
1727− YYACCEPT;
1728−
17292037 goto yybackup;
17302038
17312039 /*-----------.
@@ -1734,20 +2042,20 @@ yyparse (void) · 2 unmodified lines
17342042 yybackup:
17352043
17362044 /* Do appropriate processing given the current state. Read a
1737− lookahead token if we need one and don't already have one. */
2045+ look-ahead token if we need one and don't already have one. */
17382046
1739− /* First try to decide what to do without reference to lookahead token. */
2047+ /* First try to decide what to do without reference to look-ahead token. */
17402048 yyn = yypact[yystate];
1741− if (yypact_value_is_default (yyn))
2049+ if (yyn == YYPACT_NINF)
17422050 goto yydefault;
17432051
1744− /* Not known => get a lookahead token if don't already have one. */
2052+ /* Not known => get a look-ahead token if don't already have one. */
17452053
1746− /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2054+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
17472055 if (yychar == YYEMPTY)
17482056 {
17492057 YYDPRINTF ((stderr, "Reading a token: "));
1750− yychar = yylex ();
2058+ yychar = YYLEX;
17512059 }
17522060
17532061 if (yychar <= YYEOF)
@@ -1769,27 +2077,29 @@ yybackup: · 15 unmodified lines
17692077 yyn = yytable[yyn];
17702078 if (yyn <= 0)
17712079 {
1772− if (yytable_value_is_error (yyn))
1773− goto yyerrlab;
2080+ if (yyn == 0 || yyn == YYTABLE_NINF)
2081+ goto yyerrlab;
17742082 yyn = -yyn;
17752083 goto yyreduce;
17762084 }
17772085
2086+ if (yyn == YYFINAL)
2087+ YYACCEPT;
2088+
17782089 /* Count tokens shifted since error; after three, turn off error
17792090 status. */
17802091 if (yyerrstatus)
17812092 yyerrstatus--;
17822093
1783− /* Shift the lookahead token. */
2094+ /* Shift the look-ahead token. */
17842095 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
17852096
1786− /* Discard the shifted token. */
1787− yychar = YYEMPTY;
2097+ /* Discard the shifted token unless it is eof. */
2098+ if (yychar != YYEOF)
2099+ yychar = YYEMPTY;
17882100
17892101 yystate = yyn;
1790− YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17912102 *++yyvsp = yylval;
1792− YY_IGNORE_MAYBE_UNINITIALIZED_END
17932103
17942104 goto yynewstate;
17952105
@@ -1812,7 +2122,7 @@ yyreduce: · 16 unmodified lines
18122122 yylen = yyr2[yyn];
18132123
18142124 /* If YYLEN is nonzero, implement the default value of the action:
1815− '$$ = $1'.
2125+ `$$ = $1'.
18162126
18172127 Otherwise, the following line sets YYVAL to garbage.
18182128 This behavior is undocumented and Bison
@@ -1826,1112 +2136,920 @@ yyreduce: · 7 unmodified lines
18262136 switch (yyn)
18272137 {
18282138 case 2:
1829−#line 184 "chuck.y" /* yacc.c:1651 */
1830− { (yyval.program) = g_program = new_program( (yyvsp[0].program_section), EM_lineNum ); }
1831−#line 1830 "chuck.tab.c" /* yacc.c:1651 */
2139+#line 184 "chuck.y"
2140+ { (yyval.program) = g_program = new_program( (yyvsp[(1) - (1)].program_section), EM_lineNum ); ;}
18322141 break;
18332142
18342143 case 3:
1835−#line 185 "chuck.y" /* yacc.c:1651 */
1836− { (yyval.program) = g_program = prepend_program( (yyvsp[-1].program_section), (yyvsp[0].program), EM_lineNum ); }
1837−#line 1836 "chuck.tab.c" /* yacc.c:1651 */
2144+#line 185 "chuck.y"
2145+ { (yyval.program) = g_program = append_program( (yyvsp[(1) - (2)].program), (yyvsp[(2) - (2)].program_section), EM_lineNum ); ;}
18382146 break;
18392147
18402148 case 4:
1841−#line 189 "chuck.y" /* yacc.c:1651 */
1842− { (yyval.program_section) = new_section_stmt( (yyvsp[0].stmt_list), EM_lineNum ); }
1843−#line 1842 "chuck.tab.c" /* yacc.c:1651 */
2149+#line 189 "chuck.y"
2150+ { (yyval.program_section) = new_section_stmt( (yyvsp[(1) - (1)].stmt_list), EM_lineNum ); ;}
18442151 break;
18452152
18462153 case 5:
1847−#line 190 "chuck.y" /* yacc.c:1651 */
1848− { (yyval.program_section) = new_section_func_def( (yyvsp[0].func_def), EM_lineNum ); }
1849−#line 1848 "chuck.tab.c" /* yacc.c:1651 */
2154+#line 190 "chuck.y"
2155+ { (yyval.program_section) = new_section_func_def( (yyvsp[(1) - (1)].func_def), EM_lineNum ); ;}
18502156 break;
18512157
18522158 case 6:
1853−#line 191 "chuck.y" /* yacc.c:1651 */
1854− { (yyval.program_section) = new_section_class_def( (yyvsp[0].class_def), EM_lineNum ); }
1855−#line 1854 "chuck.tab.c" /* yacc.c:1651 */
2159+#line 191 "chuck.y"
2160+ { (yyval.program_section) = new_section_class_def( (yyvsp[(1) - (1)].class_def), EM_lineNum ); ;}
18562161 break;
18572162
18582163 case 7:
1859−#line 196 "chuck.y" /* yacc.c:1651 */
1860− { (yyval.class_def) = new_class_def( (yyvsp[-5].ival), (yyvsp[-3].id_list), NULL, (yyvsp[-1].class_body), EM_lineNum ); }
1861−#line 1860 "chuck.tab.c" /* yacc.c:1651 */
2164+#line 196 "chuck.y"
2165+ { (yyval.class_def) = new_class_def( (yyvsp[(1) - (6)].ival), (yyvsp[(3) - (6)].id_list), NULL, (yyvsp[(5) - (6)].class_body), EM_lineNum ); ;}
18622166 break;
18632167
18642168 case 8:
1865−#line 198 "chuck.y" /* yacc.c:1651 */
1866− { (yyval.class_def) = new_class_def( (yyvsp[-6].ival), (yyvsp[-4].id_list), (yyvsp[-3].class_ext), (yyvsp[-1].class_body), EM_lineNum ); }
1867−#line 1866 "chuck.tab.c" /* yacc.c:1651 */
2169+#line 198 "chuck.y"
2170+ { (yyval.class_def) = new_class_def( (yyvsp[(1) - (7)].ival), (yyvsp[(3) - (7)].id_list), (yyvsp[(4) - (7)].class_ext), (yyvsp[(6) - (7)].class_body), EM_lineNum ); ;}
18682171 break;
18692172
18702173 case 9:
1871−#line 200 "chuck.y" /* yacc.c:1651 */
1872− { (yyval.class_def) = new_iface_def( (yyvsp[-5].ival), (yyvsp[-3].id_list), NULL, (yyvsp[-1].class_body), EM_lineNum ); }
1873−#line 1872 "chuck.tab.c" /* yacc.c:1651 */
2174+#line 200 "chuck.y"
2175+ { (yyval.class_def) = new_iface_def( (yyvsp[(1) - (6)].ival), (yyvsp[(3) - (6)].id_list), NULL, (yyvsp[(5) - (6)].class_body), EM_lineNum ); ;}
18742176 break;
18752177
18762178 case 10:
1877−#line 202 "chuck.y" /* yacc.c:1651 */
1878− { (yyval.class_def) = new_iface_def( (yyvsp[-6].ival), (yyvsp[-4].id_list), (yyvsp[-3].class_ext), (yyvsp[-1].class_body), EM_lineNum ); }
1879−#line 1878 "chuck.tab.c" /* yacc.c:1651 */
2179+#line 202 "chuck.y"
2180+ { (yyval.class_def) = new_iface_def( (yyvsp[(1) - (7)].ival), (yyvsp[(3) - (7)].id_list), (yyvsp[(4) - (7)].class_ext), (yyvsp[(6) - (7)].class_body), EM_lineNum ); ;}
18802181 break;
18812182
18822183 case 11:
1883−#line 206 "chuck.y" /* yacc.c:1651 */
1884− { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[0].id_list), EM_lineNum ); }
1885−#line 1884 "chuck.tab.c" /* yacc.c:1651 */
2184+#line 206 "chuck.y"
2185+ { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[(2) - (2)].id_list), EM_lineNum ); ;}
18862186 break;
18872187
18882188 case 12:
1889−#line 207 "chuck.y" /* yacc.c:1651 */
1890− { (yyval.class_ext) = new_class_ext( (yyvsp[0].id_list), (yyvsp[-2].id_list), EM_lineNum ); }
1891−#line 1890 "chuck.tab.c" /* yacc.c:1651 */
2189+#line 207 "chuck.y"
2190+ { (yyval.class_ext) = new_class_ext( (yyvsp[(4) - (4)].id_list), (yyvsp[(2) - (4)].id_list), EM_lineNum ); ;}
18922191 break;
18932192
18942193 case 13:
1895−#line 208 "chuck.y" /* yacc.c:1651 */
1896− { (yyval.class_ext) = new_class_ext( (yyvsp[0].id_list), NULL, EM_lineNum ); }
1897−#line 1896 "chuck.tab.c" /* yacc.c:1651 */
2194+#line 208 "chuck.y"
2195+ { (yyval.class_ext) = new_class_ext( (yyvsp[(2) - (2)].id_list), NULL, EM_lineNum ); ;}
18982196 break;
18992197
19002198 case 14:
1901−#line 209 "chuck.y" /* yacc.c:1651 */
1902− { (yyval.class_ext) = new_class_ext( (yyvsp[-2].id_list), (yyvsp[0].id_list), EM_lineNum ); }
1903−#line 1902 "chuck.tab.c" /* yacc.c:1651 */
2199+#line 209 "chuck.y"
2200+ { (yyval.class_ext) = new_class_ext( (yyvsp[(2) - (4)].id_list), (yyvsp[(4) - (4)].id_list), EM_lineNum ); ;}
19042201 break;
19052202
19062203 case 15:
1907−#line 213 "chuck.y" /* yacc.c:1651 */
1908− { (yyval.class_body) = (yyvsp[0].class_body); }
1909−#line 1908 "chuck.tab.c" /* yacc.c:1651 */
2204+#line 213 "chuck.y"
2205+ { (yyval.class_body) = (yyvsp[(1) - (1)].class_body); ;}
19102206 break;
19112207
19122208 case 16:
1913−#line 214 "chuck.y" /* yacc.c:1651 */
1914− { (yyval.class_body) = NULL; }
1915−#line 1914 "chuck.tab.c" /* yacc.c:1651 */
2209+#line 214 "chuck.y"
2210+ { (yyval.class_body) = NULL; ;}
19162211 break;
19172212
19182213 case 17:
1919−#line 218 "chuck.y" /* yacc.c:1651 */
1920− { (yyval.class_body) = new_class_body( (yyvsp[0].program_section), EM_lineNum ); }
1921−#line 1920 "chuck.tab.c" /* yacc.c:1651 */
2214+#line 218 "chuck.y"
2215+ { (yyval.class_body) = new_class_body( (yyvsp[(1) - (1)].program_section), EM_lineNum ); ;}
19222216 break;
19232217
19242218 case 18:
1925−#line 219 "chuck.y" /* yacc.c:1651 */
1926− { (yyval.class_body) = prepend_class_body( (yyvsp[-1].program_section), (yyvsp[0].class_body), EM_lineNum ); }
1927−#line 1926 "chuck.tab.c" /* yacc.c:1651 */
2219+#line 219 "chuck.y"
2220+ { (yyval.class_body) = prepend_class_body( (yyvsp[(1) - (2)].program_section), (yyvsp[(2) - (2)].class_body), EM_lineNum ); ;}
19282221 break;
19292222
19302223 case 19:
1931−#line 224 "chuck.y" /* yacc.c:1651 */
1932− { (yyval.program_section) = new_section_stmt( (yyvsp[0].stmt_list), EM_lineNum ); }
1933−#line 1932 "chuck.tab.c" /* yacc.c:1651 */
2224+#line 224 "chuck.y"
2225+ { (yyval.program_section) = new_section_stmt( (yyvsp[(1) - (1)].stmt_list), EM_lineNum ); ;}
19342226 break;
19352227
19362228 case 20:
1937−#line 225 "chuck.y" /* yacc.c:1651 */
1938− { (yyval.program_section) = new_section_func_def( (yyvsp[0].func_def), EM_lineNum ); }
1939−#line 1938 "chuck.tab.c" /* yacc.c:1651 */
2229+#line 225 "chuck.y"
2230+ { (yyval.program_section) = new_section_func_def( (yyvsp[(1) - (1)].func_def), EM_lineNum ); ;}
19402231 break;
19412232
19422233 case 21:
1943−#line 226 "chuck.y" /* yacc.c:1651 */
1944− { (yyval.program_section) = new_section_class_def( (yyvsp[0].class_def), EM_lineNum ); }
1945−#line 1944 "chuck.tab.c" /* yacc.c:1651 */
2234+#line 226 "chuck.y"
2235+ { (yyval.program_section) = new_section_class_def( (yyvsp[(1) - (1)].class_def), EM_lineNum ); ;}
19462236 break;
19472237
19482238 case 22:
1949−#line 230 "chuck.y" /* yacc.c:1651 */
1950− { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[0].id_list), EM_lineNum ); }
1951−#line 1950 "chuck.tab.c" /* yacc.c:1651 */
2239+#line 230 "chuck.y"
2240+ { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[(2) - (2)].id_list), EM_lineNum ); ;}
19522241 break;
19532242
19542243 case 23:
1955−#line 234 "chuck.y" /* yacc.c:1651 */
1956− { (yyval.id_list) = new_id_list( (yyvsp[0].sval), EM_lineNum ); }
1957−#line 1956 "chuck.tab.c" /* yacc.c:1651 */
2244+#line 234 "chuck.y"
2245+ { (yyval.id_list) = new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
19582246 break;
19592247
19602248 case 24:
1961−#line 235 "chuck.y" /* yacc.c:1651 */
1962− { (yyval.id_list) = prepend_id_list( (yyvsp[-2].sval), (yyvsp[0].id_list), EM_lineNum ); }
1963−#line 1962 "chuck.tab.c" /* yacc.c:1651 */
2249+#line 235 "chuck.y"
2250+ { (yyval.id_list) = prepend_id_list( (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].id_list), EM_lineNum ); ;}
19642251 break;
19652252
19662253 case 25:
1967−#line 239 "chuck.y" /* yacc.c:1651 */
1968− { (yyval.id_list) = new_id_list( (yyvsp[0].sval), EM_lineNum ); }
1969−#line 1968 "chuck.tab.c" /* yacc.c:1651 */
2254+#line 239 "chuck.y"
2255+ { (yyval.id_list) = new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
19702256 break;
19712257
19722258 case 26:
1973−#line 240 "chuck.y" /* yacc.c:1651 */
1974− { (yyval.id_list) = prepend_id_list( (yyvsp[-2].sval), (yyvsp[0].id_list), EM_lineNum ); }
1975−#line 1974 "chuck.tab.c" /* yacc.c:1651 */
2259+#line 240 "chuck.y"
2260+ { (yyval.id_list) = prepend_id_list( (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].id_list), EM_lineNum ); ;}
19762261 break;
19772262
19782263 case 27:
1979−#line 245 "chuck.y" /* yacc.c:1651 */
1980− { (yyval.func_def) = new_func_def( (yyvsp[-7].ival), (yyvsp[-6].ival), (yyvsp[-5].type_decl), (yyvsp[-4].sval), (yyvsp[-2].arg_list), (yyvsp[0].stmt), EM_lineNum ); }
1981−#line 1980 "chuck.tab.c" /* yacc.c:1651 */
2264+#line 245 "chuck.y"
2265+ { (yyval.func_def) = new_func_def( (yyvsp[(1) - (8)].ival), (yyvsp[(2) - (8)].ival), (yyvsp[(3) - (8)].type_decl), (yyvsp[(4) - (8)].sval), (yyvsp[(6) - (8)].arg_list), (yyvsp[(8) - (8)].stmt), EM_lineNum ); ;}
19822266 break;
19832267
19842268 case 28:
1985−#line 247 "chuck.y" /* yacc.c:1651 */
1986− { (yyval.func_def) = new_func_def( (yyvsp[-6].ival), (yyvsp[-5].ival), (yyvsp[-4].type_decl), (yyvsp[-3].sval), NULL, (yyvsp[0].stmt), EM_lineNum ); }
1987−#line 1986 "chuck.tab.c" /* yacc.c:1651 */
2269+#line 247 "chuck.y"
2270+ { (yyval.func_def) = new_func_def( (yyvsp[(1) - (7)].ival), (yyvsp[(2) - (7)].ival), (yyvsp[(3) - (7)].type_decl), (yyvsp[(4) - (7)].sval), NULL, (yyvsp[(7) - (7)].stmt), EM_lineNum ); ;}
19882271 break;
19892272
19902273 case 29:
1991−#line 249 "chuck.y" /* yacc.c:1651 */
1992− { (yyval.func_def) = new_func_def( (yyvsp[-7].ival), (yyvsp[-6].ival), (yyvsp[-5].type_decl), (yyvsp[-4].sval), (yyvsp[-2].arg_list), NULL, EM_lineNum ); }
1993−#line 1992 "chuck.tab.c" /* yacc.c:1651 */
2274+#line 249 "chuck.y"
2275+ { (yyval.func_def) = new_func_def( (yyvsp[(1) - (8)].ival), (yyvsp[(2) - (8)].ival), (yyvsp[(3) - (8)].type_decl), (yyvsp[(4) - (8)].sval), (yyvsp[(6) - (8)].arg_list), NULL, EM_lineNum ); ;}
19942276 break;
19952277
19962278 case 30:
1997−#line 251 "chuck.y" /* yacc.c:1651 */
1998− { (yyval.func_def) = new_func_def( (yyvsp[-6].ival), (yyvsp[-5].ival), (yyvsp[-4].type_decl), (yyvsp[-3].sval), NULL, NULL, EM_lineNum ); }
1999−#line 1998 "chuck.tab.c" /* yacc.c:1651 */
2279+#line 251 "chuck.y"
2280+ { (yyval.func_def) = new_func_def( (yyvsp[(1) - (7)].ival), (yyvsp[(2) - (7)].ival), (yyvsp[(3) - (7)].type_decl), (yyvsp[(4) - (7)].sval), NULL, NULL, EM_lineNum ); ;}
20002281 break;
20012282
20022283 case 31:
2003−#line 255 "chuck.y" /* yacc.c:1651 */
2004− { (yyval.ival) = ae_key_public; }
2005−#line 2004 "chuck.tab.c" /* yacc.c:1651 */
2284+#line 255 "chuck.y"
2285+ { (yyval.ival) = ae_key_public; ;}
20062286 break;
20072287
20082288 case 32:
2009−#line 256 "chuck.y" /* yacc.c:1651 */
2010− { (yyval.ival) = ae_key_private; }
2011−#line 2010 "chuck.tab.c" /* yacc.c:1651 */
2289+#line 256 "chuck.y"
2290+ { (yyval.ival) = ae_key_private; ;}
20122291 break;
20132292
20142293 case 33:
2015−#line 257 "chuck.y" /* yacc.c:1651 */
2016− { (yyval.ival) = ae_key_private; }
2017−#line 2016 "chuck.tab.c" /* yacc.c:1651 */
2294+#line 257 "chuck.y"
2295+ { (yyval.ival) = ae_key_private; ;}
20182296 break;
20192297
20202298 case 34:
2021−#line 261 "chuck.y" /* yacc.c:1651 */
2022− { (yyval.ival) = ae_key_func; }
2023−#line 2022 "chuck.tab.c" /* yacc.c:1651 */
2299+#line 261 "chuck.y"
2300+ { (yyval.ival) = ae_key_func; ;}
20242301 break;
20252302
20262303 case 35:
2027−#line 262 "chuck.y" /* yacc.c:1651 */
2028− { (yyval.ival) = ae_key_public; }
2029−#line 2028 "chuck.tab.c" /* yacc.c:1651 */
2304+#line 262 "chuck.y"
2305+ { (yyval.ival) = ae_key_public; ;}
20302306 break;
20312307
20322308 case 36:
2033−#line 263 "chuck.y" /* yacc.c:1651 */
2034− { (yyval.ival) = ae_key_protected; }
2035−#line 2034 "chuck.tab.c" /* yacc.c:1651 */
2309+#line 263 "chuck.y"
2310+ { (yyval.ival) = ae_key_protected; ;}
20362311 break;
20372312
20382313 case 37:
2039−#line 264 "chuck.y" /* yacc.c:1651 */
2040− { (yyval.ival) = ae_key_private; }
2041−#line 2040 "chuck.tab.c" /* yacc.c:1651 */
2314+#line 264 "chuck.y"
2315+ { (yyval.ival) = ae_key_private; ;}
20422316 break;
20432317
20442318 case 38:
2045−#line 268 "chuck.y" /* yacc.c:1651 */
2046− { (yyval.ival) = ae_key_static; }
2047−#line 2046 "chuck.tab.c" /* yacc.c:1651 */
2319+#line 268 "chuck.y"
2320+ { (yyval.ival) = ae_key_static; ;}
20482321 break;
20492322
20502323 case 39:
2051−#line 269 "chuck.y" /* yacc.c:1651 */
2052− { (yyval.ival) = ae_key_abstract; }
2053−#line 2052 "chuck.tab.c" /* yacc.c:1651 */
2324+#line 269 "chuck.y"
2325+ { (yyval.ival) = ae_key_abstract; ;}
20542326 break;
20552327
20562328 case 40:
2057−#line 270 "chuck.y" /* yacc.c:1651 */
2058− { (yyval.ival) = ae_key_instance; }
2059−#line 2058 "chuck.tab.c" /* yacc.c:1651 */
2329+#line 270 "chuck.y"
2330+ { (yyval.ival) = ae_key_instance; ;}
20602331 break;
20612332
20622333 case 41:
2063−#line 274 "chuck.y" /* yacc.c:1651 */
2064− { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[0].sval), EM_lineNum ), 0, EM_lineNum ); }
2065−#line 2064 "chuck.tab.c" /* yacc.c:1651 */
2334+#line 274 "chuck.y"
2335+ { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ), 0, EM_lineNum ); ;}
20662336 break;
20672337
20682338 case 42:
2069−#line 275 "chuck.y" /* yacc.c:1651 */
2070− { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[-1].sval), EM_lineNum ), 1, EM_lineNum ); }
2071−#line 2070 "chuck.tab.c" /* yacc.c:1651 */
2339+#line 275 "chuck.y"
2340+ { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[(1) - (2)].sval), EM_lineNum ), 1, EM_lineNum ); ;}
20722341 break;
20732342
20742343 case 43:
2075−#line 279 "chuck.y" /* yacc.c:1651 */
2076− { (yyval.type_decl) = new_type_decl( (yyvsp[-1].id_list), 0, EM_lineNum ); }
2077−#line 2076 "chuck.tab.c" /* yacc.c:1651 */
2344+#line 279 "chuck.y"
2345+ { (yyval.type_decl) = new_type_decl( (yyvsp[(2) - (3)].id_list), 0, EM_lineNum ); ;}
20782346 break;
20792347
20802348 case 44:
2081−#line 280 "chuck.y" /* yacc.c:1651 */
2082− { (yyval.type_decl) = new_type_decl( (yyvsp[-2].id_list), 1, EM_lineNum ); }
2083−#line 2082 "chuck.tab.c" /* yacc.c:1651 */
2349+#line 280 "chuck.y"
2350+ { (yyval.type_decl) = new_type_decl( (yyvsp[(2) - (4)].id_list), 1, EM_lineNum ); ;}
20842351 break;
20852352
20862353 case 45:
2087−#line 289 "chuck.y" /* yacc.c:1651 */
2088− { (yyval.type_decl) = (yyvsp[0].type_decl); }
2089−#line 2088 "chuck.tab.c" /* yacc.c:1651 */
2354+#line 289 "chuck.y"
2355+ { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
20902356 break;
20912357
20922358 case 46:
2093−#line 290 "chuck.y" /* yacc.c:1651 */
2094− { (yyval.type_decl) = (yyvsp[0].type_decl); }
2095−#line 2094 "chuck.tab.c" /* yacc.c:1651 */
2359+#line 290 "chuck.y"
2360+ { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
20962361 break;
20972362
20982363 case 47:
2099−#line 295 "chuck.y" /* yacc.c:1651 */
2100− { (yyval.type_decl) = (yyvsp[0].type_decl); }
2101−#line 2100 "chuck.tab.c" /* yacc.c:1651 */
2364+#line 295 "chuck.y"
2365+ { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
21022366 break;
21032367
21042368 case 48:
2105−#line 296 "chuck.y" /* yacc.c:1651 */
2106− { (yyval.type_decl) = add_type_decl_array( (yyvsp[-1].type_decl), (yyvsp[0].array_sub), EM_lineNum ); }
2107−#line 2106 "chuck.tab.c" /* yacc.c:1651 */
2369+#line 296 "chuck.y"
2370+ { (yyval.type_decl) = add_type_decl_array( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
21082371 break;
21092372
21102373 case 49:
2111−#line 300 "chuck.y" /* yacc.c:1651 */
2112− { (yyval.arg_list) = new_arg_list( (yyvsp[-1].type_decl), (yyvsp[0].var_decl), EM_lineNum ); }
2113−#line 2112 "chuck.tab.c" /* yacc.c:1651 */
2374+#line 300 "chuck.y"
2375+ { (yyval.arg_list) = new_arg_list( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].var_decl), EM_lineNum ); ;}
21142376 break;
21152377
21162378 case 50:
2117−#line 301 "chuck.y" /* yacc.c:1651 */
2118− { (yyval.arg_list) = prepend_arg_list( (yyvsp[-3].type_decl), (yyvsp[-2].var_decl), (yyvsp[0].arg_list), EM_lineNum ); }
2119−#line 2118 "chuck.tab.c" /* yacc.c:1651 */
2379+#line 301 "chuck.y"
2380+ { (yyval.arg_list) = prepend_arg_list( (yyvsp[(1) - (4)].type_decl), (yyvsp[(2) - (4)].var_decl), (yyvsp[(4) - (4)].arg_list), EM_lineNum ); ;}
21202381 break;
21212382
21222383 case 51:
2123−#line 305 "chuck.y" /* yacc.c:1651 */
2124− { (yyval.stmt_list) = new_stmt_list( (yyvsp[0].stmt), EM_lineNum ); }
2125−#line 2124 "chuck.tab.c" /* yacc.c:1651 */
2384+#line 305 "chuck.y"
2385+ { (yyval.stmt_list) = new_stmt_list( (yyvsp[(1) - (1)].stmt), EM_lineNum ); ;}
21262386 break;
21272387
21282388 case 52:
2129−#line 306 "chuck.y" /* yacc.c:1651 */
2130− { (yyval.stmt_list) = prepend_stmt_list( (yyvsp[-1].stmt), (yyvsp[0].stmt_list), EM_lineNum ); }
2131−#line 2130 "chuck.tab.c" /* yacc.c:1651 */
2389+#line 306 "chuck.y"
2390+ { (yyval.stmt_list) = append_stmt_list( (yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].stmt), EM_lineNum ); ;}
21322391 break;
21332392
21342393 case 53:
2135−#line 310 "chuck.y" /* yacc.c:1651 */
2136− { (yyval.stmt) = (yyvsp[0].stmt); }
2137−#line 2136 "chuck.tab.c" /* yacc.c:1651 */
2394+#line 310 "chuck.y"
2395+ { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
21382396 break;
21392397
21402398 case 54:
2141−#line 311 "chuck.y" /* yacc.c:1651 */
2142− { (yyval.stmt) = (yyvsp[0].stmt); }
2143−#line 2142 "chuck.tab.c" /* yacc.c:1651 */
2399+#line 311 "chuck.y"
2400+ { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
21442401 break;
21452402
21462403 case 55:
2147−#line 312 "chuck.y" /* yacc.c:1651 */
2148− { (yyval.stmt) = (yyvsp[0].stmt); }
2149−#line 2148 "chuck.tab.c" /* yacc.c:1651 */
2404+#line 312 "chuck.y"
2405+ { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
21502406 break;
21512407
21522408 case 56:
2153−#line 313 "chuck.y" /* yacc.c:1651 */
2154− { (yyval.stmt) = (yyvsp[0].stmt); }
2155−#line 2154 "chuck.tab.c" /* yacc.c:1651 */
2409+#line 313 "chuck.y"
2410+ { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
21562411 break;
21572412
21582413 case 57:
2159−#line 315 "chuck.y" /* yacc.c:1651 */
2160− { (yyval.stmt) = (yyvsp[0].stmt); }
2161−#line 2160 "chuck.tab.c" /* yacc.c:1651 */
2414+#line 315 "chuck.y"
2415+ { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
21622416 break;
21632417
21642418 case 58:
2165−#line 319 "chuck.y" /* yacc.c:1651 */
2166− { (yyval.stmt) = new_stmt_from_return( NULL, EM_lineNum ); }
2167−#line 2166 "chuck.tab.c" /* yacc.c:1651 */
2419+#line 319 "chuck.y"
2420+ { (yyval.stmt) = new_stmt_from_return( NULL, EM_lineNum ); ;}
21682421 break;
21692422
21702423 case 59:
2171−#line 320 "chuck.y" /* yacc.c:1651 */
2172− { (yyval.stmt) = new_stmt_from_return( (yyvsp[-1].exp), EM_lineNum ); }
2173−#line 2172 "chuck.tab.c" /* yacc.c:1651 */
2424+#line 320 "chuck.y"
2425+ { (yyval.stmt) = new_stmt_from_return( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
21742426 break;
21752427
21762428 case 60:
2177−#line 321 "chuck.y" /* yacc.c:1651 */
2178− { (yyval.stmt) = new_stmt_from_break( EM_lineNum ); }
2179−#line 2178 "chuck.tab.c" /* yacc.c:1651 */
2429+#line 321 "chuck.y"
2430+ { (yyval.stmt) = new_stmt_from_break( EM_lineNum ); ;}
21802431 break;
21812432
21822433 case 61:
2183−#line 322 "chuck.y" /* yacc.c:1651 */
2184− { (yyval.stmt) = new_stmt_from_continue( EM_lineNum ); }
2185−#line 2184 "chuck.tab.c" /* yacc.c:1651 */
2434+#line 322 "chuck.y"
2435+ { (yyval.stmt) = new_stmt_from_continue( EM_lineNum ); ;}
21862436 break;
21872437
21882438 case 62:
2189−#line 327 "chuck.y" /* yacc.c:1651 */
2190− { (yyval.stmt) = new_stmt_from_if( (yyvsp[-2].exp), (yyvsp[0].stmt), NULL, EM_lineNum ); }
2191−#line 2190 "chuck.tab.c" /* yacc.c:1651 */
2439+#line 327 "chuck.y"
2440+ { (yyval.stmt) = new_stmt_from_if( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), NULL, EM_lineNum ); ;}
21922441 break;
21932442
21942443 case 63:
2195−#line 329 "chuck.y" /* yacc.c:1651 */
2196− { (yyval.stmt) = new_stmt_from_if( (yyvsp[-4].exp), (yyvsp[-2].stmt), (yyvsp[0].stmt), EM_lineNum ); }
2197−#line 2196 "chuck.tab.c" /* yacc.c:1651 */
2444+#line 329 "chuck.y"
2445+ { (yyval.stmt) = new_stmt_from_if( (yyvsp[(3) - (7)].exp), (yyvsp[(5) - (7)].stmt), (yyvsp[(7) - (7)].stmt), EM_lineNum ); ;}
21982446 break;
21992447
22002448 case 64:
2201−#line 334 "chuck.y" /* yacc.c:1651 */
2202− { (yyval.stmt) = new_stmt_from_while( (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }
2203−#line 2202 "chuck.tab.c" /* yacc.c:1651 */
2449+#line 334 "chuck.y"
2450+ { (yyval.stmt) = new_stmt_from_while( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
22042451 break;
22052452
22062453 case 65:
2207−#line 336 "chuck.y" /* yacc.c:1651 */
2208− { (yyval.stmt) = new_stmt_from_do_while( (yyvsp[-2].exp), (yyvsp[-5].stmt), EM_lineNum ); }
2209−#line 2208 "chuck.tab.c" /* yacc.c:1651 */
2454+#line 336 "chuck.y"
2455+ { (yyval.stmt) = new_stmt_from_do_while( (yyvsp[(5) - (7)].exp), (yyvsp[(2) - (7)].stmt), EM_lineNum ); ;}
22102456 break;
22112457
22122458 case 66:
2213−#line 338 "chuck.y" /* yacc.c:1651 */
2214− { (yyval.stmt) = new_stmt_from_for( (yyvsp[-3].stmt), (yyvsp[-2].stmt), NULL, (yyvsp[0].stmt), EM_lineNum ); }
2215−#line 2214 "chuck.tab.c" /* yacc.c:1651 */
2459+#line 338 "chuck.y"
2460+ { (yyval.stmt) = new_stmt_from_for( (yyvsp[(3) - (6)].stmt), (yyvsp[(4) - (6)].stmt), NULL, (yyvsp[(6) - (6)].stmt), EM_lineNum ); ;}
22162461 break;
22172462
22182463 case 67:
2219−#line 340 "chuck.y" /* yacc.c:1651 */
2220− { (yyval.stmt) = new_stmt_from_for( (yyvsp[-4].stmt), (yyvsp[-3].stmt), (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }
2221−#line 2220 "chuck.tab.c" /* yacc.c:1651 */
2464+#line 340 "chuck.y"
2465+ { (yyval.stmt) = new_stmt_from_for( (yyvsp[(3) - (7)].stmt), (yyvsp[(4) - (7)].stmt), (yyvsp[(5) - (7)].exp), (yyvsp[(7) - (7)].stmt), EM_lineNum ); ;}
22222466 break;
22232467
22242468 case 68:
2225−#line 342 "chuck.y" /* yacc.c:1651 */
2226− { (yyval.stmt) = new_stmt_from_until( (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }
2227−#line 2226 "chuck.tab.c" /* yacc.c:1651 */
2469+#line 342 "chuck.y"
2470+ { (yyval.stmt) = new_stmt_from_until( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
22282471 break;
22292472
22302473 case 69:
2231−#line 344 "chuck.y" /* yacc.c:1651 */
2232− { (yyval.stmt) = new_stmt_from_do_until( (yyvsp[-2].exp), (yyvsp[-5].stmt), EM_lineNum ); }
2233−#line 2232 "chuck.tab.c" /* yacc.c:1651 */
2474+#line 344 "chuck.y"
2475+ { (yyval.stmt) = new_stmt_from_do_until( (yyvsp[(5) - (7)].exp), (yyvsp[(2) - (7)].stmt), EM_lineNum ); ;}
22342476 break;
22352477
22362478 case 70:
2237−#line 346 "chuck.y" /* yacc.c:1651 */
2238− { (yyval.stmt) = new_stmt_from_loop( (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }
2239−#line 2238 "chuck.tab.c" /* yacc.c:1651 */
2479+#line 346 "chuck.y"
2480+ { (yyval.stmt) = new_stmt_from_loop( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
22402481 break;
22412482
22422483 case 71:
2243−#line 350 "chuck.y" /* yacc.c:1651 */
2244− { (yyval.stmt) = new_stmt_from_code( NULL, EM_lineNum ); }
2245−#line 2244 "chuck.tab.c" /* yacc.c:1651 */
2484+#line 350 "chuck.y"
2485+ { (yyval.stmt) = new_stmt_from_code( NULL, EM_lineNum ); ;}
22462486 break;
22472487
22482488 case 72:
2249−#line 351 "chuck.y" /* yacc.c:1651 */
2250− { (yyval.stmt) = new_stmt_from_code( (yyvsp[-1].stmt_list), EM_lineNum ); }
2251−#line 2250 "chuck.tab.c" /* yacc.c:1651 */
2489+#line 351 "chuck.y"
2490+ { (yyval.stmt) = new_stmt_from_code( (yyvsp[(2) - (3)].stmt_list), EM_lineNum ); ;}
22522491 break;
22532492
22542493 case 73:
2255−#line 355 "chuck.y" /* yacc.c:1651 */
2256− { (yyval.stmt) = NULL; }
2257−#line 2256 "chuck.tab.c" /* yacc.c:1651 */
2494+#line 355 "chuck.y"
2495+ { (yyval.stmt) = NULL; ;}
22582496 break;
22592497
22602498 case 74:
2261−#line 356 "chuck.y" /* yacc.c:1651 */
2262− { (yyval.stmt) = new_stmt_from_expression( (yyvsp[-1].exp), EM_lineNum ); }
2263−#line 2262 "chuck.tab.c" /* yacc.c:1651 */
2499+#line 356 "chuck.y"
2500+ { (yyval.stmt) = new_stmt_from_expression( (yyvsp[(1) - (2)].exp), EM_lineNum ); ;}
22642501 break;
22652502
22662503 case 75:
2267−#line 360 "chuck.y" /* yacc.c:1651 */
2268− { (yyval.exp) = (yyvsp[0].exp); }
2269−#line 2268 "chuck.tab.c" /* yacc.c:1651 */
2504+#line 360 "chuck.y"
2505+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
22702506 break;
22712507
22722508 case 76:
2273−#line 361 "chuck.y" /* yacc.c:1651 */
2274− { (yyval.exp) = prepend_expression( (yyvsp[-2].exp), (yyvsp[0].exp), EM_lineNum ); }
2275−#line 2274 "chuck.tab.c" /* yacc.c:1651 */
2509+#line 361 "chuck.y"
2510+ { (yyval.exp) = append_expression( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
22762511 break;
22772512
22782513 case 77:
2279−#line 365 "chuck.y" /* yacc.c:1651 */
2280− { (yyval.exp) = (yyvsp[0].exp); }
2281−#line 2280 "chuck.tab.c" /* yacc.c:1651 */
2514+#line 365 "chuck.y"
2515+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
22822516 break;
22832517
22842518 case 78:
2285−#line 367 "chuck.y" /* yacc.c:1651 */
2286− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), (yyvsp[-1].ival), (yyvsp[0].exp), EM_lineNum ); }
2287−#line 2286 "chuck.tab.c" /* yacc.c:1651 */
2519+#line 367 "chuck.y"
2520+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
22882521 break;
22892522
22902523 case 79:
2291−#line 371 "chuck.y" /* yacc.c:1651 */
2292− { (yyval.exp) = (yyvsp[0].exp); }
2293−#line 2292 "chuck.tab.c" /* yacc.c:1651 */
2524+#line 371 "chuck.y"
2525+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
22942526 break;
22952527
22962528 case 80:
2297−#line 373 "chuck.y" /* yacc.c:1651 */
2298− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), (yyvsp[-1].ival), (yyvsp[0].exp), EM_lineNum ); }
2299−#line 2298 "chuck.tab.c" /* yacc.c:1651 */
2529+#line 373 "chuck.y"
2530+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
23002531 break;
23012532
23022533 case 81:
2303−#line 377 "chuck.y" /* yacc.c:1651 */
2304− { (yyval.array_sub) = new_array_sub( (yyvsp[-1].exp), EM_lineNum ); }
2305−#line 2304 "chuck.tab.c" /* yacc.c:1651 */
2534+#line 377 "chuck.y"
2535+ { (yyval.array_sub) = new_array_sub( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
23062536 break;
23072537
23082538 case 82:
2309−#line 379 "chuck.y" /* yacc.c:1651 */
2310− { (yyval.array_sub) = prepend_array_sub( (yyvsp[0].array_sub), (yyvsp[-2].exp), EM_lineNum ); }
2311−#line 2310 "chuck.tab.c" /* yacc.c:1651 */
2539+#line 379 "chuck.y"
2540+ { (yyval.array_sub) = prepend_array_sub( (yyvsp[(4) - (4)].array_sub), (yyvsp[(2) - (4)].exp), EM_lineNum ); ;}
23122541 break;
23132542
23142543 case 83:
2315−#line 383 "chuck.y" /* yacc.c:1651 */
2316− { (yyval.array_sub) = new_array_sub( NULL, EM_lineNum ); }
2317−#line 2316 "chuck.tab.c" /* yacc.c:1651 */
2544+#line 383 "chuck.y"
2545+ { (yyval.array_sub) = new_array_sub( NULL, EM_lineNum ); ;}
23182546 break;
23192547
23202548 case 84:
2321−#line 384 "chuck.y" /* yacc.c:1651 */
2322− { (yyval.array_sub) = prepend_array_sub( (yyvsp[-2].array_sub), NULL, EM_lineNum ); }
2323−#line 2322 "chuck.tab.c" /* yacc.c:1651 */
2549+#line 384 "chuck.y"
2550+ { (yyval.array_sub) = prepend_array_sub( (yyvsp[(1) - (3)].array_sub), NULL, EM_lineNum ); ;}
23242551 break;
23252552
23262553 case 85:
2327−#line 388 "chuck.y" /* yacc.c:1651 */
2328− { (yyval.exp) = (yyvsp[0].exp); }
2329−#line 2328 "chuck.tab.c" /* yacc.c:1651 */
2554+#line 388 "chuck.y"
2555+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
23302556 break;
23312557
23322558 case 86:
2333−#line 389 "chuck.y" /* yacc.c:1651 */
2334− { (yyval.exp) = new_exp_decl( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 0, EM_lineNum ); }
2335−#line 2334 "chuck.tab.c" /* yacc.c:1651 */
2559+#line 389 "chuck.y"
2560+ { (yyval.exp) = new_exp_decl( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].var_decl_list), 0, EM_lineNum ); ;}
23362561 break;
23372562
23382563 case 87:
2339−#line 390 "chuck.y" /* yacc.c:1651 */
2340− { (yyval.exp) = new_exp_decl_external( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 0, EM_lineNum ); }
2341−#line 2340 "chuck.tab.c" /* yacc.c:1651 */
2564+#line 390 "chuck.y"
2565+ { (yyval.exp) = new_exp_decl_external( (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].var_decl_list), 0, EM_lineNum ); ;}
23422566 break;
23432567
23442568 case 88:
2345−#line 391 "chuck.y" /* yacc.c:1651 */
2346− { (yyval.exp) = new_exp_decl_global( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 0, EM_lineNum ); }
2347−#line 2346 "chuck.tab.c" /* yacc.c:1651 */
2569+#line 391 "chuck.y"
2570+ { (yyval.exp) = new_exp_decl_global( (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].var_decl_list), 0, EM_lineNum ); ;}
23482571 break;
23492572
23502573 case 89:
2351−#line 392 "chuck.y" /* yacc.c:1651 */
2352− { (yyval.exp) = new_exp_decl( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 1, EM_lineNum ); }
2353−#line 2352 "chuck.tab.c" /* yacc.c:1651 */
2574+#line 392 "chuck.y"
2575+ { (yyval.exp) = new_exp_decl( (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].var_decl_list), 1, EM_lineNum ); ;}
23542576 break;
23552577
23562578 case 90:
2357−#line 393 "chuck.y" /* yacc.c:1651 */
2358− { (yyval.exp) = new_exp_decl( NULL, (yyvsp[0].var_decl_list), 0, EM_lineNum ); }
2359−#line 2358 "chuck.tab.c" /* yacc.c:1651 */
2579+#line 393 "chuck.y"
2580+ { (yyval.exp) = new_exp_decl( NULL, (yyvsp[(2) - (2)].var_decl_list), 0, EM_lineNum ); ;}
23602581 break;
23612582
23622583 case 91:
2363−#line 394 "chuck.y" /* yacc.c:1651 */
2364− { (yyval.exp) = new_exp_decl( NULL, (yyvsp[0].var_decl_list), 1, EM_lineNum ); }
2365−#line 2364 "chuck.tab.c" /* yacc.c:1651 */
2584+#line 394 "chuck.y"
2585+ { (yyval.exp) = new_exp_decl( NULL, (yyvsp[(3) - (3)].var_decl_list), 1, EM_lineNum ); ;}
23662586 break;
23672587
23682588 case 92:
2369−#line 398 "chuck.y" /* yacc.c:1651 */
2370− { (yyval.var_decl_list) = new_var_decl_list( (yyvsp[0].var_decl), EM_lineNum ); }
2371−#line 2370 "chuck.tab.c" /* yacc.c:1651 */
2589+#line 398 "chuck.y"
2590+ { (yyval.var_decl_list) = new_var_decl_list( (yyvsp[(1) - (1)].var_decl), EM_lineNum ); ;}
23722591 break;
23732592
23742593 case 93:
2375−#line 399 "chuck.y" /* yacc.c:1651 */
2376− { (yyval.var_decl_list) = prepend_var_decl_list( (yyvsp[-2].var_decl), (yyvsp[0].var_decl_list), EM_lineNum ); }
2377−#line 2376 "chuck.tab.c" /* yacc.c:1651 */
2594+#line 399 "chuck.y"
2595+ { (yyval.var_decl_list) = prepend_var_decl_list( (yyvsp[(1) - (3)].var_decl), (yyvsp[(3) - (3)].var_decl_list), EM_lineNum ); ;}
23782596 break;
23792597
23802598 case 94:
2381−#line 403 "chuck.y" /* yacc.c:1651 */
2382− { (yyval.var_decl) = new_var_decl( (yyvsp[0].sval), NULL, EM_lineNum ); }
2383−#line 2382 "chuck.tab.c" /* yacc.c:1651 */
2599+#line 403 "chuck.y"
2600+ { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (1)].sval), NULL, EM_lineNum ); ;}
23842601 break;
23852602
23862603 case 95:
2387−#line 404 "chuck.y" /* yacc.c:1651 */
2388− { (yyval.var_decl) = new_var_decl( (yyvsp[-1].sval), (yyvsp[0].array_sub), EM_lineNum ); }
2389−#line 2388 "chuck.tab.c" /* yacc.c:1651 */
2604+#line 404 "chuck.y"
2605+ { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
23902606 break;
23912607
23922608 case 96:
2393−#line 405 "chuck.y" /* yacc.c:1651 */
2394− { (yyval.var_decl) = new_var_decl( (yyvsp[-1].sval), (yyvsp[0].array_sub), EM_lineNum ); }
2395−#line 2394 "chuck.tab.c" /* yacc.c:1651 */
2609+#line 405 "chuck.y"
2610+ { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
23962611 break;
23972612
23982613 case 97:
2399−#line 410 "chuck.y" /* yacc.c:1651 */
2400− { (yyval.complex_exp) = new_complex( (yyvsp[-1].exp), EM_lineNum ); }
2401−#line 2400 "chuck.tab.c" /* yacc.c:1651 */
2614+#line 410 "chuck.y"
2615+ { (yyval.complex_exp) = new_complex( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
24022616 break;
24032617
24042618 case 98:
2405−#line 415 "chuck.y" /* yacc.c:1651 */
2406− { (yyval.polar_exp) = new_polar( (yyvsp[-1].exp), EM_lineNum ); }
2407−#line 2406 "chuck.tab.c" /* yacc.c:1651 */
2619+#line 415 "chuck.y"
2620+ { (yyval.polar_exp) = new_polar( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
24082621 break;
24092622
24102623 case 99:
2411−#line 420 "chuck.y" /* yacc.c:1651 */
2412− { (yyval.vec_exp) = new_vec( (yyvsp[-1].exp), EM_lineNum ); }
2413−#line 2412 "chuck.tab.c" /* yacc.c:1651 */
2624+#line 420 "chuck.y"
2625+ { (yyval.vec_exp) = new_vec( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
24142626 break;
24152627
24162628 case 100:
2417−#line 424 "chuck.y" /* yacc.c:1651 */
2418− { (yyval.ival) = ae_op_chuck; }
2419−#line 2418 "chuck.tab.c" /* yacc.c:1651 */
2629+#line 424 "chuck.y"
2630+ { (yyval.ival) = ae_op_chuck; ;}
24202631 break;
24212632
24222633 case 101:
2423−#line 425 "chuck.y" /* yacc.c:1651 */
2424− { (yyval.ival) = ae_op_at_chuck; }
2425−#line 2424 "chuck.tab.c" /* yacc.c:1651 */
2634+#line 425 "chuck.y"
2635+ { (yyval.ival) = ae_op_at_chuck; ;}
24262636 break;
24272637
24282638 case 102:
2429−#line 426 "chuck.y" /* yacc.c:1651 */
2430− { (yyval.ival) = ae_op_plus_chuck; }
2431−#line 2430 "chuck.tab.c" /* yacc.c:1651 */
2639+#line 426 "chuck.y"
2640+ { (yyval.ival) = ae_op_plus_chuck; ;}
24322641 break;
24332642
24342643 case 103:
2435−#line 427 "chuck.y" /* yacc.c:1651 */
2436− { (yyval.ival) = ae_op_minus_chuck; }
2437−#line 2436 "chuck.tab.c" /* yacc.c:1651 */
2644+#line 427 "chuck.y"
2645+ { (yyval.ival) = ae_op_minus_chuck; ;}
24382646 break;
24392647
24402648 case 104:
2441−#line 428 "chuck.y" /* yacc.c:1651 */
2442− { (yyval.ival) = ae_op_times_chuck; }
2443−#line 2442 "chuck.tab.c" /* yacc.c:1651 */
2649+#line 428 "chuck.y"
2650+ { (yyval.ival) = ae_op_times_chuck; ;}
24442651 break;
24452652
24462653 case 105:
2447−#line 429 "chuck.y" /* yacc.c:1651 */
2448− { (yyval.ival) = ae_op_divide_chuck; }
2449−#line 2448 "chuck.tab.c" /* yacc.c:1651 */
2654+#line 429 "chuck.y"
2655+ { (yyval.ival) = ae_op_divide_chuck; ;}
24502656 break;
24512657
24522658 case 106:
2453−#line 430 "chuck.y" /* yacc.c:1651 */
2454− { (yyval.ival) = ae_op_shift_right_chuck; }
2455−#line 2454 "chuck.tab.c" /* yacc.c:1651 */
2659+#line 430 "chuck.y"
2660+ { (yyval.ival) = ae_op_shift_right_chuck; ;}
24562661 break;
24572662
24582663 case 107:
2459−#line 431 "chuck.y" /* yacc.c:1651 */
2460− { (yyval.ival) = ae_op_shift_left_chuck; }
2461−#line 2460 "chuck.tab.c" /* yacc.c:1651 */
2664+#line 431 "chuck.y"
2665+ { (yyval.ival) = ae_op_shift_left_chuck; ;}
24622666 break;
24632667
24642668 case 108:
2465−#line 432 "chuck.y" /* yacc.c:1651 */
2466− { (yyval.ival) = ae_op_percent_chuck; }
2467−#line 2466 "chuck.tab.c" /* yacc.c:1651 */
2669+#line 432 "chuck.y"
2670+ { (yyval.ival) = ae_op_percent_chuck; ;}
24682671 break;
24692672
24702673 case 109:
2471−#line 433 "chuck.y" /* yacc.c:1651 */
2472− { (yyval.ival) = ae_op_unchuck; }
2473−#line 2472 "chuck.tab.c" /* yacc.c:1651 */
2674+#line 433 "chuck.y"
2675+ { (yyval.ival) = ae_op_unchuck; ;}
24742676 break;
24752677
24762678 case 110:
2477−#line 434 "chuck.y" /* yacc.c:1651 */
2478− { (yyval.ival) = ae_op_upchuck; }
2479−#line 2478 "chuck.tab.c" /* yacc.c:1651 */
2679+#line 434 "chuck.y"
2680+ { (yyval.ival) = ae_op_upchuck; ;}
24802681 break;
24812682
24822683 case 111:
2483−#line 435 "chuck.y" /* yacc.c:1651 */
2484− { (yyval.ival) = ae_op_s_and_chuck; }
2485−#line 2484 "chuck.tab.c" /* yacc.c:1651 */
2684+#line 435 "chuck.y"
2685+ { (yyval.ival) = ae_op_s_and_chuck; ;}
24862686 break;
24872687
24882688 case 112:
2489−#line 436 "chuck.y" /* yacc.c:1651 */
2490− { (yyval.ival) = ae_op_s_or_chuck; }
2491−#line 2490 "chuck.tab.c" /* yacc.c:1651 */
2689+#line 436 "chuck.y"
2690+ { (yyval.ival) = ae_op_s_or_chuck; ;}
24922691 break;
24932692
24942693 case 113:
2495−#line 437 "chuck.y" /* yacc.c:1651 */
2496− { (yyval.ival) = ae_op_s_xor_chuck; }
2497−#line 2496 "chuck.tab.c" /* yacc.c:1651 */
2694+#line 437 "chuck.y"
2695+ { (yyval.ival) = ae_op_s_xor_chuck; ;}
24982696 break;
24992697
25002698 case 114:
2501−#line 441 "chuck.y" /* yacc.c:1651 */
2502− { (yyval.ival) = ae_op_arrow_left; }
2503−#line 2502 "chuck.tab.c" /* yacc.c:1651 */
2699+#line 441 "chuck.y"
2700+ { (yyval.ival) = ae_op_arrow_left; ;}
25042701 break;
25052702
25062703 case 115:
2507−#line 442 "chuck.y" /* yacc.c:1651 */
2508− { (yyval.ival) = ae_op_arrow_right; }
2509−#line 2508 "chuck.tab.c" /* yacc.c:1651 */
2704+#line 442 "chuck.y"
2705+ { (yyval.ival) = ae_op_arrow_right; ;}
25102706 break;
25112707
25122708 case 116:
2513−#line 446 "chuck.y" /* yacc.c:1651 */
2514− { (yyval.exp) = (yyvsp[0].exp); }
2515−#line 2514 "chuck.tab.c" /* yacc.c:1651 */
2709+#line 446 "chuck.y"
2710+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
25162711 break;
25172712
25182713 case 117:
2519−#line 448 "chuck.y" /* yacc.c:1651 */
2520− { (yyval.exp) = new_exp_from_if( (yyvsp[-4].exp), (yyvsp[-2].exp), (yyvsp[0].exp), EM_lineNum ); }
2521−#line 2520 "chuck.tab.c" /* yacc.c:1651 */
2714+#line 448 "chuck.y"
2715+ { (yyval.exp) = new_exp_from_if( (yyvsp[(1) - (5)].exp), (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].exp), EM_lineNum ); ;}
25222716 break;
25232717
25242718 case 118:
2525−#line 452 "chuck.y" /* yacc.c:1651 */
2526− { (yyval.exp) = (yyvsp[0].exp); }
2527−#line 2526 "chuck.tab.c" /* yacc.c:1651 */
2719+#line 452 "chuck.y"
2720+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
25282721 break;
25292722
25302723 case 119:
2531−#line 454 "chuck.y" /* yacc.c:1651 */
2532− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_or, (yyvsp[0].exp), EM_lineNum ); }
2533−#line 2532 "chuck.tab.c" /* yacc.c:1651 */
2724+#line 454 "chuck.y"
2725+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_or, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
25342726 break;
25352727
25362728 case 120:
2537−#line 458 "chuck.y" /* yacc.c:1651 */
2538− { (yyval.exp) = (yyvsp[0].exp); }
2539−#line 2538 "chuck.tab.c" /* yacc.c:1651 */
2729+#line 458 "chuck.y"
2730+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
25402731 break;
25412732
25422733 case 121:
2543−#line 460 "chuck.y" /* yacc.c:1651 */
2544− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_and, (yyvsp[0].exp), EM_lineNum ); }
2545−#line 2544 "chuck.tab.c" /* yacc.c:1651 */
2734+#line 460 "chuck.y"
2735+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_and, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
25462736 break;
25472737
25482738 case 122:
2549−#line 464 "chuck.y" /* yacc.c:1651 */
2550− { (yyval.exp) = (yyvsp[0].exp); }
2551−#line 2550 "chuck.tab.c" /* yacc.c:1651 */
2739+#line 464 "chuck.y"
2740+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
25522741 break;
25532742
25542743 case 123:
2555−#line 466 "chuck.y" /* yacc.c:1651 */
2556− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_s_or, (yyvsp[0].exp), EM_lineNum ); }
2557−#line 2556 "chuck.tab.c" /* yacc.c:1651 */
2744+#line 466 "chuck.y"
2745+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_or, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
25582746 break;
25592747
25602748 case 124:
2561−#line 470 "chuck.y" /* yacc.c:1651 */
2562− { (yyval.exp) = (yyvsp[0].exp); }
2563−#line 2562 "chuck.tab.c" /* yacc.c:1651 */
2749+#line 470 "chuck.y"
2750+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
25642751 break;
25652752
25662753 case 125:
2567−#line 472 "chuck.y" /* yacc.c:1651 */
2568− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_s_xor, (yyvsp[0].exp), EM_lineNum ); }
2569−#line 2568 "chuck.tab.c" /* yacc.c:1651 */
2754+#line 472 "chuck.y"
2755+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_xor, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
25702756 break;
25712757
25722758 case 126:
2573−#line 476 "chuck.y" /* yacc.c:1651 */
2574− { (yyval.exp) = (yyvsp[0].exp); }
2575−#line 2574 "chuck.tab.c" /* yacc.c:1651 */
2759+#line 476 "chuck.y"
2760+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
25762761 break;
25772762
25782763 case 127:
2579−#line 478 "chuck.y" /* yacc.c:1651 */
2580− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_s_and, (yyvsp[0].exp), EM_lineNum ); }
2581−#line 2580 "chuck.tab.c" /* yacc.c:1651 */
2764+#line 478 "chuck.y"
2765+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_and, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
25822766 break;
25832767
25842768 case 128:
2585−#line 482 "chuck.y" /* yacc.c:1651 */
2586− { (yyval.exp) = (yyvsp[0].exp); }
2587−#line 2586 "chuck.tab.c" /* yacc.c:1651 */
2769+#line 482 "chuck.y"
2770+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
25882771 break;
25892772
25902773 case 129:
2591−#line 484 "chuck.y" /* yacc.c:1651 */
2592− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_eq, (yyvsp[0].exp), EM_lineNum ); }
2593−#line 2592 "chuck.tab.c" /* yacc.c:1651 */
2774+#line 484 "chuck.y"
2775+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_eq, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
25942776 break;
25952777
25962778 case 130:
2597−#line 486 "chuck.y" /* yacc.c:1651 */
2598− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_neq, (yyvsp[0].exp), EM_lineNum ); }
2599−#line 2598 "chuck.tab.c" /* yacc.c:1651 */
2779+#line 486 "chuck.y"
2780+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_neq, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26002781 break;
26012782
26022783 case 131:
2603−#line 490 "chuck.y" /* yacc.c:1651 */
2604− { (yyval.exp) = (yyvsp[0].exp); }
2605−#line 2604 "chuck.tab.c" /* yacc.c:1651 */
2784+#line 490 "chuck.y"
2785+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
26062786 break;
26072787
26082788 case 132:
2609−#line 492 "chuck.y" /* yacc.c:1651 */
2610− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_lt, (yyvsp[0].exp), EM_lineNum ); }
2611−#line 2610 "chuck.tab.c" /* yacc.c:1651 */
2789+#line 492 "chuck.y"
2790+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_lt, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26122791 break;
26132792
26142793 case 133:
2615−#line 494 "chuck.y" /* yacc.c:1651 */
2616− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_gt, (yyvsp[0].exp), EM_lineNum ); }
2617−#line 2616 "chuck.tab.c" /* yacc.c:1651 */
2794+#line 494 "chuck.y"
2795+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_gt, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26182796 break;
26192797
26202798 case 134:
2621−#line 496 "chuck.y" /* yacc.c:1651 */
2622− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_le, (yyvsp[0].exp), EM_lineNum ); }
2623−#line 2622 "chuck.tab.c" /* yacc.c:1651 */
2799+#line 496 "chuck.y"
2800+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_le, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26242801 break;
26252802
26262803 case 135:
2627−#line 498 "chuck.y" /* yacc.c:1651 */
2628− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_ge, (yyvsp[0].exp), EM_lineNum ); }
2629−#line 2628 "chuck.tab.c" /* yacc.c:1651 */
2804+#line 498 "chuck.y"
2805+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_ge, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26302806 break;
26312807
26322808 case 136:
2633−#line 502 "chuck.y" /* yacc.c:1651 */
2634− { (yyval.exp) = (yyvsp[0].exp); }
2635−#line 2634 "chuck.tab.c" /* yacc.c:1651 */
2809+#line 502 "chuck.y"
2810+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
26362811 break;
26372812
26382813 case 137:
2639−#line 504 "chuck.y" /* yacc.c:1651 */
2640− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_shift_left, (yyvsp[0].exp), EM_lineNum ); }
2641−#line 2640 "chuck.tab.c" /* yacc.c:1651 */
2814+#line 504 "chuck.y"
2815+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_shift_left, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26422816 break;
26432817
26442818 case 138:
2645−#line 506 "chuck.y" /* yacc.c:1651 */
2646− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_shift_right, (yyvsp[0].exp), EM_lineNum ); }
2647−#line 2646 "chuck.tab.c" /* yacc.c:1651 */
2819+#line 506 "chuck.y"
2820+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_shift_right, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26482821 break;
26492822
26502823 case 139:
2651−#line 510 "chuck.y" /* yacc.c:1651 */
2652− { (yyval.exp) = (yyvsp[0].exp); }
2653−#line 2652 "chuck.tab.c" /* yacc.c:1651 */
2824+#line 510 "chuck.y"
2825+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
26542826 break;
26552827
26562828 case 140:
2657−#line 512 "chuck.y" /* yacc.c:1651 */
2658− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_plus, (yyvsp[0].exp), EM_lineNum ); }
2659−#line 2658 "chuck.tab.c" /* yacc.c:1651 */
2829+#line 512 "chuck.y"
2830+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_plus, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26602831 break;
26612832
26622833 case 141:
2663−#line 514 "chuck.y" /* yacc.c:1651 */
2664− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_minus, (yyvsp[0].exp), EM_lineNum ); }
2665−#line 2664 "chuck.tab.c" /* yacc.c:1651 */
2834+#line 514 "chuck.y"
2835+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_minus, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26662836 break;
26672837
26682838 case 142:
2669−#line 518 "chuck.y" /* yacc.c:1651 */
2670− { (yyval.exp) = (yyvsp[0].exp); }
2671−#line 2670 "chuck.tab.c" /* yacc.c:1651 */
2839+#line 518 "chuck.y"
2840+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
26722841 break;
26732842
26742843 case 143:
2675−#line 520 "chuck.y" /* yacc.c:1651 */
2676− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_times, (yyvsp[0].exp), EM_lineNum ); }
2677−#line 2676 "chuck.tab.c" /* yacc.c:1651 */
2844+#line 520 "chuck.y"
2845+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_times, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26782846 break;
26792847
26802848 case 144:
2681−#line 522 "chuck.y" /* yacc.c:1651 */
2682− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_divide, (yyvsp[0].exp), EM_lineNum ); }
2683−#line 2682 "chuck.tab.c" /* yacc.c:1651 */
2849+#line 522 "chuck.y"
2850+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_divide, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26842851 break;
26852852
26862853 case 145:
2687−#line 524 "chuck.y" /* yacc.c:1651 */
2688− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_percent, (yyvsp[0].exp), EM_lineNum ); }
2689−#line 2688 "chuck.tab.c" /* yacc.c:1651 */
2854+#line 524 "chuck.y"
2855+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_percent, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
26902856 break;
26912857
26922858 case 146:
2693−#line 528 "chuck.y" /* yacc.c:1651 */
2694− { (yyval.exp) = (yyvsp[0].exp); }
2695−#line 2694 "chuck.tab.c" /* yacc.c:1651 */
2859+#line 528 "chuck.y"
2860+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
26962861 break;
26972862
26982863 case 147:
2699−#line 530 "chuck.y" /* yacc.c:1651 */
2700− { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_tilda, (yyvsp[0].exp), EM_lineNum ); }
2701−#line 2700 "chuck.tab.c" /* yacc.c:1651 */
2864+#line 530 "chuck.y"
2865+ { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_tilda, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
27022866 break;
27032867
27042868 case 148:
2705−#line 534 "chuck.y" /* yacc.c:1651 */
2706− { (yyval.exp) = (yyvsp[0].exp); }
2707−#line 2706 "chuck.tab.c" /* yacc.c:1651 */
2869+#line 534 "chuck.y"
2870+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
27082871 break;
27092872
27102873 case 149:
2711−#line 536 "chuck.y" /* yacc.c:1651 */
2712− { (yyval.exp) = new_exp_from_cast( (yyvsp[0].type_decl), (yyvsp[-2].exp), EM_lineNum ); }
2713−#line 2712 "chuck.tab.c" /* yacc.c:1651 */
2874+#line 536 "chuck.y"
2875+ { (yyval.exp) = new_exp_from_cast( (yyvsp[(3) - (3)].type_decl), (yyvsp[(1) - (3)].exp), EM_lineNum ); ;}
27142876 break;
27152877
27162878 case 150:
2717−#line 540 "chuck.y" /* yacc.c:1651 */
2718− { (yyval.exp) = (yyvsp[0].exp); }
2719−#line 2718 "chuck.tab.c" /* yacc.c:1651 */
2879+#line 540 "chuck.y"
2880+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
27202881 break;
27212882
27222883 case 151:
2723−#line 542 "chuck.y" /* yacc.c:1651 */
2724− { (yyval.exp) = new_exp_from_unary( ae_op_plusplus, (yyvsp[0].exp), EM_lineNum ); }
2725−#line 2724 "chuck.tab.c" /* yacc.c:1651 */
2884+#line 542 "chuck.y"
2885+ { (yyval.exp) = new_exp_from_unary( ae_op_plusplus, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
27262886 break;
27272887
27282888 case 152:
2729−#line 544 "chuck.y" /* yacc.c:1651 */
2730− { (yyval.exp) = new_exp_from_unary( ae_op_minusminus, (yyvsp[0].exp), EM_lineNum ); }
2731−#line 2730 "chuck.tab.c" /* yacc.c:1651 */
2889+#line 544 "chuck.y"
2890+ { (yyval.exp) = new_exp_from_unary( ae_op_minusminus, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
27322891 break;
27332892
27342893 case 153:
2735−#line 546 "chuck.y" /* yacc.c:1651 */
2736− { (yyval.exp) = new_exp_from_unary( (yyvsp[-1].ival), (yyvsp[0].exp), EM_lineNum ); }
2737−#line 2736 "chuck.tab.c" /* yacc.c:1651 */
2894+#line 546 "chuck.y"
2895+ { (yyval.exp) = new_exp_from_unary( (yyvsp[(1) - (2)].ival), (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
27382896 break;
27392897
27402898 case 154:
2741−#line 548 "chuck.y" /* yacc.c:1651 */
2742− { (yyval.exp) = new_exp_from_unary( ae_op_typeof, (yyvsp[0].exp), EM_lineNum ); }
2743−#line 2742 "chuck.tab.c" /* yacc.c:1651 */
2899+#line 548 "chuck.y"
2900+ { (yyval.exp) = new_exp_from_unary( ae_op_typeof, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
27442901 break;
27452902
27462903 case 155:
2747−#line 550 "chuck.y" /* yacc.c:1651 */
2748− { (yyval.exp) = new_exp_from_unary( ae_op_sizeof, (yyvsp[0].exp), EM_lineNum ); }
2749−#line 2748 "chuck.tab.c" /* yacc.c:1651 */
2904+#line 550 "chuck.y"
2905+ { (yyval.exp) = new_exp_from_unary( ae_op_sizeof, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
27502906 break;
27512907
27522908 case 156:
2753−#line 552 "chuck.y" /* yacc.c:1651 */
2754− { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[0].type_decl), NULL, EM_lineNum ); }
2755−#line 2754 "chuck.tab.c" /* yacc.c:1651 */
2909+#line 552 "chuck.y"
2910+ { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[(2) - (2)].type_decl), NULL, EM_lineNum ); ;}
27562911 break;
27572912
27582913 case 157:
2759−#line 554 "chuck.y" /* yacc.c:1651 */
2760− { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[-1].type_decl), (yyvsp[0].array_sub), EM_lineNum ); }
2761−#line 2760 "chuck.tab.c" /* yacc.c:1651 */
2914+#line 554 "chuck.y"
2915+ { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].array_sub), EM_lineNum ); ;}
27622916 break;
27632917
27642918 case 158:
2765−#line 560 "chuck.y" /* yacc.c:1651 */
2766− { (yyval.ival) = ae_op_plus; }
2767−#line 2766 "chuck.tab.c" /* yacc.c:1651 */
2919+#line 560 "chuck.y"
2920+ { (yyval.ival) = ae_op_plus; ;}
27682921 break;
27692922
27702923 case 159:
2771−#line 561 "chuck.y" /* yacc.c:1651 */
2772− { (yyval.ival) = ae_op_minus; }
2773−#line 2772 "chuck.tab.c" /* yacc.c:1651 */
2924+#line 561 "chuck.y"
2925+ { (yyval.ival) = ae_op_minus; ;}
27742926 break;
27752927
27762928 case 160:
2777−#line 562 "chuck.y" /* yacc.c:1651 */
2778− { (yyval.ival) = ae_op_tilda; }
2779−#line 2778 "chuck.tab.c" /* yacc.c:1651 */
2929+#line 562 "chuck.y"
2930+ { (yyval.ival) = ae_op_tilda; ;}
27802931 break;
27812932
27822933 case 161:
2783−#line 563 "chuck.y" /* yacc.c:1651 */
2784− { (yyval.ival) = ae_op_exclamation; }
2785−#line 2784 "chuck.tab.c" /* yacc.c:1651 */
2934+#line 563 "chuck.y"
2935+ { (yyval.ival) = ae_op_exclamation; ;}
27862936 break;
27872937
27882938 case 162:
2789−#line 564 "chuck.y" /* yacc.c:1651 */
2790− { (yyval.ival) = ae_op_times; }
2791−#line 2790 "chuck.tab.c" /* yacc.c:1651 */
2939+#line 564 "chuck.y"
2940+ { (yyval.ival) = ae_op_times; ;}
27922941 break;
27932942
27942943 case 163:
2795−#line 565 "chuck.y" /* yacc.c:1651 */
2796− { (yyval.ival) = ae_op_spork; }
2797−#line 2796 "chuck.tab.c" /* yacc.c:1651 */
2944+#line 565 "chuck.y"
2945+ { (yyval.ival) = ae_op_spork; ;}
27982946 break;
27992947
28002948 case 165:
2801−#line 572 "chuck.y" /* yacc.c:1651 */
2802− { (yyval.exp) = new_exp_from_dur( (yyvsp[-2].exp), (yyvsp[0].exp), EM_lineNum ); }
2803−#line 2802 "chuck.tab.c" /* yacc.c:1651 */
2949+#line 572 "chuck.y"
2950+ { (yyval.exp) = new_exp_from_dur( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
28042951 break;
28052952
28062953 case 166:
2807−#line 576 "chuck.y" /* yacc.c:1651 */
2808− { (yyval.exp) = (yyvsp[0].exp); }
2809−#line 2808 "chuck.tab.c" /* yacc.c:1651 */
2954+#line 576 "chuck.y"
2955+ { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
28102956 break;
28112957
28122958 case 167:
2813−#line 578 "chuck.y" /* yacc.c:1651 */
2814− { (yyval.exp) = new_exp_from_array( (yyvsp[-1].exp), (yyvsp[0].array_sub), EM_lineNum ); }
2815−#line 2814 "chuck.tab.c" /* yacc.c:1651 */
2959+#line 578 "chuck.y"
2960+ { (yyval.exp) = new_exp_from_array( (yyvsp[(1) - (2)].exp), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
28162961 break;
28172962
28182963 case 168:
2819−#line 580 "chuck.y" /* yacc.c:1651 */
2820− { (yyval.exp) = new_exp_from_func_call( (yyvsp[-2].exp), NULL, EM_lineNum ); }
2821−#line 2820 "chuck.tab.c" /* yacc.c:1651 */
2964+#line 580 "chuck.y"
2965+ { (yyval.exp) = new_exp_from_func_call( (yyvsp[(1) - (3)].exp), NULL, EM_lineNum ); ;}
28222966 break;
28232967
28242968 case 169:
2825−#line 582 "chuck.y" /* yacc.c:1651 */
2826− { (yyval.exp) = new_exp_from_func_call( (yyvsp[-3].exp), (yyvsp[-1].exp), EM_lineNum ); }
2827−#line 2826 "chuck.tab.c" /* yacc.c:1651 */
2969+#line 582 "chuck.y"
2970+ { (yyval.exp) = new_exp_from_func_call( (yyvsp[(1) - (4)].exp), (yyvsp[(3) - (4)].exp), EM_lineNum ); ;}
28282971 break;
28292972
28302973 case 170:
2831−#line 584 "chuck.y" /* yacc.c:1651 */
2832− { (yyval.exp) = new_exp_from_member_dot( (yyvsp[-2].exp), (yyvsp[0].sval), EM_lineNum ); }
2833−#line 2832 "chuck.tab.c" /* yacc.c:1651 */
2974+#line 584 "chuck.y"
2975+ { (yyval.exp) = new_exp_from_member_dot( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].sval), EM_lineNum ); ;}
28342976 break;
28352977
28362978 case 171:
2837−#line 586 "chuck.y" /* yacc.c:1651 */
2838− { (yyval.exp) = new_exp_from_postfix( (yyvsp[-1].exp), ae_op_plusplus, EM_lineNum ); }
2839−#line 2838 "chuck.tab.c" /* yacc.c:1651 */
2979+#line 586 "chuck.y"
2980+ { (yyval.exp) = new_exp_from_postfix( (yyvsp[(1) - (2)].exp), ae_op_plusplus, EM_lineNum ); ;}
28402981 break;
28412982
28422983 case 172:
2843−#line 588 "chuck.y" /* yacc.c:1651 */
2844− { (yyval.exp) = new_exp_from_postfix( (yyvsp[-1].exp), ae_op_minusminus, EM_lineNum ); }
2845−#line 2844 "chuck.tab.c" /* yacc.c:1651 */
2984+#line 588 "chuck.y"
2985+ { (yyval.exp) = new_exp_from_postfix( (yyvsp[(1) - (2)].exp), ae_op_minusminus, EM_lineNum ); ;}
28462986 break;
28472987
28482988 case 173:
2849−#line 593 "chuck.y" /* yacc.c:1651 */
2850− { (yyval.exp) = new_exp_from_id( (yyvsp[0].sval), EM_lineNum ); }
2851−#line 2850 "chuck.tab.c" /* yacc.c:1651 */
2989+#line 593 "chuck.y"
2990+ { (yyval.exp) = new_exp_from_id( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
28522991 break;
28532992
28542993 case 174:
2855−#line 594 "chuck.y" /* yacc.c:1651 */
2856− { (yyval.exp) = new_exp_from_int( (yyvsp[0].ival), EM_lineNum ); }
2857−#line 2856 "chuck.tab.c" /* yacc.c:1651 */
2994+#line 594 "chuck.y"
2995+ { (yyval.exp) = new_exp_from_int( (yyvsp[(1) - (1)].ival), EM_lineNum ); ;}
28582996 break;
28592997
28602998 case 175:
2861−#line 595 "chuck.y" /* yacc.c:1651 */
2862− { (yyval.exp) = new_exp_from_float( (yyvsp[0].fval), EM_lineNum ); }
2863−#line 2862 "chuck.tab.c" /* yacc.c:1651 */
2999+#line 595 "chuck.y"
3000+ { (yyval.exp) = new_exp_from_float( (yyvsp[(1) - (1)].fval), EM_lineNum ); ;}
28643001 break;
28653002
28663003 case 176:
2867−#line 596 "chuck.y" /* yacc.c:1651 */
2868− { (yyval.exp) = new_exp_from_str( (yyvsp[0].sval), EM_lineNum ); }
2869−#line 2868 "chuck.tab.c" /* yacc.c:1651 */
3004+#line 596 "chuck.y"
3005+ { (yyval.exp) = new_exp_from_str( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
28703006 break;
28713007
28723008 case 177:
2873−#line 597 "chuck.y" /* yacc.c:1651 */
2874− { (yyval.exp) = new_exp_from_char( (yyvsp[0].sval), EM_lineNum ); }
2875−#line 2874 "chuck.tab.c" /* yacc.c:1651 */
3009+#line 597 "chuck.y"
3010+ { (yyval.exp) = new_exp_from_char( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
28763011 break;
28773012
28783013 case 178:
2879−#line 598 "chuck.y" /* yacc.c:1651 */
2880− { (yyval.exp) = new_exp_from_array_lit( (yyvsp[0].array_sub), EM_lineNum ); }
2881−#line 2880 "chuck.tab.c" /* yacc.c:1651 */
3014+#line 598 "chuck.y"
3015+ { (yyval.exp) = new_exp_from_array_lit( (yyvsp[(1) - (1)].array_sub), EM_lineNum ); ;}
28823016 break;
28833017
28843018 case 179:
2885−#line 599 "chuck.y" /* yacc.c:1651 */
2886− { (yyval.exp) = new_exp_from_complex( (yyvsp[0].complex_exp), EM_lineNum ); }
2887−#line 2886 "chuck.tab.c" /* yacc.c:1651 */
3019+#line 599 "chuck.y"
3020+ { (yyval.exp) = new_exp_from_complex( (yyvsp[(1) - (1)].complex_exp), EM_lineNum ); ;}
28883021 break;
28893022
28903023 case 180:
2891−#line 600 "chuck.y" /* yacc.c:1651 */
2892− { (yyval.exp) = new_exp_from_polar( (yyvsp[0].polar_exp), EM_lineNum ); }
2893−#line 2892 "chuck.tab.c" /* yacc.c:1651 */
3024+#line 600 "chuck.y"
3025+ { (yyval.exp) = new_exp_from_polar( (yyvsp[(1) - (1)].polar_exp), EM_lineNum ); ;}
28943026 break;
28953027
28963028 case 181:
2897−#line 601 "chuck.y" /* yacc.c:1651 */
2898− { (yyval.exp) = new_exp_from_vec( (yyvsp[0].vec_exp), EM_lineNum ); }
2899−#line 2898 "chuck.tab.c" /* yacc.c:1651 */
3029+#line 601 "chuck.y"
3030+ { (yyval.exp) = new_exp_from_vec( (yyvsp[(1) - (1)].vec_exp), EM_lineNum ); ;}
29003031 break;
29013032
29023033 case 182:
2903−#line 602 "chuck.y" /* yacc.c:1651 */
2904− { (yyval.exp) = new_exp_from_hack( (yyvsp[-1].exp), EM_lineNum ); }
2905−#line 2904 "chuck.tab.c" /* yacc.c:1651 */
3034+#line 602 "chuck.y"
3035+ { (yyval.exp) = new_exp_from_hack( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
29063036 break;
29073037
29083038 case 183:
2909−#line 603 "chuck.y" /* yacc.c:1651 */
2910− { (yyval.exp) = (yyvsp[-1].exp); }
2911−#line 2910 "chuck.tab.c" /* yacc.c:1651 */
3039+#line 603 "chuck.y"
3040+ { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
29123041 break;
29133042
29143043 case 184:
2915−#line 604 "chuck.y" /* yacc.c:1651 */
2916− { (yyval.exp) = new_exp_from_nil( EM_lineNum ); }
2917−#line 2916 "chuck.tab.c" /* yacc.c:1651 */
3044+#line 604 "chuck.y"
3045+ { (yyval.exp) = new_exp_from_nil( EM_lineNum ); ;}
29183046 break;
29193047
29203048
2921−#line 2920 "chuck.tab.c" /* yacc.c:1651 */
3049+/* Line 1267 of yacc.c. */
3050+#line 3051 "chuck.tab.c"
29223051 default: break;
29233052 }
2924− /* User semantic actions sometimes alter yychar, and that requires
2925− that yytoken be updated with the new translation. We take the
2926− approach of translating immediately before every use of yytoken.
2927− One alternative is translating here after every semantic action,
2928− but that translation would be missed if the semantic action invokes
2929− YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2930− if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2931− incorrect destructor might then be invoked immediately. In the
2932− case of YYERROR or YYBACKUP, subsequent parser actions might lead
2933− to an incorrect destructor call or verbose syntax error message
2934− before the lookahead is translated. */
29353053 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
29363054
29373055 YYPOPSTACK (yylen);
@@ -2940,7 +3058,8 @@ yyreduce: · 2 unmodified lines
29403058
29413059 *++yyvsp = yyval;
29423060
2943− /* Now 'shift' the result of the reduction. Determine what state
3061+
3062+ /* Now `shift' the result of the reduction. Determine what state
29443063 that goes to, based on the state we popped back to and the rule
29453064 number reduced by. */
29463065
@@ -2955,14 +3074,10 @@ yyreduce: · 8 unmodified lines
29553074 goto yynewstate;
29563075
29573076
2958−/*--------------------------------------.
2959−| yyerrlab -- here on detecting error. |
2960−`--------------------------------------*/
3077+/*------------------------------------.
3078+| yyerrlab -- here on detecting error |
3079+`------------------------------------*/
29613080 yyerrlab:
2962− /* Make sure we have latest lookahead translation. See comments at
2963− user semantic actions for why this is necessary. */
2964− yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2965−
29663081 /* If not already recovering from an error, report this error. */
29673082 if (!yyerrstatus)
29683083 {
@@ -2970,36 +3085,37 @@ yyerrlab: · 1 unmodified line
29703085 #if ! YYERROR_VERBOSE
29713086 yyerror (YY_("syntax error"));
29723087 #else
2973−# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2974− yyssp, yytoken)
29753088 {
2976− char const *yymsgp = YY_("syntax error");
2977− int yysyntax_error_status;
2978− yysyntax_error_status = YYSYNTAX_ERROR;
2979− if (yysyntax_error_status == 0)
2980− yymsgp = yymsg;
2981− else if (yysyntax_error_status == 1)
2982− {
2983− if (yymsg != yymsgbuf)
2984− YYSTACK_FREE (yymsg);
2985− yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2986− if (!yymsg)
2987− {
2988− yymsg = yymsgbuf;
2989− yymsg_alloc = sizeof yymsgbuf;
2990− yysyntax_error_status = 2;
2991− }
2992− else
2993− {
2994− yysyntax_error_status = YYSYNTAX_ERROR;
2995− yymsgp = yymsg;
2996− }
2997− }
2998− yyerror (yymsgp);
2999− if (yysyntax_error_status == 2)
3000− goto yyexhaustedlab;
3089+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3090+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3091+ {
3092+ YYSIZE_T yyalloc = 2 * yysize;
3093+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3094+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
3095+ if (yymsg != yymsgbuf)
3096+ YYSTACK_FREE (yymsg);
3097+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3098+ if (yymsg)
3099+ yymsg_alloc = yyalloc;
3100+ else
3101+ {
3102+ yymsg = yymsgbuf;
3103+ yymsg_alloc = sizeof yymsgbuf;
3104+ }
3105+ }
3106+
3107+ if (0 < yysize && yysize <= yymsg_alloc)
3108+ {
3109+ (void) yysyntax_error (yymsg, yystate, yychar);
3110+ yyerror (yymsg);
3111+ }
3112+ else
3113+ {
3114+ yyerror (YY_("syntax error"));
3115+ if (yysize != 0)
3116+ goto yyexhaustedlab;
3117+ }
30013118 }
3002−# undef YYSYNTAX_ERROR
30033119 #endif
30043120 }
30053121
@@ -3007,24 +3123,24 @@ yyerrlab: · 1 unmodified line
30073123
30083124 if (yyerrstatus == 3)
30093125 {
3010− /* If just tried and failed to reuse lookahead token after an
3011− error, discard it. */
3126+ /* If just tried and failed to reuse look-ahead token after an
3127+ error, discard it. */
30123128
30133129 if (yychar <= YYEOF)
3014− {
3015− /* Return failure if at end of input. */
3016− if (yychar == YYEOF)
3017− YYABORT;
3018− }
3130+ {
3131+ /* Return failure if at end of input. */
3132+ if (yychar == YYEOF)
3133+ YYABORT;
3134+ }
30193135 else
3020− {
3021− yydestruct ("Error: discarding",
3022− yytoken, &yylval);
3023− yychar = YYEMPTY;
3024− }
3136+ {
3137+ yydestruct ("Error: discarding",
3138+ yytoken, &yylval);
3139+ yychar = YYEMPTY;
3140+ }
30253141 }
30263142
3027− /* Else will try to reuse lookahead token after shifting the error
3143+ /* Else will try to reuse look-ahead token after shifting the error
30283144 token. */
30293145 goto yyerrlab1;
30303146
@@ -3040,7 +3156,7 @@ yyerrorlab: · 9 unmodified lines
30403156 if (/*CONSTCOND*/ 0)
30413157 goto yyerrorlab;
30423158
3043− /* Do not reclaim the symbols of the rule whose action triggered
3159+ /* Do not reclaim the symbols of the rule which action triggered
30443160 this YYERROR. */
30453161 YYPOPSTACK (yylen);
30463162 yylen = 0;
@@ -3053,37 +3169,38 @@ yyerrorlab: · 6 unmodified lines
30533169 | yyerrlab1 -- common code for both syntax error and YYERROR. |
30543170 `-------------------------------------------------------------*/
30553171 yyerrlab1:
3056− yyerrstatus = 3; /* Each real token shifted decrements this. */
3172+ yyerrstatus = 3; /* Each real token shifted decrements this. */
30573173
30583174 for (;;)
30593175 {
30603176 yyn = yypact[yystate];
3061− if (!yypact_value_is_default (yyn))
3062− {
3063− yyn += YYTERROR;
3064− if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3065− {
3066− yyn = yytable[yyn];
3067− if (0 < yyn)
3068− break;
3069− }
3070− }
3177+ if (yyn != YYPACT_NINF)
3178+ {
3179+ yyn += YYTERROR;
3180+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3181+ {
3182+ yyn = yytable[yyn];
3183+ if (0 < yyn)
3184+ break;
3185+ }
3186+ }
30713187
30723188 /* Pop the current state because it cannot handle the error token. */
30733189 if (yyssp == yyss)
3074− YYABORT;
3190+ YYABORT;
30753191
30763192
30773193 yydestruct ("Error: popping",
3078− yystos[yystate], yyvsp);
3194+ yystos[yystate], yyvsp);
30793195 YYPOPSTACK (1);
30803196 yystate = *yyssp;
30813197 YY_STACK_PRINT (yyss, yyssp);
30823198 }
30833199
3084− YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3200+ if (yyn == YYFINAL)
3201+ YYACCEPT;
3202+
30853203 *++yyvsp = yylval;
3086− YY_IGNORE_MAYBE_UNINITIALIZED_END
30873204
30883205
30893206 /* Shift the error token. */
@@ -3107,7 +3224,7 @@ yyabortlab: · 17 unmodified lines
31073224 yyresult = 1;
31083225 goto yyreturn;
31093226
3110−#if !defined yyoverflow || YYERROR_VERBOSE
3227+#ifndef yyoverflow
31113228 /*-------------------------------------------------.
31123229 | yyexhaustedlab -- memory exhaustion comes here. |
31133230 `-------------------------------------------------*/
@@ -3118,22 +3235,17 @@ yyexhaustedlab: · 4 unmodified lines
31183235 #endif
31193236
31203237 yyreturn:
3121− if (yychar != YYEMPTY)
3122− {
3123− /* Make sure we have latest lookahead translation. See comments at
3124− user semantic actions for why this is necessary. */
3125− yytoken = YYTRANSLATE (yychar);
3126− yydestruct ("Cleanup: discarding lookahead",
3127− yytoken, &yylval);
3128− }
3129− /* Do not reclaim the symbols of the rule whose action triggered
3238+ if (yychar != YYEOF && yychar != YYEMPTY)
3239+ yydestruct ("Cleanup: discarding lookahead",
3240+ yytoken, &yylval);
3241+ /* Do not reclaim the symbols of the rule which action triggered
31303242 this YYABORT or YYACCEPT. */
31313243 YYPOPSTACK (yylen);
31323244 YY_STACK_PRINT (yyss, yyssp);
31333245 while (yyssp != yyss)
31343246 {
31353247 yydestruct ("Cleanup: popping",
3136− yystos[*yyssp], yyvsp);
3248+ yystos[*yyssp], yyvsp);
31373249 YYPOPSTACK (1);
31383250 }
31393251 #ifndef yyoverflow
@@ -3144,11 +3256,15 @@ yyreturn: · 4 unmodified lines
31443256 if (yymsg != yymsgbuf)
31453257 YYSTACK_FREE (yymsg);
31463258 #endif
3147− return yyresult;
3259+ /* Make sure YYID is used. */
3260+ return YYID (yyresult);
31483261 }
3149−#line 1 "core/chuck.yy.c"
31503262
3151−#line 3 "core/chuck.yy.c"
3263+
3264+
3265+#line 2 "chuck.yy.c"
3266+
3267+#line 4 "chuck.yy.c"
31523268
31533269 #define YY_INT_ALIGNED short int
31543270
@@ -3156,8 +3272,8 @@ yyreturn: · 1 unmodified line
31563272
31573273 #define FLEX_SCANNER
31583274 #define YY_FLEX_MAJOR_VERSION 2
3159−#define YY_FLEX_MINOR_VERSION 6
3160−#define YY_FLEX_SUBMINOR_VERSION 4
3275+#define YY_FLEX_MINOR_VERSION 5
3276+#define YY_FLEX_SUBMINOR_VERSION 35
31613277 #if YY_FLEX_SUBMINOR_VERSION > 0
31623278 #define FLEX_BETA
31633279 #endif
@@ -3195,6 +3311,7 @@ typedef int16_t flex_int16_t; · 31 unmodified lines
31953311 typedef uint16_t flex_uint16_t;
31963312 typedef int32_t flex_int32_t;
31973313 typedef uint32_t flex_uint32_t;
3314+typedef uint64_t flex_uint64_t;
31983315 #else
31993316 typedef signed char flex_int8_t;
32003317 typedef short int flex_int16_t;
@@ -3202,6 +3319,7 @@ typedef int flex_int32_t; · 1 unmodified line
32023319 typedef unsigned char flex_uint8_t;
32033320 typedef unsigned short int flex_uint16_t;
32043321 typedef unsigned int flex_uint32_t;
3322+#endif /* ! C99 */
32053323
32063324 /* Limits of integral types. */
32073325 #ifndef INT8_MIN
@@ -3232,61 +3350,63 @@ typedef unsigned int flex_uint32_t; · 24 unmodified lines
32323350 #define UINT32_MAX (4294967295U)
32333351 #endif
32343352
3235−#ifndef SIZE_MAX
3236−#define SIZE_MAX (~(size_t)0)
3237−#endif
3353+#endif /* ! FLEXINT_H */
32383354
3239−#endif /* ! C99 */
3355+#ifdef __cplusplus
32403356
3241−#endif /* ! FLEXINT_H */
3357+/* The "const" storage-class-modifier is valid. */
3358+#define YY_USE_CONST
32423359
3243−/* begin standard C++ headers. */
3360+#else /* ! __cplusplus */
32443361
3245−/* TODO: this is always defined, so inline it */
3246−#define yyconst const
3362+/* C99 requires __STDC__ to be defined as 1. */
3363+#if defined (__STDC__)
3364+
3365+#define YY_USE_CONST
3366+
3367+#endif /* defined (__STDC__) */
3368+#endif /* ! __cplusplus */
32473369
3248−#if defined(__GNUC__) && __GNUC__ >= 3
3249−#define yynoreturn __attribute__((__noreturn__))
3370+#ifdef YY_USE_CONST
3371+#define yyconst const
32503372 #else
3251−#define yynoreturn
3373+#define yyconst
32523374 #endif
32533375
32543376 /* Returned upon end-of-file. */
32553377 #define YY_NULL 0
32563378
3257−/* Promotes a possibly negative, possibly signed char to an
3258− * integer in range [0..255] for use as an array index.
3379+/* Promotes a possibly negative, possibly signed char to an unsigned
3380+ * integer for use as an array index. If the signed char is negative,
3381+ * we want to instead treat it as an 8-bit unsigned char, hence the
3382+ * double cast.
32593383 */
3260−#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
3384+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
32613385
32623386 /* Enter a start condition. This macro really ought to take a parameter,
32633387 * but we do it the disgusting crufty way forced on us by the ()-less
32643388 * definition of BEGIN.
32653389 */
32663390 #define BEGIN (yy_start) = 1 + 2 *
3391+
32673392 /* Translate the current start state into a value that can be later handed
32683393 * to BEGIN to return to the state. The YYSTATE alias is for lex
32693394 * compatibility.
32703395 */
32713396 #define YY_START (((yy_start) - 1) / 2)
32723397 #define YYSTATE YY_START
3398+
32733399 /* Action number for EOF rule of a given start state. */
32743400 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
3401+
32753402 /* Special action meaning "start processing a new file". */
3276−#define YY_NEW_FILE yyrestart( yyin )
3403+#define YY_NEW_FILE yyrestart(yyin )
3404+
32773405 #define YY_END_OF_BUFFER_CHAR 0
32783406
32793407 /* Size of default input buffer. */
32803408 #ifndef YY_BUF_SIZE
3281−#ifdef __ia64__
3282−/* On IA-64, the buffer size is 16k, not 8k.
3283− * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
3284− * Ditto for the __ia64__ case accordingly.
3285− */
3286−#define YY_BUF_SIZE 32768
3287−#else
32883409 #define YY_BUF_SIZE 16384
3289−#endif /* __ia64__ */
32903410 #endif
32913411
32923412 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -3303,16 +3423,15 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; · 10 unmodified lines
33033423 typedef size_t yy_size_t;
33043424 #endif
33053425
3306−extern int yyleng;
3426+extern yy_size_t yyleng;
33073427
33083428 extern FILE *yyin, *yyout;
33093429
33103430 #define EOB_ACT_CONTINUE_SCAN 0
33113431 #define EOB_ACT_END_OF_FILE 1
33123432 #define EOB_ACT_LAST_MATCH 2
3313−
3433+
33143434 #define YY_LESS_LINENO(n)
3315− #define YY_LINENO_REWIND_TO(ptr)
33163435
33173436 /* Return all but the first "n" matched characters back to the input stream. */
33183437 #define yyless(n) \
@@ -3327,6 +3446,7 @@ extern FILE *yyin, *yyout; · 8 unmodified lines
33273446 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
33283447 } \
33293448 while ( 0 )
3449+
33303450 #define unput(c) yyunput( c, (yytext_ptr) )
33313451
33323452 #ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -3341,12 +3461,12 @@ struct yy_buffer_state · 8 unmodified lines
33413461 /* Size of input buffer in bytes, not including room for EOB
33423462 * characters.
33433463 */
3344− int yy_buf_size;
3464+ yy_size_t yy_buf_size;
33453465
33463466 /* Number of characters read into yy_ch_buf, not including EOB
33473467 * characters.
33483468 */
3349− int yy_n_chars;
3469+ yy_size_t yy_n_chars;
33503470
33513471 /* Whether we "own" the buffer - i.e., we know we created it,
33523472 * and can realloc() it to grow it, and should free() it to
@@ -3369,7 +3489,7 @@ struct yy_buffer_state · 16 unmodified lines
33693489
33703490 int yy_bs_lineno; /**< The line count. */
33713491 int yy_bs_column; /**< The column count. */
3372−
3492+
33733493 /* Whether to try to fill the input buffer when we reach the
33743494 * end of it.
33753495 */
@@ -3397,7 +3517,7 @@ struct yy_buffer_state · 21 unmodified lines
33973517 /* Stack of input buffers. */
33983518 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
33993519 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
3400−static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
3520+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
34013521
34023522 /* We provide macros for accessing buffer states in case in the
34033523 * future we want to put the buffer states in a more general
@@ -3408,6 +3528,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ · 4 unmodified lines
34083528 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
34093529 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
34103530 : NULL)
3531+
34113532 /* Same as previous macro, but useful when we know that the buffer stack is not
34123533 * NULL or when we need an lvalue. For internal use only.
34133534 */
@@ -3415,11 +3536,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ · 1 unmodified line
34153536
34163537 /* yy_hold_char holds the character lost when yytext is formed. */
34173538 static char yy_hold_char;
3418−static int yy_n_chars; /* number of characters read into yy_ch_buf */
3419−int yyleng;
3539+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
3540+yy_size_t yyleng;
34203541
34213542 /* Points to current character in buffer. */
3422−static char *yy_c_buf_p = NULL;
3543+static char *yy_c_buf_p = (char *) 0;
34233544 static int yy_init = 0; /* whether we need to initialize */
34243545 static int yy_start = 0; /* start state number */
34253546
@@ -3428,78 +3549,82 @@ static int yy_start = 0; /* start state number */ · 2 unmodified lines
34283549 */
34293550 static int yy_did_buffer_switch_on_eof;
34303551
3431−void yyrestart ( FILE *input_file );
3432−void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
3433−YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
3434−void yy_delete_buffer ( YY_BUFFER_STATE b );
3435−void yy_flush_buffer ( YY_BUFFER_STATE b );
3436−void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
3437−void yypop_buffer_state ( void );
3552+void yyrestart (FILE *input_file );
3553+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
3554+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
3555+void yy_delete_buffer (YY_BUFFER_STATE b );
3556+void yy_flush_buffer (YY_BUFFER_STATE b );
3557+void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
3558+void yypop_buffer_state (void );
34383559
3439−static void yyensure_buffer_stack ( void );
3440−static void yy_load_buffer_state ( void );
3441−static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
3442−#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
3560+static void yyensure_buffer_stack (void );
3561+static void yy_load_buffer_state (void );
3562+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
34433563
3444−YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
3445−YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
3446−YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
3564+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
34473565
3448−void *yyalloc ( yy_size_t );
3449−void *yyrealloc ( void *, yy_size_t );
3450−void yyfree ( void * );
3566+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
3567+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
3568+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
3569+
3570+void *yyalloc (yy_size_t );
3571+void *yyrealloc (void *,yy_size_t );
3572+void yyfree (void * );
34513573
34523574 #define yy_new_buffer yy_create_buffer
3575+
34533576 #define yy_set_interactive(is_interactive) \
34543577 { \
34553578 if ( ! YY_CURRENT_BUFFER ){ \
34563579 yyensure_buffer_stack (); \
34573580 YY_CURRENT_BUFFER_LVALUE = \
3458− yy_create_buffer( yyin, YY_BUF_SIZE ); \
3581+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
34593582 } \
34603583 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
34613584 }
3585+
34623586 #define yy_set_bol(at_bol) \
34633587 { \
34643588 if ( ! YY_CURRENT_BUFFER ){\
34653589 yyensure_buffer_stack (); \
34663590 YY_CURRENT_BUFFER_LVALUE = \
3467− yy_create_buffer( yyin, YY_BUF_SIZE ); \
3591+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
34683592 } \
34693593 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
34703594 }
3595+
34713596 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
34723597
34733598 /* Begin user sect3 */
3474−typedef flex_uint8_t YY_CHAR;
34753599
3476−FILE *yyin = NULL, *yyout = NULL;
3600+typedef unsigned char YY_CHAR;
3601+
3602+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
34773603
34783604 typedef int yy_state_type;
34793605
34803606 extern int yylineno;
3607+
34813608 int yylineno = 1;
34823609
34833610 extern char *yytext;
3484−#ifdef yytext_ptr
3485−#undef yytext_ptr
3486−#endif
34873611 #define yytext_ptr yytext
34883612
3489−static yy_state_type yy_get_previous_state ( void );
3490−static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
3491−static int yy_get_next_buffer ( void );
3492−static void yynoreturn yy_fatal_error ( const char* msg );
3613+static yy_state_type yy_get_previous_state (void );
3614+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
3615+static int yy_get_next_buffer (void );
3616+static void yy_fatal_error (yyconst char msg[] );
34933617
34943618 /* Done after the current pattern has been matched and before the
34953619 * corresponding action - sets up yytext.
34963620 */
34973621 #define YY_DO_BEFORE_ACTION \
34983622 (yytext_ptr) = yy_bp; \
3499− yyleng = (int) (yy_cp - yy_bp); \
3623+ yyleng = (yy_size_t) (yy_cp - yy_bp); \
35003624 (yy_hold_char) = *yy_cp; \
35013625 *yy_cp = '\0'; \
35023626 (yy_c_buf_p) = yy_cp;
3627+
35033628 #define YY_NUM_RULES 105
35043629 #define YY_END_OF_BUFFER 106
35053630 /* This struct is not used in this scanner,
@@ -3509,7 +3634,7 @@ struct yy_trans_info · 3 unmodified lines
35093634 flex_int32_t yy_verify;
35103635 flex_int32_t yy_nxt;
35113636 };
3512−static const flex_int16_t yy_accept[243] =
3637+static yyconst flex_int16_t yy_accept[243] =
35133638 { 0,
35143639 0, 0, 106, 104, 5, 7, 104, 4, 46, 104,
35153640 21, 22, 20, 32, 104, 38, 39, 18, 16, 13,
@@ -3540,7 +3665,7 @@ static const flex_int16_t yy_accept[243] = · 24 unmodified lines
35403665 66, 0
35413666 } ;
35423667
3543−static const YY_CHAR yy_ec[256] =
3668+static yyconst flex_int32_t yy_ec[256] =
35443669 { 0,
35453670 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
35463671 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
@@ -3572,7 +3697,7 @@ static const YY_CHAR yy_ec[256] = · 25 unmodified lines
35723697 1, 1, 1, 1, 1
35733698 } ;
35743699
3575−static const YY_CHAR yy_meta[69] =
3700+static yyconst flex_int32_t yy_meta[69] =
35763701 { 0,
35773702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
35783703 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -3583,7 +3708,7 @@ static const YY_CHAR yy_meta[69] = · 4 unmodified lines
35833708 4, 4, 4, 4, 1, 1, 1, 1
35843709 } ;
35853710
3586−static const flex_int16_t yy_base[248] =
3711+static yyconst flex_int16_t yy_base[248] =
35873712 { 0,
35883713 0, 0, 326, 327, 327, 327, 322, 327, 297, 62,
35893714 310, 327, 57, 60, 284, 327, 327, 294, 56, 327,
@@ -3614,7 +3739,7 @@ static const flex_int16_t yy_base[248] = · 24 unmodified lines
36143739 0, 327, 218, 222, 224, 228, 78
36153740 } ;
36163741
3617−static const flex_int16_t yy_def[248] =
3742+static yyconst flex_int16_t yy_def[248] =
36183743 { 0,
36193744 242, 1, 242, 242, 242, 242, 242, 242, 242, 243,
36203745 242, 242, 242, 242, 244, 242, 242, 242, 242, 242,
@@ -3645,7 +3770,7 @@ static const flex_int16_t yy_def[248] = · 24 unmodified lines
36453770 245, 0, 242, 242, 242, 242, 242
36463771 } ;
36473772
3648−static const flex_int16_t yy_nxt[396] =
3773+static yyconst flex_int16_t yy_nxt[396] =
36493774 { 0,
36503775 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
36513776 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
@@ -3693,7 +3818,7 @@ static const flex_int16_t yy_nxt[396] = · 41 unmodified lines
36933818
36943819 } ;
36953820
3696−static const flex_int16_t yy_chk[396] =
3821+static yyconst flex_int16_t yy_chk[396] =
36973822 { 0,
36983823 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
36993824 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -3755,8 +3880,8 @@ int yy_flex_debug = 0; · 55 unmodified lines
37553880 #define YY_MORE_ADJ 0
37563881 #define YY_RESTORE_YY_MORE_OFFSET
37573882 char *yytext;
3758−#line 1 "core/chuck.lex"
3759−#line 11 "core/chuck.lex"
3883+#line 1 "chuck.lex"
3884+#line 11 "chuck.lex"
37603885 /*----------------------------------------------------------------------------
37613886 ChucK Concurrent, On-the-fly Audio Programming Language
37623887 Compiler and Virtual Machine
@@ -3795,9 +3920,6 @@ char *yytext; · 32 unmodified lines
37953920
37963921 #include <stdlib.h>
37973922 #include <string.h>
3798−#ifndef __PLATFORM_WIN32__
3799−#include <unistd.h>
3800−#endif
38013923 #include "chuck_utils.h"
38023924 #include "chuck_absyn.h"
38033925 #include "chuck_errmsg.h"
@@ -3834,7 +3956,7 @@ extern "C" { · 30 unmodified lines
38343956 #endif
38353957
38363958 // yywrap()
3837−int yywrap( void )
3959+int yywrap(void )
38383960 {
38393961 char_pos = 1;
38403962 return 1;
@@ -3919,45 +4041,52 @@ long htol( c_str str ) · 78 unmodified lines
39194041
39204042 // .*\-\-> { adjust(); continue; }
39214043
3922−#line 772 "core/chuck.yy.c"
3923−#line 773 "core/chuck.yy.c"
4044+#line 781 "chuck.yy.c"
39244045
39254046 #define INITIAL 0
39264047
4048+#ifndef YY_NO_UNISTD_H
4049+/* Special case for "unistd.h", since it is non-ANSI. We include it way
4050+ * down here because we want the user's section 1 to have been scanned first.
4051+ * The user has a chance to override it with an option.
4052+ */
4053+//#include <unistd.h>
4054+#endif
4055+
39274056 #ifndef YY_EXTRA_TYPE
39284057 #define YY_EXTRA_TYPE void *
39294058 #endif
39304059
3931−static int yy_init_globals ( void );
4060+static int yy_init_globals (void );
39324061
39334062 /* Accessor methods to globals.
39344063 These are made visible to non-reentrant scanners for convenience. */
39354064
3936−int yylex_destroy ( void );
4065+int yylex_destroy (void );
39374066
3938−int yyget_debug ( void );
4067+int yyget_debug (void );
39394068
3940−void yyset_debug ( int debug_flag );
4069+void yyset_debug (int debug_flag );
39414070
3942−YY_EXTRA_TYPE yyget_extra ( void );
4071+YY_EXTRA_TYPE yyget_extra (void );
39434072
3944−void yyset_extra ( YY_EXTRA_TYPE user_defined );
4073+void yyset_extra (YY_EXTRA_TYPE user_defined );
39454074
3946−FILE *yyget_in ( void );
4075+FILE *yyget_in (void );
39474076
3948−void yyset_in ( FILE * _in_str );
4077+void yyset_in (FILE * in_str );
39494078
3950−FILE *yyget_out ( void );
4079+FILE *yyget_out (void );
39514080
3952−void yyset_out ( FILE * _out_str );
4081+void yyset_out (FILE * out_str );
39534082
3954− int yyget_leng ( void );
4083+yy_size_t yyget_leng (void );
39554084
3956−char *yyget_text ( void );
4085+char *yyget_text (void );
39574086
3958−int yyget_lineno ( void );
4087+int yyget_lineno (void );
39594088
3960−void yyset_lineno ( int _line_number );
4089+void yyset_lineno (int line_number );
39614090
39624091 /* Macros after this point can all be overridden by user definitions in
39634092 * section 1.
@@ -3965,43 +4094,35 @@ void yyset_lineno ( int _line_number ); · 1 unmodified line
39654094
39664095 #ifndef YY_SKIP_YYWRAP
39674096 #ifdef __cplusplus
3968−extern "C" int yywrap ( void );
4097+extern "C" int yywrap (void );
39694098 #else
3970−extern int yywrap ( void );
4099+extern int yywrap (void );
39714100 #endif
39724101 #endif
39734102
3974−#ifndef YY_NO_UNPUT
4103+ static void yyunput (int c,char *buf_ptr );
39754104
3976− static void yyunput ( int c, char *buf_ptr );
3977−
3978−#endif
3979−
39804105 #ifndef yytext_ptr
3981−static void yy_flex_strncpy ( char *, const char *, int );
4106+static void yy_flex_strncpy (char *,yyconst char *,int );
39824107 #endif
39834108
39844109 #ifdef YY_NEED_STRLEN
3985−static int yy_flex_strlen ( const char * );
4110+static int yy_flex_strlen (yyconst char * );
39864111 #endif
39874112
39884113 #ifndef YY_NO_INPUT
4114+
39894115 #ifdef __cplusplus
3990−static int yyinput ( void );
4116+static int yyinput (void );
39914117 #else
3992−static int input ( void );
4118+static int input (void );
39934119 #endif
39944120
39954121 #endif
39964122
39974123 /* Amount of stuff to slurp up with each read. */
39984124 #ifndef YY_READ_BUF_SIZE
3999−#ifdef __ia64__
4000−/* On IA-64, the buffer size is 16k, not 8k */
4001−#define YY_READ_BUF_SIZE 16384
4002−#else
40034125 #define YY_READ_BUF_SIZE 8192
4004−#endif /* __ia64__ */
40054126 #endif
40064127
40074128 /* Copy whatever the last rule matched to the standard output. */
@@ -4009,7 +4130,7 @@ static int input ( void ); · 1 unmodified line
40094130 /* This used to be an fputs(), but since the string might contain NUL's,
40104131 * we now use fwrite().
40114132 */
4012−#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
4133+#define ECHO fwrite( yytext, yyleng, 1, yyout )
40134134 #endif
40144135
40154136 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -4020,7 +4141,7 @@ static int input ( void ); · 4 unmodified lines
40204141 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
40214142 { \
40224143 int c = '*'; \
4023− int n; \
4144+ yy_size_t n; \
40244145 for ( n = 0; n < max_size && \
40254146 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
40264147 buf[n] = (char) c; \
@@ -4033,7 +4154,7 @@ static int input ( void ); · 6 unmodified lines
40334154 else \
40344155 { \
40354156 errno=0; \
4036− while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
4157+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
40374158 { \
40384159 if( errno != EINTR) \
40394160 { \
@@ -4088,7 +4209,7 @@ extern int yylex (void); · 48 unmodified lines
40884209
40894210 /* Code executed at the end of each rule. */
40904211 #ifndef YY_BREAK
4091−#define YY_BREAK /*LINTED*/break;
4212+#define YY_BREAK break;
40924213 #endif
40934214
40944215 #define YY_RULE_SETUP \
@@ -4098,10 +4219,15 @@ extern int yylex (void); · 3 unmodified lines
40984219 */
40994220 YY_DECL
41004221 {
4101− yy_state_type yy_current_state;
4102− char *yy_cp, *yy_bp;
4103− int yy_act;
4222+ register yy_state_type yy_current_state;
4223+ register char *yy_cp, *yy_bp;
4224+ register int yy_act;
41044225
4226+#line 172 "chuck.lex"
4227+
4228+
4229+#line 966 "chuck.yy.c"
4230+
41054231 if ( !(yy_init) )
41064232 {
41074233 (yy_init) = 1;
@@ -4122,19 +4248,13 @@ YY_DECL · 14 unmodified lines
41224248 if ( ! YY_CURRENT_BUFFER ) {
41234249 yyensure_buffer_stack ();
41244250 YY_CURRENT_BUFFER_LVALUE =
4125− yy_create_buffer( yyin, YY_BUF_SIZE );
4251+ yy_create_buffer(yyin,YY_BUF_SIZE );
41264252 }
41274253
4128− yy_load_buffer_state( );
4254+ yy_load_buffer_state( );
41294255 }
41304256
4131− {
4132−#line 173 "core/chuck.lex"
4133−
4134−
4135−#line 985 "core/chuck.yy.c"
4136−
4137− while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
4257+ while ( 1 ) /* loops until end-of-file is reached */
41384258 {
41394259 yy_cp = (yy_c_buf_p);
41404260
@@ -4150,7 +4270,7 @@ YY_DECL · 9 unmodified lines
41504270 yy_match:
41514271 do
41524272 {
4153− YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
4273+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
41544274 if ( yy_accept[yy_current_state] )
41554275 {
41564276 (yy_last_accepting_state) = yy_current_state;
@@ -4160,9 +4280,9 @@ yy_match: · 3 unmodified lines
41604280 {
41614281 yy_current_state = (int) yy_def[yy_current_state];
41624282 if ( yy_current_state >= 243 )
4163− yy_c = yy_meta[yy_c];
4283+ yy_c = yy_meta[(unsigned int) yy_c];
41644284 }
4165− yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
4285+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
41664286 ++yy_cp;
41674287 }
41684288 while ( yy_base[yy_current_state] != 327 );
@@ -4191,535 +4311,535 @@ do_action: /* This label is used only to access EOF actions. */ · 22 unmodified lines
41914311
41924312 case 1:
41934313 YY_RULE_SETUP
4194−#line 175 "core/chuck.lex"
4314+#line 174 "chuck.lex"
41954315 { char c; adjust(); comment_hack; continue; }
41964316 YY_BREAK
41974317 case 2:
41984318 YY_RULE_SETUP
4199−#line 176 "core/chuck.lex"
4319+#line 175 "chuck.lex"
42004320 { char c; adjust(); comment_hack; continue; }
42014321 YY_BREAK
42024322 case 3:
42034323 YY_RULE_SETUP
4204−#line 177 "core/chuck.lex"
4324+#line 176 "chuck.lex"
42054325 { char c, c1; adjust(); block_comment_hack; continue; }
42064326 YY_BREAK
42074327 case 4:
42084328 YY_RULE_SETUP
4209−#line 178 "core/chuck.lex"
4329+#line 177 "chuck.lex"
42104330 { adjust(); continue; }
42114331 YY_BREAK
42124332 case 5:
42134333 YY_RULE_SETUP
4214−#line 179 "core/chuck.lex"
4334+#line 178 "chuck.lex"
42154335 { adjust(); continue; }
42164336 YY_BREAK
42174337 case 6:
42184338 /* rule 6 can match eol */
42194339 YY_RULE_SETUP
4220−#line 180 "core/chuck.lex"
4340+#line 179 "chuck.lex"
42214341 { adjust(); EM_newline(); continue; }
42224342 YY_BREAK
42234343 case 7:
42244344 /* rule 7 can match eol */
42254345 YY_RULE_SETUP
4226−#line 181 "core/chuck.lex"
4346+#line 180 "chuck.lex"
42274347 { adjust(); EM_newline(); continue; }
42284348 YY_BREAK
42294349 case 8:
42304350 YY_RULE_SETUP
4231−#line 183 "core/chuck.lex"
4351+#line 182 "chuck.lex"
42324352 { adjust(); return PLUSPLUS; }
42334353 YY_BREAK
42344354 case 9:
42354355 YY_RULE_SETUP
4236−#line 184 "core/chuck.lex"
4356+#line 183 "chuck.lex"
42374357 { adjust(); return MINUSMINUS; }
42384358 YY_BREAK
42394359 case 10:
42404360 YY_RULE_SETUP
4241−#line 185 "core/chuck.lex"
4361+#line 184 "chuck.lex"
42424362 { adjust(); return POUNDPAREN; }
42434363 YY_BREAK
42444364 case 11:
42454365 YY_RULE_SETUP
4246−#line 186 "core/chuck.lex"
4366+#line 185 "chuck.lex"
42474367 { adjust(); return PERCENTPAREN; }
42484368 YY_BREAK
42494369 case 12:
42504370 YY_RULE_SETUP
4251−#line 187 "core/chuck.lex"
4371+#line 186 "chuck.lex"
42524372 { adjust(); return ATPAREN; }
42534373 YY_BREAK
42544374 case 13:
42554375 YY_RULE_SETUP
4256−#line 189 "core/chuck.lex"
4376+#line 188 "chuck.lex"
42574377 { adjust(); return COMMA; }
42584378 YY_BREAK
42594379 case 14:
42604380 YY_RULE_SETUP
4261−#line 190 "core/chuck.lex"
4381+#line 189 "chuck.lex"
42624382 { adjust(); return COLON; }
42634383 YY_BREAK
42644384 case 15:
42654385 YY_RULE_SETUP
4266−#line 191 "core/chuck.lex"
4386+#line 190 "chuck.lex"
42674387 { adjust(); return DOT; }
42684388 YY_BREAK

1170 more lines aren’t shown here.

src/core/chuck_win32.h+245−145
@@ -1,13 +1,14 @@
1−/* A Bison parser, made by GNU Bison 3.0.4. */
1+/* A Bison parser, made by GNU Bison 2.3. */
22
3−/* Bison interface for Yacc-like parsers in C
3+/* Skeleton interface for Bison's Yacc-like parsers in C
44
5− Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
5+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6+ Free Software Foundation, Inc.
67
7− This program is free software: you can redistribute it and/or modify
8+ This program is free software; you can redistribute it and/or modify
89 it under the terms of the GNU General Public License as published by
9− the Free Software Foundation, either version 3 of the License, or
10− (at your option) any later version.
10+ the Free Software Foundation; either version 2, or (at your option)
11+ any later version.
1112
1213 This program is distributed in the hope that it will be useful,
1314 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +16,9 @@ · 1 unmodified line
1516 GNU General Public License for more details.
1617
1718 You should have received a copy of the GNU General Public License
18− along with this program. If not, see <http://www.gnu.org/licenses/>. */
19+ along with this program; if not, write to the Free Software
20+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
21+ Boston, MA 02110-1301, USA. */
1922
2023 /* As a special exception, you may create a larger work that contains
2124 part or all of the Bison parser skeleton and distribute that work
@@ -30,140 +33,241 @@ · 8 unmodified lines
3033 This special exception was added by the Free Software Foundation in
3134 version 2.2 of Bison. */
3235
33−#ifndef YY_YY_CHUCK_TAB_H_INCLUDED
34−# define YY_YY_CHUCK_TAB_H_INCLUDED
35−/* Debug traces. */
36−#ifndef YYDEBUG
37−# define YYDEBUG 0
38−#endif
39−#if YYDEBUG
40−extern int yydebug;
41−#endif
42−
43−/* Token type. */
36+/* Tokens. */
4437 #ifndef YYTOKENTYPE
4538 # define YYTOKENTYPE
46− enum yytokentype
47− {
48− ID = 258,
49− STRING_LIT = 259,
50− CHAR_LIT = 260,
51− NUM = 261,
52− FLOAT = 262,
53− POUND = 263,
54− COMMA = 264,
55− COLON = 265,
56− SEMICOLON = 266,
57− LPAREN = 267,
58− RPAREN = 268,
59− LBRACK = 269,
60− RBRACK = 270,
61− LBRACE = 271,
62− RBRACE = 272,
63− DOT = 273,
64− PLUS = 274,
65− MINUS = 275,
66− TIMES = 276,
67− DIVIDE = 277,
68− PERCENT = 278,
69− EQ = 279,
70− NEQ = 280,
71− LT = 281,
72− LE = 282,
73− GT = 283,
74− GE = 284,
75− AND = 285,
76− OR = 286,
77− ASSIGN = 287,
78− IF = 288,
79− THEN = 289,
80− ELSE = 290,
81− WHILE = 291,
82− FOR = 292,
83− DO = 293,
84− LOOP = 294,
85− BREAK = 295,
86− CONTINUE = 296,
87− NULL_TOK = 297,
88− FUNCTION = 298,
89− RETURN = 299,
90− QUESTION = 300,
91− EXCLAMATION = 301,
92− S_OR = 302,
93− S_AND = 303,
94− S_XOR = 304,
95− PLUSPLUS = 305,
96− MINUSMINUS = 306,
97− DOLLAR = 307,
98− POUNDPAREN = 308,
99− PERCENTPAREN = 309,
100− ATPAREN = 310,
101− SIMULT = 311,
102− PATTERN = 312,
103− CODE = 313,
104− TRANSPORT = 314,
105− HOST = 315,
106− TIME = 316,
107− WHENEVER = 317,
108− NEXT = 318,
109− UNTIL = 319,
110− EXTERNAL = 320,
111− GLOBAL = 321,
112− EVERY = 322,
113− BEFORE = 323,
114− AFTER = 324,
115− AT = 325,
116− AT_SYM = 326,
117− ATAT_SYM = 327,
118− NEW = 328,
119− SIZEOF = 329,
120− TYPEOF = 330,
121− SAME = 331,
122− PLUS_CHUCK = 332,
123− MINUS_CHUCK = 333,
124− TIMES_CHUCK = 334,
125− DIVIDE_CHUCK = 335,
126− S_AND_CHUCK = 336,
127− S_OR_CHUCK = 337,
128− S_XOR_CHUCK = 338,
129− SHIFT_RIGHT_CHUCK = 339,
130− SHIFT_LEFT_CHUCK = 340,
131− PERCENT_CHUCK = 341,
132− SHIFT_RIGHT = 342,
133− SHIFT_LEFT = 343,
134− TILDA = 344,
135− CHUCK = 345,
136− COLONCOLON = 346,
137− S_CHUCK = 347,
138− AT_CHUCK = 348,
139− LEFT_S_CHUCK = 349,
140− UNCHUCK = 350,
141− UPCHUCK = 351,
142− CLASS = 352,
143− INTERFACE = 353,
144− EXTENDS = 354,
145− IMPLEMENTS = 355,
146− PUBLIC = 356,
147− PROTECTED = 357,
148− PRIVATE = 358,
149− STATIC = 359,
150− ABSTRACT = 360,
151− CONST = 361,
152− SPORK = 362,
153− ARROW_RIGHT = 363,
154− ARROW_LEFT = 364,
155− L_HACK = 365,
156− R_HACK = 366
157− };
39+ /* Put the tokens into the symbol table, so that GDB and other debuggers
40+ know about them. */
41+ enum yytokentype {
42+ ID = 258,
43+ STRING_LIT = 259,
44+ CHAR_LIT = 260,
45+ NUM = 261,
46+ FLOAT = 262,
47+ POUND = 263,
48+ COMMA = 264,
49+ COLON = 265,
50+ SEMICOLON = 266,
51+ LPAREN = 267,
52+ RPAREN = 268,
53+ LBRACK = 269,
54+ RBRACK = 270,
55+ LBRACE = 271,
56+ RBRACE = 272,
57+ DOT = 273,
58+ PLUS = 274,
59+ MINUS = 275,
60+ TIMES = 276,
61+ DIVIDE = 277,
62+ PERCENT = 278,
63+ EQ = 279,
64+ NEQ = 280,
65+ LT = 281,
66+ LE = 282,
67+ GT = 283,
68+ GE = 284,
69+ AND = 285,
70+ OR = 286,
71+ ASSIGN = 287,
72+ IF = 288,
73+ THEN = 289,
74+ ELSE = 290,
75+ WHILE = 291,
76+ FOR = 292,
77+ DO = 293,
78+ LOOP = 294,
79+ BREAK = 295,
80+ CONTINUE = 296,
81+ NULL_TOK = 297,
82+ FUNCTION = 298,
83+ RETURN = 299,
84+ QUESTION = 300,
85+ EXCLAMATION = 301,
86+ S_OR = 302,
87+ S_AND = 303,
88+ S_XOR = 304,
89+ PLUSPLUS = 305,
90+ MINUSMINUS = 306,
91+ DOLLAR = 307,
92+ POUNDPAREN = 308,
93+ PERCENTPAREN = 309,
94+ ATPAREN = 310,
95+ SIMULT = 311,
96+ PATTERN = 312,
97+ CODE = 313,
98+ TRANSPORT = 314,
99+ HOST = 315,
100+ TIME = 316,
101+ WHENEVER = 317,
102+ NEXT = 318,
103+ UNTIL = 319,
104+ EXTERNAL = 320,
105+ GLOBAL = 321,
106+ EVERY = 322,
107+ BEFORE = 323,
108+ AFTER = 324,
109+ AT = 325,
110+ AT_SYM = 326,
111+ ATAT_SYM = 327,
112+ NEW = 328,
113+ SIZEOF = 329,
114+ TYPEOF = 330,
115+ SAME = 331,
116+ PLUS_CHUCK = 332,
117+ MINUS_CHUCK = 333,
118+ TIMES_CHUCK = 334,
119+ DIVIDE_CHUCK = 335,
120+ S_AND_CHUCK = 336,
121+ S_OR_CHUCK = 337,
122+ S_XOR_CHUCK = 338,
123+ SHIFT_RIGHT_CHUCK = 339,
124+ SHIFT_LEFT_CHUCK = 340,
125+ PERCENT_CHUCK = 341,
126+ SHIFT_RIGHT = 342,
127+ SHIFT_LEFT = 343,
128+ TILDA = 344,
129+ CHUCK = 345,
130+ COLONCOLON = 346,
131+ S_CHUCK = 347,
132+ AT_CHUCK = 348,
133+ LEFT_S_CHUCK = 349,
134+ UNCHUCK = 350,
135+ UPCHUCK = 351,
136+ CLASS = 352,
137+ INTERFACE = 353,
138+ EXTENDS = 354,
139+ IMPLEMENTS = 355,
140+ PUBLIC = 356,
141+ PROTECTED = 357,
142+ PRIVATE = 358,
143+ STATIC = 359,
144+ ABSTRACT = 360,
145+ CONST = 361,
146+ SPORK = 362,
147+ ARROW_RIGHT = 363,
148+ ARROW_LEFT = 364,
149+ L_HACK = 365,
150+ R_HACK = 366
151+ };
158152 #endif
153+/* Tokens. */
154+#define ID 258
155+#define STRING_LIT 259
156+#define CHAR_LIT 260
157+#define NUM 261
158+#define FLOAT 262
159+#define POUND 263
160+#define COMMA 264
161+#define COLON 265
162+#define SEMICOLON 266
163+#define LPAREN 267
164+#define RPAREN 268
165+#define LBRACK 269
166+#define RBRACK 270
167+#define LBRACE 271
168+#define RBRACE 272
169+#define DOT 273
170+#define PLUS 274
171+#define MINUS 275
172+#define TIMES 276
173+#define DIVIDE 277
174+#define PERCENT 278
175+#define EQ 279
176+#define NEQ 280
177+#define LT 281
178+#define LE 282
179+#define GT 283
180+#define GE 284
181+#define AND 285
182+#define OR 286
183+#define ASSIGN 287
184+#define IF 288
185+#define THEN 289
186+#define ELSE 290
187+#define WHILE 291
188+#define FOR 292
189+#define DO 293
190+#define LOOP 294
191+#define BREAK 295
192+#define CONTINUE 296
193+#define NULL_TOK 297
194+#define FUNCTION 298
195+#define RETURN 299
196+#define QUESTION 300
197+#define EXCLAMATION 301
198+#define S_OR 302
199+#define S_AND 303
200+#define S_XOR 304
201+#define PLUSPLUS 305
202+#define MINUSMINUS 306
203+#define DOLLAR 307
204+#define POUNDPAREN 308
205+#define PERCENTPAREN 309
206+#define ATPAREN 310
207+#define SIMULT 311
208+#define PATTERN 312
209+#define CODE 313
210+#define TRANSPORT 314
211+#define HOST 315
212+#define TIME 316
213+#define WHENEVER 317
214+#define NEXT 318
215+#define UNTIL 319
216+#define EXTERNAL 320
217+#define GLOBAL 321
218+#define EVERY 322
219+#define BEFORE 323
220+#define AFTER 324
221+#define AT 325
222+#define AT_SYM 326
223+#define ATAT_SYM 327
224+#define NEW 328
225+#define SIZEOF 329
226+#define TYPEOF 330
227+#define SAME 331
228+#define PLUS_CHUCK 332
229+#define MINUS_CHUCK 333
230+#define TIMES_CHUCK 334
231+#define DIVIDE_CHUCK 335
232+#define S_AND_CHUCK 336
233+#define S_OR_CHUCK 337
234+#define S_XOR_CHUCK 338
235+#define SHIFT_RIGHT_CHUCK 339
236+#define SHIFT_LEFT_CHUCK 340
237+#define PERCENT_CHUCK 341
238+#define SHIFT_RIGHT 342
239+#define SHIFT_LEFT 343
240+#define TILDA 344
241+#define CHUCK 345
242+#define COLONCOLON 346
243+#define S_CHUCK 347
244+#define AT_CHUCK 348
245+#define LEFT_S_CHUCK 349
246+#define UNCHUCK 350
247+#define UPCHUCK 351
248+#define CLASS 352
249+#define INTERFACE 353
250+#define EXTENDS 354
251+#define IMPLEMENTS 355
252+#define PUBLIC 356
253+#define PROTECTED 357
254+#define PRIVATE 358
255+#define STATIC 359
256+#define ABSTRACT 360
257+#define CONST 361
258+#define SPORK 362
259+#define ARROW_RIGHT 363
260+#define ARROW_LEFT 364
261+#define L_HACK 365
262+#define R_HACK 366
263+
159264
160−/* Value type. */
161−#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
162265
163−union YYSTYPE
164−{
165−#line 59 "chuck.y" /* yacc.c:1909 */
166266
267+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
268+typedef union YYSTYPE
269+#line 59 "chuck.y"
270+{
167271 int pos;
168272 int ival;
169273 double fval;
@@ -187,18 +291,14 @@ union YYSTYPE · 17 unmodified lines
187291 a_Complex complex_exp;
188292 a_Polar polar_exp;
189293 a_Vec vec_exp; // ge: added 1.3.5.3
190−
191−#line 192 "chuck.tab.h" /* yacc.c:1909 */
192−};
193−
194−typedef union YYSTYPE YYSTYPE;
195−# define YYSTYPE_IS_TRIVIAL 1
294+}
295+/* Line 1529 of yacc.c. */
296+#line 297 "chuck.tab.h"
297+ YYSTYPE;
298+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
196299 # define YYSTYPE_IS_DECLARED 1
300+# define YYSTYPE_IS_TRIVIAL 1
197301 #endif
198302
199−
200303 extern YYSTYPE yylval;
201304
202−int yyparse (void);
203−
204−#endif /* !YY_YY_CHUCK_TAB_H_INCLUDED */
src/core/makefile.x/makefile.win32+12−0
@@ -1,3 +1,15 @@
1+# NOTE: chuck_win32.h and chuck_win32.c come from the output of
2+# chuck.lex and chuck.y
3+#
4+# > flex -ochuck.yy.c chuck.lex
5+# > bison -dv -b chuck chuck.y
6+#
7+# to create the chuck_win32 files:
8+#
9+# > cat chuck.tab.c chuck.yy.c > chuck_win32.c
10+# > cp chuck.tab.h chuck_win32.h
11+#
12+# ALSO: we are actually now building in 64-bit, but yeah.
113
214 MSBUILD=msbuild.exe
315
src/core/midiio_rtmidi.cpp+1071−2
@@ -46,7 +46,7 @@ · 45 unmodified lines
4646 //-----------------------------------------------------------------------------
4747 // global variables
4848 //-----------------------------------------------------------------------------
49−#define BUFFER_SIZE 8192
49+#define MIDI_BUFFER_SIZE 8192
5050
5151 std::vector<RtMidiIn *> MidiInManager::the_mins;
5252 std::vector< std::map< Chuck_VM *, CBufferAdvance * > > MidiInManager::the_bufs;
@@ -519,7 +519,7 @@ t_CKBOOL MidiInManager::add_vm( Chuck_VM * vm, t_CKINT device_num, · 466 unmodified lines
519519
520520 // allocate the buffer
521521 CBufferAdvance * cbuf = new CBufferAdvance;
522− if( !cbuf->initialize( BUFFER_SIZE, sizeof(MidiMsg), m_event_buffers[vm] ) )
522+ if( !cbuf->initialize( MIDI_BUFFER_SIZE, sizeof(MidiMsg), m_event_buffers[vm] ) )
523523 {
524524 if( !suppress_output )
525525 EM_error2( 0, "MidiIn: couldn't allocate CBuffer for port %i...", device_num );
@@ -1069,3 +1069,1072 @@ t_CKBOOL MidiIn::open( t_CKUINT device_num ) · 543 unmodified lines
10691069 }
10701070
10711071 #endif // __DISABLE_MIDI__
1072+
1073+//-----------------------------------------------------------------------------
1074+// name: adapted from y-score-reader.cpp
1075+// desc: reads song scores
1076+//
1077+// authors: Ge Wang (ge@ccrma.stanford.edu)
1078+// date: Winter 2010
1079+// version: 1.0
1080+//-----------------------------------------------------------------------------
1081+#include <iostream>
1082+#include "midiio_rtmidi.h"
1083+#include "ugen_stk.h"
1084+
1085+using namespace stk;
1086+using namespace std;
1087+
1088+
1089+
1090+
1091+#pragma mark - MIDI helpers
1092+
1093+
1094+//-----------------------------------------------------------------------------
1095+// name: isNoteOff()
1096+// desc: ...
1097+//-----------------------------------------------------------------------------
1098+static bool isNoteOff( std::vector<unsigned char> & shuttle )
1099+{
1100+ if( shuttle.size() >= 1 && shuttle[0] >> 4 == 0x8 ) // note off event
1101+ return true;
1102+
1103+ if( shuttle.size() >= 3 && shuttle[0] >> 4 == 0x9 && shuttle[2] == 0 ) // note on event with velocity 0
1104+ return true;
1105+
1106+ return false;
1107+}
1108+
1109+
1110+
1111+
1112+//-----------------------------------------------------------------------------
1113+// name: isControl()
1114+// desc: ...
1115+//-----------------------------------------------------------------------------
1116+static bool isControl( std::vector<unsigned char> & shuttle )
1117+{
1118+ if( shuttle.size() >= 1 && ( shuttle[0] & 0xf0 ) == 0xb0 )
1119+ return true;
1120+
1121+ return false;
1122+}
1123+
1124+
1125+
1126+
1127+//-----------------------------------------------------------------------------
1128+// name: isMeta()
1129+// desc: ...
1130+//-----------------------------------------------------------------------------
1131+static bool isMeta( std::vector<unsigned char> & shuttle )
1132+{
1133+ if( shuttle.size() >= 1 && shuttle[0] == 0xff )
1134+ return true;
1135+
1136+ return false;
1137+}
1138+
1139+
1140+
1141+
1142+//-----------------------------------------------------------------------------
1143+// name: isProgram()
1144+// desc: ...
1145+//-----------------------------------------------------------------------------
1146+static bool isProgram( std::vector<unsigned char> & shuttle )
1147+{
1148+ if( shuttle.size() >= 1 && ( shuttle[0] >= 0xC0 && shuttle[0] <= 0xCF ) )
1149+ return true;
1150+
1151+ return false;
1152+}
1153+
1154+
1155+
1156+
1157+//-----------------------------------------------------------------------------
1158+// name: MidiScoreReader()
1159+// desc: constructor
1160+//-----------------------------------------------------------------------------
1161+MidiScoreReader::MidiScoreReader()
1162+: m_midiFile(NULL), m_velocity_scale(0.0f), m_numNonZeroTracks(0)
1163+{
1164+}
1165+
1166+
1167+
1168+
1169+//-----------------------------------------------------------------------------
1170+// name: ~MidiScoreReader()
1171+// desc: destructor
1172+//-----------------------------------------------------------------------------
1173+MidiScoreReader::~MidiScoreReader()
1174+{
1175+ // clean up
1176+ cleanup();
1177+}
1178+
1179+
1180+
1181+
1182+//-----------------------------------------------------------------------------
1183+// name: cleanup()
1184+// desc: reclaim
1185+//-----------------------------------------------------------------------------
1186+void MidiScoreReader::cleanup()
1187+{
1188+ // clean up
1189+ if( m_midiFile )
1190+ {
1191+ // pointer to event
1192+ MidiNoteEvent * e = NULL;
1193+ MidiNoteEvent * next = NULL;
1194+
1195+ // clean up the tracks
1196+ for( long i = 0; i < m_midiFile->getNumberOfTracks(); i++ )
1197+ {
1198+ // for each track
1199+ for( long j = 0; j < m_events[i].size(); j++ )
1200+ {
1201+ // get track
1202+ e = m_events[i][j];
1203+ // delete simultaneous events
1204+ while( e )
1205+ {
1206+ // get next
1207+ next = e->simultaneous;
1208+ // delete current
1209+ delete e;
1210+ // advance
1211+ e = next;
1212+ }
1213+ }
1214+
1215+ // clear the vectors
1216+ m_events[i].clear();
1217+ }
1218+
1219+ // delete midiFile
1220+ delete m_midiFile;
1221+ m_midiFile = NULL;
1222+
1223+ // clean the vector
1224+ m_events.clear();
1225+ m_countMaps.clear();
1226+ m_nonZeroTrackIndices.clear();
1227+
1228+ // clear the queue
1229+ while( m_queue.size() > 0 )
1230+ m_queue.pop_front();
1231+ }
1232+}
1233+
1234+
1235+
1236+
1237+//-----------------------------------------------------------------------------
1238+// name: load()
1239+// desc: load a MIDI file
1240+//-----------------------------------------------------------------------------
1241+bool MidiScoreReader::load( const char * path, float velScale )
1242+{
1243+ // sanity check
1244+ if( m_midiFile ) cleanup();
1245+
1246+ // open midi file
1247+ try
1248+ {
1249+ m_midiFile = new MidiFileIn( path );
1250+ // print a little information about the file.
1251+ CK_STDCERR << "[chuck]: MIDI file: " << path << CK_STDENDL;
1252+ CK_STDCERR << "[chuck]: | format = " << m_midiFile->getFileFormat() << CK_STDENDL;
1253+ CK_STDCERR << "[chuck]: | tracks = " << m_midiFile->getNumberOfTracks() << CK_STDENDL;
1254+ CK_STDCERR << "[chuck]: | seconds / ticks = " << m_midiFile->getTickSeconds() << CK_STDENDL;
1255+ CK_STDCERR << "[chuck]: | BPM = " << m_midiFile->getBPM() << CK_STDENDL;
1256+ }
1257+ catch ( StkError & e )
1258+ {
1259+ // you might want to do something more useful here.
1260+ CK_STDCERR << "[chuck]: error loading MIDI file: " << path << CK_STDENDL;
1261+ // delete
1262+ cleanup();
1263+
1264+ return false;
1265+ }
1266+
1267+ // set velocity scale
1268+ m_velocity_scale = velScale;
1269+ // reset
1270+ m_numNonZeroTracks = 0;
1271+ // clear
1272+ m_nonZeroTrackIndices.clear();
1273+
1274+ // allocate element for vector
1275+ m_events.resize( m_midiFile->getNumberOfTracks() );
1276+ m_lyricEvents.resize( m_midiFile->getNumberOfTracks() );
1277+ m_indices.resize( m_midiFile->getNumberOfTracks() );
1278+ m_countMaps.resize( m_midiFile->getNumberOfTracks() );
1279+ // iterate and set
1280+ for( long i = 0; i < m_midiFile->getNumberOfTracks(); i++ )
1281+ {
1282+ // load up the arrays
1283+ loadTrack( i, m_events[i], m_lyricEvents[i] );
1284+ // log
1285+ string name = getTrackName( i );
1286+ CK_FPRINTF_STDERR( "[chuck](MIDI file): track-%ld (%s): events: %lu low: %lu high: %lu\n",
1287+ i, name.c_str(), m_events[i].size(), getLowestNote( i, NULL ), getHighestNote( i, NULL ) );
1288+ // set indice
1289+ m_indices[i] = 0;
1290+ // add search pointer
1291+ m_searchIndices.push_back( 0 );
1292+ // count non zero
1293+ if( m_events[i].size() )
1294+ {
1295+ // increment
1296+ m_numNonZeroTracks++;
1297+ // append
1298+ m_nonZeroTrackIndices.push_back( i );
1299+ }
1300+ }
1301+
1302+ return true;
1303+}
1304+
1305+
1306+
1307+
1308+//-----------------------------------------------------------------------------
1309+// name: getNumTracks()
1310+// desc: get the number of tracks
1311+//-----------------------------------------------------------------------------
1312+long MidiScoreReader::getNumTracks() const
1313+{
1314+ if( m_midiFile == NULL ) return 0;
1315+ return m_midiFile->getNumberOfTracks();
1316+}
1317+
1318+
1319+
1320+
1321+//-----------------------------------------------------------------------------
1322+// name: getNumTracksNonZero()
1323+// desc: get number of tracks with more than 0 zero
1324+//-----------------------------------------------------------------------------
1325+long MidiScoreReader::getNumTracksNonZero() const
1326+{
1327+ if( m_midiFile == NULL ) return 0;
1328+ return m_numNonZeroTracks;
1329+}
1330+
1331+
1332+
1333+
1334+//-----------------------------------------------------------------------------
1335+// name: getTracksNonZero()
1336+// desc: get a vector of tracks indices that have more than 0 events
1337+//-----------------------------------------------------------------------------
1338+const std::vector<long> & MidiScoreReader::getTracksNonZero() const
1339+{
1340+ return m_nonZeroTrackIndices;
1341+}
1342+
1343+
1344+
1345+
1346+//-----------------------------------------------------------------------------
1347+// name: getBPM()
1348+// desc: get BPM
1349+//-----------------------------------------------------------------------------
1350+double MidiScoreReader::getBPM() const
1351+{
1352+ if( m_midiFile == NULL ) return 0;
1353+ return m_midiFile->getBPM();
1354+}
1355+
1356+
1357+
1358+
1359+//-----------------------------------------------------------------------------
1360+// name: getLowestNote()
1361+// desc: get lowest note for a track
1362+//-----------------------------------------------------------------------------
1363+long MidiScoreReader::getLowestNote( long track, const MidiNoteEvent * start )
1364+{
1365+ int lowestNote = 128;
1366+ int startingPoint = 0;
1367+
1368+ // get the starting point
1369+ if( start != NULL )
1370+ {
1371+ for( int i = 0; i < m_events[track].size(); i++ )
1372+ {
1373+ if( m_events[track].at(i) == start )
1374+ {
1375+ startingPoint = i + 1;
1376+ break;
1377+ }
1378+ }
1379+ }
1380+
1381+ for( int i = startingPoint; i < m_events[track].size(); i++ )
1382+ {
1383+ if( m_events[track].at(i)->data2 < lowestNote )
1384+ lowestNote = m_events[track].at(i)->data2;
1385+
1386+ if( m_events[track].at(i)->phrasemark ) break;
1387+ }
1388+
1389+ return lowestNote < 128 ? lowestNote : 0;
1390+}
1391+
1392+
1393+
1394+
1395+//-----------------------------------------------------------------------------
1396+// name: getHighestNote()
1397+// desc: get highest note for a track
1398+//-----------------------------------------------------------------------------
1399+long MidiScoreReader::getHighestNote( long track, const MidiNoteEvent *start )
1400+{
1401+ long highestNote = 0;
1402+ long startingPoint = 0;
1403+
1404+ // get the starting point
1405+ if( start != NULL )
1406+ {
1407+ for( long i = 0; i < m_events[track].size(); i++ )
1408+ {
1409+ if( m_events[track].at(i) == start )
1410+ {
1411+ startingPoint = i+1;
1412+ break;
1413+ }
1414+ }
1415+ }
1416+
1417+ for( long i = startingPoint; i < m_events[track].size(); i++ )
1418+ {
1419+ if( m_events[track].at(i)->data2 > highestNote )
1420+ highestNote = m_events[track].at(i)->data2;
1421+
1422+ if( m_events[track].at(i)->phrasemark ) break;
1423+ }
1424+
1425+ return highestNote;
1426+}
1427+
1428+
1429+
1430+
1431+//-----------------------------------------------------------------------------
1432+// name: getTopEvent()
1433+// desc: return current (top-level) note event on track
1434+//-----------------------------------------------------------------------------
1435+const MidiNoteEvent * MidiScoreReader::getTopEvent( long track, long offset )
1436+{
1437+ // sanity check
1438+ if( !m_midiFile || track >= m_events.size() )
1439+ {
1440+ CK_STDCERR << "[chuck](MIDI file): cannot access top event data!" << CK_STDENDL;
1441+ return NULL;
1442+ }
1443+
1444+ // the new index
1445+ long index = m_indices[track] + offset;
1446+ // check it
1447+ if( index < 0 || index >= m_events[track].size() ) return NULL;
1448+ // return it
1449+ return m_events[track][index];
1450+}
1451+
1452+
1453+
1454+
1455+//-----------------------------------------------------------------------------
1456+// name: scanEvent()
1457+// desc: get the next event (respects simultaneous) + move to next
1458+//-----------------------------------------------------------------------------
1459+const MidiNoteEvent * MidiScoreReader::scanEvent( long track, bool & isNewSet )
1460+{
1461+ const MidiNoteEvent * e = NULL;
1462+ isNewSet = false;
1463+ // see if there is last event
1464+ if( ( e = front() ) )
1465+ {
1466+ // pop it
1467+ dequeue();
1468+ // get simulaneous
1469+ e = e->simultaneous;
1470+ }
1471+ // see if still NULL
1472+ if( !e )
1473+ {
1474+ // get current
1475+ e = getTopEvent( track );
1476+ // set flag
1477+ isNewSet = true;
1478+ }
1479+ // set the next event
1480+ enqueue( e );
1481+
1482+ return e;
1483+}
1484+
1485+
1486+
1487+
1488+//-----------------------------------------------------------------------------
1489+// name: seek()
1490+// desc: advance to an event on a track
1491+//-----------------------------------------------------------------------------
1492+bool MidiScoreReader::seek( long track, long numToAdvance )
1493+{
1494+ // sanity check
1495+ if( !m_midiFile || track >= m_events.size() )
1496+ {
1497+ // CK_STDCERR << "[chuck](MIDI file): cannot seek current data!" << CK_STDENDL;
1498+ return false;
1499+ }
1500+
1501+ // the next index
1502+ long index = m_indices[track] + numToAdvance;
1503+ // check it
1504+ if( index < 0 ) index = 0;
1505+ else if( index >= m_events[track].size() ) index = m_events[track].size();
1506+ // update
1507+ m_indices[track] = index;
1508+
1509+ // return
1510+ if( index >= m_events[track].size() ) return false;
1511+ return true;
1512+}
1513+
1514+
1515+
1516+
1517+//-----------------------------------------------------------------------------
1518+// name: seekToNoteOn()
1519+// desc: advance to an event on a track
1520+//-----------------------------------------------------------------------------
1521+bool MidiScoreReader::seekToNoteOn( long track )
1522+{
1523+ // sanity check
1524+ if( !m_midiFile || track >= m_events.size() )
1525+ {
1526+ // CK_STDCERR << "[chuck](MIDI file): cannot seek current data!" << CK_STDENDL;
1527+ return false;
1528+ }
1529+
1530+ // event
1531+ const MidiNoteEvent * e = NULL;
1532+ long index = 0;
1533+
1534+ // go
1535+ do {
1536+ // the next index
1537+ index = m_indices[track] + 1;
1538+ // check it
1539+ if( index < 0 ) index = 0;
1540+ else if( index >= m_events[track].size() ) index = m_events[track].size();
1541+ // update
1542+ m_indices[track] = index;
1543+ // break
1544+ if( index >= m_events[track].size() ) break;
1545+ // set the e
1546+ e = m_events[track][index];
1547+ } while( (e->data1 >> 4 != 0x9) || (e->data3 == 0) );
1548+
1549+ // return
1550+ if( index >= m_events[track].size() ) return false;
1551+ return true;
1552+}
1553+
1554+
1555+
1556+
1557+//-----------------------------------------------------------------------------
1558+// name: rewind()
1559+// desc: go to begining
1560+//-----------------------------------------------------------------------------
1561+void MidiScoreReader::rewind()
1562+{
1563+ // sanity check
1564+ if( !m_midiFile ) return;
1565+
1566+ // set all indices to 0
1567+ for( long i = 0; i < m_midiFile->getNumberOfTracks(); i++ )
1568+ {
1569+ // clear
1570+ m_indices[i] = 0;
1571+ m_searchIndices[i] = 0;
1572+ }
1573+}
1574+
1575+
1576+
1577+
1578+//-----------------------------------------------------------------------------
1579+// name: getEvents()
1580+// desc: get notes in a time window
1581+//-----------------------------------------------------------------------------
1582+void MidiScoreReader::getEvents( long track, double startTime, double endTime,
1583+ vector<const MidiNoteEvent *> & result,
1584+ bool includeSimultaneous )
1585+{
1586+ // clear the result
1587+ result.clear();
1588+
1589+ // sanity check
1590+ if( !m_midiFile || track >= m_events.size() )
1591+ {
1592+ // don't alway print this
1593+ // CK_STDCERR << "[chuck](MIDI file): cannot read track: " << track << "!" << CK_STDENDL;
1594+ return;
1595+ }
1596+
1597+ // get the event
1598+ const MidiNoteEvent * searchPtr = getTopEvent( track, m_searchIndices[track] );
1599+
1600+ // advance the search pointer
1601+ while( searchPtr && searchPtr->endTime < startTime )
1602+ {
1603+ // TODO: this doesn't handle the case where simultaneous note ends later than parent
1604+
1605+ // increment index
1606+ m_searchIndices[track]++;
1607+ // get event
1608+ searchPtr = getTopEvent( track, m_searchIndices[track] );
1609+ }
1610+
1611+ // check
1612+ if( searchPtr == NULL )
1613+ return;
1614+
1615+ // the index
1616+ unsigned long searchIndex = m_searchIndices[track];
1617+
1618+ // scan for events within the window
1619+ while( searchPtr )
1620+ {
1621+ // within window - this is some sexy logic, thanks Jieun and Tom
1622+ // ge: added the <= for endTime
1623+ if( searchPtr->endTime > startTime && searchPtr->startTime <= endTime )
1624+ {
1625+ // add to vector
1626+ result.push_back( searchPtr );
1627+ }
1628+
1629+ // check
1630+ if( includeSimultaneous && searchPtr->simultaneous )
1631+ {
1632+ // move to simultaneous - could have different end time
1633+ searchPtr = searchPtr->simultaneous;
1634+ }
1635+ else // to the next parent (top level event)
1636+ {
1637+ // advance search index
1638+ searchIndex++;
1639+ // get event
1640+ searchPtr = getTopEvent( track, searchIndex );
1641+ }
1642+ }
1643+}
1644+
1645+
1646+
1647+
1648+//-----------------------------------------------------------------------------
1649+// name: isDone()
1650+// desc: is done
1651+//-----------------------------------------------------------------------------
1652+bool MidiScoreReader::isDone( long track, double currTime )
1653+{
1654+ // sanity check
1655+ if( track < 0 || track >= m_events.size() )
1656+ return true;
1657+
1658+ // number of events on a track
1659+ long numEvents = m_events[track].size();
1660+ // check time against last element
1661+ if( numEvents <= 0 )
1662+ return true;
1663+
1664+ return m_events[track][numEvents-1]->endTime < currTime;
1665+}
1666+
1667+
1668+
1669+
1670+//-----------------------------------------------------------------------------
1671+// name: applyControl()
1672+// desc: applies control data to an existing event
1673+//-----------------------------------------------------------------------------
1674+bool MidiScoreReader::applyControl( long track, long data2, long data3, MidiNoteEvent * e )
1675+{
1676+ // sanity check
1677+ if( !e ) return false;
1678+ if( data2 < 0 || data2 > 127 ) return false;
1679+ if( data3 < 0 || data3 > 127 ) return false;
1680+
1681+ // flag
1682+ bool found = false;
1683+
1684+ if( data2 == 0x52 )
1685+ {
1686+ // gliss
1687+ e->shouldBend = true;
1688+ found = true;
1689+ // increment
1690+ incrementCount( track, "bend" );
1691+ e->bendAmount = (int)data3;
1692+ }
1693+
1694+ if( data2 == 0x53 )
1695+ {
1696+ // gliss
1697+ e->phrasemark = true;
1698+ found = true;
1699+ // increment
1700+ incrementCount( track, "phrasemark" );
1701+ }
1702+
1703+ return found;
1704+}
1705+
1706+
1707+
1708+
1709+//-----------------------------------------------------------------------------
1710+// name: loadTrack()
1711+// desc: load a track from file
1712+//-----------------------------------------------------------------------------
1713+bool MidiScoreReader::loadTrack( long track, std::vector<MidiNoteEvent *> & data, std::vector<MidiLyricEvent *> & lyricData )
1714+{
1715+ // sanity check
1716+ if( !m_midiFile || track >= m_events.size() )
1717+ {
1718+ // error
1719+ CK_STDCERR << "[chuck](MIDI file): cannot read track: " << track << "!" << CK_STDENDL;
1720+ return false;
1721+ }
1722+
1723+ // clear out the vectors
1724+ data.clear();
1725+ // clear out active MIDI notes
1726+ m_activeNotes.clear();
1727+ // a vector to hold the return information
1728+ std::vector<unsigned char> shuttle;
1729+ // piano event pointers
1730+ MidiNoteEvent * e = NULL;
1731+ MidiLyricEvent * le = NULL;
1732+ // last event
1733+ MidiNoteEvent * prev_e = NULL;
1734+ MidiLyricEvent * prev_le = NULL;
1735+ // parent event
1736+ MidiNoteEvent * parent = NULL;
1737+
1738+ int currentProgram = 27; // program defaults to electric gutiar (27) in case it is not set in the score
1739+
1740+ // load next on the track
1741+ try {
1742+ // seconds accum
1743+ double secondsAccum = 0;
1744+ // loop
1745+ while( true )
1746+ {
1747+ // get the next MIDI event
1748+ unsigned long ticks = m_midiFile->getNextEvent( &shuttle, (unsigned int)track );
1749+
1750+ // accumulate time
1751+ secondsAccum += ticks * m_midiFile->getTickSeconds();
1752+
1753+ // MIDI message spec: http://www.srm.com/qtma/davidsmidispec.html
1754+
1755+ // check size (done?)
1756+ if( shuttle.size() == 0 ) break;
1757+
1758+ if( isNoteOff( shuttle ) )
1759+ {
1760+ // do note off
1761+ handleNoteOff( shuttle[1], secondsAccum );
1762+ continue;
1763+ }
1764+ else if( isControl( shuttle ) )
1765+ {
1766+ // apply control to previous
1767+ applyControl( track, shuttle[1], shuttle[2], prev_e );
1768+ continue;
1769+ }
1770+ else if( isMeta( shuttle ) )
1771+ {
1772+ // format: http://www.recordingblogs.com/sa/Wiki/tabid/88/Default.aspx?topic=MIDI+meta+messages
1773+ // shuttle[1]: message type
1774+ // shuttle[2]: number of bytes in custom data part
1775+ // shuttle[3]: start of custom data part
1776+
1777+ switch( shuttle[1] )
1778+ {
1779+ case 1: // text
1780+ {
1781+ string text = string( (char *)&shuttle[3] /* name */, shuttle[2] /* length */ );
1782+ break;
1783+ }
1784+ case 3: // track name
1785+ {
1786+ string name = string( (char *)&shuttle[3] /* name */, shuttle[2] /* length */ );
1787+ setTrackName( track, name );
1788+ break;
1789+ }
1790+ case 5: // lyric
1791+ {
1792+ string lyric = string( (char *)&shuttle[3] /* name */, shuttle[2] /* length */ );
1793+
1794+ le = new MidiLyricEvent;
1795+ le->lyric = lyric;
1796+ le->time = le->endTime = secondsAccum;
1797+
1798+ if( prev_le )
1799+ {
1800+ prev_le->endTime = secondsAccum;
1801+ }
1802+
1803+ lyricData.push_back( le );
1804+
1805+ prev_le = le;
1806+
1807+ break;
1808+ }
1809+ }
1810+ continue;
1811+ }
1812+
1813+ // store a program change in an event
1814+ else if( isProgram( shuttle ) )
1815+ {
1816+ if( shuttle[1] >= 0 )
1817+ currentProgram = shuttle[1];
1818+ continue;
1819+ }
1820+
1821+ // continue if it's anything but a note on
1822+ if( shuttle[0] >> 4 != 0x9 || shuttle[2] == 0 ) continue;
1823+
1824+ // instantiate
1825+ e = new MidiNoteEvent();
1826+ // fill
1827+ e->data1 = (unsigned short)shuttle[0];
1828+ e->data2 = (unsigned short)shuttle[1];
1829+ e->data3 = (unsigned short)shuttle[2];
1830+ // check
1831+ if( (m_velocity_scale > 0) && e->data3 )
1832+ {
1833+ // scale
1834+ e->data3 = e->data3 + m_velocity_scale * (127 - e->data3);
1835+ // clamp
1836+ if( e->data3 > 127 ) e->data3 = 127;
1837+ }
1838+
1839+ // fill the until next for prev
1840+ if( prev_e ) prev_e->untilNext = e->time - prev_e->startTime;
1841+ // advance time
1842+ e->startTime = e->time = secondsAccum;
1843+ // simultaneous
1844+ e->simultaneous = NULL;
1845+ // store current program
1846+ e->programChange = currentProgram;
1847+
1848+ // simultaneous or in series?
1849+ if( prev_e != NULL && e->time == prev_e->time )
1850+ {
1851+ // sim
1852+ prev_e->simultaneous = e;
1853+ // point to parent
1854+ e->parent = parent;
1855+ }
1856+ else
1857+ {
1858+ // increment
1859+ incrementCount( track, "note" );
1860+ // series
1861+ data.push_back( e );
1862+ // save as parent
1863+ parent = e->parent = e;
1864+ }
1865+
1866+ // add to lookup
1867+ handleNoteOn( e, e->data2 );
1868+
1869+ // update
1870+ prev_e = e;
1871+ }
1872+ }
1873+ catch( StkError & )
1874+ {
1875+ // you might want to do something more useful here.
1876+ CK_STDCERR << "[chuck](MIDI file): uh oh, error loading track!" << CK_STDENDL;
1877+
1878+ // clear out active MIDI notes
1879+ m_activeNotes.clear();
1880+
1881+ return false;
1882+ }
1883+
1884+ // clear out active MIDI notes
1885+ m_activeNotes.clear();
1886+
1887+ return true;
1888+}
1889+
1890+
1891+
1892+
1893+//-----------------------------------------------------------------------------
1894+// name: enqueue()
1895+// desc: enqueue a event to remember
1896+//-----------------------------------------------------------------------------
1897+void MidiScoreReader::enqueue( const MidiNoteEvent * event )
1898+{
1899+ // TODO: synchronization?
1900+ // while( event != NULL )
1901+ // {
1902+ m_queue.push_back( event );
1903+ // event = event->simultaneous;
1904+ // }
1905+}
1906+
1907+
1908+
1909+
1910+//-----------------------------------------------------------------------------
1911+// name: front()
1912+// desc: get the front event
1913+//-----------------------------------------------------------------------------
1914+const MidiNoteEvent * MidiScoreReader::front() const
1915+{
1916+ if( m_queue.size() == 0 ) return NULL;
1917+ else return m_queue.front();
1918+}
1919+
1920+
1921+
1922+
1923+//-----------------------------------------------------------------------------
1924+// name: dequeue()
1925+// desc: dequeue the event
1926+//-----------------------------------------------------------------------------
1927+void MidiScoreReader::dequeue()
1928+{
1929+ if( m_queue.size() > 0 )
1930+ m_queue.pop_front();
1931+}
1932+
1933+
1934+
1935+
1936+//-----------------------------------------------------------------------------
1937+// name: enqueue_front()
1938+// desc: enqueue to front
1939+//-----------------------------------------------------------------------------
1940+void MidiScoreReader::enqueue_front( const MidiNoteEvent * e )
1941+{
1942+ m_queue.push_front( e );
1943+}
1944+
1945+
1946+
1947+
1948+//-----------------------------------------------------------------------------
1949+// name: getNumEvents()
1950+// desc: get number of events on a track
1951+//-----------------------------------------------------------------------------
1952+long MidiScoreReader::getNumEvents( long track ) const
1953+{
1954+ // sanity check
1955+ if( track < 0 || track >= m_events.size() )
1956+ return 0;
1957+
1958+ // return the number of elements
1959+ return m_events[track].size();
1960+}
1961+
1962+
1963+
1964+
1965+//-----------------------------------------------------------------------------
1966+// name: getNoteEvents()
1967+// desc: get an entire track's note events
1968+//-----------------------------------------------------------------------------
1969+static vector<MidiNoteEvent *> s_nullNoteVector;
1970+const vector<MidiNoteEvent *> & MidiScoreReader::getNoteEvents( long track )
1971+{
1972+ // sanity check
1973+ if( track < 0 || track >= m_events.size() )
1974+ return s_nullNoteVector;
1975+
1976+ return m_events[track];
1977+}
1978+
1979+
1980+
1981+
1982+//-----------------------------------------------------------------------------
1983+// name: getLyricEvents()
1984+// desc: get an entire track's lyric events
1985+//-----------------------------------------------------------------------------
1986+static vector<MidiLyricEvent *> s_nullLyricVector;
1987+const vector<MidiLyricEvent *> & MidiScoreReader::getLyricEvents( long track )
1988+{
1989+ // sanity check
1990+ if( track < 0 || track >= m_lyricEvents.size() )
1991+ return s_nullLyricVector;
1992+
1993+ return m_lyricEvents[track];
1994+}
1995+
1996+
1997+
1998+
1999+//-----------------------------------------------------------------------------
2000+// name: getCount()
2001+// desc: return a count associated with key
2002+//-----------------------------------------------------------------------------
2003+long MidiScoreReader::getCount( long track, const std::string & key )
2004+{
2005+ // sanity check
2006+ if( track < 0 || track >= m_events.size() ) return 0;
2007+ // find
2008+ std::map< std::string, long >::iterator iter = m_countMaps[track].find( key );
2009+ // not found
2010+ if( iter == m_countMaps[track].end() ) return 0;
2011+ // return value
2012+ return iter->second;
2013+}
2014+
2015+
2016+
2017+
2018+//-----------------------------------------------------------------------------
2019+// name: incrementCount()
2020+// desc: increment a count associated with key
2021+//-----------------------------------------------------------------------------
2022+void MidiScoreReader::incrementCount( long track, const std::string & key )
2023+{
2024+ // sanity check
2025+ if( track < 0 || track >= m_events.size() ) return;
2026+
2027+ // find
2028+ std::map< std::string, long >::iterator iter = m_countMaps[track].find( key );
2029+
2030+ if( iter == m_countMaps[track].end() )
2031+ {
2032+ // if not found, add
2033+ m_countMaps[track][key] = 1;
2034+ }
2035+ else
2036+ {
2037+ // if found, increment
2038+ iter->second++;
2039+ }
2040+}
2041+
2042+
2043+
2044+
2045+//-----------------------------------------------------------------------------
2046+// name: handleNoteOn()
2047+// desc: insert a note on into table
2048+//-----------------------------------------------------------------------------
2049+void MidiScoreReader::handleNoteOn( MidiNoteEvent * e, long note )
2050+{
2051+ // sanity check
2052+ if( !e )
2053+ return;
2054+
2055+ // check to see if occupied
2056+ if( m_activeNotes[note] != NULL )
2057+ {
2058+ // treat as a note-off for the same note
2059+ handleNoteOff( note, e->time );
2060+ }
2061+
2062+ // insert
2063+ m_activeNotes[note] = e;
2064+}
2065+
2066+
2067+
2068+
2069+//-----------------------------------------------------------------------------
2070+// name: handleNoteOff()
2071+// desc: insert a note off into table
2072+//-----------------------------------------------------------------------------
2073+void MidiScoreReader::handleNoteOff( long note, double time )
2074+{
2075+ // get the piano event
2076+ MidiNoteEvent * e = m_activeNotes[note];
2077+ // check
2078+ if( !e )
2079+ return;
2080+
2081+ // set end time
2082+ e->endTime = time;
2083+
2084+ // set
2085+ m_activeNotes[note] = NULL;
2086+}
2087+
2088+
2089+
2090+
2091+//-----------------------------------------------------------------------------
2092+// name: setTrackName()
2093+// desc: sets track name
2094+//-----------------------------------------------------------------------------
2095+void MidiScoreReader::setTrackName( long track, const std::string & name )
2096+{
2097+ // x-map it!
2098+ m_trackToName[track] = name;
2099+ m_nameToTrack[name] = track;
2100+}
2101+
2102+
2103+
2104+
2105+//-----------------------------------------------------------------------------
2106+// name: getTrackName()
2107+// desc: gets track name ("" if not present)
2108+//-----------------------------------------------------------------------------
2109+string MidiScoreReader::getTrackName( long track )
2110+{
2111+ map<long, string>::iterator itr = m_trackToName.find( track );
2112+
2113+ if( itr == m_trackToName.end() )
2114+ return "";
2115+
2116+ return itr->second;
2117+}
2118+
2119+
2120+
2121+
2122+//-----------------------------------------------------------------------------
2123+// name: getTrackForName()
2124+// desc: gets the track with the given name (-1 if not present)
2125+//-----------------------------------------------------------------------------
2126+long MidiScoreReader::getTrackForName( const std::string & name )
2127+{
2128+ // look up the track index by name
2129+ map<string, long>::iterator itr = m_nameToTrack.find( name );
2130+
2131+ // didn't find
2132+ if( itr == m_nameToTrack.end() )
2133+ return -1;
2134+
2135+ // make sure the track actually exists
2136+ if( itr->second >= m_events.size() )
2137+ return -1;
2138+
2139+ return itr->second;
2140+}
src/core/midiio_rtmidi.h+222−0
@@ -168,6 +168,12 @@ void probeMidiIn(); · 167 unmodified lines
168168 void probeMidiOut();
169169
170170
171+
172+
173+//-----------------------------------------------------------------------------
174+// name: class MidiInManager
175+// desc: singleton manager
176+//-----------------------------------------------------------------------------
171177 class MidiInManager
172178 {
173179 public:
@@ -192,6 +198,12 @@ public: · 18 unmodified lines
192198 };
193199
194200
201+
202+
203+//-----------------------------------------------------------------------------
204+// name: class MidiOutManager
205+// desc: singleton manager
206+//-----------------------------------------------------------------------------
195207 class MidiOutManager
196208 {
197209 public:
@@ -207,6 +219,8 @@ protected: · 9 unmodified lines
207219 };
208220
209221
222+
223+
210224 //-----------------------------------------------------------------------------
211225 // name: class MidiRW
212226 // desc: reads and writes midi messages from file
@@ -233,6 +247,8 @@ protected: · 20 unmodified lines
233247 t_CKBOOL midirw_detach( );
234248
235249
250+
251+
236252 //-----------------------------------------------------------------------------
237253 // name: class MidiMsgOut
238254 // desc: reads midi messages from file
@@ -255,6 +271,8 @@ protected: · 16 unmodified lines
255271 };
256272
257273
274+
275+
258276 //-----------------------------------------------------------------------------
259277 // name: class MidiMsgIn
260278 // desc: reads midi messages from file
@@ -277,4 +295,208 @@ protected: · 16 unmodified lines
277295 };
278296
279297
298+
299+
300+//-----------------------------------------------------------------------------
301+// name: adapted from MCD/y-score-reader.h
302+// desc: midi score reader/data structures
303+//
304+// authors: Ge Wang (ge@ccrma.stanford.edu)
305+// Tom Lieber
306+//
307+// date: Winter 2010
308+// version: 1.1
309+//-----------------------------------------------------------------------------
310+#include <vector>
311+#include <deque>
312+#include <string>
313+#include <map>
314+
315+
316+
317+
318+//-----------------------------------------------------------------------------
319+// name: struct MidiNoteEvent
320+// desc: a MIDI note event, parsed for start and end time, with simultaneous
321+// notes combined into the 'simultaneous' linked list
322+//-----------------------------------------------------------------------------
323+struct MidiNoteEvent
324+{
325+ // data
326+ unsigned short data1;
327+ unsigned short data2;
328+ unsigned short data3;
329+ // time data
330+ double time;
331+ double untilNext;
332+ // link to simultaneous events
333+ MidiNoteEvent * simultaneous;
334+ // link to parent (could be self)
335+ MidiNoteEvent * parent;
336+
337+ // more data
338+ double startTime;
339+ double endTime;
340+ bool shouldBend;
341+ int bendAmount;
342+ int programChange;
343+ bool phrasemark;
344+
345+ // constructor
346+ MidiNoteEvent() : data1(0), data2(0), data3(0), time(0.0), untilNext(0.0),
347+ simultaneous(NULL), parent(NULL), startTime(0), endTime(0), shouldBend(false),
348+ bendAmount(0), programChange(0), phrasemark(false) { }
349+
350+ // type of message
351+ int type() const { return data1 & 0x70; }
352+ // channel
353+ int getChannel() const { return data1 & 0x0f; }
354+};
355+
356+
357+
358+
359+//-----------------------------------------------------------------------------
360+// name: struct MidiLyricEvent
361+// desc: a MIDI lyric event, with "end" time given by the time of the next
362+// event in the list
363+//-----------------------------------------------------------------------------
364+struct MidiLyricEvent
365+{
366+ std::string lyric;
367+ // time data
368+ double time;
369+ double endTime;
370+
371+ // constructor
372+ MidiLyricEvent() : time(0), endTime(0) { }
373+};
374+
375+
376+
377+
378+// forward references
379+namespace stk { class MidiFileIn; }
380+
381+
382+
383+
384+//-----------------------------------------------------------------------------
385+// name: class YScoreReader()
386+// desc: loads a MIDI score
387+//-----------------------------------------------------------------------------
388+class MidiScoreReader
389+{
390+public:
391+ MidiScoreReader();
392+ ~MidiScoreReader();
393+
394+public:
395+ bool load( const char * filename, float velScale = 0.0f );
396+ void cleanup();
397+
398+public:
399+ // rewind to beginning
400+ void rewind();
401+ // get current top event (NO simultaneous)
402+ const MidiNoteEvent * getTopEvent( long track, long offset = 0 );
403+ // get current event (YES simultaneous) + move to next
404+ const MidiNoteEvent * scanEvent( long track, bool & isNewSet );
405+ // advance to next event
406+ bool seek( long track, long numToAdvance = 1 );
407+ // advance to next note on
408+ bool seekToNoteOn( long track );
409+ // get notes in a time window
410+ void getEvents( long track, double startTime, double endTime, std::vector<const MidiNoteEvent *> & result,
411+ bool includeSimultaneous = false );
412+ // isDone
413+ bool isDone( long track, double currTime );
414+
415+
416+public:
417+ // get number of tracks
418+ long getNumTracks() const;
419+ // get number of events per track
420+ long getNumEvents( long track ) const;
421+ // get number of tracks with more than 0 events
422+ long getNumTracksNonZero() const;
423+ // get a vector of tracks indices that have more than 0 events
424+ const std::vector<long> & getTracksNonZero() const;
425+ // get BPM
426+ double getBPM() const;
427+ // get an entire track's note events
428+ const std::vector<MidiNoteEvent *> & getNoteEvents( long track );
429+ // get an entire track's lyric events
430+ const std::vector<MidiLyricEvent *> & getLyricEvents( long track );
431+ // get count
432+ long getCount( long track, const std::string & key );
433+ // get lowest note for a track
434+ long getLowestNote( long track, const MidiNoteEvent *start );
435+ // get highest note for a track
436+ long getHighestNote( long track, const MidiNoteEvent *start );
437+
438+public: // TODO: these may as well be a separate object
439+ // push a event to remember
440+ void enqueue( const MidiNoteEvent * event );
441+ // get the front event
442+ const MidiNoteEvent * front() const;
443+ // dequeue the event
444+ void dequeue();
445+ // push to front
446+ void enqueue_front( const MidiNoteEvent * event );
447+
448+public: // track naming
449+ // sets track name
450+ void setTrackName( long track, const std::string & name );
451+ // gets track name ("" if not present)
452+ std::string getTrackName( long track );
453+ // gets the track with the given name (-1 if not present)
454+ long getTrackForName( const std::string & name );
455+
456+protected: // for use while loading a track
457+ // load a track
458+ bool loadTrack( long track, std::vector<MidiNoteEvent *> & data, std::vector<MidiLyricEvent *> & lyricData );
459+ // apply control to existing event
460+ bool applyControl( long track, long data2, long data3, MidiNoteEvent * e );
461+ // increment count for the given key (used for counting the number of notes, glissandi, etc)
462+ void incrementCount( long track, const std::string & key );
463+ // handle note events, managing m_activeNotes and setting the event's endTime
464+ void handleNoteOn( MidiNoteEvent * e, long note );
465+ void handleNoteOff( long note, double time );
466+
467+protected:
468+ // midi
469+ stk::MidiFileIn * m_midiFile;
470+ // vector of tracks of events
471+ std::vector< std::vector<MidiNoteEvent *> > m_events;
472+ // vector of tracks of events
473+ std::vector< std::vector<MidiLyricEvent *> > m_lyricEvents;
474+ // vector of indices
475+ std::vector<unsigned long> m_indices;
476+ // stack of events
477+ std::deque<const MidiNoteEvent *> m_queue;
478+ // vector of event
479+ std::vector<const MidiNoteEvent *> m_result;
480+ // search pointer
481+ std::vector<unsigned long> m_searchIndices;
482+ // count map
483+ std::vector< std::map< std::string, long > > m_countMaps;
484+ // HACK: scale the velocity (0-1)
485+ float m_velocity_scale;
486+ // track names
487+ std::map<std::string, long> m_nameToTrack;
488+ std::map<long, std::string> m_trackToName;
489+ // number of non-zero tracks
490+ long m_numNonZeroTracks;
491+ // vector of indices of non-zero tracks
492+ std::vector<long> m_nonZeroTrackIndices;
493+
494+private: // used during track loading
495+ // active notes, map from MIDI note to event
496+ std::map<long, MidiNoteEvent *> m_activeNotes;
497+};
498+
499+
500+
501+
280502 #endif
src/core/uana_extract.cpp+1−1
@@ -1378,7 +1378,7 @@ CK_DLL_SFUN( XCorr_compute ) · 1377 unmodified lines
13781378 void xcorr_fft( SAMPLE * f, t_CKINT fsize, SAMPLE * g, t_CKINT gsize, SAMPLE * buffy, t_CKINT size )
13791379 {
13801380 // sanity check
1381− assert( fsize == gsize == size );
1381+ assert( fsize == gsize && gsize == size );
13821382
13831383 // take fft
13841384 rfft( f, size/2, FFT_FORWARD );
src/core/ugen_filter.cpp+118−1
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 #include "ugen_filter.h"
3535 #include "chuck_type.h"
3636 #include "chuck_compile.h"
37+#include "chuck_instr.h"
3738 #include <math.h>
3839 #include <stdlib.h>
3940
@@ -1271,6 +1272,12 @@ CK_DLL_CTRL( BPF_ctrl_freq ) · 1231 unmodified lines
12711272 // implementation: adapted from SC3's BPF
12721273 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
12731274 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1275+
1276+ // added: 1.4.0.1 (Nathan Tindall)
1277+ if( freq < 0 ) {
1278+ throw_exception(SHRED, "NegativeFrequencyException",
1279+ "freq value for BPF is negative");
1280+ }
12741281
12751282 // set
12761283 d->set_bpf( freq, d->m_Q );
@@ -1303,6 +1310,12 @@ CK_DLL_CTRL( BPF_ctrl_Q ) · 26 unmodified lines
13031310 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
13041311 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
13051312
1313+ // added: 1.4.0.1 (Nathan Tindall)
1314+ if( Q < 0 ) {
1315+ throw_exception(SHRED, "NegativeQException",
1316+ "Q value for BPF is negative");
1317+ }
1318+
13061319 // set
13071320 d->set_bpf( d->m_freq, Q );
13081321
@@ -1335,6 +1348,16 @@ CK_DLL_CTRL( BPF_ctrl_set ) · 26 unmodified lines
13351348 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
13361349 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
13371350
1351+ // added: 1.4.0.1 (Nathan Tindall)
1352+ if( freq < 0 ) {
1353+ throw_exception(SHRED, "NegativeFrequencyException",
1354+ "freq value for BPF is negative");
1355+ }
1356+ if( Q < 0 ) {
1357+ throw_exception(SHRED, "NegativeQException",
1358+ "Q value for BPF is negative");
1359+ }
1360+
13381361 // set
13391362 d->set_bpf( freq, Q );
13401363 }
@@ -1386,6 +1409,12 @@ CK_DLL_CTRL( BRF_ctrl_freq ) · 45 unmodified lines
13861409 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
13871410 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
13881411
1412+ // added: 1.4.0.1 (Nathan Tindall)
1413+ if( freq < 0 ) {
1414+ throw_exception(SHRED, "NegativeFrequencyException",
1415+ "freq value for BRF is negative");
1416+ }
1417+
13891418 // set
13901419 d->set_brf( freq, d->m_Q );
13911420
@@ -1417,6 +1446,12 @@ CK_DLL_CTRL( BRF_ctrl_Q ) · 25 unmodified lines
14171446 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
14181447 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
14191448
1449+ // added: 1.4.0.1 (Nathan Tindall)
1450+ if( Q < 0 ) {
1451+ throw_exception(SHRED, "NegativeQException",
1452+ "Q value for BRF is negative");
1453+ }
1454+
14201455 // set
14211456 d->set_brf( d->m_freq, Q );
14221457
@@ -1449,6 +1484,16 @@ CK_DLL_CTRL( BRF_ctrl_set ) · 26 unmodified lines
14491484 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
14501485 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
14511486
1487+ // added: 1.4.0.1 (Nathan Tindall)
1488+ if( freq < 0 ) {
1489+ throw_exception(SHRED, "NegativeFrequencyException",
1490+ "freq value for BRF is negative");
1491+ }
1492+ if( Q < 0 ) {
1493+ throw_exception(SHRED, "NegativeQException",
1494+ "Q value for BRF is negative");
1495+ }
1496+
14521497 // set
14531498 d->set_brf( freq, Q );
14541499 }
@@ -1501,6 +1546,12 @@ CK_DLL_CTRL( RLPF_ctrl_freq ) · 46 unmodified lines
15011546 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
15021547 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
15031548
1549+ // added: 1.4.0.1 (Nathan Tindall)
1550+ if( freq < 0 ) {
1551+ throw_exception(SHRED, "NegativeFrequencyException",
1552+ "freq value for LPF is negative");
1553+ }
1554+
15041555 // set
15051556 d->set_rlpf( freq, d->m_Q );
15061557
@@ -1531,6 +1582,12 @@ CK_DLL_CTRL( RLPF_ctrl_Q ) · 24 unmodified lines
15311582 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
15321583 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
15331584
1585+ // added: 1.4.0.1 (Nathan Tindall)
1586+ if( Q < 0 ) {
1587+ throw_exception(SHRED, "NegativeQException",
1588+ "Q value for LPF is negative");
1589+ }
1590+
15341591 // set
15351592 d->set_rlpf( d->m_freq, Q );
15361593
@@ -1563,6 +1620,16 @@ CK_DLL_CTRL( RLPF_ctrl_set ) · 26 unmodified lines
15631620 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
15641621 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
15651622
1623+ // added: 1.4.0.1 (Nathan Tindall)
1624+ if( freq < 0 ) {
1625+ throw_exception(SHRED, "NegativeFrequencyException",
1626+ "freq value for LPF is negative");
1627+ }
1628+ if( Q < 0 ) {
1629+ throw_exception(SHRED, "NegativeQException",
1630+ "Q value for LPF is negative");
1631+ }
1632+
15661633 // set
15671634 d->set_rlpf( freq, Q );
15681635
@@ -1617,6 +1684,14 @@ CK_DLL_CTRL( ResonZ_ctrl_freq ) · 48 unmodified lines
16171684 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
16181685 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
16191686
1687+ // added: 1.4.0.1 (Nathan Tindall)
1688+ // commented out for now: main culprits LPF HPF BPF BRF; still
1689+ // hoping to retain experimental possibilties for other filters (ge)
1690+ // if( freq < 0 ) {
1691+ // throw_exception(SHRED, "NegativeFrequencyException",
1692+ // "freq value for ResonZ is negative");
1693+ // }
1694+
16201695 // set
16211696 d->set_resonz( freq, d->m_Q );
16221697
@@ -1647,6 +1722,14 @@ CK_DLL_CTRL( ResonZ_ctrl_Q ) · 24 unmodified lines
16471722 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
16481723 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
16491724
1725+ // added: 1.4.0.1 (Nathan Tindall)
1726+ // commented out for now: main culprits LPF HPF BPF BRF; still
1727+ // hoping to retain experimental possibilties for other filters (ge)
1728+ // if( Q < 0 ) {
1729+ // throw_exception(SHRED, "NegativeQException",
1730+ // "Q value for ResonZ is negative");
1731+ // }
1732+
16501733 // set
16511734 d->set_resonz( d->m_freq, Q );
16521735
@@ -1679,6 +1762,18 @@ CK_DLL_CTRL( ResonZ_ctrl_set ) · 26 unmodified lines
16791762 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
16801763 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
16811764
1765+ // added: 1.4.0.1 (Nathan Tindall)
1766+ // commented out for now: main culprits LPF HPF BPF BRF; still
1767+ // hoping to retain experimental possibilties for other filters (ge)
1768+ // if( freq < 0 ) {
1769+ // throw_exception(SHRED, "NegativeFrequencyException",
1770+ // "freq value for ResonZ is negative");
1771+ // }
1772+ // if( Q < 0 ) {
1773+ // throw_exception(SHRED, "NegativeQException",
1774+ // "Q value for ResonZ is negative");
1775+ // }
1776+
16821777 // set
16831778 d->set_resonz( freq, Q );
16841779
@@ -1733,6 +1828,12 @@ CK_DLL_CTRL( RHPF_ctrl_freq ) · 48 unmodified lines
17331828 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
17341829 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
17351830
1831+ // added: 1.4.0.1 (Nathan Tindall)
1832+ if( freq < 0 ) {
1833+ throw_exception(SHRED, "NegativeFrequencyException",
1834+ "freq value for HPF is negative");
1835+ }
1836+
17361837 // set
17371838 d->set_rhpf( freq, d->m_Q );
17381839
@@ -1763,6 +1864,12 @@ CK_DLL_CTRL( RHPF_ctrl_Q ) · 24 unmodified lines
17631864 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
17641865 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
17651866
1867+ // added: 1.4.0.1 (Nathan Tindall)
1868+ if( Q < 0 ) {
1869+ throw_exception(SHRED, "NegativeQException",
1870+ "Q value for HPF is negative");
1871+ }
1872+
17661873 // set
17671874 d->set_rhpf( d->m_freq, Q );
17681875
@@ -1795,8 +1902,18 @@ CK_DLL_CTRL( RHPF_ctrl_set ) · 26 unmodified lines
17951902 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
17961903 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
17971904
1905+ // added: 1.4.0.1 (Nathan Tindall)
1906+ if( freq < 0 ) {
1907+ throw_exception(SHRED, "NegativeFrequencyException",
1908+ "freq value for LPF is negative");
1909+ }
1910+ if( Q < 0 ) {
1911+ throw_exception(SHRED, "NegativeQException",
1912+ "Q value for LPF is negative");
1913+ }
1914+
17981915 // set
1799− d->set_rlpf( freq, Q );
1916+ d->set_rhpf( freq, Q );
18001917 }
18011918
18021919
src/core/ugen_stk.cpp+32−1
@@ -41,6 +41,7 @@ · 40 unmodified lines
4141 #include "chuck_vm.h"
4242 #include "chuck_compile.h"
4343 #include "chuck_lang.h"
44+#include "chuck_io.h"
4445 #include "chuck_carrier.h"
4546 #include <stdlib.h>
4647 #include <string.h>
@@ -18685,6 +18686,9 @@ namespace stk { · 18638 unmodified lines
1868518686
1868618687 MidiFileIn :: MidiFileIn( std::string fileName )
1868718688 {
18689+ // ge: initialize
18690+ bpm_ = 0;
18691+
1868818692 // Attempt to open the file.
1868918693 file_.open( fileName.c_str(), std::ios::in | std::ios::binary );
1869018694 if ( !file_ ) {
@@ -18796,6 +18800,10 @@ MidiFileIn :: MidiFileIn( std::string fileName ) · 105 unmodified lines
1879618800 tempoEvent.count = count;
1879718801 value = ( event[3] << 16 ) + ( event[4] << 8 ) + event[5];
1879818802 tempoEvent.tickSeconds = (double) (0.000001 * value / tickrate);
18803+ // ge: check
18804+ // std::cerr << "tick: " << 60000000 / value << std::endl;
18805+ // ge: set BPM
18806+ bpm_ = 60000000.0 / value;
1879918807 if ( count > tempoEvents_.back().count )
1880018808 tempoEvents_.push_back( tempoEvent );
1880118809 else
@@ -18826,6 +18834,21 @@ MidiFileIn :: ~MidiFileIn() · 24 unmodified lines
1882618834 file_.close();
1882718835 }
1882818836
18837+int MidiFileIn :: getFileFormat() const
18838+{
18839+ return format_;
18840+}
18841+
18842+unsigned int MidiFileIn :: getNumberOfTracks() const
18843+{
18844+ return nTracks_;
18845+}
18846+
18847+int MidiFileIn :: getDivision() const
18848+{
18849+ return division_;
18850+}
18851+
1882918852 void MidiFileIn :: rewindTrack( unsigned int track )
1883018853 {
1883118854 if ( track >= nTracks_ ) {
@@ -18849,6 +18872,12 @@ double MidiFileIn :: getTickSeconds( unsigned int track ) · 17 unmodified lines
1884918872 return tickSeconds_[track];
1885018873 }
1885118874
18875+// ge: implemented
18876+double MidiFileIn :: getBPM()
18877+{
18878+ return bpm_;
18879+}
18880+
1885218881 unsigned long MidiFileIn :: getNextEvent( std::vector<unsigned char> *event, unsigned int track )
1885318882 {
1885418883 // Fill the user-provided vector with the next event in the
@@ -18942,6 +18971,9 @@ unsigned long MidiFileIn :: getNextEvent( std::vector<unsigned char> *event, uns · 87 unmodified lines
1894218971 double tickrate = (double) (division_ & 0x7FFF);
1894318972 unsigned long value = ( event->at(3) << 16 ) + ( event->at(4) << 8 ) + event->at(5);
1894418973 tickSeconds_[track] = (double) (0.000001 * value / tickrate);
18974+
18975+ // ge: set BPM
18976+ bpm_ = 60000000.0 / value;
1894518977 }
1894618978
1894718979 if ( format_ == 1 ) {
@@ -19013,7 +19045,6 @@ bool MidiFileIn :: readVariableLength( unsigned long *value ) · 65 unmodified lines
1901319045
1901419046 } // stk namespace
1901519047
19016−
1901719048 // chuck - import
1901819049 // wrapper functions
1901919050
src/core/ugen_stk.h+12−3
@@ -6402,10 +6402,10 @@ public: · 6401 unmodified lines
64026402 ~MidiFileIn();
64036403
64046404 //! Return the MIDI file format (0, 1, or 2).
6405− int getFileFormat() const { return format_; };
6405+ int getFileFormat() const;
64066406
64076407 //! Return the number of tracks in the MIDI file.
6408− unsigned int getNumberOfTracks() const { return nTracks_; };
6408+ unsigned int getNumberOfTracks() const;
64096409
64106410 //! Return the MIDI file division value from the file header.
64116411 /*!
@@ -6413,7 +6413,7 @@ public: · 1 unmodified line
64136413 MIDI File Specification. In particular, if the MSB is set, the
64146414 file uses time-code representations for delta-time values.
64156415 */
6416− int getDivision() const { return division_; };
6416+ int getDivision() const;
64176417
64186418 //! Move the specified track event reader to the beginning of its track.
64196419 /*!
@@ -6460,6 +6460,13 @@ public: · 40 unmodified lines
64606460 */
64616461 unsigned long getNextMidiEvent( std::vector<unsigned char> *midiEvent, unsigned int track = 0 );
64626462
6463+ //! ge: get the current BPM (I think)
6464+ /*!
6465+ This value can change as events are read... hmm pretty much
6466+ what it says above for getTickSeconds()
6467+ */
6468+ double getBPM();
6469+
64636470 protected:
64646471
64656472 // This protected class function is used for reading variable-length
@@ -6479,6 +6486,8 @@ protected: · 13 unmodified lines
64796486 std::vector<long> trackOffsets_;
64806487 std::vector<long> trackLengths_;
64816488 std::vector<char> trackStatus_;
6489+ // ge:
6490+ double bpm_;
64826491
64836492 // This structure and the following variables are used to save and
64846493 // keep track of a format 1 tempo map (and the initial tickSeconds
src/core/ugen_xxx.cpp+3−2
@@ -121,6 +121,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 120 unmodified lines
121121 type_engine_register_deprecate( env, "zerox", "ZeroX" );
122122 type_engine_register_deprecate( env, "delayp", "DelayP" );
123123 type_engine_register_deprecate( env, "sndbuf", "SndBuf" );
124+ type_engine_register_deprecate( env, "Chubgraph", "Chugraph" );
124125
125126 //! \section audio output
126127
@@ -128,7 +129,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 1 unmodified line
128129 // init as base class: Subgraph
129130 //-------------------------------------------------------------------------
130131 doc = "Base class for chubgraph-based user unit generators. ";
131− if( !type_engine_import_ugen_begin( env, "Chubgraph", "UGen", env->global(),
132+ if( !type_engine_import_ugen_begin( env, "Chugraph", "UGen", env->global(),
132133 subgraph_ctor, NULL, NULL, NULL, 1, 1, doc.c_str() ) )
133134 return FALSE;
134135
@@ -3787,7 +3788,7 @@ struct LiSaMulti_data · 3652 unmodified lines
37873788
37883789 if(record) {
37893790 if(looprec) {
3790− if(rindex >= loop_end_rec) rindex = 0;
3791+ if(rindex >= loop_end_rec) rindex = loop_start[0];
37913792 tempsample = coeff * mdata[rindex] + insample;
37923793 //mdata[rindex] = coeff * mdata[rindex] + insample;
37933794 //rindex++;
src/core/util_thread.cpp+9−1
@@ -67,7 +67,15 @@ XThread::XThread( ) · 66 unmodified lines
6767 //-----------------------------------------------------------------------------
6868 XThread::~XThread( )
6969 {
70− if( thread != 0 )
70+#if defined(__PLATFORM_MACOSX__) || defined(__PLATFORM_LINUX__) || defined(__WINDOWS_PTHREAD__)
71+ // cant terminate self
72+ bool is_self_thread = (thread != pthread_self());
73+#elif defined(__PLATFORM_WIN32__)
74+ // ignore for now
75+ bool is_self_thread = false;
76+#endif
77+
78+ if( thread != 0 && !is_self_thread)
7179 {
7280 #if defined(__PLATFORM_MACOSX__) || defined(__PLATFORM_LINUX__) || defined(__WINDOWS_PTHREAD__)
7381 pthread_cancel(thread);
src/host/chuck_audio.cpp+80−15
@@ -81,8 +81,10 @@ t_CKBOOL ChuckAudio::m_init = FALSE; · 80 unmodified lines
8181 t_CKBOOL ChuckAudio::m_start = FALSE;
8282 t_CKBOOL ChuckAudio::m_go = FALSE;
8383 t_CKBOOL ChuckAudio::m_silent = FALSE;
84+t_CKBOOL ChuckAudio::m_expand_in_mono2stereo= FALSE;
8485 t_CKUINT ChuckAudio::m_num_channels_out = NUM_CHANNELS_DEFAULT;
8586 t_CKUINT ChuckAudio::m_num_channels_in = NUM_CHANNELS_DEFAULT;
87+t_CKUINT ChuckAudio::m_num_channels_max = NUM_CHANNELS_DEFAULT;
8688 t_CKUINT ChuckAudio::m_sample_rate = SAMPLE_RATE_DEFAULT;
8789 t_CKUINT ChuckAudio::m_buffer_size = BUFFER_SIZE_DEFAULT;
8890 t_CKUINT ChuckAudio::m_num_buffers = NUM_BUFFERS_DEFAULT;
@@ -465,8 +467,6 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 376 unmodified lines
465467 // remember user data to pass to callback
466468 m_cb_user_data = data;
467469
468− // # of channels
469− t_CKUINT num_channels = 0;
470470 // variable to pass by reference into RtAudio
471471 unsigned int bufsize = m_buffer_size;
472472
@@ -604,8 +604,10 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 131 unmodified lines
604604 // convert 1-based ordinal to 0-based ordinal
605605 if( m_num_channels_in > 0 )
606606 {
607+ // if we are requesting the default input device
607608 if( m_adc_n == 0 )
608609 {
610+ // get default input device
609611 m_adc_n = m_rtaudio->getDefaultInputDevice();
610612
611613 // ensure correct channel count if default device is requested
@@ -617,13 +619,63 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 5 unmodified lines
617619 // find first device with at least the requested channel count
618620 m_adc_n = -1;
619621 int num_devices = m_rtaudio->getDeviceCount();
620− for(int i = 0; i < num_devices; i++)
622+ for( int i = 0; i < num_devices; i++ )
621623 {
622624 device_info = m_rtaudio->getDeviceInfo(i);
623− if(device_info.inputChannels >= m_num_channels_in)
625+ if( device_info.inputChannels >= m_num_channels_in )
624626 {
625− m_adc_n = i;
626− break;
627+ // added 1.4.0.1 -- check if the sample rate is supported
628+ // this is to catch the case where the default device has
629+ // insufficient channels (e.g., 1 on MacOS), finds secondary device
630+ // (e.g., ZoomAudioDevice on MacOS) that has enough channels
631+ // but does not support the desired sample rate
632+ bool isMatch = false;
633+ for( long j = 0; j < device_info.sampleRates.size(); j++ )
634+ {
635+ if( device_info.sampleRates[j] == m_sample_rate )
636+ {
637+ // flag
638+ isMatch = true;
639+ // break out sample rate loop
640+ break;
641+ }
642+ }
643+
644+ // match? (does this separately to break out of outer loop)
645+ if( isMatch )
646+ {
647+ // new input device
648+ m_adc_n = i;
649+ // log
650+ EM_log( CK_LOG_INFO, "found alternate input device: %d...", i );
651+ // break out of device loop
652+ break;
653+ }
654+ }
655+ }
656+
657+ // added 1.4.0.1 (ge) -- special case if no other matching device found...
658+ // for systems that have default mono audio device e.g., some MacOS systems
659+ if( m_adc_n == -1 )
660+ {
661+ // get default input device
662+ m_adc_n = m_rtaudio->getDefaultInputDevice();
663+ // get device info
664+ device_info = m_rtaudio->getDeviceInfo(m_adc_n);
665+
666+ // special case
667+ if( m_num_channels_in == 2 && device_info.inputChannels == 1 )
668+ {
669+ // flag this for expansion in the callback
670+ m_expand_in_mono2stereo = TRUE;
671+ // log
672+ EM_log( CK_LOG_INFO, "no matching stereo input device found..." );
673+ EM_log( CK_LOG_INFO, "simulating stereo input from mono audio device..." );
674+ }
675+ else
676+ {
677+ // okay, let's not impose any further; fall through to subseqent logic
678+ m_adc_n = -1;
627679 }
628680 }
629681
@@ -641,6 +693,7 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 11 unmodified lines
641693 }
642694 else
643695 {
696+ // offset to 0-index device number
644697 m_adc_n -= 1;
645698 }
646699 }
@@ -658,7 +711,7 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 11 unmodified lines
658711
659712 RtAudio::StreamParameters input_parameters;
660713 input_parameters.deviceId = m_adc_n;
661− input_parameters.nChannels = m_num_channels_in;
714+ input_parameters.nChannels = m_expand_in_mono2stereo ? 1 : m_num_channels_in;
662715 input_parameters.firstChannel = 0;
663716
664717 RtAudio::StreamOptions stream_options;
@@ -693,17 +746,17 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 28 unmodified lines
693746 EM_poplog();
694747
695748 // greater of dac/adc channels
696− num_channels = num_dac_channels > num_adc_channels ?
697− num_dac_channels : num_adc_channels;
749+ m_num_channels_max = num_dac_channels > num_adc_channels ?
750+ num_dac_channels : num_adc_channels;
698751 // log
699752 EM_log( CK_LOG_SEVERE, "allocating buffers for %d x %d samples...",
700− m_buffer_size, num_channels );
753+ m_buffer_size, m_num_channels_max );
701754
702755 // allocate buffers
703− m_buffer_in = new SAMPLE[m_buffer_size * num_channels];
704− m_buffer_out = new SAMPLE[m_buffer_size * num_channels];
705− memset( m_buffer_in, 0, m_buffer_size * sizeof(SAMPLE) * num_channels );
706− memset( m_buffer_out, 0, m_buffer_size * sizeof(SAMPLE) * num_channels );
756+ m_buffer_in = new SAMPLE[m_buffer_size * m_num_channels_max];
757+ m_buffer_out = new SAMPLE[m_buffer_size * m_num_channels_max];
758+ memset( m_buffer_in, 0, m_buffer_size * sizeof(SAMPLE) * m_num_channels_max );
759+ memset( m_buffer_out, 0, m_buffer_size * sizeof(SAMPLE) * m_num_channels_max );
707760
708761 return m_init = TRUE;
709762 }
@@ -761,7 +814,19 @@ int ChuckAudio::cb( void * output_buffer, void * input_buffer, unsigned int buff · 51 unmodified lines
761814 // copy input to local buffer
762815 if( m_num_channels_in )
763816 {
764− memcpy( m_buffer_in, input_buffer, len );
817+ // added 1.4.0.1 (ge) -- special case in=1; out=2
818+ if( m_expand_in_mono2stereo )
819+ {
820+ for( int i = 0; i < buffer_size; i++ )
821+ {
822+ // copy mono sample into stereo buffer
823+ m_buffer_in[i*2] = m_buffer_in[i*2+1] = ((SAMPLE *)input_buffer)[i];
824+ }
825+ }
826+ else
827+ {
828+ memcpy( m_buffer_in, input_buffer, len );
829+ }
765830 // copy to extern
766831 if( m_extern_in ) memcpy( m_extern_in, input_buffer, len );
767832 }
src/host/chuck_audio.h+2−0
@@ -135,8 +135,10 @@ public: // data · 134 unmodified lines
135135 static t_CKBOOL m_start;
136136 static t_CKBOOL m_go; // counter of # of times callback called
137137 static t_CKBOOL m_silent; // if true, will output silence
138+ static t_CKBOOL m_expand_in_mono2stereo; // 1.4.0.1 for in:1 out:2
138139 static t_CKUINT m_num_channels_out;
139140 static t_CKUINT m_num_channels_in;
141+ static t_CKUINT m_num_channels_max; // the max of out/in
140142 static t_CKUINT m_sample_rate;
141143 static t_CKUINT m_bps;
142144 static t_CKUINT m_buffer_size;
src/host/chuck_main.cpp+18−2
@@ -408,6 +408,7 @@ bool go( int argc, const char ** argv ) · 407 unmodified lines
408408 t_CKBOOL auto_depend = FALSE;
409409 t_CKBOOL block = FALSE;
410410 // t_CKBOOL enable_shell = FALSE;
411+ t_CKBOOL syntax_check_only = FALSE;
411412 t_CKBOOL no_vm = FALSE;
412413 t_CKBOOL load_hid = FALSE;
413414 t_CKBOOL enable_server = TRUE;
@@ -492,6 +493,10 @@ bool go( int argc, const char ** argv ) · 78 unmodified lines
492493 // blocking removed, ge: 1.3.5.3
493494 // else if( !strcmp(argv[i], "--blocking") )
494495 // block = TRUE;
496+ else if( !strcmp(argv[i], "--syntax") ) {
497+ syntax_check_only = TRUE;
498+ g_enable_realtime_audio = FALSE;
499+ }
495500 else if( !strcmp(argv[i], "--hid") )
496501 load_hid = TRUE;
497502 else if( !strcmp(argv[i], "--shell") || !strcmp( argv[i], "-e" ) )
@@ -881,7 +886,7 @@ bool go( int argc, const char ** argv ) · 383 unmodified lines
881886 // TODO: refactor initialize() to take in the dac and adc nums
882887 ChuckAudio::m_adc_n = adc;
883888 ChuckAudio::m_dac_n = dac;
884− t_CKBOOL retval = ChuckAudio::initialize( adc_chans, dac_chans,
889+ t_CKBOOL retval = ChuckAudio::initialize( dac_chans, adc_chans,
885890 srate, buffer_size, num_buffers, cb, (void *)the_chuck, force_srate );
886891 // check
887892 if( !retval )
@@ -970,6 +975,9 @@ bool go( int argc, const char ** argv ) · 82 unmodified lines
970975 // pop indent
971976 EM_poplog();
972977
978+ if( syntax_check_only )
979+ return TRUE;
980+
973981 // boost priority
974982 if( XThreadUtil::our_priority != 0x7fffffff )
975983 {
@@ -1029,7 +1037,11 @@ bool go( int argc, const char ** argv ) · 53 unmodified lines
10291037 // real-time audio
10301038 if( g_enable_realtime_audio )
10311039 {
1032− usleep( 10000 );
1040+ Chuck_DL_MainThreadHook * hook = the_chuck->getMainThreadHook();
1041+ if (hook)
1042+ hook->m_hook(hook->m_bindle);
1043+ else
1044+ usleep( 10000 );
10331045 }
10341046 else // silent mode
10351047 {
@@ -1038,6 +1050,10 @@ bool go( int argc, const char ** argv ) · 2 unmodified lines
10381050 }
10391051 }
10401052
1053+ Chuck_DL_MainThreadHook * hook = the_chuck->getMainThreadHook();
1054+ if (hook)
1055+ hook->m_quit(hook->m_bindle);
1056+
10411057 return TRUE;
10421058 }
10431059
src/makefile+1−1
@@ -71,7 +71,7 @@ osx linux-pulse linux-jack linux-alsa cygwin osx-rl: chuck · 70 unmodified lines
7171 win32:
7272 make -f $(COREDIR)/makefile.x/makefile.win32
7373
74−CK_VERSION=1.4.0.0
74+CK_VERSION=1.4.0.1
7575
7676
7777 ########################### COMPILATION TOOLS ##################################
src/test/04-Stress/5200_lines.ck+5208−0
@@ -0,0 +1,5208 @@
1+// 5200_lines.ck
2+// Tests the parser with left-recursion
3+// NOTE: without left-recurion we'd get this error when running this file:
4+// [5200_lines.ck]:line(5009).char(22): memory exhausted
5+
6+SqrOsc c => dac;
7+.5 => c.gain;
8+0 => c.freq;
9+60.0 / 1000 => float beat;
10+beat::second => dur T;
11+
12+ 15.2290558426 => c.freq; 0.152290558426::T => now;
13+ 42.8376834284 => c.freq; 0.428376834284::T => now;
14+ 95.9000618294 => c.freq; 0.959000618294::T => now;
15+ 54.1929651177 => c.freq; 0.541929651177::T => now;
16+ 64.8711461939 => c.freq; 0.648711461939::T => now;
17+ 63.3880569387 => c.freq; 0.633880569387::T => now;
18+ 97.5678729336 => c.freq; 0.975678729336::T => now;
19+ 42.2085567862 => c.freq; 0.422085567862::T => now;
20+ 76.0981450326 => c.freq; 0.760981450326::T => now;
21+ 85.5190887724 => c.freq; 0.855190887724::T => now;
22+ 19.8462895415 => c.freq; 0.198462895415::T => now;
23+ 45.295319112 => c.freq; 0.45295319112::T => now;
24+ 11.1216252087 => c.freq; 0.111216252087::T => now;
25+ 63.192313611 => c.freq; 0.63192313611::T => now;
26+ 70.8117365548 => c.freq; 0.708117365548::T => now;
27+ 11.8726918397 => c.freq; 0.118726918397::T => now;
28+ 0.227435035027 => c.freq; 0.00227435035027::T => now;
29+ 78.8258726865 => c.freq; 0.788258726865::T => now;
30+ 75.3953927236 => c.freq; 0.753953927236::T => now;
31+ 53.7793462322 => c.freq; 0.537793462322::T => now;
32+ 74.6139240207 => c.freq; 0.746139240207::T => now;
33+ 46.0229529242 => c.freq; 0.460229529242::T => now;
34+ 97.4618201641 => c.freq; 0.974618201641::T => now;
35+ 71.2430511367 => c.freq; 0.712430511367::T => now;
36+ 78.9783283426 => c.freq; 0.789783283426::T => now;
37+ 57.1853249164 => c.freq; 0.571853249164::T => now;
38+ 15.5804212259 => c.freq; 0.155804212259::T => now;
39+ 78.9535985919 => c.freq; 0.789535985919::T => now;
40+ 15.9252905472 => c.freq; 0.159252905472::T => now;
41+ 90.7719737104 => c.freq; 0.907719737104::T => now;
42+ 89.6215593472 => c.freq; 0.896215593472::T => now;
43+ 60.6393432988 => c.freq; 0.606393432988::T => now;
44+ 26.7251858167 => c.freq; 0.267251858167::T => now;
45+ 92.7872058692 => c.freq; 0.927872058692::T => now;
46+ 32.8926942833 => c.freq; 0.328926942833::T => now;
47+ 2.23384712963 => c.freq; 0.0223384712963::T => now;
48+ 89.3238581039 => c.freq; 0.893238581039::T => now;
49+ 62.4446636853 => c.freq; 0.624446636853::T => now;
50+ 19.5011717798 => c.freq; 0.195011717798::T => now;
51+ 61.9972647793 => c.freq; 0.619972647793::T => now;
52+ 45.7055902411 => c.freq; 0.457055902411::T => now;
53+ 83.1988494584 => c.freq; 0.831988494584::T => now;
54+ 45.6677048766 => c.freq; 0.456677048766::T => now;
55+ 41.4941060809 => c.freq; 0.414941060809::T => now;
56+ 68.3480023168 => c.freq; 0.683480023168::T => now;
57+ 79.3624056216 => c.freq; 0.793624056216::T => now;
58+ 79.5274313973 => c.freq; 0.795274313973::T => now;
59+ 89.977706362 => c.freq; 0.89977706362::T => now;
60+ 50.419306911 => c.freq; 0.50419306911::T => now;
61+ 90.4964444807 => c.freq; 0.904964444807::T => now;
62+ 62.7504824646 => c.freq; 0.627504824646::T => now;
63+ 38.6795482629 => c.freq; 0.386795482629::T => now;
64+ 55.1785220336 => c.freq; 0.551785220336::T => now;
65+ 65.2566291244 => c.freq; 0.652566291244::T => now;
66+ 39.849532234 => c.freq; 0.39849532234::T => now;
67+ 24.8145295694 => c.freq; 0.248145295694::T => now;
68+ 75.4479708933 => c.freq; 0.754479708933::T => now;
69+ 91.7898205013 => c.freq; 0.917898205013::T => now;
70+ 11.1226719804 => c.freq; 0.111226719804::T => now;
71+ 17.1612882353 => c.freq; 0.171612882353::T => now;
72+ 95.4233201187 => c.freq; 0.954233201187::T => now;
73+ 9.22913408693 => c.freq; 0.0922913408693::T => now;
74+ 74.8085014754 => c.freq; 0.748085014754::T => now;
75+ 45.7232704819 => c.freq; 0.457232704819::T => now;
76+ 70.6104549223 => c.freq; 0.706104549223::T => now;
77+ 14.0670638553 => c.freq; 0.140670638553::T => now;
78+ 28.2045775408 => c.freq; 0.282045775408::T => now;
79+ 35.5272011789 => c.freq; 0.355272011789::T => now;
80+ 48.8174762859 => c.freq; 0.488174762859::T => now;
81+ 21.5772789394 => c.freq; 0.215772789394::T => now;
82+ 53.2483212703 => c.freq; 0.532483212703::T => now;
83+ 8.39420479412 => c.freq; 0.0839420479412::T => now;
84+ 94.1412601813 => c.freq; 0.941412601813::T => now;
85+ 22.7259402831 => c.freq; 0.227259402831::T => now;
86+ 37.62738641 => c.freq; 0.3762738641::T => now;
87+ 24.7410864394 => c.freq; 0.247410864394::T => now;
88+ 16.8648990013 => c.freq; 0.168648990013::T => now;
89+ 28.9079990034 => c.freq; 0.152290558426::T => now;
90+ 60.4867532489 => c.freq; 0.428376834284::T => now;
91+ 53.9949091227 => c.freq; 0.959000618294::T => now;
92+ 58.5674922482 => c.freq; 0.541929651177::T => now;
93+ 75.3412338585 => c.freq; 0.648711461939::T => now;
94+ 61.1770871374 => c.freq; 0.633880569387::T => now;
95+ 1.44097785444 => c.freq; 0.975678729336::T => now;
96+ 51.0561990819 => c.freq; 0.422085567862::T => now;
97+ 58.2684359741 => c.freq; 0.760981450326::T => now;
98+ 30.6552411327 => c.freq; 0.855190887724::T => now;
99+ 68.7118926494 => c.freq; 0.198462895415::T => now;
100+ 30.825387103 => c.freq; 0.45295319112::T => now;
101+ 13.7376567337 => c.freq; 0.111216252087::T => now;
102+ 87.5865705461 => c.freq; 0.63192313611::T => now;
103+ 10.9963381301 => c.freq; 0.708117365548::T => now;
104+ 84.9345785496 => c.freq; 0.118726918397::T => now;
105+ 53.3746088305 => c.freq; 0.00227435035027::T => now;
106+ 70.3579325877 => c.freq; 0.788258726865::T => now;
107+ 11.2994663847 => c.freq; 0.753953927236::T => now;
108+ 95.9606211012 => c.freq; 0.537793462322::T => now;
109+ 5.74823778088 => c.freq; 0.746139240207::T => now;
110+ 28.757113591 => c.freq; 0.460229529242::T => now;
111+ 32.1191964371 => c.freq; 0.974618201641::T => now;
112+ 15.2290558426 => c.freq; 0.712430511367::T => now;
113+ 42.8376834284 => c.freq; 0.789783283426::T => now;
114+ 95.9000618294 => c.freq; 0.571853249164::T => now;
115+ 54.1929651177 => c.freq; 0.155804212259::T => now;
116+ 64.8711461939 => c.freq; 0.789535985919::T => now;
117+ 63.3880569387 => c.freq; 0.159252905472::T => now;
118+ 97.5678729336 => c.freq; 0.907719737104::T => now;
119+ 42.2085567862 => c.freq; 0.896215593472::T => now;
120+ 76.0981450326 => c.freq; 0.606393432988::T => now;
121+ 85.5190887724 => c.freq; 0.267251858167::T => now;
122+ 19.8462895415 => c.freq; 0.927872058692::T => now;
123+ 45.295319112 => c.freq; 0.328926942833::T => now;
124+ 11.1216252087 => c.freq; 0.0223384712963::T => now;
125+ 63.192313611 => c.freq; 0.893238581039::T => now;
126+ 70.8117365548 => c.freq; 0.624446636853::T => now;
127+ 11.8726918397 => c.freq; 0.195011717798::T => now;
128+ 0.227435035027 => c.freq; 0.619972647793::T => now;
129+ 78.8258726865 => c.freq; 0.457055902411::T => now;
130+ 75.3953927236 => c.freq; 0.831988494584::T => now;
131+ 53.7793462322 => c.freq; 0.456677048766::T => now;
132+ 74.6139240207 => c.freq; 0.414941060809::T => now;
133+ 46.0229529242 => c.freq; 0.683480023168::T => now;
134+ 97.4618201641 => c.freq; 0.793624056216::T => now;
135+ 71.2430511367 => c.freq; 0.795274313973::T => now;
136+ 78.9783283426 => c.freq; 0.89977706362::T => now;
137+ 57.1853249164 => c.freq; 0.50419306911::T => now;
138+ 15.5804212259 => c.freq; 0.904964444807::T => now;
139+ 78.9535985919 => c.freq; 0.627504824646::T => now;
140+ 15.9252905472 => c.freq; 0.386795482629::T => now;
141+ 90.7719737104 => c.freq; 0.551785220336::T => now;
142+ 89.6215593472 => c.freq; 0.652566291244::T => now;
143+ 60.6393432988 => c.freq; 0.39849532234::T => now;
144+ 26.7251858167 => c.freq; 0.248145295694::T => now;
145+ 92.7872058692 => c.freq; 0.754479708933::T => now;
146+ 32.8926942833 => c.freq; 0.917898205013::T => now;
147+ 2.23384712963 => c.freq; 0.111226719804::T => now;
148+ 89.3238581039 => c.freq; 0.171612882353::T => now;
149+ 62.4446636853 => c.freq; 0.954233201187::T => now;
150+ 19.5011717798 => c.freq; 0.0922913408693::T => now;
151+ 61.9972647793 => c.freq; 0.748085014754::T => now;
152+ 45.7055902411 => c.freq; 0.457232704819::T => now;
153+ 83.1988494584 => c.freq; 0.706104549223::T => now;
154+ 45.6677048766 => c.freq; 0.140670638553::T => now;
155+ 41.4941060809 => c.freq; 0.282045775408::T => now;
156+ 68.3480023168 => c.freq; 0.355272011789::T => now;
157+ 79.3624056216 => c.freq; 0.488174762859::T => now;
158+ 79.5274313973 => c.freq; 0.215772789394::T => now;
159+ 89.977706362 => c.freq; 0.532483212703::T => now;
160+ 50.419306911 => c.freq; 0.0839420479412::T => now;
161+ 90.4964444807 => c.freq; 0.941412601813::T => now;
162+ 62.7504824646 => c.freq; 0.227259402831::T => now;
163+ 38.6795482629 => c.freq; 0.3762738641::T => now;
164+ 55.1785220336 => c.freq; 0.247410864394::T => now;
165+ 65.2566291244 => c.freq; 0.168648990013::T => now;
166+ 39.849532234 => c.freq; 0.152290558426::T => now;
167+ 24.8145295694 => c.freq; 0.428376834284::T => now;
168+ 75.4479708933 => c.freq; 0.959000618294::T => now;
169+ 91.7898205013 => c.freq; 0.541929651177::T => now;
170+ 11.1226719804 => c.freq; 0.648711461939::T => now;
171+ 17.1612882353 => c.freq; 0.633880569387::T => now;
172+ 95.4233201187 => c.freq; 0.975678729336::T => now;
173+ 9.22913408693 => c.freq; 0.422085567862::T => now;
174+ 74.8085014754 => c.freq; 0.760981450326::T => now;
175+ 45.7232704819 => c.freq; 0.855190887724::T => now;
176+ 70.6104549223 => c.freq; 0.198462895415::T => now;
177+ 14.0670638553 => c.freq; 0.45295319112::T => now;
178+ 28.2045775408 => c.freq; 0.111216252087::T => now;
179+ 35.5272011789 => c.freq; 0.63192313611::T => now;
180+ 48.8174762859 => c.freq; 0.708117365548::T => now;
181+ 21.5772789394 => c.freq; 0.118726918397::T => now;
182+ 53.2483212703 => c.freq; 0.00227435035027::T => now;
183+ 8.39420479412 => c.freq; 0.788258726865::T => now;
184+ 94.1412601813 => c.freq; 0.753953927236::T => now;
185+ 22.7259402831 => c.freq; 0.537793462322::T => now;
186+ 37.62738641 => c.freq; 0.746139240207::T => now;
187+ 24.7410864394 => c.freq; 0.460229529242::T => now;
188+ 16.8648990013 => c.freq; 0.974618201641::T => now;
189+ 28.9079990034 => c.freq; 0.712430511367::T => now;
190+ 60.4867532489 => c.freq; 0.789783283426::T => now;
191+ 53.9949091227 => c.freq; 0.571853249164::T => now;
192+ 58.5674922482 => c.freq; 0.155804212259::T => now;
193+ 75.3412338585 => c.freq; 0.789535985919::T => now;
194+ 61.1770871374 => c.freq; 0.159252905472::T => now;
195+ 1.44097785444 => c.freq; 0.907719737104::T => now;
196+ 51.0561990819 => c.freq; 0.896215593472::T => now;
197+ 58.2684359741 => c.freq; 0.606393432988::T => now;
198+ 30.6552411327 => c.freq; 0.267251858167::T => now;
199+ 68.7118926494 => c.freq; 0.927872058692::T => now;
200+ 30.825387103 => c.freq; 0.328926942833::T => now;
201+ 13.7376567337 => c.freq; 0.0223384712963::T => now;
202+ 87.5865705461 => c.freq; 0.893238581039::T => now;
203+ 10.9963381301 => c.freq; 0.624446636853::T => now;
204+ 84.9345785496 => c.freq; 0.195011717798::T => now;
205+ 53.3746088305 => c.freq; 0.619972647793::T => now;
206+ 70.3579325877 => c.freq; 0.457055902411::T => now;
207+ 11.2994663847 => c.freq; 0.831988494584::T => now;
208+ 95.9606211012 => c.freq; 0.456677048766::T => now;
209+ 5.74823778088 => c.freq; 0.414941060809::T => now;
210+ 28.757113591 => c.freq; 0.683480023168::T => now;
211+ 32.1191964371 => c.freq; 0.793624056216::T => now;
212+ 15.2290558426 => c.freq; 0.795274313973::T => now;
213+ 42.8376834284 => c.freq; 0.89977706362::T => now;
214+ 95.9000618294 => c.freq; 0.50419306911::T => now;
215+ 54.1929651177 => c.freq; 0.904964444807::T => now;
216+ 64.8711461939 => c.freq; 0.627504824646::T => now;
217+ 63.3880569387 => c.freq; 0.386795482629::T => now;
218+ 97.5678729336 => c.freq; 0.551785220336::T => now;
219+ 42.2085567862 => c.freq; 0.652566291244::T => now;
220+ 76.0981450326 => c.freq; 0.39849532234::T => now;
221+ 85.5190887724 => c.freq; 0.248145295694::T => now;
222+ 19.8462895415 => c.freq; 0.754479708933::T => now;
223+ 45.295319112 => c.freq; 0.917898205013::T => now;
224+ 11.1216252087 => c.freq; 0.111226719804::T => now;
225+ 63.192313611 => c.freq; 0.171612882353::T => now;
226+ 70.8117365548 => c.freq; 0.954233201187::T => now;
227+ 11.8726918397 => c.freq; 0.0922913408693::T => now;
228+ 0.227435035027 => c.freq; 0.748085014754::T => now;
229+ 78.8258726865 => c.freq; 0.457232704819::T => now;
230+ 75.3953927236 => c.freq; 0.706104549223::T => now;
231+ 53.7793462322 => c.freq; 0.140670638553::T => now;
232+ 74.6139240207 => c.freq; 0.282045775408::T => now;
233+ 46.0229529242 => c.freq; 0.355272011789::T => now;
234+ 97.4618201641 => c.freq; 0.488174762859::T => now;
235+ 71.2430511367 => c.freq; 0.215772789394::T => now;
236+ 78.9783283426 => c.freq; 0.532483212703::T => now;
237+ 57.1853249164 => c.freq; 0.0839420479412::T => now;
238+ 15.5804212259 => c.freq; 0.941412601813::T => now;
239+ 78.9535985919 => c.freq; 0.227259402831::T => now;
240+ 15.9252905472 => c.freq; 0.3762738641::T => now;
241+ 90.7719737104 => c.freq; 0.247410864394::T => now;
242+ 89.6215593472 => c.freq; 0.168648990013::T => now;
243+ 60.6393432988 => c.freq; 0.152290558426::T => now;
244+ 26.7251858167 => c.freq; 0.428376834284::T => now;
245+ 92.7872058692 => c.freq; 0.959000618294::T => now;
246+ 32.8926942833 => c.freq; 0.541929651177::T => now;
247+ 2.23384712963 => c.freq; 0.648711461939::T => now;
248+ 89.3238581039 => c.freq; 0.633880569387::T => now;
249+ 62.4446636853 => c.freq; 0.975678729336::T => now;
250+ 19.5011717798 => c.freq; 0.422085567862::T => now;
251+ 61.9972647793 => c.freq; 0.760981450326::T => now;
252+ 45.7055902411 => c.freq; 0.855190887724::T => now;
253+ 83.1988494584 => c.freq; 0.198462895415::T => now;
254+ 45.6677048766 => c.freq; 0.45295319112::T => now;
255+ 41.4941060809 => c.freq; 0.111216252087::T => now;
256+ 68.3480023168 => c.freq; 0.63192313611::T => now;
257+ 79.3624056216 => c.freq; 0.708117365548::T => now;
258+ 79.5274313973 => c.freq; 0.118726918397::T => now;
259+ 89.977706362 => c.freq; 0.00227435035027::T => now;
260+ 50.419306911 => c.freq; 0.788258726865::T => now;
261+ 90.4964444807 => c.freq; 0.753953927236::T => now;
262+ 62.7504824646 => c.freq; 0.537793462322::T => now;
263+ 38.6795482629 => c.freq; 0.746139240207::T => now;
264+ 55.1785220336 => c.freq; 0.460229529242::T => now;
265+ 65.2566291244 => c.freq; 0.974618201641::T => now;
266+ 39.849532234 => c.freq; 0.712430511367::T => now;
267+ 24.8145295694 => c.freq; 0.789783283426::T => now;
268+ 75.4479708933 => c.freq; 0.571853249164::T => now;
269+ 91.7898205013 => c.freq; 0.155804212259::T => now;
270+ 11.1226719804 => c.freq; 0.789535985919::T => now;
271+ 17.1612882353 => c.freq; 0.159252905472::T => now;
272+ 95.4233201187 => c.freq; 0.907719737104::T => now;
273+ 9.22913408693 => c.freq; 0.896215593472::T => now;
274+ 74.8085014754 => c.freq; 0.606393432988::T => now;
275+ 45.7232704819 => c.freq; 0.267251858167::T => now;
276+ 70.6104549223 => c.freq; 0.927872058692::T => now;
277+ 14.0670638553 => c.freq; 0.328926942833::T => now;
278+ 28.2045775408 => c.freq; 0.0223384712963::T => now;
279+ 35.5272011789 => c.freq; 0.893238581039::T => now;
280+ 48.8174762859 => c.freq; 0.624446636853::T => now;
281+ 21.5772789394 => c.freq; 0.195011717798::T => now;
282+ 53.2483212703 => c.freq; 0.619972647793::T => now;
283+ 8.39420479412 => c.freq; 0.457055902411::T => now;
284+ 94.1412601813 => c.freq; 0.831988494584::T => now;
285+ 22.7259402831 => c.freq; 0.456677048766::T => now;
286+ 37.62738641 => c.freq; 0.414941060809::T => now;
287+ 24.7410864394 => c.freq; 0.683480023168::T => now;
288+ 16.8648990013 => c.freq; 0.793624056216::T => now;
289+ 28.9079990034 => c.freq; 0.795274313973::T => now;
290+ 60.4867532489 => c.freq; 0.89977706362::T => now;
291+ 53.9949091227 => c.freq; 0.50419306911::T => now;
292+ 58.5674922482 => c.freq; 0.904964444807::T => now;
293+ 75.3412338585 => c.freq; 0.627504824646::T => now;
294+ 61.1770871374 => c.freq; 0.386795482629::T => now;
295+ 1.44097785444 => c.freq; 0.551785220336::T => now;
296+ 51.0561990819 => c.freq; 0.652566291244::T => now;
297+ 58.2684359741 => c.freq; 0.39849532234::T => now;
298+ 30.6552411327 => c.freq; 0.248145295694::T => now;
299+ 68.7118926494 => c.freq; 0.754479708933::T => now;
300+ 30.825387103 => c.freq; 0.917898205013::T => now;
301+ 13.7376567337 => c.freq; 0.111226719804::T => now;
302+ 87.5865705461 => c.freq; 0.171612882353::T => now;
303+ 10.9963381301 => c.freq; 0.954233201187::T => now;
304+ 84.9345785496 => c.freq; 0.0922913408693::T => now;
305+ 53.3746088305 => c.freq; 0.748085014754::T => now;
306+ 70.3579325877 => c.freq; 0.457232704819::T => now;
307+ 11.2994663847 => c.freq; 0.706104549223::T => now;
308+ 95.9606211012 => c.freq; 0.140670638553::T => now;
309+ 5.74823778088 => c.freq; 0.282045775408::T => now;
310+ 28.757113591 => c.freq; 0.355272011789::T => now;
311+ 32.1191964371 => c.freq; 0.488174762859::T => now;
312+ 15.2290558426 => c.freq; 0.215772789394::T => now;
313+ 42.8376834284 => c.freq; 0.532483212703::T => now;
314+ 95.9000618294 => c.freq; 0.0839420479412::T => now;
315+ 54.1929651177 => c.freq; 0.941412601813::T => now;
316+ 64.8711461939 => c.freq; 0.227259402831::T => now;
317+ 63.3880569387 => c.freq; 0.3762738641::T => now;
318+ 97.5678729336 => c.freq; 0.247410864394::T => now;
319+ 42.2085567862 => c.freq; 0.168648990013::T => now;
320+ 76.0981450326 => c.freq; 0.152290558426::T => now;
321+ 85.5190887724 => c.freq; 0.428376834284::T => now;
322+ 19.8462895415 => c.freq; 0.959000618294::T => now;
323+ 45.295319112 => c.freq; 0.541929651177::T => now;
324+ 11.1216252087 => c.freq; 0.648711461939::T => now;
325+ 63.192313611 => c.freq; 0.633880569387::T => now;
326+ 70.8117365548 => c.freq; 0.975678729336::T => now;
327+ 11.8726918397 => c.freq; 0.422085567862::T => now;
328+ 0.227435035027 => c.freq; 0.760981450326::T => now;
329+ 78.8258726865 => c.freq; 0.855190887724::T => now;
330+ 75.3953927236 => c.freq; 0.198462895415::T => now;
331+ 53.7793462322 => c.freq; 0.45295319112::T => now;
332+ 74.6139240207 => c.freq; 0.111216252087::T => now;
333+ 46.0229529242 => c.freq; 0.63192313611::T => now;
334+ 97.4618201641 => c.freq; 0.708117365548::T => now;
335+ 71.2430511367 => c.freq; 0.118726918397::T => now;
336+ 78.9783283426 => c.freq; 0.00227435035027::T => now;
337+ 57.1853249164 => c.freq; 0.788258726865::T => now;
338+ 15.5804212259 => c.freq; 0.753953927236::T => now;
339+ 78.9535985919 => c.freq; 0.537793462322::T => now;
340+ 15.9252905472 => c.freq; 0.746139240207::T => now;
341+ 90.7719737104 => c.freq; 0.460229529242::T => now;
342+ 89.6215593472 => c.freq; 0.974618201641::T => now;
343+ 60.6393432988 => c.freq; 0.712430511367::T => now;
344+ 26.7251858167 => c.freq; 0.789783283426::T => now;
345+ 92.7872058692 => c.freq; 0.571853249164::T => now;
346+ 32.8926942833 => c.freq; 0.155804212259::T => now;
347+ 2.23384712963 => c.freq; 0.789535985919::T => now;
348+ 89.3238581039 => c.freq; 0.159252905472::T => now;
349+ 62.4446636853 => c.freq; 0.907719737104::T => now;
350+ 19.5011717798 => c.freq; 0.896215593472::T => now;
351+ 61.9972647793 => c.freq; 0.606393432988::T => now;
352+ 45.7055902411 => c.freq; 0.267251858167::T => now;
353+ 83.1988494584 => c.freq; 0.927872058692::T => now;
354+ 45.6677048766 => c.freq; 0.328926942833::T => now;
355+ 41.4941060809 => c.freq; 0.0223384712963::T => now;
356+ 68.3480023168 => c.freq; 0.893238581039::T => now;
357+ 79.3624056216 => c.freq; 0.624446636853::T => now;
358+ 79.5274313973 => c.freq; 0.195011717798::T => now;
359+ 89.977706362 => c.freq; 0.619972647793::T => now;
360+ 50.419306911 => c.freq; 0.457055902411::T => now;
361+ 90.4964444807 => c.freq; 0.831988494584::T => now;
362+ 62.7504824646 => c.freq; 0.456677048766::T => now;
363+ 38.6795482629 => c.freq; 0.414941060809::T => now;
364+ 55.1785220336 => c.freq; 0.683480023168::T => now;
365+ 65.2566291244 => c.freq; 0.793624056216::T => now;
366+ 39.849532234 => c.freq; 0.795274313973::T => now;
367+ 24.8145295694 => c.freq; 0.89977706362::T => now;
368+ 75.4479708933 => c.freq; 0.50419306911::T => now;
369+ 91.7898205013 => c.freq; 0.904964444807::T => now;
370+ 11.1226719804 => c.freq; 0.627504824646::T => now;
371+ 17.1612882353 => c.freq; 0.386795482629::T => now;
372+ 95.4233201187 => c.freq; 0.551785220336::T => now;
373+ 9.22913408693 => c.freq; 0.652566291244::T => now;
374+ 74.8085014754 => c.freq; 0.39849532234::T => now;
375+ 45.7232704819 => c.freq; 0.248145295694::T => now;
376+ 70.6104549223 => c.freq; 0.754479708933::T => now;
377+ 14.0670638553 => c.freq; 0.917898205013::T => now;
378+ 28.2045775408 => c.freq; 0.111226719804::T => now;
379+ 35.5272011789 => c.freq; 0.171612882353::T => now;
380+ 48.8174762859 => c.freq; 0.954233201187::T => now;
381+ 21.5772789394 => c.freq; 0.0922913408693::T => now;
382+ 53.2483212703 => c.freq; 0.748085014754::T => now;
383+ 8.39420479412 => c.freq; 0.457232704819::T => now;
384+ 94.1412601813 => c.freq; 0.706104549223::T => now;
385+ 22.7259402831 => c.freq; 0.140670638553::T => now;
386+ 37.62738641 => c.freq; 0.282045775408::T => now;
387+ 24.7410864394 => c.freq; 0.355272011789::T => now;
388+ 16.8648990013 => c.freq; 0.488174762859::T => now;
389+ 28.9079990034 => c.freq; 0.215772789394::T => now;
390+ 60.4867532489 => c.freq; 0.532483212703::T => now;
391+ 53.9949091227 => c.freq; 0.0839420479412::T => now;
392+ 58.5674922482 => c.freq; 0.941412601813::T => now;
393+ 75.3412338585 => c.freq; 0.227259402831::T => now;
394+ 61.1770871374 => c.freq; 0.3762738641::T => now;
395+ 1.44097785444 => c.freq; 0.247410864394::T => now;
396+ 51.0561990819 => c.freq; 0.168648990013::T => now;
397+ 58.2684359741 => c.freq; 0.152290558426::T => now;
398+ 30.6552411327 => c.freq; 0.428376834284::T => now;
399+ 68.7118926494 => c.freq; 0.959000618294::T => now;
400+ 30.825387103 => c.freq; 0.541929651177::T => now;
401+ 13.7376567337 => c.freq; 0.648711461939::T => now;
402+ 87.5865705461 => c.freq; 0.633880569387::T => now;
403+ 10.9963381301 => c.freq; 0.975678729336::T => now;
404+ 84.9345785496 => c.freq; 0.422085567862::T => now;
405+ 53.3746088305 => c.freq; 0.760981450326::T => now;
406+ 70.3579325877 => c.freq; 0.855190887724::T => now;
407+ 11.2994663847 => c.freq; 0.198462895415::T => now;
408+ 95.9606211012 => c.freq; 0.45295319112::T => now;
409+ 5.74823778088 => c.freq; 0.111216252087::T => now;
410+ 28.757113591 => c.freq; 0.63192313611::T => now;
411+ 32.1191964371 => c.freq; 0.708117365548::T => now;
412+ 15.2290558426 => c.freq; 0.118726918397::T => now;
413+ 42.8376834284 => c.freq; 0.00227435035027::T => now;
414+ 95.9000618294 => c.freq; 0.788258726865::T => now;
415+ 54.1929651177 => c.freq; 0.753953927236::T => now;
416+ 64.8711461939 => c.freq; 0.537793462322::T => now;
417+ 63.3880569387 => c.freq; 0.746139240207::T => now;
418+ 97.5678729336 => c.freq; 0.460229529242::T => now;
419+ 42.2085567862 => c.freq; 0.974618201641::T => now;
420+ 76.0981450326 => c.freq; 0.712430511367::T => now;
421+ 85.5190887724 => c.freq; 0.789783283426::T => now;
422+ 19.8462895415 => c.freq; 0.571853249164::T => now;
423+ 45.295319112 => c.freq; 0.155804212259::T => now;
424+ 11.1216252087 => c.freq; 0.789535985919::T => now;
425+ 63.192313611 => c.freq; 0.159252905472::T => now;
426+ 70.8117365548 => c.freq; 0.907719737104::T => now;
427+ 11.8726918397 => c.freq; 0.896215593472::T => now;
428+ 0.227435035027 => c.freq; 0.606393432988::T => now;
429+ 78.8258726865 => c.freq; 0.267251858167::T => now;
430+ 75.3953927236 => c.freq; 0.927872058692::T => now;
431+ 53.7793462322 => c.freq; 0.328926942833::T => now;
432+ 74.6139240207 => c.freq; 0.0223384712963::T => now;
433+ 46.0229529242 => c.freq; 0.893238581039::T => now;
434+ 97.4618201641 => c.freq; 0.624446636853::T => now;
435+ 71.2430511367 => c.freq; 0.195011717798::T => now;
436+ 78.9783283426 => c.freq; 0.619972647793::T => now;
437+ 57.1853249164 => c.freq; 0.457055902411::T => now;
438+ 15.5804212259 => c.freq; 0.831988494584::T => now;
439+ 78.9535985919 => c.freq; 0.456677048766::T => now;
440+ 15.9252905472 => c.freq; 0.414941060809::T => now;
441+ 90.7719737104 => c.freq; 0.683480023168::T => now;
442+ 89.6215593472 => c.freq; 0.793624056216::T => now;
443+ 60.6393432988 => c.freq; 0.795274313973::T => now;
444+ 26.7251858167 => c.freq; 0.89977706362::T => now;
445+ 92.7872058692 => c.freq; 0.50419306911::T => now;
446+ 32.8926942833 => c.freq; 0.904964444807::T => now;
447+ 2.23384712963 => c.freq; 0.627504824646::T => now;
448+ 89.3238581039 => c.freq; 0.386795482629::T => now;
449+ 62.4446636853 => c.freq; 0.551785220336::T => now;
450+ 19.5011717798 => c.freq; 0.652566291244::T => now;
451+ 61.9972647793 => c.freq; 0.39849532234::T => now;
452+ 45.7055902411 => c.freq; 0.248145295694::T => now;
453+ 83.1988494584 => c.freq; 0.754479708933::T => now;
454+ 45.6677048766 => c.freq; 0.917898205013::T => now;
455+ 41.4941060809 => c.freq; 0.111226719804::T => now;
456+ 68.3480023168 => c.freq; 0.171612882353::T => now;
457+ 79.3624056216 => c.freq; 0.954233201187::T => now;
458+ 79.5274313973 => c.freq; 0.0922913408693::T => now;
459+ 89.977706362 => c.freq; 0.748085014754::T => now;
460+ 50.419306911 => c.freq; 0.457232704819::T => now;
461+ 90.4964444807 => c.freq; 0.706104549223::T => now;
462+ 62.7504824646 => c.freq; 0.140670638553::T => now;
463+ 38.6795482629 => c.freq; 0.282045775408::T => now;
464+ 55.1785220336 => c.freq; 0.355272011789::T => now;
465+ 65.2566291244 => c.freq; 0.488174762859::T => now;
466+ 39.849532234 => c.freq; 0.215772789394::T => now;
467+ 24.8145295694 => c.freq; 0.532483212703::T => now;
468+ 75.4479708933 => c.freq; 0.0839420479412::T => now;
469+ 91.7898205013 => c.freq; 0.941412601813::T => now;
470+ 11.1226719804 => c.freq; 0.227259402831::T => now;
471+ 17.1612882353 => c.freq; 0.3762738641::T => now;
472+ 95.4233201187 => c.freq; 0.247410864394::T => now;
473+ 9.22913408693 => c.freq; 0.168648990013::T => now;
474+ 74.8085014754 => c.freq; 0.152290558426::T => now;
475+ 45.7232704819 => c.freq; 0.428376834284::T => now;
476+ 70.6104549223 => c.freq; 0.959000618294::T => now;
477+ 14.0670638553 => c.freq; 0.541929651177::T => now;
478+ 28.2045775408 => c.freq; 0.648711461939::T => now;
479+ 35.5272011789 => c.freq; 0.633880569387::T => now;
480+ 48.8174762859 => c.freq; 0.975678729336::T => now;
481+ 21.5772789394 => c.freq; 0.422085567862::T => now;
482+ 53.2483212703 => c.freq; 0.760981450326::T => now;
483+ 8.39420479412 => c.freq; 0.855190887724::T => now;
484+ 94.1412601813 => c.freq; 0.198462895415::T => now;
485+ 22.7259402831 => c.freq; 0.45295319112::T => now;
486+ 37.62738641 => c.freq; 0.111216252087::T => now;
487+ 24.7410864394 => c.freq; 0.63192313611::T => now;
488+ 16.8648990013 => c.freq; 0.708117365548::T => now;
489+ 28.9079990034 => c.freq; 0.118726918397::T => now;
490+ 60.4867532489 => c.freq; 0.00227435035027::T => now;
491+ 53.9949091227 => c.freq; 0.788258726865::T => now;
492+ 58.5674922482 => c.freq; 0.753953927236::T => now;
493+ 75.3412338585 => c.freq; 0.537793462322::T => now;
494+ 61.1770871374 => c.freq; 0.746139240207::T => now;
495+ 1.44097785444 => c.freq; 0.460229529242::T => now;
496+ 51.0561990819 => c.freq; 0.974618201641::T => now;
497+ 58.2684359741 => c.freq; 0.712430511367::T => now;
498+ 30.6552411327 => c.freq; 0.789783283426::T => now;
499+ 68.7118926494 => c.freq; 0.571853249164::T => now;
500+ 30.825387103 => c.freq; 0.155804212259::T => now;
501+ 13.7376567337 => c.freq; 0.789535985919::T => now;
502+ 87.5865705461 => c.freq; 0.159252905472::T => now;
503+ 10.9963381301 => c.freq; 0.907719737104::T => now;
504+ 84.9345785496 => c.freq; 0.896215593472::T => now;
505+ 53.3746088305 => c.freq; 0.606393432988::T => now;
506+ 70.3579325877 => c.freq; 0.267251858167::T => now;
507+ 11.2994663847 => c.freq; 0.927872058692::T => now;
508+ 95.9606211012 => c.freq; 0.328926942833::T => now;
509+ 5.74823778088 => c.freq; 0.0223384712963::T => now;
510+ 28.757113591 => c.freq; 0.893238581039::T => now;
511+ 32.1191964371 => c.freq; 0.624446636853::T => now;
512+ 15.2290558426 => c.freq; 0.195011717798::T => now;
513+ 42.8376834284 => c.freq; 0.619972647793::T => now;
514+ 95.9000618294 => c.freq; 0.457055902411::T => now;
515+ 54.1929651177 => c.freq; 0.831988494584::T => now;
516+ 64.8711461939 => c.freq; 0.456677048766::T => now;
517+ 63.3880569387 => c.freq; 0.414941060809::T => now;
518+ 97.5678729336 => c.freq; 0.683480023168::T => now;
519+ 42.2085567862 => c.freq; 0.793624056216::T => now;
520+ 76.0981450326 => c.freq; 0.795274313973::T => now;
521+ 85.5190887724 => c.freq; 0.89977706362::T => now;
522+ 19.8462895415 => c.freq; 0.50419306911::T => now;
523+ 45.295319112 => c.freq; 0.904964444807::T => now;
524+ 11.1216252087 => c.freq; 0.627504824646::T => now;
525+ 63.192313611 => c.freq; 0.386795482629::T => now;
526+ 70.8117365548 => c.freq; 0.551785220336::T => now;
527+ 11.8726918397 => c.freq; 0.652566291244::T => now;
528+ 0.227435035027 => c.freq; 0.39849532234::T => now;
529+ 78.8258726865 => c.freq; 0.248145295694::T => now;
530+ 75.3953927236 => c.freq; 0.754479708933::T => now;
531+ 53.7793462322 => c.freq; 0.917898205013::T => now;
532+ 74.6139240207 => c.freq; 0.111226719804::T => now;
533+ 46.0229529242 => c.freq; 0.171612882353::T => now;
534+ 97.4618201641 => c.freq; 0.954233201187::T => now;
535+ 71.2430511367 => c.freq; 0.0922913408693::T => now;
536+ 78.9783283426 => c.freq; 0.748085014754::T => now;
537+ 57.1853249164 => c.freq; 0.457232704819::T => now;
538+ 15.5804212259 => c.freq; 0.706104549223::T => now;
539+ 78.9535985919 => c.freq; 0.140670638553::T => now;
540+ 15.9252905472 => c.freq; 0.282045775408::T => now;
541+ 90.7719737104 => c.freq; 0.355272011789::T => now;
542+ 89.6215593472 => c.freq; 0.488174762859::T => now;
543+ 60.6393432988 => c.freq; 0.215772789394::T => now;
544+ 26.7251858167 => c.freq; 0.532483212703::T => now;
545+ 92.7872058692 => c.freq; 0.0839420479412::T => now;
546+ 32.8926942833 => c.freq; 0.941412601813::T => now;
547+ 2.23384712963 => c.freq; 0.227259402831::T => now;
548+ 89.3238581039 => c.freq; 0.3762738641::T => now;
549+ 62.4446636853 => c.freq; 0.247410864394::T => now;
550+ 19.5011717798 => c.freq; 0.168648990013::T => now;
551+ 61.9972647793 => c.freq; 0.152290558426::T => now;
552+ 45.7055902411 => c.freq; 0.428376834284::T => now;
553+ 83.1988494584 => c.freq; 0.959000618294::T => now;
554+ 45.6677048766 => c.freq; 0.541929651177::T => now;
555+ 41.4941060809 => c.freq; 0.648711461939::T => now;
556+ 68.3480023168 => c.freq; 0.633880569387::T => now;
557+ 79.3624056216 => c.freq; 0.975678729336::T => now;
558+ 79.5274313973 => c.freq; 0.422085567862::T => now;
559+ 89.977706362 => c.freq; 0.760981450326::T => now;
560+ 50.419306911 => c.freq; 0.855190887724::T => now;
561+ 90.4964444807 => c.freq; 0.198462895415::T => now;
562+ 62.7504824646 => c.freq; 0.45295319112::T => now;
563+ 38.6795482629 => c.freq; 0.111216252087::T => now;
564+ 55.1785220336 => c.freq; 0.63192313611::T => now;
565+ 65.2566291244 => c.freq; 0.708117365548::T => now;
566+ 39.849532234 => c.freq; 0.118726918397::T => now;
567+ 24.8145295694 => c.freq; 0.00227435035027::T => now;
568+ 75.4479708933 => c.freq; 0.788258726865::T => now;
569+ 91.7898205013 => c.freq; 0.753953927236::T => now;
570+ 11.1226719804 => c.freq; 0.537793462322::T => now;
571+ 17.1612882353 => c.freq; 0.746139240207::T => now;
572+ 95.4233201187 => c.freq; 0.460229529242::T => now;
573+ 9.22913408693 => c.freq; 0.974618201641::T => now;
574+ 74.8085014754 => c.freq; 0.712430511367::T => now;
575+ 45.7232704819 => c.freq; 0.789783283426::T => now;
576+ 70.6104549223 => c.freq; 0.571853249164::T => now;
577+ 14.0670638553 => c.freq; 0.155804212259::T => now;
578+ 28.2045775408 => c.freq; 0.789535985919::T => now;
579+ 35.5272011789 => c.freq; 0.159252905472::T => now;
580+ 48.8174762859 => c.freq; 0.907719737104::T => now;
581+ 21.5772789394 => c.freq; 0.896215593472::T => now;
582+ 53.2483212703 => c.freq; 0.606393432988::T => now;
583+ 8.39420479412 => c.freq; 0.267251858167::T => now;
584+ 94.1412601813 => c.freq; 0.927872058692::T => now;
585+ 22.7259402831 => c.freq; 0.328926942833::T => now;
586+ 37.62738641 => c.freq; 0.0223384712963::T => now;
587+ 24.7410864394 => c.freq; 0.893238581039::T => now;
588+ 16.8648990013 => c.freq; 0.624446636853::T => now;
589+ 28.9079990034 => c.freq; 0.195011717798::T => now;
590+ 60.4867532489 => c.freq; 0.619972647793::T => now;
591+ 53.9949091227 => c.freq; 0.457055902411::T => now;
592+ 58.5674922482 => c.freq; 0.831988494584::T => now;
593+ 75.3412338585 => c.freq; 0.456677048766::T => now;
594+ 61.1770871374 => c.freq; 0.414941060809::T => now;
595+ 1.44097785444 => c.freq; 0.683480023168::T => now;
596+ 51.0561990819 => c.freq; 0.793624056216::T => now;
597+ 58.2684359741 => c.freq; 0.795274313973::T => now;
598+ 30.6552411327 => c.freq; 0.89977706362::T => now;
599+ 68.7118926494 => c.freq; 0.50419306911::T => now;
600+ 30.825387103 => c.freq; 0.904964444807::T => now;
601+ 13.7376567337 => c.freq; 0.627504824646::T => now;
602+ 87.5865705461 => c.freq; 0.386795482629::T => now;
603+ 10.9963381301 => c.freq; 0.551785220336::T => now;
604+ 84.9345785496 => c.freq; 0.652566291244::T => now;
605+ 53.3746088305 => c.freq; 0.39849532234::T => now;
606+ 70.3579325877 => c.freq; 0.248145295694::T => now;
607+ 11.2994663847 => c.freq; 0.754479708933::T => now;
608+ 95.9606211012 => c.freq; 0.917898205013::T => now;
609+ 5.74823778088 => c.freq; 0.111226719804::T => now;
610+ 28.757113591 => c.freq; 0.171612882353::T => now;
611+ 32.1191964371 => c.freq; 0.954233201187::T => now;
612+ 15.2290558426 => c.freq; 0.0922913408693::T => now;
613+ 42.8376834284 => c.freq; 0.748085014754::T => now;
614+ 95.9000618294 => c.freq; 0.457232704819::T => now;
615+ 54.1929651177 => c.freq; 0.706104549223::T => now;
616+ 64.8711461939 => c.freq; 0.140670638553::T => now;
617+ 63.3880569387 => c.freq; 0.282045775408::T => now;
618+ 97.5678729336 => c.freq; 0.355272011789::T => now;
619+ 42.2085567862 => c.freq; 0.488174762859::T => now;
620+ 76.0981450326 => c.freq; 0.215772789394::T => now;
621+ 85.5190887724 => c.freq; 0.532483212703::T => now;
622+ 19.8462895415 => c.freq; 0.0839420479412::T => now;
623+ 45.295319112 => c.freq; 0.941412601813::T => now;
624+ 11.1216252087 => c.freq; 0.227259402831::T => now;
625+ 63.192313611 => c.freq; 0.3762738641::T => now;
626+ 70.8117365548 => c.freq; 0.247410864394::T => now;
627+ 11.8726918397 => c.freq; 0.168648990013::T => now;
628+ 0.227435035027 => c.freq; 0.152290558426::T => now;
629+ 78.8258726865 => c.freq; 0.428376834284::T => now;
630+ 75.3953927236 => c.freq; 0.959000618294::T => now;
631+ 53.7793462322 => c.freq; 0.541929651177::T => now;
632+ 74.6139240207 => c.freq; 0.648711461939::T => now;
633+ 46.0229529242 => c.freq; 0.633880569387::T => now;
634+ 97.4618201641 => c.freq; 0.975678729336::T => now;
635+ 71.2430511367 => c.freq; 0.422085567862::T => now;
636+ 78.9783283426 => c.freq; 0.760981450326::T => now;
637+ 57.1853249164 => c.freq; 0.855190887724::T => now;
638+ 15.5804212259 => c.freq; 0.198462895415::T => now;
639+ 78.9535985919 => c.freq; 0.45295319112::T => now;
640+ 15.9252905472 => c.freq; 0.111216252087::T => now;
641+ 90.7719737104 => c.freq; 0.63192313611::T => now;
642+ 89.6215593472 => c.freq; 0.708117365548::T => now;
643+ 60.6393432988 => c.freq; 0.118726918397::T => now;
644+ 26.7251858167 => c.freq; 0.00227435035027::T => now;
645+ 92.7872058692 => c.freq; 0.788258726865::T => now;
646+ 32.8926942833 => c.freq; 0.753953927236::T => now;
647+ 2.23384712963 => c.freq; 0.537793462322::T => now;
648+ 89.3238581039 => c.freq; 0.746139240207::T => now;
649+ 62.4446636853 => c.freq; 0.460229529242::T => now;
650+ 19.5011717798 => c.freq; 0.974618201641::T => now;
651+ 61.9972647793 => c.freq; 0.712430511367::T => now;
652+ 45.7055902411 => c.freq; 0.789783283426::T => now;
653+ 83.1988494584 => c.freq; 0.571853249164::T => now;
654+ 45.6677048766 => c.freq; 0.155804212259::T => now;
655+ 41.4941060809 => c.freq; 0.789535985919::T => now;
656+ 68.3480023168 => c.freq; 0.159252905472::T => now;
657+ 79.3624056216 => c.freq; 0.907719737104::T => now;
658+ 79.5274313973 => c.freq; 0.896215593472::T => now;
659+ 89.977706362 => c.freq; 0.606393432988::T => now;
660+ 50.419306911 => c.freq; 0.267251858167::T => now;
661+ 90.4964444807 => c.freq; 0.927872058692::T => now;
662+ 62.7504824646 => c.freq; 0.328926942833::T => now;
663+ 38.6795482629 => c.freq; 0.0223384712963::T => now;
664+ 55.1785220336 => c.freq; 0.893238581039::T => now;
665+ 65.2566291244 => c.freq; 0.624446636853::T => now;
666+ 39.849532234 => c.freq; 0.195011717798::T => now;
667+ 24.8145295694 => c.freq; 0.619972647793::T => now;
668+ 75.4479708933 => c.freq; 0.457055902411::T => now;
669+ 91.7898205013 => c.freq; 0.831988494584::T => now;
670+ 11.1226719804 => c.freq; 0.456677048766::T => now;
671+ 17.1612882353 => c.freq; 0.414941060809::T => now;
672+ 95.4233201187 => c.freq; 0.683480023168::T => now;
673+ 9.22913408693 => c.freq; 0.793624056216::T => now;
674+ 74.8085014754 => c.freq; 0.795274313973::T => now;
675+ 45.7232704819 => c.freq; 0.89977706362::T => now;
676+ 70.6104549223 => c.freq; 0.50419306911::T => now;
677+ 14.0670638553 => c.freq; 0.904964444807::T => now;
678+ 28.2045775408 => c.freq; 0.627504824646::T => now;
679+ 35.5272011789 => c.freq; 0.386795482629::T => now;
680+ 48.8174762859 => c.freq; 0.551785220336::T => now;
681+ 21.5772789394 => c.freq; 0.652566291244::T => now;
682+ 53.2483212703 => c.freq; 0.39849532234::T => now;
683+ 8.39420479412 => c.freq; 0.248145295694::T => now;
684+ 94.1412601813 => c.freq; 0.754479708933::T => now;
685+ 22.7259402831 => c.freq; 0.917898205013::T => now;
686+ 37.62738641 => c.freq; 0.111226719804::T => now;
687+ 24.7410864394 => c.freq; 0.171612882353::T => now;
688+ 16.8648990013 => c.freq; 0.954233201187::T => now;
689+ 28.9079990034 => c.freq; 0.0922913408693::T => now;
690+ 60.4867532489 => c.freq; 0.748085014754::T => now;
691+ 53.9949091227 => c.freq; 0.457232704819::T => now;
692+ 58.5674922482 => c.freq; 0.706104549223::T => now;
693+ 75.3412338585 => c.freq; 0.140670638553::T => now;
694+ 61.1770871374 => c.freq; 0.282045775408::T => now;
695+ 1.44097785444 => c.freq; 0.355272011789::T => now;
696+ 51.0561990819 => c.freq; 0.488174762859::T => now;
697+ 58.2684359741 => c.freq; 0.215772789394::T => now;
698+ 30.6552411327 => c.freq; 0.532483212703::T => now;
699+ 68.7118926494 => c.freq; 0.0839420479412::T => now;
700+ 30.825387103 => c.freq; 0.941412601813::T => now;
701+ 13.7376567337 => c.freq; 0.227259402831::T => now;
702+ 87.5865705461 => c.freq; 0.3762738641::T => now;
703+ 10.9963381301 => c.freq; 0.247410864394::T => now;
704+ 84.9345785496 => c.freq; 0.168648990013::T => now;
705+ 53.3746088305 => c.freq; 0.152290558426::T => now;
706+ 70.3579325877 => c.freq; 0.428376834284::T => now;
707+ 11.2994663847 => c.freq; 0.959000618294::T => now;
708+ 95.9606211012 => c.freq; 0.541929651177::T => now;
709+ 5.74823778088 => c.freq; 0.648711461939::T => now;
710+ 28.757113591 => c.freq; 0.633880569387::T => now;
711+ 32.1191964371 => c.freq; 0.975678729336::T => now;
712+ 15.2290558426 => c.freq; 0.422085567862::T => now;
713+ 42.8376834284 => c.freq; 0.760981450326::T => now;
714+ 95.9000618294 => c.freq; 0.855190887724::T => now;
715+ 54.1929651177 => c.freq; 0.198462895415::T => now;
716+ 64.8711461939 => c.freq; 0.45295319112::T => now;
717+ 63.3880569387 => c.freq; 0.111216252087::T => now;
718+ 97.5678729336 => c.freq; 0.63192313611::T => now;
719+ 42.2085567862 => c.freq; 0.708117365548::T => now;
720+ 76.0981450326 => c.freq; 0.118726918397::T => now;
721+ 85.5190887724 => c.freq; 0.00227435035027::T => now;
722+ 19.8462895415 => c.freq; 0.788258726865::T => now;
723+ 45.295319112 => c.freq; 0.753953927236::T => now;
724+ 11.1216252087 => c.freq; 0.537793462322::T => now;
725+ 63.192313611 => c.freq; 0.746139240207::T => now;
726+ 70.8117365548 => c.freq; 0.460229529242::T => now;
727+ 11.8726918397 => c.freq; 0.974618201641::T => now;
728+ 0.227435035027 => c.freq; 0.712430511367::T => now;
729+ 78.8258726865 => c.freq; 0.789783283426::T => now;
730+ 75.3953927236 => c.freq; 0.571853249164::T => now;
731+ 53.7793462322 => c.freq; 0.155804212259::T => now;
732+ 74.6139240207 => c.freq; 0.789535985919::T => now;
733+ 46.0229529242 => c.freq; 0.159252905472::T => now;
734+ 97.4618201641 => c.freq; 0.907719737104::T => now;
735+ 71.2430511367 => c.freq; 0.896215593472::T => now;
736+ 78.9783283426 => c.freq; 0.606393432988::T => now;
737+ 57.1853249164 => c.freq; 0.267251858167::T => now;
738+ 15.5804212259 => c.freq; 0.927872058692::T => now;
739+ 78.9535985919 => c.freq; 0.328926942833::T => now;
740+ 15.9252905472 => c.freq; 0.0223384712963::T => now;
741+ 90.7719737104 => c.freq; 0.893238581039::T => now;
742+ 89.6215593472 => c.freq; 0.624446636853::T => now;
743+ 60.6393432988 => c.freq; 0.195011717798::T => now;
744+ 26.7251858167 => c.freq; 0.619972647793::T => now;
745+ 92.7872058692 => c.freq; 0.457055902411::T => now;
746+ 32.8926942833 => c.freq; 0.831988494584::T => now;
747+ 2.23384712963 => c.freq; 0.456677048766::T => now;
748+ 89.3238581039 => c.freq; 0.414941060809::T => now;
749+ 62.4446636853 => c.freq; 0.683480023168::T => now;
750+ 19.5011717798 => c.freq; 0.793624056216::T => now;
751+ 61.9972647793 => c.freq; 0.795274313973::T => now;
752+ 45.7055902411 => c.freq; 0.89977706362::T => now;
753+ 83.1988494584 => c.freq; 0.50419306911::T => now;
754+ 45.6677048766 => c.freq; 0.904964444807::T => now;
755+ 41.4941060809 => c.freq; 0.627504824646::T => now;
756+ 68.3480023168 => c.freq; 0.386795482629::T => now;
757+ 79.3624056216 => c.freq; 0.551785220336::T => now;
758+ 79.5274313973 => c.freq; 0.652566291244::T => now;
759+ 89.977706362 => c.freq; 0.39849532234::T => now;
760+ 50.419306911 => c.freq; 0.248145295694::T => now;
761+ 90.4964444807 => c.freq; 0.754479708933::T => now;
762+ 62.7504824646 => c.freq; 0.917898205013::T => now;
763+ 38.6795482629 => c.freq; 0.111226719804::T => now;
764+ 55.1785220336 => c.freq; 0.171612882353::T => now;
765+ 65.2566291244 => c.freq; 0.954233201187::T => now;
766+ 39.849532234 => c.freq; 0.0922913408693::T => now;
767+ 24.8145295694 => c.freq; 0.748085014754::T => now;
768+ 75.4479708933 => c.freq; 0.457232704819::T => now;
769+ 91.7898205013 => c.freq; 0.706104549223::T => now;
770+ 11.1226719804 => c.freq; 0.140670638553::T => now;
771+ 17.1612882353 => c.freq; 0.282045775408::T => now;
772+ 95.4233201187 => c.freq; 0.355272011789::T => now;
773+ 9.22913408693 => c.freq; 0.488174762859::T => now;
774+ 74.8085014754 => c.freq; 0.215772789394::T => now;
775+ 45.7232704819 => c.freq; 0.532483212703::T => now;
776+ 70.6104549223 => c.freq; 0.0839420479412::T => now;
777+ 14.0670638553 => c.freq; 0.941412601813::T => now;
778+ 28.2045775408 => c.freq; 0.227259402831::T => now;
779+ 35.5272011789 => c.freq; 0.3762738641::T => now;
780+ 48.8174762859 => c.freq; 0.247410864394::T => now;
781+ 21.5772789394 => c.freq; 0.168648990013::T => now;
782+ 53.2483212703 => c.freq; 0.152290558426::T => now;
783+ 8.39420479412 => c.freq; 0.428376834284::T => now;
784+ 94.1412601813 => c.freq; 0.959000618294::T => now;
785+ 22.7259402831 => c.freq; 0.541929651177::T => now;
786+ 37.62738641 => c.freq; 0.648711461939::T => now;
787+ 24.7410864394 => c.freq; 0.633880569387::T => now;
788+ 16.8648990013 => c.freq; 0.975678729336::T => now;
789+ 28.9079990034 => c.freq; 0.422085567862::T => now;
790+ 60.4867532489 => c.freq; 0.760981450326::T => now;
791+ 53.9949091227 => c.freq; 0.855190887724::T => now;
792+ 58.5674922482 => c.freq; 0.198462895415::T => now;
793+ 75.3412338585 => c.freq; 0.45295319112::T => now;
794+ 61.1770871374 => c.freq; 0.111216252087::T => now;
795+ 1.44097785444 => c.freq; 0.63192313611::T => now;
796+ 51.0561990819 => c.freq; 0.708117365548::T => now;
797+ 58.2684359741 => c.freq; 0.118726918397::T => now;
798+ 30.6552411327 => c.freq; 0.00227435035027::T => now;
799+ 68.7118926494 => c.freq; 0.788258726865::T => now;
800+ 30.825387103 => c.freq; 0.753953927236::T => now;
801+ 13.7376567337 => c.freq; 0.537793462322::T => now;
802+ 87.5865705461 => c.freq; 0.746139240207::T => now;
803+ 10.9963381301 => c.freq; 0.460229529242::T => now;
804+ 84.9345785496 => c.freq; 0.974618201641::T => now;
805+ 53.3746088305 => c.freq; 0.712430511367::T => now;
806+ 70.3579325877 => c.freq; 0.789783283426::T => now;
807+ 11.2994663847 => c.freq; 0.571853249164::T => now;
808+ 95.9606211012 => c.freq; 0.155804212259::T => now;
809+ 5.74823778088 => c.freq; 0.789535985919::T => now;
810+ 28.757113591 => c.freq; 0.159252905472::T => now;
811+ 32.1191964371 => c.freq; 0.907719737104::T => now;
812+ 15.2290558426 => c.freq; 0.896215593472::T => now;
813+ 42.8376834284 => c.freq; 0.606393432988::T => now;
814+ 95.9000618294 => c.freq; 0.267251858167::T => now;
815+ 54.1929651177 => c.freq; 0.927872058692::T => now;
816+ 64.8711461939 => c.freq; 0.328926942833::T => now;
817+ 63.3880569387 => c.freq; 0.0223384712963::T => now;
818+ 97.5678729336 => c.freq; 0.893238581039::T => now;
819+ 42.2085567862 => c.freq; 0.624446636853::T => now;
820+ 76.0981450326 => c.freq; 0.195011717798::T => now;
821+ 85.5190887724 => c.freq; 0.619972647793::T => now;
822+ 19.8462895415 => c.freq; 0.457055902411::T => now;
823+ 45.295319112 => c.freq; 0.831988494584::T => now;
824+ 11.1216252087 => c.freq; 0.456677048766::T => now;
825+ 63.192313611 => c.freq; 0.414941060809::T => now;
826+ 70.8117365548 => c.freq; 0.683480023168::T => now;
827+ 11.8726918397 => c.freq; 0.793624056216::T => now;
828+ 0.227435035027 => c.freq; 0.795274313973::T => now;
829+ 78.8258726865 => c.freq; 0.89977706362::T => now;
830+ 75.3953927236 => c.freq; 0.50419306911::T => now;
831+ 53.7793462322 => c.freq; 0.904964444807::T => now;
832+ 74.6139240207 => c.freq; 0.627504824646::T => now;
833+ 46.0229529242 => c.freq; 0.386795482629::T => now;
834+ 97.4618201641 => c.freq; 0.551785220336::T => now;
835+ 71.2430511367 => c.freq; 0.652566291244::T => now;
836+ 78.9783283426 => c.freq; 0.39849532234::T => now;
837+ 57.1853249164 => c.freq; 0.248145295694::T => now;
838+ 15.5804212259 => c.freq; 0.754479708933::T => now;
839+ 78.9535985919 => c.freq; 0.917898205013::T => now;
840+ 15.9252905472 => c.freq; 0.111226719804::T => now;
841+ 90.7719737104 => c.freq; 0.171612882353::T => now;
842+ 89.6215593472 => c.freq; 0.954233201187::T => now;
843+ 60.6393432988 => c.freq; 0.0922913408693::T => now;
844+ 26.7251858167 => c.freq; 0.748085014754::T => now;
845+ 92.7872058692 => c.freq; 0.457232704819::T => now;
846+ 32.8926942833 => c.freq; 0.706104549223::T => now;
847+ 2.23384712963 => c.freq; 0.140670638553::T => now;
848+ 89.3238581039 => c.freq; 0.282045775408::T => now;
849+ 62.4446636853 => c.freq; 0.355272011789::T => now;
850+ 19.5011717798 => c.freq; 0.488174762859::T => now;
851+ 61.9972647793 => c.freq; 0.215772789394::T => now;
852+ 45.7055902411 => c.freq; 0.532483212703::T => now;
853+ 83.1988494584 => c.freq; 0.0839420479412::T => now;
854+ 45.6677048766 => c.freq; 0.941412601813::T => now;
855+ 41.4941060809 => c.freq; 0.227259402831::T => now;
856+ 68.3480023168 => c.freq; 0.3762738641::T => now;
857+ 79.3624056216 => c.freq; 0.247410864394::T => now;
858+ 79.5274313973 => c.freq; 0.168648990013::T => now;
859+ 89.977706362 => c.freq; 0.152290558426::T => now;
860+ 50.419306911 => c.freq; 0.428376834284::T => now;
861+ 90.4964444807 => c.freq; 0.959000618294::T => now;
862+ 62.7504824646 => c.freq; 0.541929651177::T => now;
863+ 38.6795482629 => c.freq; 0.648711461939::T => now;
864+ 55.1785220336 => c.freq; 0.633880569387::T => now;
865+ 65.2566291244 => c.freq; 0.975678729336::T => now;
866+ 39.849532234 => c.freq; 0.422085567862::T => now;
867+ 24.8145295694 => c.freq; 0.760981450326::T => now;
868+ 75.4479708933 => c.freq; 0.855190887724::T => now;
869+ 91.7898205013 => c.freq; 0.198462895415::T => now;
870+ 11.1226719804 => c.freq; 0.45295319112::T => now;
871+ 17.1612882353 => c.freq; 0.111216252087::T => now;
872+ 95.4233201187 => c.freq; 0.63192313611::T => now;
873+ 9.22913408693 => c.freq; 0.708117365548::T => now;
874+ 74.8085014754 => c.freq; 0.118726918397::T => now;
875+ 45.7232704819 => c.freq; 0.00227435035027::T => now;
876+ 70.6104549223 => c.freq; 0.788258726865::T => now;
877+ 14.0670638553 => c.freq; 0.753953927236::T => now;
878+ 28.2045775408 => c.freq; 0.537793462322::T => now;
879+ 35.5272011789 => c.freq; 0.746139240207::T => now;
880+ 48.8174762859 => c.freq; 0.460229529242::T => now;
881+ 21.5772789394 => c.freq; 0.974618201641::T => now;
882+ 53.2483212703 => c.freq; 0.712430511367::T => now;
883+ 8.39420479412 => c.freq; 0.789783283426::T => now;
884+ 94.1412601813 => c.freq; 0.571853249164::T => now;
885+ 22.7259402831 => c.freq; 0.155804212259::T => now;
886+ 37.62738641 => c.freq; 0.789535985919::T => now;
887+ 24.7410864394 => c.freq; 0.159252905472::T => now;
888+ 16.8648990013 => c.freq; 0.907719737104::T => now;
889+ 28.9079990034 => c.freq; 0.896215593472::T => now;
890+ 60.4867532489 => c.freq; 0.606393432988::T => now;
891+ 53.9949091227 => c.freq; 0.267251858167::T => now;
892+ 58.5674922482 => c.freq; 0.927872058692::T => now;
893+ 75.3412338585 => c.freq; 0.328926942833::T => now;
894+ 61.1770871374 => c.freq; 0.0223384712963::T => now;
895+ 1.44097785444 => c.freq; 0.893238581039::T => now;
896+ 51.0561990819 => c.freq; 0.624446636853::T => now;
897+ 58.2684359741 => c.freq; 0.195011717798::T => now;
898+ 30.6552411327 => c.freq; 0.619972647793::T => now;
899+ 68.7118926494 => c.freq; 0.457055902411::T => now;
900+ 30.825387103 => c.freq; 0.831988494584::T => now;
901+ 13.7376567337 => c.freq; 0.456677048766::T => now;
902+ 87.5865705461 => c.freq; 0.414941060809::T => now;
903+ 10.9963381301 => c.freq; 0.683480023168::T => now;
904+ 84.9345785496 => c.freq; 0.793624056216::T => now;
905+ 53.3746088305 => c.freq; 0.795274313973::T => now;
906+ 70.3579325877 => c.freq; 0.89977706362::T => now;
907+ 11.2994663847 => c.freq; 0.50419306911::T => now;
908+ 95.9606211012 => c.freq; 0.904964444807::T => now;
909+ 5.74823778088 => c.freq; 0.627504824646::T => now;
910+ 28.757113591 => c.freq; 0.386795482629::T => now;
911+ 32.1191964371 => c.freq; 0.551785220336::T => now;
912+ 15.2290558426 => c.freq; 0.652566291244::T => now;
913+ 42.8376834284 => c.freq; 0.39849532234::T => now;
914+ 95.9000618294 => c.freq; 0.248145295694::T => now;
915+ 54.1929651177 => c.freq; 0.754479708933::T => now;
916+ 64.8711461939 => c.freq; 0.917898205013::T => now;
917+ 63.3880569387 => c.freq; 0.111226719804::T => now;
918+ 97.5678729336 => c.freq; 0.171612882353::T => now;
919+ 42.2085567862 => c.freq; 0.954233201187::T => now;
920+ 76.0981450326 => c.freq; 0.0922913408693::T => now;
921+ 85.5190887724 => c.freq; 0.748085014754::T => now;
922+ 19.8462895415 => c.freq; 0.457232704819::T => now;
923+ 45.295319112 => c.freq; 0.706104549223::T => now;
924+ 11.1216252087 => c.freq; 0.140670638553::T => now;
925+ 63.192313611 => c.freq; 0.282045775408::T => now;
926+ 70.8117365548 => c.freq; 0.355272011789::T => now;
927+ 11.8726918397 => c.freq; 0.488174762859::T => now;
928+ 0.227435035027 => c.freq; 0.215772789394::T => now;
929+ 78.8258726865 => c.freq; 0.532483212703::T => now;
930+ 75.3953927236 => c.freq; 0.0839420479412::T => now;
931+ 53.7793462322 => c.freq; 0.941412601813::T => now;
932+ 74.6139240207 => c.freq; 0.227259402831::T => now;
933+ 46.0229529242 => c.freq; 0.3762738641::T => now;
934+ 97.4618201641 => c.freq; 0.247410864394::T => now;
935+ 71.2430511367 => c.freq; 0.168648990013::T => now;
936+ 78.9783283426 => c.freq; 0.152290558426::T => now;
937+ 57.1853249164 => c.freq; 0.428376834284::T => now;
938+ 15.5804212259 => c.freq; 0.959000618294::T => now;
939+ 78.9535985919 => c.freq; 0.541929651177::T => now;
940+ 15.9252905472 => c.freq; 0.648711461939::T => now;
941+ 90.7719737104 => c.freq; 0.633880569387::T => now;
942+ 89.6215593472 => c.freq; 0.975678729336::T => now;
943+ 60.6393432988 => c.freq; 0.422085567862::T => now;
944+ 26.7251858167 => c.freq; 0.760981450326::T => now;
945+ 92.7872058692 => c.freq; 0.855190887724::T => now;
946+ 32.8926942833 => c.freq; 0.198462895415::T => now;
947+ 2.23384712963 => c.freq; 0.45295319112::T => now;
948+ 89.3238581039 => c.freq; 0.111216252087::T => now;
949+ 62.4446636853 => c.freq; 0.63192313611::T => now;
950+ 19.5011717798 => c.freq; 0.708117365548::T => now;
951+ 61.9972647793 => c.freq; 0.118726918397::T => now;
952+ 45.7055902411 => c.freq; 0.00227435035027::T => now;
953+ 83.1988494584 => c.freq; 0.788258726865::T => now;
954+ 45.6677048766 => c.freq; 0.753953927236::T => now;
955+ 41.4941060809 => c.freq; 0.537793462322::T => now;
956+ 68.3480023168 => c.freq; 0.746139240207::T => now;
957+ 79.3624056216 => c.freq; 0.460229529242::T => now;
958+ 79.5274313973 => c.freq; 0.974618201641::T => now;
959+ 89.977706362 => c.freq; 0.712430511367::T => now;
960+ 50.419306911 => c.freq; 0.789783283426::T => now;
961+ 90.4964444807 => c.freq; 0.571853249164::T => now;
962+ 62.7504824646 => c.freq; 0.155804212259::T => now;
963+ 38.6795482629 => c.freq; 0.789535985919::T => now;
964+ 55.1785220336 => c.freq; 0.159252905472::T => now;
965+ 65.2566291244 => c.freq; 0.907719737104::T => now;
966+ 39.849532234 => c.freq; 0.896215593472::T => now;
967+ 24.8145295694 => c.freq; 0.606393432988::T => now;
968+ 75.4479708933 => c.freq; 0.267251858167::T => now;
969+ 91.7898205013 => c.freq; 0.927872058692::T => now;
970+ 11.1226719804 => c.freq; 0.328926942833::T => now;
971+ 17.1612882353 => c.freq; 0.0223384712963::T => now;
972+ 95.4233201187 => c.freq; 0.893238581039::T => now;
973+ 9.22913408693 => c.freq; 0.624446636853::T => now;
974+ 74.8085014754 => c.freq; 0.195011717798::T => now;
975+ 45.7232704819 => c.freq; 0.619972647793::T => now;
976+ 70.6104549223 => c.freq; 0.457055902411::T => now;
977+ 14.0670638553 => c.freq; 0.831988494584::T => now;
978+ 28.2045775408 => c.freq; 0.456677048766::T => now;
979+ 35.5272011789 => c.freq; 0.414941060809::T => now;
980+ 48.8174762859 => c.freq; 0.683480023168::T => now;
981+ 21.5772789394 => c.freq; 0.793624056216::T => now;
982+ 53.2483212703 => c.freq; 0.795274313973::T => now;
983+ 8.39420479412 => c.freq; 0.89977706362::T => now;
984+ 94.1412601813 => c.freq; 0.50419306911::T => now;
985+ 22.7259402831 => c.freq; 0.904964444807::T => now;
986+ 37.62738641 => c.freq; 0.627504824646::T => now;
987+ 24.7410864394 => c.freq; 0.386795482629::T => now;
988+ 16.8648990013 => c.freq; 0.551785220336::T => now;
989+ 28.9079990034 => c.freq; 0.652566291244::T => now;
990+ 60.4867532489 => c.freq; 0.39849532234::T => now;
991+ 53.9949091227 => c.freq; 0.248145295694::T => now;
992+ 58.5674922482 => c.freq; 0.754479708933::T => now;
993+ 75.3412338585 => c.freq; 0.917898205013::T => now;
994+ 61.1770871374 => c.freq; 0.111226719804::T => now;
995+ 1.44097785444 => c.freq; 0.171612882353::T => now;
996+ 51.0561990819 => c.freq; 0.954233201187::T => now;
997+ 58.2684359741 => c.freq; 0.0922913408693::T => now;
998+ 30.6552411327 => c.freq; 0.748085014754::T => now;
999+ 68.7118926494 => c.freq; 0.457232704819::T => now;
1000+ 30.825387103 => c.freq; 0.706104549223::T => now;
1001+ 13.7376567337 => c.freq; 0.140670638553::T => now;
1002+ 87.5865705461 => c.freq; 0.282045775408::T => now;
1003+ 10.9963381301 => c.freq; 0.355272011789::T => now;
1004+ 84.9345785496 => c.freq; 0.488174762859::T => now;
1005+ 53.3746088305 => c.freq; 0.215772789394::T => now;
1006+ 70.3579325877 => c.freq; 0.532483212703::T => now;
1007+ 11.2994663847 => c.freq; 0.0839420479412::T => now;
1008+ 95.9606211012 => c.freq; 0.941412601813::T => now;
1009+ 5.74823778088 => c.freq; 0.227259402831::T => now;
1010+ 28.757113591 => c.freq; 0.3762738641::T => now;
1011+ 32.1191964371 => c.freq; 0.247410864394::T => now;
1012+ 15.2290558426 => c.freq; 0.168648990013::T => now;
1013+ 42.8376834284 => c.freq; 0.152290558426::T => now;
1014+ 95.9000618294 => c.freq; 0.428376834284::T => now;
1015+ 54.1929651177 => c.freq; 0.959000618294::T => now;
1016+ 64.8711461939 => c.freq; 0.541929651177::T => now;
1017+ 63.3880569387 => c.freq; 0.648711461939::T => now;
1018+ 97.5678729336 => c.freq; 0.633880569387::T => now;
1019+ 42.2085567862 => c.freq; 0.975678729336::T => now;
1020+ 76.0981450326 => c.freq; 0.422085567862::T => now;
1021+ 85.5190887724 => c.freq; 0.760981450326::T => now;
1022+ 19.8462895415 => c.freq; 0.855190887724::T => now;
1023+ 45.295319112 => c.freq; 0.198462895415::T => now;
1024+ 11.1216252087 => c.freq; 0.45295319112::T => now;
1025+ 63.192313611 => c.freq; 0.111216252087::T => now;
1026+ 70.8117365548 => c.freq; 0.63192313611::T => now;
1027+ 11.8726918397 => c.freq; 0.708117365548::T => now;
1028+ 0.227435035027 => c.freq; 0.118726918397::T => now;
1029+ 78.8258726865 => c.freq; 0.00227435035027::T => now;
1030+ 75.3953927236 => c.freq; 0.788258726865::T => now;
1031+ 53.7793462322 => c.freq; 0.753953927236::T => now;
1032+ 74.6139240207 => c.freq; 0.537793462322::T => now;
1033+ 46.0229529242 => c.freq; 0.746139240207::T => now;
1034+ 97.4618201641 => c.freq; 0.460229529242::T => now;
1035+ 71.2430511367 => c.freq; 0.974618201641::T => now;
1036+ 78.9783283426 => c.freq; 0.712430511367::T => now;
1037+ 57.1853249164 => c.freq; 0.789783283426::T => now;
1038+ 15.5804212259 => c.freq; 0.571853249164::T => now;
1039+ 78.9535985919 => c.freq; 0.155804212259::T => now;
1040+ 15.9252905472 => c.freq; 0.789535985919::T => now;
1041+ 90.7719737104 => c.freq; 0.159252905472::T => now;
1042+ 89.6215593472 => c.freq; 0.907719737104::T => now;
1043+ 60.6393432988 => c.freq; 0.896215593472::T => now;
1044+ 26.7251858167 => c.freq; 0.606393432988::T => now;
1045+ 92.7872058692 => c.freq; 0.267251858167::T => now;
1046+ 32.8926942833 => c.freq; 0.927872058692::T => now;
1047+ 2.23384712963 => c.freq; 0.328926942833::T => now;
1048+ 89.3238581039 => c.freq; 0.0223384712963::T => now;
1049+ 62.4446636853 => c.freq; 0.893238581039::T => now;
1050+ 19.5011717798 => c.freq; 0.624446636853::T => now;
1051+ 61.9972647793 => c.freq; 0.195011717798::T => now;
1052+ 45.7055902411 => c.freq; 0.619972647793::T => now;
1053+ 83.1988494584 => c.freq; 0.457055902411::T => now;
1054+ 45.6677048766 => c.freq; 0.831988494584::T => now;
1055+ 41.4941060809 => c.freq; 0.456677048766::T => now;
1056+ 68.3480023168 => c.freq; 0.414941060809::T => now;
1057+ 79.3624056216 => c.freq; 0.683480023168::T => now;
1058+ 79.5274313973 => c.freq; 0.793624056216::T => now;
1059+ 89.977706362 => c.freq; 0.795274313973::T => now;
1060+ 50.419306911 => c.freq; 0.89977706362::T => now;
1061+ 90.4964444807 => c.freq; 0.50419306911::T => now;
1062+ 62.7504824646 => c.freq; 0.904964444807::T => now;
1063+ 38.6795482629 => c.freq; 0.627504824646::T => now;
1064+ 55.1785220336 => c.freq; 0.386795482629::T => now;
1065+ 65.2566291244 => c.freq; 0.551785220336::T => now;
1066+ 39.849532234 => c.freq; 0.652566291244::T => now;
1067+ 24.8145295694 => c.freq; 0.39849532234::T => now;
1068+ 75.4479708933 => c.freq; 0.248145295694::T => now;
1069+ 91.7898205013 => c.freq; 0.754479708933::T => now;
1070+ 11.1226719804 => c.freq; 0.917898205013::T => now;
1071+ 17.1612882353 => c.freq; 0.111226719804::T => now;
1072+ 95.4233201187 => c.freq; 0.171612882353::T => now;
1073+ 9.22913408693 => c.freq; 0.954233201187::T => now;
1074+ 74.8085014754 => c.freq; 0.0922913408693::T => now;
1075+ 45.7232704819 => c.freq; 0.748085014754::T => now;
1076+ 70.6104549223 => c.freq; 0.457232704819::T => now;
1077+ 14.0670638553 => c.freq; 0.706104549223::T => now;
1078+ 28.2045775408 => c.freq; 0.140670638553::T => now;
1079+ 35.5272011789 => c.freq; 0.282045775408::T => now;
1080+ 48.8174762859 => c.freq; 0.355272011789::T => now;
1081+ 21.5772789394 => c.freq; 0.488174762859::T => now;
1082+ 53.2483212703 => c.freq; 0.215772789394::T => now;
1083+ 8.39420479412 => c.freq; 0.532483212703::T => now;
1084+ 94.1412601813 => c.freq; 0.0839420479412::T => now;
1085+ 22.7259402831 => c.freq; 0.941412601813::T => now;
1086+ 37.62738641 => c.freq; 0.227259402831::T => now;
1087+ 24.7410864394 => c.freq; 0.3762738641::T => now;
1088+ 16.8648990013 => c.freq; 0.247410864394::T => now;
1089+ 28.9079990034 => c.freq; 0.168648990013::T => now;
1090+ 60.4867532489 => c.freq; 0.152290558426::T => now;
1091+ 53.9949091227 => c.freq; 0.428376834284::T => now;
1092+ 58.5674922482 => c.freq; 0.959000618294::T => now;
1093+ 75.3412338585 => c.freq; 0.541929651177::T => now;
1094+ 61.1770871374 => c.freq; 0.648711461939::T => now;
1095+ 1.44097785444 => c.freq; 0.633880569387::T => now;
1096+ 51.0561990819 => c.freq; 0.975678729336::T => now;
1097+ 58.2684359741 => c.freq; 0.422085567862::T => now;
1098+ 30.6552411327 => c.freq; 0.760981450326::T => now;
1099+ 68.7118926494 => c.freq; 0.855190887724::T => now;
1100+ 30.825387103 => c.freq; 0.198462895415::T => now;
1101+ 13.7376567337 => c.freq; 0.45295319112::T => now;
1102+ 87.5865705461 => c.freq; 0.111216252087::T => now;
1103+ 10.9963381301 => c.freq; 0.63192313611::T => now;
1104+ 84.9345785496 => c.freq; 0.708117365548::T => now;
1105+ 53.3746088305 => c.freq; 0.118726918397::T => now;
1106+ 70.3579325877 => c.freq; 0.00227435035027::T => now;
1107+ 11.2994663847 => c.freq; 0.788258726865::T => now;
1108+ 95.9606211012 => c.freq; 0.753953927236::T => now;
1109+ 5.74823778088 => c.freq; 0.537793462322::T => now;
1110+ 28.757113591 => c.freq; 0.746139240207::T => now;
1111+ 32.1191964371 => c.freq; 0.460229529242::T => now;
1112+ 15.2290558426 => c.freq; 0.974618201641::T => now;
1113+ 42.8376834284 => c.freq; 0.712430511367::T => now;
1114+ 95.9000618294 => c.freq; 0.789783283426::T => now;
1115+ 54.1929651177 => c.freq; 0.571853249164::T => now;
1116+ 64.8711461939 => c.freq; 0.155804212259::T => now;
1117+ 63.3880569387 => c.freq; 0.789535985919::T => now;
1118+ 97.5678729336 => c.freq; 0.159252905472::T => now;
1119+ 42.2085567862 => c.freq; 0.907719737104::T => now;
1120+ 76.0981450326 => c.freq; 0.896215593472::T => now;
1121+ 85.5190887724 => c.freq; 0.606393432988::T => now;
1122+ 19.8462895415 => c.freq; 0.267251858167::T => now;
1123+ 45.295319112 => c.freq; 0.927872058692::T => now;
1124+ 11.1216252087 => c.freq; 0.328926942833::T => now;
1125+ 63.192313611 => c.freq; 0.0223384712963::T => now;
1126+ 70.8117365548 => c.freq; 0.893238581039::T => now;
1127+ 11.8726918397 => c.freq; 0.624446636853::T => now;
1128+ 0.227435035027 => c.freq; 0.195011717798::T => now;
1129+ 78.8258726865 => c.freq; 0.619972647793::T => now;
1130+ 75.3953927236 => c.freq; 0.457055902411::T => now;
1131+ 53.7793462322 => c.freq; 0.831988494584::T => now;
1132+ 74.6139240207 => c.freq; 0.456677048766::T => now;
1133+ 46.0229529242 => c.freq; 0.414941060809::T => now;
1134+ 97.4618201641 => c.freq; 0.683480023168::T => now;
1135+ 71.2430511367 => c.freq; 0.793624056216::T => now;
1136+ 78.9783283426 => c.freq; 0.795274313973::T => now;
1137+ 57.1853249164 => c.freq; 0.89977706362::T => now;
1138+ 15.5804212259 => c.freq; 0.50419306911::T => now;
1139+ 78.9535985919 => c.freq; 0.904964444807::T => now;
1140+ 15.9252905472 => c.freq; 0.627504824646::T => now;
1141+ 90.7719737104 => c.freq; 0.386795482629::T => now;
1142+ 89.6215593472 => c.freq; 0.551785220336::T => now;
1143+ 60.6393432988 => c.freq; 0.652566291244::T => now;
1144+ 26.7251858167 => c.freq; 0.39849532234::T => now;
1145+ 92.7872058692 => c.freq; 0.248145295694::T => now;
1146+ 32.8926942833 => c.freq; 0.754479708933::T => now;
1147+ 2.23384712963 => c.freq; 0.917898205013::T => now;
1148+ 89.3238581039 => c.freq; 0.111226719804::T => now;
1149+ 62.4446636853 => c.freq; 0.171612882353::T => now;
1150+ 19.5011717798 => c.freq; 0.954233201187::T => now;
1151+ 61.9972647793 => c.freq; 0.0922913408693::T => now;
1152+ 45.7055902411 => c.freq; 0.748085014754::T => now;
1153+ 83.1988494584 => c.freq; 0.457232704819::T => now;
1154+ 45.6677048766 => c.freq; 0.706104549223::T => now;
1155+ 41.4941060809 => c.freq; 0.140670638553::T => now;
1156+ 68.3480023168 => c.freq; 0.282045775408::T => now;
1157+ 79.3624056216 => c.freq; 0.355272011789::T => now;
1158+ 79.5274313973 => c.freq; 0.488174762859::T => now;
1159+ 89.977706362 => c.freq; 0.215772789394::T => now;
1160+ 50.419306911 => c.freq; 0.532483212703::T => now;
1161+ 90.4964444807 => c.freq; 0.0839420479412::T => now;
1162+ 62.7504824646 => c.freq; 0.941412601813::T => now;
1163+ 38.6795482629 => c.freq; 0.227259402831::T => now;
1164+ 55.1785220336 => c.freq; 0.3762738641::T => now;
1165+ 65.2566291244 => c.freq; 0.247410864394::T => now;
1166+ 39.849532234 => c.freq; 0.168648990013::T => now;
1167+ 24.8145295694 => c.freq; 0.152290558426::T => now;
1168+ 75.4479708933 => c.freq; 0.428376834284::T => now;
1169+ 91.7898205013 => c.freq; 0.959000618294::T => now;
1170+ 11.1226719804 => c.freq; 0.541929651177::T => now;
1171+ 17.1612882353 => c.freq; 0.648711461939::T => now;
1172+ 95.4233201187 => c.freq; 0.633880569387::T => now;
1173+ 9.22913408693 => c.freq; 0.975678729336::T => now;
1174+ 74.8085014754 => c.freq; 0.422085567862::T => now;
1175+ 45.7232704819 => c.freq; 0.760981450326::T => now;
1176+ 70.6104549223 => c.freq; 0.855190887724::T => now;
1177+ 14.0670638553 => c.freq; 0.198462895415::T => now;
1178+ 28.2045775408 => c.freq; 0.45295319112::T => now;
1179+ 35.5272011789 => c.freq; 0.111216252087::T => now;
1180+ 48.8174762859 => c.freq; 0.63192313611::T => now;
1181+ 21.5772789394 => c.freq; 0.708117365548::T => now;
1182+ 53.2483212703 => c.freq; 0.118726918397::T => now;
1183+ 8.39420479412 => c.freq; 0.00227435035027::T => now;
1184+ 94.1412601813 => c.freq; 0.788258726865::T => now;
1185+ 22.7259402831 => c.freq; 0.753953927236::T => now;
1186+ 37.62738641 => c.freq; 0.537793462322::T => now;
1187+ 24.7410864394 => c.freq; 0.746139240207::T => now;
1188+ 16.8648990013 => c.freq; 0.460229529242::T => now;
1189+ 28.9079990034 => c.freq; 0.974618201641::T => now;
1190+ 60.4867532489 => c.freq; 0.712430511367::T => now;
1191+ 53.9949091227 => c.freq; 0.789783283426::T => now;
1192+ 58.5674922482 => c.freq; 0.571853249164::T => now;
1193+ 75.3412338585 => c.freq; 0.155804212259::T => now;
1194+ 61.1770871374 => c.freq; 0.789535985919::T => now;
1195+ 1.44097785444 => c.freq; 0.159252905472::T => now;
1196+ 51.0561990819 => c.freq; 0.907719737104::T => now;
1197+ 58.2684359741 => c.freq; 0.896215593472::T => now;
1198+ 30.6552411327 => c.freq; 0.606393432988::T => now;
1199+ 68.7118926494 => c.freq; 0.267251858167::T => now;
1200+ 30.825387103 => c.freq; 0.927872058692::T => now;
1201+ 13.7376567337 => c.freq; 0.328926942833::T => now;
1202+ 87.5865705461 => c.freq; 0.0223384712963::T => now;
1203+ 10.9963381301 => c.freq; 0.893238581039::T => now;
1204+ 84.9345785496 => c.freq; 0.624446636853::T => now;
1205+ 53.3746088305 => c.freq; 0.195011717798::T => now;
1206+ 70.3579325877 => c.freq; 0.619972647793::T => now;
1207+ 11.2994663847 => c.freq; 0.457055902411::T => now;
1208+ 95.9606211012 => c.freq; 0.831988494584::T => now;
1209+ 5.74823778088 => c.freq; 0.456677048766::T => now;
1210+ 28.757113591 => c.freq; 0.414941060809::T => now;
1211+ 32.1191964371 => c.freq; 0.683480023168::T => now;
1212+ 15.2290558426 => c.freq; 0.793624056216::T => now;
1213+ 42.8376834284 => c.freq; 0.795274313973::T => now;
1214+ 95.9000618294 => c.freq; 0.89977706362::T => now;
1215+ 54.1929651177 => c.freq; 0.50419306911::T => now;
1216+ 64.8711461939 => c.freq; 0.904964444807::T => now;
1217+ 63.3880569387 => c.freq; 0.627504824646::T => now;
1218+ 97.5678729336 => c.freq; 0.386795482629::T => now;
1219+ 42.2085567862 => c.freq; 0.551785220336::T => now;
1220+ 76.0981450326 => c.freq; 0.652566291244::T => now;
1221+ 85.5190887724 => c.freq; 0.39849532234::T => now;
1222+ 19.8462895415 => c.freq; 0.248145295694::T => now;
1223+ 45.295319112 => c.freq; 0.754479708933::T => now;
1224+ 11.1216252087 => c.freq; 0.917898205013::T => now;
1225+ 63.192313611 => c.freq; 0.111226719804::T => now;
1226+ 70.8117365548 => c.freq; 0.171612882353::T => now;
1227+ 11.8726918397 => c.freq; 0.954233201187::T => now;
1228+ 0.227435035027 => c.freq; 0.0922913408693::T => now;
1229+ 78.8258726865 => c.freq; 0.748085014754::T => now;
1230+ 75.3953927236 => c.freq; 0.457232704819::T => now;
1231+ 53.7793462322 => c.freq; 0.706104549223::T => now;
1232+ 74.6139240207 => c.freq; 0.140670638553::T => now;
1233+ 46.0229529242 => c.freq; 0.282045775408::T => now;
1234+ 97.4618201641 => c.freq; 0.355272011789::T => now;
1235+ 71.2430511367 => c.freq; 0.488174762859::T => now;
1236+ 78.9783283426 => c.freq; 0.215772789394::T => now;
1237+ 57.1853249164 => c.freq; 0.532483212703::T => now;
1238+ 15.5804212259 => c.freq; 0.0839420479412::T => now;
1239+ 78.9535985919 => c.freq; 0.941412601813::T => now;
1240+ 15.9252905472 => c.freq; 0.227259402831::T => now;
1241+ 90.7719737104 => c.freq; 0.3762738641::T => now;
1242+ 89.6215593472 => c.freq; 0.247410864394::T => now;
1243+ 60.6393432988 => c.freq; 0.168648990013::T => now;
1244+ 26.7251858167 => c.freq; 0.152290558426::T => now;
1245+ 92.7872058692 => c.freq; 0.428376834284::T => now;
1246+ 32.8926942833 => c.freq; 0.959000618294::T => now;
1247+ 2.23384712963 => c.freq; 0.541929651177::T => now;
1248+ 89.3238581039 => c.freq; 0.648711461939::T => now;
1249+ 62.4446636853 => c.freq; 0.633880569387::T => now;
1250+ 19.5011717798 => c.freq; 0.975678729336::T => now;
1251+ 61.9972647793 => c.freq; 0.422085567862::T => now;
1252+ 45.7055902411 => c.freq; 0.760981450326::T => now;
1253+ 83.1988494584 => c.freq; 0.855190887724::T => now;
1254+ 45.6677048766 => c.freq; 0.198462895415::T => now;
1255+ 41.4941060809 => c.freq; 0.45295319112::T => now;
1256+ 68.3480023168 => c.freq; 0.111216252087::T => now;
1257+ 79.3624056216 => c.freq; 0.63192313611::T => now;
1258+ 79.5274313973 => c.freq; 0.708117365548::T => now;
1259+ 89.977706362 => c.freq; 0.118726918397::T => now;
1260+ 50.419306911 => c.freq; 0.00227435035027::T => now;
1261+ 90.4964444807 => c.freq; 0.788258726865::T => now;
1262+ 62.7504824646 => c.freq; 0.753953927236::T => now;
1263+ 38.6795482629 => c.freq; 0.537793462322::T => now;
1264+ 55.1785220336 => c.freq; 0.746139240207::T => now;
1265+ 65.2566291244 => c.freq; 0.460229529242::T => now;
1266+ 39.849532234 => c.freq; 0.974618201641::T => now;
1267+ 24.8145295694 => c.freq; 0.712430511367::T => now;
1268+ 75.4479708933 => c.freq; 0.789783283426::T => now;
1269+ 91.7898205013 => c.freq; 0.571853249164::T => now;
1270+ 11.1226719804 => c.freq; 0.155804212259::T => now;
1271+ 17.1612882353 => c.freq; 0.789535985919::T => now;
1272+ 95.4233201187 => c.freq; 0.159252905472::T => now;
1273+ 9.22913408693 => c.freq; 0.907719737104::T => now;
1274+ 74.8085014754 => c.freq; 0.896215593472::T => now;
1275+ 45.7232704819 => c.freq; 0.606393432988::T => now;
1276+ 70.6104549223 => c.freq; 0.267251858167::T => now;
1277+ 14.0670638553 => c.freq; 0.927872058692::T => now;
1278+ 28.2045775408 => c.freq; 0.328926942833::T => now;
1279+ 35.5272011789 => c.freq; 0.0223384712963::T => now;
1280+ 48.8174762859 => c.freq; 0.893238581039::T => now;
1281+ 21.5772789394 => c.freq; 0.624446636853::T => now;
1282+ 53.2483212703 => c.freq; 0.195011717798::T => now;
1283+ 8.39420479412 => c.freq; 0.619972647793::T => now;
1284+ 94.1412601813 => c.freq; 0.457055902411::T => now;
1285+ 22.7259402831 => c.freq; 0.831988494584::T => now;
1286+ 37.62738641 => c.freq; 0.456677048766::T => now;
1287+ 24.7410864394 => c.freq; 0.414941060809::T => now;
1288+ 16.8648990013 => c.freq; 0.683480023168::T => now;
1289+ 28.9079990034 => c.freq; 0.793624056216::T => now;
1290+ 60.4867532489 => c.freq; 0.795274313973::T => now;
1291+ 53.9949091227 => c.freq; 0.89977706362::T => now;
1292+ 58.5674922482 => c.freq; 0.50419306911::T => now;
1293+ 75.3412338585 => c.freq; 0.904964444807::T => now;
1294+ 61.1770871374 => c.freq; 0.627504824646::T => now;
1295+ 1.44097785444 => c.freq; 0.386795482629::T => now;
1296+ 51.0561990819 => c.freq; 0.551785220336::T => now;
1297+ 58.2684359741 => c.freq; 0.652566291244::T => now;
1298+ 30.6552411327 => c.freq; 0.39849532234::T => now;
1299+ 68.7118926494 => c.freq; 0.248145295694::T => now;
1300+ 30.825387103 => c.freq; 0.754479708933::T => now;
1301+ 13.7376567337 => c.freq; 0.917898205013::T => now;
1302+ 87.5865705461 => c.freq; 0.111226719804::T => now;
1303+ 10.9963381301 => c.freq; 0.171612882353::T => now;
1304+ 84.9345785496 => c.freq; 0.954233201187::T => now;
1305+ 53.3746088305 => c.freq; 0.0922913408693::T => now;
1306+ 70.3579325877 => c.freq; 0.748085014754::T => now;
1307+ 11.2994663847 => c.freq; 0.457232704819::T => now;
1308+ 95.9606211012 => c.freq; 0.706104549223::T => now;
1309+ 5.74823778088 => c.freq; 0.140670638553::T => now;
1310+ 28.757113591 => c.freq; 0.282045775408::T => now;
1311+ 32.1191964371 => c.freq; 0.355272011789::T => now;
1312+ 15.2290558426 => c.freq; 0.488174762859::T => now;
1313+ 42.8376834284 => c.freq; 0.215772789394::T => now;
1314+ 95.9000618294 => c.freq; 0.532483212703::T => now;
1315+ 54.1929651177 => c.freq; 0.0839420479412::T => now;
1316+ 64.8711461939 => c.freq; 0.941412601813::T => now;
1317+ 63.3880569387 => c.freq; 0.227259402831::T => now;
1318+ 97.5678729336 => c.freq; 0.3762738641::T => now;
1319+ 42.2085567862 => c.freq; 0.247410864394::T => now;
1320+ 76.0981450326 => c.freq; 0.168648990013::T => now;
1321+ 85.5190887724 => c.freq; 0.152290558426::T => now;
1322+ 19.8462895415 => c.freq; 0.428376834284::T => now;
1323+ 45.295319112 => c.freq; 0.959000618294::T => now;
1324+ 11.1216252087 => c.freq; 0.541929651177::T => now;
1325+ 63.192313611 => c.freq; 0.648711461939::T => now;
1326+ 70.8117365548 => c.freq; 0.633880569387::T => now;
1327+ 11.8726918397 => c.freq; 0.975678729336::T => now;
1328+ 0.227435035027 => c.freq; 0.422085567862::T => now;
1329+ 78.8258726865 => c.freq; 0.760981450326::T => now;
1330+ 75.3953927236 => c.freq; 0.855190887724::T => now;
1331+ 53.7793462322 => c.freq; 0.198462895415::T => now;
1332+ 74.6139240207 => c.freq; 0.45295319112::T => now;
1333+ 46.0229529242 => c.freq; 0.111216252087::T => now;
1334+ 97.4618201641 => c.freq; 0.63192313611::T => now;
1335+ 71.2430511367 => c.freq; 0.708117365548::T => now;
1336+ 78.9783283426 => c.freq; 0.118726918397::T => now;
1337+ 57.1853249164 => c.freq; 0.00227435035027::T => now;
1338+ 15.5804212259 => c.freq; 0.788258726865::T => now;
1339+ 78.9535985919 => c.freq; 0.753953927236::T => now;
1340+ 15.9252905472 => c.freq; 0.537793462322::T => now;
1341+ 90.7719737104 => c.freq; 0.746139240207::T => now;
1342+ 89.6215593472 => c.freq; 0.460229529242::T => now;
1343+ 60.6393432988 => c.freq; 0.974618201641::T => now;
1344+ 26.7251858167 => c.freq; 0.712430511367::T => now;
1345+ 92.7872058692 => c.freq; 0.789783283426::T => now;
1346+ 32.8926942833 => c.freq; 0.571853249164::T => now;
1347+ 2.23384712963 => c.freq; 0.155804212259::T => now;
1348+ 89.3238581039 => c.freq; 0.789535985919::T => now;
1349+ 62.4446636853 => c.freq; 0.159252905472::T => now;
1350+ 19.5011717798 => c.freq; 0.907719737104::T => now;
1351+ 61.9972647793 => c.freq; 0.896215593472::T => now;
1352+ 45.7055902411 => c.freq; 0.606393432988::T => now;
1353+ 83.1988494584 => c.freq; 0.267251858167::T => now;
1354+ 45.6677048766 => c.freq; 0.927872058692::T => now;
1355+ 41.4941060809 => c.freq; 0.328926942833::T => now;
1356+ 68.3480023168 => c.freq; 0.0223384712963::T => now;
1357+ 79.3624056216 => c.freq; 0.893238581039::T => now;
1358+ 79.5274313973 => c.freq; 0.624446636853::T => now;
1359+ 89.977706362 => c.freq; 0.195011717798::T => now;
1360+ 50.419306911 => c.freq; 0.619972647793::T => now;
1361+ 90.4964444807 => c.freq; 0.457055902411::T => now;
1362+ 62.7504824646 => c.freq; 0.831988494584::T => now;
1363+ 38.6795482629 => c.freq; 0.456677048766::T => now;
1364+ 55.1785220336 => c.freq; 0.414941060809::T => now;
1365+ 65.2566291244 => c.freq; 0.683480023168::T => now;
1366+ 39.849532234 => c.freq; 0.793624056216::T => now;
1367+ 24.8145295694 => c.freq; 0.795274313973::T => now;
1368+ 75.4479708933 => c.freq; 0.89977706362::T => now;
1369+ 91.7898205013 => c.freq; 0.50419306911::T => now;
1370+ 11.1226719804 => c.freq; 0.904964444807::T => now;
1371+ 17.1612882353 => c.freq; 0.627504824646::T => now;
1372+ 95.4233201187 => c.freq; 0.386795482629::T => now;
1373+ 9.22913408693 => c.freq; 0.551785220336::T => now;
1374+ 74.8085014754 => c.freq; 0.652566291244::T => now;
1375+ 45.7232704819 => c.freq; 0.39849532234::T => now;
1376+ 70.6104549223 => c.freq; 0.248145295694::T => now;
1377+ 14.0670638553 => c.freq; 0.754479708933::T => now;
1378+ 28.2045775408 => c.freq; 0.917898205013::T => now;
1379+ 35.5272011789 => c.freq; 0.111226719804::T => now;
1380+ 48.8174762859 => c.freq; 0.171612882353::T => now;
1381+ 21.5772789394 => c.freq; 0.954233201187::T => now;
1382+ 53.2483212703 => c.freq; 0.0922913408693::T => now;
1383+ 8.39420479412 => c.freq; 0.748085014754::T => now;
1384+ 94.1412601813 => c.freq; 0.457232704819::T => now;
1385+ 22.7259402831 => c.freq; 0.706104549223::T => now;
1386+ 37.62738641 => c.freq; 0.140670638553::T => now;
1387+ 24.7410864394 => c.freq; 0.282045775408::T => now;
1388+ 16.8648990013 => c.freq; 0.355272011789::T => now;
1389+ 28.9079990034 => c.freq; 0.488174762859::T => now;
1390+ 60.4867532489 => c.freq; 0.215772789394::T => now;
1391+ 53.9949091227 => c.freq; 0.532483212703::T => now;
1392+ 58.5674922482 => c.freq; 0.0839420479412::T => now;
1393+ 75.3412338585 => c.freq; 0.941412601813::T => now;
1394+ 61.1770871374 => c.freq; 0.227259402831::T => now;
1395+ 1.44097785444 => c.freq; 0.3762738641::T => now;
1396+ 51.0561990819 => c.freq; 0.247410864394::T => now;
1397+ 58.2684359741 => c.freq; 0.168648990013::T => now;
1398+ 30.6552411327 => c.freq; 0.152290558426::T => now;
1399+ 68.7118926494 => c.freq; 0.428376834284::T => now;
1400+ 30.825387103 => c.freq; 0.959000618294::T => now;
1401+ 13.7376567337 => c.freq; 0.541929651177::T => now;
1402+ 87.5865705461 => c.freq; 0.648711461939::T => now;
1403+ 10.9963381301 => c.freq; 0.633880569387::T => now;
1404+ 84.9345785496 => c.freq; 0.975678729336::T => now;
1405+ 53.3746088305 => c.freq; 0.422085567862::T => now;
1406+ 70.3579325877 => c.freq; 0.760981450326::T => now;
1407+ 11.2994663847 => c.freq; 0.855190887724::T => now;
1408+ 95.9606211012 => c.freq; 0.198462895415::T => now;
1409+ 5.74823778088 => c.freq; 0.45295319112::T => now;
1410+ 28.757113591 => c.freq; 0.111216252087::T => now;
1411+ 32.1191964371 => c.freq; 0.63192313611::T => now;
1412+ 15.2290558426 => c.freq; 0.708117365548::T => now;
1413+ 42.8376834284 => c.freq; 0.118726918397::T => now;
1414+ 95.9000618294 => c.freq; 0.00227435035027::T => now;
1415+ 54.1929651177 => c.freq; 0.788258726865::T => now;
1416+ 64.8711461939 => c.freq; 0.753953927236::T => now;
1417+ 63.3880569387 => c.freq; 0.537793462322::T => now;
1418+ 97.5678729336 => c.freq; 0.746139240207::T => now;
1419+ 42.2085567862 => c.freq; 0.460229529242::T => now;
1420+ 76.0981450326 => c.freq; 0.974618201641::T => now;
1421+ 85.5190887724 => c.freq; 0.712430511367::T => now;
1422+ 19.8462895415 => c.freq; 0.789783283426::T => now;
1423+ 45.295319112 => c.freq; 0.571853249164::T => now;
1424+ 11.1216252087 => c.freq; 0.155804212259::T => now;
1425+ 63.192313611 => c.freq; 0.789535985919::T => now;
1426+ 70.8117365548 => c.freq; 0.159252905472::T => now;
1427+ 11.8726918397 => c.freq; 0.907719737104::T => now;
1428+ 0.227435035027 => c.freq; 0.896215593472::T => now;
1429+ 78.8258726865 => c.freq; 0.606393432988::T => now;
1430+ 75.3953927236 => c.freq; 0.267251858167::T => now;
1431+ 53.7793462322 => c.freq; 0.927872058692::T => now;
1432+ 74.6139240207 => c.freq; 0.328926942833::T => now;
1433+ 46.0229529242 => c.freq; 0.0223384712963::T => now;
1434+ 97.4618201641 => c.freq; 0.893238581039::T => now;
1435+ 71.2430511367 => c.freq; 0.624446636853::T => now;
1436+ 78.9783283426 => c.freq; 0.195011717798::T => now;
1437+ 57.1853249164 => c.freq; 0.619972647793::T => now;
1438+ 15.5804212259 => c.freq; 0.457055902411::T => now;
1439+ 78.9535985919 => c.freq; 0.831988494584::T => now;
1440+ 15.9252905472 => c.freq; 0.456677048766::T => now;
1441+ 90.7719737104 => c.freq; 0.414941060809::T => now;
1442+ 89.6215593472 => c.freq; 0.683480023168::T => now;
1443+ 60.6393432988 => c.freq; 0.793624056216::T => now;
1444+ 26.7251858167 => c.freq; 0.795274313973::T => now;
1445+ 92.7872058692 => c.freq; 0.89977706362::T => now;
1446+ 32.8926942833 => c.freq; 0.50419306911::T => now;
1447+ 2.23384712963 => c.freq; 0.904964444807::T => now;
1448+ 89.3238581039 => c.freq; 0.627504824646::T => now;
1449+ 62.4446636853 => c.freq; 0.386795482629::T => now;
1450+ 19.5011717798 => c.freq; 0.551785220336::T => now;
1451+ 61.9972647793 => c.freq; 0.652566291244::T => now;
1452+ 45.7055902411 => c.freq; 0.39849532234::T => now;
1453+ 83.1988494584 => c.freq; 0.248145295694::T => now;
1454+ 45.6677048766 => c.freq; 0.754479708933::T => now;
1455+ 41.4941060809 => c.freq; 0.917898205013::T => now;
1456+ 68.3480023168 => c.freq; 0.111226719804::T => now;
1457+ 79.3624056216 => c.freq; 0.171612882353::T => now;
1458+ 79.5274313973 => c.freq; 0.954233201187::T => now;
1459+ 89.977706362 => c.freq; 0.0922913408693::T => now;
1460+ 50.419306911 => c.freq; 0.748085014754::T => now;
1461+ 90.4964444807 => c.freq; 0.457232704819::T => now;
1462+ 62.7504824646 => c.freq; 0.706104549223::T => now;
1463+ 38.6795482629 => c.freq; 0.140670638553::T => now;
1464+ 55.1785220336 => c.freq; 0.282045775408::T => now;
1465+ 65.2566291244 => c.freq; 0.355272011789::T => now;
1466+ 39.849532234 => c.freq; 0.488174762859::T => now;
1467+ 24.8145295694 => c.freq; 0.215772789394::T => now;
1468+ 75.4479708933 => c.freq; 0.532483212703::T => now;
1469+ 91.7898205013 => c.freq; 0.0839420479412::T => now;
1470+ 11.1226719804 => c.freq; 0.941412601813::T => now;
1471+ 17.1612882353 => c.freq; 0.227259402831::T => now;
1472+ 95.4233201187 => c.freq; 0.3762738641::T => now;
1473+ 9.22913408693 => c.freq; 0.247410864394::T => now;
1474+ 74.8085014754 => c.freq; 0.168648990013::T => now;
1475+ 45.7232704819 => c.freq; 0.152290558426::T => now;
1476+ 70.6104549223 => c.freq; 0.428376834284::T => now;
1477+ 14.0670638553 => c.freq; 0.959000618294::T => now;
1478+ 28.2045775408 => c.freq; 0.541929651177::T => now;
1479+ 35.5272011789 => c.freq; 0.648711461939::T => now;
1480+ 48.8174762859 => c.freq; 0.633880569387::T => now;
1481+ 21.5772789394 => c.freq; 0.975678729336::T => now;
1482+ 53.2483212703 => c.freq; 0.422085567862::T => now;
1483+ 8.39420479412 => c.freq; 0.760981450326::T => now;
1484+ 94.1412601813 => c.freq; 0.855190887724::T => now;
1485+ 22.7259402831 => c.freq; 0.198462895415::T => now;
1486+ 37.62738641 => c.freq; 0.45295319112::T => now;
1487+ 24.7410864394 => c.freq; 0.111216252087::T => now;
1488+ 16.8648990013 => c.freq; 0.63192313611::T => now;
1489+ 28.9079990034 => c.freq; 0.708117365548::T => now;
1490+ 60.4867532489 => c.freq; 0.118726918397::T => now;
1491+ 53.9949091227 => c.freq; 0.00227435035027::T => now;
1492+ 58.5674922482 => c.freq; 0.788258726865::T => now;
1493+ 75.3412338585 => c.freq; 0.753953927236::T => now;
1494+ 61.1770871374 => c.freq; 0.537793462322::T => now;
1495+ 1.44097785444 => c.freq; 0.746139240207::T => now;
1496+ 51.0561990819 => c.freq; 0.460229529242::T => now;
1497+ 58.2684359741 => c.freq; 0.974618201641::T => now;
1498+ 30.6552411327 => c.freq; 0.712430511367::T => now;
1499+ 68.7118926494 => c.freq; 0.789783283426::T => now;
1500+ 30.825387103 => c.freq; 0.571853249164::T => now;
1501+ 13.7376567337 => c.freq; 0.155804212259::T => now;
1502+ 87.5865705461 => c.freq; 0.789535985919::T => now;
1503+ 10.9963381301 => c.freq; 0.159252905472::T => now;
1504+ 84.9345785496 => c.freq; 0.907719737104::T => now;
1505+ 53.3746088305 => c.freq; 0.896215593472::T => now;
1506+ 70.3579325877 => c.freq; 0.606393432988::T => now;
1507+ 11.2994663847 => c.freq; 0.267251858167::T => now;
1508+ 95.9606211012 => c.freq; 0.927872058692::T => now;
1509+ 5.74823778088 => c.freq; 0.328926942833::T => now;
1510+ 28.757113591 => c.freq; 0.0223384712963::T => now;
1511+ 32.1191964371 => c.freq; 0.893238581039::T => now;
1512+ 15.2290558426 => c.freq; 0.624446636853::T => now;
1513+ 42.8376834284 => c.freq; 0.195011717798::T => now;
1514+ 95.9000618294 => c.freq; 0.619972647793::T => now;
1515+ 54.1929651177 => c.freq; 0.457055902411::T => now;
1516+ 64.8711461939 => c.freq; 0.831988494584::T => now;
1517+ 63.3880569387 => c.freq; 0.456677048766::T => now;
1518+ 97.5678729336 => c.freq; 0.414941060809::T => now;
1519+ 42.2085567862 => c.freq; 0.683480023168::T => now;
1520+ 76.0981450326 => c.freq; 0.793624056216::T => now;
1521+ 85.5190887724 => c.freq; 0.795274313973::T => now;
1522+ 19.8462895415 => c.freq; 0.89977706362::T => now;
1523+ 45.295319112 => c.freq; 0.50419306911::T => now;
1524+ 11.1216252087 => c.freq; 0.904964444807::T => now;
1525+ 63.192313611 => c.freq; 0.627504824646::T => now;
1526+ 70.8117365548 => c.freq; 0.386795482629::T => now;
1527+ 11.8726918397 => c.freq; 0.551785220336::T => now;
1528+ 0.227435035027 => c.freq; 0.652566291244::T => now;
1529+ 78.8258726865 => c.freq; 0.39849532234::T => now;
1530+ 75.3953927236 => c.freq; 0.248145295694::T => now;
1531+ 53.7793462322 => c.freq; 0.754479708933::T => now;
1532+ 74.6139240207 => c.freq; 0.917898205013::T => now;
1533+ 46.0229529242 => c.freq; 0.111226719804::T => now;
1534+ 97.4618201641 => c.freq; 0.171612882353::T => now;
1535+ 71.2430511367 => c.freq; 0.954233201187::T => now;
1536+ 78.9783283426 => c.freq; 0.0922913408693::T => now;
1537+ 57.1853249164 => c.freq; 0.748085014754::T => now;
1538+ 15.5804212259 => c.freq; 0.457232704819::T => now;
1539+ 78.9535985919 => c.freq; 0.706104549223::T => now;
1540+ 15.9252905472 => c.freq; 0.140670638553::T => now;
1541+ 90.7719737104 => c.freq; 0.282045775408::T => now;
1542+ 89.6215593472 => c.freq; 0.355272011789::T => now;
1543+ 60.6393432988 => c.freq; 0.488174762859::T => now;
1544+ 26.7251858167 => c.freq; 0.215772789394::T => now;
1545+ 92.7872058692 => c.freq; 0.532483212703::T => now;
1546+ 32.8926942833 => c.freq; 0.0839420479412::T => now;
1547+ 2.23384712963 => c.freq; 0.941412601813::T => now;
1548+ 89.3238581039 => c.freq; 0.227259402831::T => now;
1549+ 62.4446636853 => c.freq; 0.3762738641::T => now;
1550+ 19.5011717798 => c.freq; 0.247410864394::T => now;
1551+ 61.9972647793 => c.freq; 0.168648990013::T => now;
1552+ 45.7055902411 => c.freq; 0.152290558426::T => now;
1553+ 83.1988494584 => c.freq; 0.428376834284::T => now;
1554+ 45.6677048766 => c.freq; 0.959000618294::T => now;
1555+ 41.4941060809 => c.freq; 0.541929651177::T => now;
1556+ 68.3480023168 => c.freq; 0.648711461939::T => now;
1557+ 79.3624056216 => c.freq; 0.633880569387::T => now;
1558+ 79.5274313973 => c.freq; 0.975678729336::T => now;
1559+ 89.977706362 => c.freq; 0.422085567862::T => now;
1560+ 50.419306911 => c.freq; 0.760981450326::T => now;
1561+ 90.4964444807 => c.freq; 0.855190887724::T => now;
1562+ 62.7504824646 => c.freq; 0.198462895415::T => now;
1563+ 38.6795482629 => c.freq; 0.45295319112::T => now;
1564+ 55.1785220336 => c.freq; 0.111216252087::T => now;
1565+ 65.2566291244 => c.freq; 0.63192313611::T => now;
1566+ 39.849532234 => c.freq; 0.708117365548::T => now;
1567+ 24.8145295694 => c.freq; 0.118726918397::T => now;
1568+ 75.4479708933 => c.freq; 0.00227435035027::T => now;
1569+ 91.7898205013 => c.freq; 0.788258726865::T => now;
1570+ 11.1226719804 => c.freq; 0.753953927236::T => now;
1571+ 17.1612882353 => c.freq; 0.537793462322::T => now;
1572+ 95.4233201187 => c.freq; 0.746139240207::T => now;
1573+ 9.22913408693 => c.freq; 0.460229529242::T => now;
1574+ 74.8085014754 => c.freq; 0.974618201641::T => now;
1575+ 45.7232704819 => c.freq; 0.712430511367::T => now;
1576+ 70.6104549223 => c.freq; 0.789783283426::T => now;
1577+ 14.0670638553 => c.freq; 0.571853249164::T => now;
1578+ 28.2045775408 => c.freq; 0.155804212259::T => now;
1579+ 35.5272011789 => c.freq; 0.789535985919::T => now;
1580+ 48.8174762859 => c.freq; 0.159252905472::T => now;
1581+ 21.5772789394 => c.freq; 0.907719737104::T => now;
1582+ 53.2483212703 => c.freq; 0.896215593472::T => now;
1583+ 8.39420479412 => c.freq; 0.606393432988::T => now;
1584+ 94.1412601813 => c.freq; 0.267251858167::T => now;
1585+ 22.7259402831 => c.freq; 0.927872058692::T => now;
1586+ 37.62738641 => c.freq; 0.328926942833::T => now;
1587+ 24.7410864394 => c.freq; 0.0223384712963::T => now;
1588+ 16.8648990013 => c.freq; 0.893238581039::T => now;
1589+ 28.9079990034 => c.freq; 0.624446636853::T => now;
1590+ 60.4867532489 => c.freq; 0.195011717798::T => now;
1591+ 53.9949091227 => c.freq; 0.619972647793::T => now;
1592+ 58.5674922482 => c.freq; 0.457055902411::T => now;
1593+ 75.3412338585 => c.freq; 0.831988494584::T => now;
1594+ 61.1770871374 => c.freq; 0.456677048766::T => now;
1595+ 1.44097785444 => c.freq; 0.414941060809::T => now;
1596+ 51.0561990819 => c.freq; 0.683480023168::T => now;
1597+ 58.2684359741 => c.freq; 0.793624056216::T => now;
1598+ 30.6552411327 => c.freq; 0.795274313973::T => now;
1599+ 68.7118926494 => c.freq; 0.89977706362::T => now;
1600+ 30.825387103 => c.freq; 0.50419306911::T => now;
1601+ 13.7376567337 => c.freq; 0.904964444807::T => now;
1602+ 87.5865705461 => c.freq; 0.627504824646::T => now;
1603+ 10.9963381301 => c.freq; 0.386795482629::T => now;
1604+ 84.9345785496 => c.freq; 0.551785220336::T => now;
1605+ 53.3746088305 => c.freq; 0.652566291244::T => now;
1606+ 70.3579325877 => c.freq; 0.39849532234::T => now;
1607+ 11.2994663847 => c.freq; 0.248145295694::T => now;
1608+ 95.9606211012 => c.freq; 0.754479708933::T => now;
1609+ 5.74823778088 => c.freq; 0.917898205013::T => now;
1610+ 28.757113591 => c.freq; 0.111226719804::T => now;
1611+ 32.1191964371 => c.freq; 0.171612882353::T => now;
1612+ 15.2290558426 => c.freq; 0.954233201187::T => now;
1613+ 42.8376834284 => c.freq; 0.0922913408693::T => now;
1614+ 95.9000618294 => c.freq; 0.748085014754::T => now;
1615+ 54.1929651177 => c.freq; 0.457232704819::T => now;
1616+ 64.8711461939 => c.freq; 0.706104549223::T => now;
1617+ 63.3880569387 => c.freq; 0.140670638553::T => now;
1618+ 97.5678729336 => c.freq; 0.282045775408::T => now;
1619+ 42.2085567862 => c.freq; 0.355272011789::T => now;
1620+ 76.0981450326 => c.freq; 0.488174762859::T => now;
1621+ 85.5190887724 => c.freq; 0.215772789394::T => now;
1622+ 19.8462895415 => c.freq; 0.532483212703::T => now;
1623+ 45.295319112 => c.freq; 0.0839420479412::T => now;
1624+ 11.1216252087 => c.freq; 0.941412601813::T => now;
1625+ 63.192313611 => c.freq; 0.227259402831::T => now;
1626+ 70.8117365548 => c.freq; 0.3762738641::T => now;
1627+ 11.8726918397 => c.freq; 0.247410864394::T => now;
1628+ 0.227435035027 => c.freq; 0.168648990013::T => now;
1629+ 78.8258726865 => c.freq; 0.152290558426::T => now;
1630+ 75.3953927236 => c.freq; 0.428376834284::T => now;
1631+ 53.7793462322 => c.freq; 0.959000618294::T => now;
1632+ 74.6139240207 => c.freq; 0.541929651177::T => now;
1633+ 46.0229529242 => c.freq; 0.648711461939::T => now;
1634+ 97.4618201641 => c.freq; 0.633880569387::T => now;
1635+ 71.2430511367 => c.freq; 0.975678729336::T => now;
1636+ 78.9783283426 => c.freq; 0.422085567862::T => now;
1637+ 57.1853249164 => c.freq; 0.760981450326::T => now;
1638+ 15.5804212259 => c.freq; 0.855190887724::T => now;
1639+ 78.9535985919 => c.freq; 0.198462895415::T => now;
1640+ 15.9252905472 => c.freq; 0.45295319112::T => now;
1641+ 90.7719737104 => c.freq; 0.111216252087::T => now;
1642+ 89.6215593472 => c.freq; 0.63192313611::T => now;
1643+ 60.6393432988 => c.freq; 0.708117365548::T => now;
1644+ 26.7251858167 => c.freq; 0.118726918397::T => now;
1645+ 92.7872058692 => c.freq; 0.00227435035027::T => now;
1646+ 32.8926942833 => c.freq; 0.788258726865::T => now;
1647+ 2.23384712963 => c.freq; 0.753953927236::T => now;
1648+ 89.3238581039 => c.freq; 0.537793462322::T => now;
1649+ 62.4446636853 => c.freq; 0.746139240207::T => now;
1650+ 19.5011717798 => c.freq; 0.460229529242::T => now;
1651+ 61.9972647793 => c.freq; 0.974618201641::T => now;
1652+ 45.7055902411 => c.freq; 0.712430511367::T => now;
1653+ 83.1988494584 => c.freq; 0.789783283426::T => now;
1654+ 45.6677048766 => c.freq; 0.571853249164::T => now;
1655+ 41.4941060809 => c.freq; 0.155804212259::T => now;
1656+ 68.3480023168 => c.freq; 0.789535985919::T => now;
1657+ 79.3624056216 => c.freq; 0.159252905472::T => now;
1658+ 79.5274313973 => c.freq; 0.907719737104::T => now;
1659+ 89.977706362 => c.freq; 0.896215593472::T => now;
1660+ 50.419306911 => c.freq; 0.606393432988::T => now;
1661+ 90.4964444807 => c.freq; 0.267251858167::T => now;
1662+ 62.7504824646 => c.freq; 0.927872058692::T => now;
1663+ 38.6795482629 => c.freq; 0.328926942833::T => now;
1664+ 55.1785220336 => c.freq; 0.0223384712963::T => now;
1665+ 65.2566291244 => c.freq; 0.893238581039::T => now;
1666+ 39.849532234 => c.freq; 0.624446636853::T => now;
1667+ 24.8145295694 => c.freq; 0.195011717798::T => now;
1668+ 75.4479708933 => c.freq; 0.619972647793::T => now;
1669+ 91.7898205013 => c.freq; 0.457055902411::T => now;
1670+ 11.1226719804 => c.freq; 0.831988494584::T => now;
1671+ 17.1612882353 => c.freq; 0.456677048766::T => now;
1672+ 95.4233201187 => c.freq; 0.414941060809::T => now;
1673+ 9.22913408693 => c.freq; 0.683480023168::T => now;
1674+ 74.8085014754 => c.freq; 0.793624056216::T => now;
1675+ 45.7232704819 => c.freq; 0.795274313973::T => now;
1676+ 70.6104549223 => c.freq; 0.89977706362::T => now;
1677+ 14.0670638553 => c.freq; 0.50419306911::T => now;
1678+ 28.2045775408 => c.freq; 0.904964444807::T => now;
1679+ 35.5272011789 => c.freq; 0.627504824646::T => now;
1680+ 48.8174762859 => c.freq; 0.386795482629::T => now;
1681+ 21.5772789394 => c.freq; 0.551785220336::T => now;
1682+ 53.2483212703 => c.freq; 0.652566291244::T => now;
1683+ 8.39420479412 => c.freq; 0.39849532234::T => now;
1684+ 94.1412601813 => c.freq; 0.248145295694::T => now;
1685+ 22.7259402831 => c.freq; 0.754479708933::T => now;
1686+ 37.62738641 => c.freq; 0.917898205013::T => now;
1687+ 24.7410864394 => c.freq; 0.111226719804::T => now;
1688+ 16.8648990013 => c.freq; 0.171612882353::T => now;
1689+ 28.9079990034 => c.freq; 0.954233201187::T => now;
1690+ 60.4867532489 => c.freq; 0.0922913408693::T => now;
1691+ 53.9949091227 => c.freq; 0.748085014754::T => now;
1692+ 58.5674922482 => c.freq; 0.457232704819::T => now;
1693+ 75.3412338585 => c.freq; 0.706104549223::T => now;
1694+ 61.1770871374 => c.freq; 0.140670638553::T => now;
1695+ 1.44097785444 => c.freq; 0.282045775408::T => now;
1696+ 51.0561990819 => c.freq; 0.355272011789::T => now;
1697+ 58.2684359741 => c.freq; 0.488174762859::T => now;
1698+ 30.6552411327 => c.freq; 0.215772789394::T => now;
1699+ 68.7118926494 => c.freq; 0.532483212703::T => now;
1700+ 30.825387103 => c.freq; 0.0839420479412::T => now;
1701+ 13.7376567337 => c.freq; 0.941412601813::T => now;
1702+ 87.5865705461 => c.freq; 0.227259402831::T => now;
1703+ 10.9963381301 => c.freq; 0.3762738641::T => now;
1704+ 84.9345785496 => c.freq; 0.247410864394::T => now;
1705+ 53.3746088305 => c.freq; 0.168648990013::T => now;
1706+ 70.3579325877 => c.freq; 0.152290558426::T => now;
1707+ 11.2994663847 => c.freq; 0.428376834284::T => now;
1708+ 95.9606211012 => c.freq; 0.959000618294::T => now;
1709+ 5.74823778088 => c.freq; 0.541929651177::T => now;
1710+ 28.757113591 => c.freq; 0.648711461939::T => now;
1711+ 32.1191964371 => c.freq; 0.633880569387::T => now;
1712+ 15.2290558426 => c.freq; 0.975678729336::T => now;
1713+ 42.8376834284 => c.freq; 0.422085567862::T => now;
1714+ 95.9000618294 => c.freq; 0.760981450326::T => now;
1715+ 54.1929651177 => c.freq; 0.855190887724::T => now;
1716+ 64.8711461939 => c.freq; 0.198462895415::T => now;
1717+ 63.3880569387 => c.freq; 0.45295319112::T => now;
1718+ 97.5678729336 => c.freq; 0.111216252087::T => now;
1719+ 42.2085567862 => c.freq; 0.63192313611::T => now;
1720+ 76.0981450326 => c.freq; 0.708117365548::T => now;
1721+ 85.5190887724 => c.freq; 0.118726918397::T => now;
1722+ 19.8462895415 => c.freq; 0.00227435035027::T => now;
1723+ 45.295319112 => c.freq; 0.788258726865::T => now;
1724+ 11.1216252087 => c.freq; 0.753953927236::T => now;
1725+ 63.192313611 => c.freq; 0.537793462322::T => now;
1726+ 70.8117365548 => c.freq; 0.746139240207::T => now;
1727+ 11.8726918397 => c.freq; 0.460229529242::T => now;
1728+ 0.227435035027 => c.freq; 0.974618201641::T => now;
1729+ 78.8258726865 => c.freq; 0.712430511367::T => now;
1730+ 75.3953927236 => c.freq; 0.789783283426::T => now;
1731+ 53.7793462322 => c.freq; 0.571853249164::T => now;
1732+ 74.6139240207 => c.freq; 0.155804212259::T => now;
1733+ 46.0229529242 => c.freq; 0.789535985919::T => now;
1734+ 97.4618201641 => c.freq; 0.159252905472::T => now;
1735+ 71.2430511367 => c.freq; 0.907719737104::T => now;
1736+ 78.9783283426 => c.freq; 0.896215593472::T => now;
1737+ 57.1853249164 => c.freq; 0.606393432988::T => now;
1738+ 15.5804212259 => c.freq; 0.267251858167::T => now;
1739+ 78.9535985919 => c.freq; 0.927872058692::T => now;
1740+ 15.9252905472 => c.freq; 0.328926942833::T => now;
1741+ 90.7719737104 => c.freq; 0.0223384712963::T => now;
1742+ 89.6215593472 => c.freq; 0.893238581039::T => now;
1743+ 60.6393432988 => c.freq; 0.624446636853::T => now;
1744+ 26.7251858167 => c.freq; 0.195011717798::T => now;
1745+ 92.7872058692 => c.freq; 0.619972647793::T => now;
1746+ 32.8926942833 => c.freq; 0.457055902411::T => now;
1747+ 2.23384712963 => c.freq; 0.831988494584::T => now;
1748+ 89.3238581039 => c.freq; 0.456677048766::T => now;
1749+ 62.4446636853 => c.freq; 0.414941060809::T => now;
1750+ 19.5011717798 => c.freq; 0.683480023168::T => now;
1751+ 61.9972647793 => c.freq; 0.793624056216::T => now;
1752+ 45.7055902411 => c.freq; 0.795274313973::T => now;
1753+ 83.1988494584 => c.freq; 0.89977706362::T => now;
1754+ 45.6677048766 => c.freq; 0.50419306911::T => now;
1755+ 41.4941060809 => c.freq; 0.904964444807::T => now;
1756+ 68.3480023168 => c.freq; 0.627504824646::T => now;
1757+ 79.3624056216 => c.freq; 0.386795482629::T => now;
1758+ 79.5274313973 => c.freq; 0.551785220336::T => now;
1759+ 89.977706362 => c.freq; 0.652566291244::T => now;
1760+ 50.419306911 => c.freq; 0.39849532234::T => now;
1761+ 90.4964444807 => c.freq; 0.248145295694::T => now;
1762+ 62.7504824646 => c.freq; 0.754479708933::T => now;
1763+ 38.6795482629 => c.freq; 0.917898205013::T => now;
1764+ 55.1785220336 => c.freq; 0.111226719804::T => now;
1765+ 65.2566291244 => c.freq; 0.171612882353::T => now;
1766+ 39.849532234 => c.freq; 0.954233201187::T => now;
1767+ 24.8145295694 => c.freq; 0.0922913408693::T => now;
1768+ 75.4479708933 => c.freq; 0.748085014754::T => now;
1769+ 91.7898205013 => c.freq; 0.457232704819::T => now;
1770+ 11.1226719804 => c.freq; 0.706104549223::T => now;
1771+ 17.1612882353 => c.freq; 0.140670638553::T => now;
1772+ 95.4233201187 => c.freq; 0.282045775408::T => now;
1773+ 9.22913408693 => c.freq; 0.355272011789::T => now;
1774+ 74.8085014754 => c.freq; 0.488174762859::T => now;
1775+ 45.7232704819 => c.freq; 0.215772789394::T => now;
1776+ 70.6104549223 => c.freq; 0.532483212703::T => now;
1777+ 14.0670638553 => c.freq; 0.0839420479412::T => now;
1778+ 28.2045775408 => c.freq; 0.941412601813::T => now;
1779+ 35.5272011789 => c.freq; 0.227259402831::T => now;
1780+ 48.8174762859 => c.freq; 0.3762738641::T => now;
1781+ 21.5772789394 => c.freq; 0.247410864394::T => now;
1782+ 53.2483212703 => c.freq; 0.168648990013::T => now;
1783+ 8.39420479412 => c.freq; 0.152290558426::T => now;
1784+ 94.1412601813 => c.freq; 0.428376834284::T => now;
1785+ 22.7259402831 => c.freq; 0.959000618294::T => now;
1786+ 37.62738641 => c.freq; 0.541929651177::T => now;
1787+ 24.7410864394 => c.freq; 0.648711461939::T => now;
1788+ 16.8648990013 => c.freq; 0.633880569387::T => now;
1789+ 28.9079990034 => c.freq; 0.975678729336::T => now;
1790+ 60.4867532489 => c.freq; 0.422085567862::T => now;
1791+ 53.9949091227 => c.freq; 0.760981450326::T => now;
1792+ 58.5674922482 => c.freq; 0.855190887724::T => now;
1793+ 75.3412338585 => c.freq; 0.198462895415::T => now;
1794+ 61.1770871374 => c.freq; 0.45295319112::T => now;
1795+ 1.44097785444 => c.freq; 0.111216252087::T => now;
1796+ 51.0561990819 => c.freq; 0.63192313611::T => now;
1797+ 58.2684359741 => c.freq; 0.708117365548::T => now;
1798+ 30.6552411327 => c.freq; 0.118726918397::T => now;
1799+ 68.7118926494 => c.freq; 0.00227435035027::T => now;
1800+ 30.825387103 => c.freq; 0.788258726865::T => now;
1801+ 13.7376567337 => c.freq; 0.753953927236::T => now;
1802+ 87.5865705461 => c.freq; 0.537793462322::T => now;
1803+ 10.9963381301 => c.freq; 0.746139240207::T => now;
1804+ 84.9345785496 => c.freq; 0.460229529242::T => now;
1805+ 53.3746088305 => c.freq; 0.974618201641::T => now;
1806+ 70.3579325877 => c.freq; 0.712430511367::T => now;
1807+ 11.2994663847 => c.freq; 0.789783283426::T => now;
1808+ 95.9606211012 => c.freq; 0.571853249164::T => now;
1809+ 5.74823778088 => c.freq; 0.155804212259::T => now;
1810+ 28.757113591 => c.freq; 0.789535985919::T => now;
1811+ 32.1191964371 => c.freq; 0.159252905472::T => now;
1812+ 15.2290558426 => c.freq; 0.907719737104::T => now;
1813+ 42.8376834284 => c.freq; 0.896215593472::T => now;
1814+ 95.9000618294 => c.freq; 0.606393432988::T => now;
1815+ 54.1929651177 => c.freq; 0.267251858167::T => now;
1816+ 64.8711461939 => c.freq; 0.927872058692::T => now;
1817+ 63.3880569387 => c.freq; 0.328926942833::T => now;
1818+ 97.5678729336 => c.freq; 0.0223384712963::T => now;
1819+ 42.2085567862 => c.freq; 0.893238581039::T => now;
1820+ 76.0981450326 => c.freq; 0.624446636853::T => now;
1821+ 85.5190887724 => c.freq; 0.195011717798::T => now;
1822+ 19.8462895415 => c.freq; 0.619972647793::T => now;
1823+ 45.295319112 => c.freq; 0.457055902411::T => now;
1824+ 11.1216252087 => c.freq; 0.831988494584::T => now;
1825+ 63.192313611 => c.freq; 0.456677048766::T => now;
1826+ 70.8117365548 => c.freq; 0.414941060809::T => now;
1827+ 11.8726918397 => c.freq; 0.683480023168::T => now;
1828+ 0.227435035027 => c.freq; 0.793624056216::T => now;
1829+ 78.8258726865 => c.freq; 0.795274313973::T => now;
1830+ 75.3953927236 => c.freq; 0.89977706362::T => now;
1831+ 53.7793462322 => c.freq; 0.50419306911::T => now;
1832+ 74.6139240207 => c.freq; 0.904964444807::T => now;
1833+ 46.0229529242 => c.freq; 0.627504824646::T => now;
1834+ 97.4618201641 => c.freq; 0.386795482629::T => now;
1835+ 71.2430511367 => c.freq; 0.551785220336::T => now;
1836+ 78.9783283426 => c.freq; 0.652566291244::T => now;
1837+ 57.1853249164 => c.freq; 0.39849532234::T => now;
1838+ 15.5804212259 => c.freq; 0.248145295694::T => now;
1839+ 78.9535985919 => c.freq; 0.754479708933::T => now;
1840+ 15.9252905472 => c.freq; 0.917898205013::T => now;
1841+ 90.7719737104 => c.freq; 0.111226719804::T => now;
1842+ 89.6215593472 => c.freq; 0.171612882353::T => now;
1843+ 60.6393432988 => c.freq; 0.954233201187::T => now;
1844+ 26.7251858167 => c.freq; 0.0922913408693::T => now;
1845+ 92.7872058692 => c.freq; 0.748085014754::T => now;
1846+ 32.8926942833 => c.freq; 0.457232704819::T => now;
1847+ 2.23384712963 => c.freq; 0.706104549223::T => now;
1848+ 89.3238581039 => c.freq; 0.140670638553::T => now;
1849+ 62.4446636853 => c.freq; 0.282045775408::T => now;
1850+ 19.5011717798 => c.freq; 0.355272011789::T => now;
1851+ 61.9972647793 => c.freq; 0.488174762859::T => now;
1852+ 45.7055902411 => c.freq; 0.215772789394::T => now;
1853+ 83.1988494584 => c.freq; 0.532483212703::T => now;
1854+ 45.6677048766 => c.freq; 0.0839420479412::T => now;
1855+ 41.4941060809 => c.freq; 0.941412601813::T => now;
1856+ 68.3480023168 => c.freq; 0.227259402831::T => now;
1857+ 79.3624056216 => c.freq; 0.3762738641::T => now;
1858+ 79.5274313973 => c.freq; 0.247410864394::T => now;
1859+ 89.977706362 => c.freq; 0.168648990013::T => now;
1860+ 50.419306911 => c.freq; 0.152290558426::T => now;
1861+ 90.4964444807 => c.freq; 0.428376834284::T => now;
1862+ 62.7504824646 => c.freq; 0.959000618294::T => now;
1863+ 38.6795482629 => c.freq; 0.541929651177::T => now;
1864+ 55.1785220336 => c.freq; 0.648711461939::T => now;
1865+ 65.2566291244 => c.freq; 0.633880569387::T => now;
1866+ 39.849532234 => c.freq; 0.975678729336::T => now;
1867+ 24.8145295694 => c.freq; 0.422085567862::T => now;
1868+ 75.4479708933 => c.freq; 0.760981450326::T => now;
1869+ 91.7898205013 => c.freq; 0.855190887724::T => now;
1870+ 11.1226719804 => c.freq; 0.198462895415::T => now;
1871+ 17.1612882353 => c.freq; 0.45295319112::T => now;
1872+ 95.4233201187 => c.freq; 0.111216252087::T => now;
1873+ 9.22913408693 => c.freq; 0.63192313611::T => now;
1874+ 74.8085014754 => c.freq; 0.708117365548::T => now;
1875+ 45.7232704819 => c.freq; 0.118726918397::T => now;
1876+ 70.6104549223 => c.freq; 0.00227435035027::T => now;
1877+ 14.0670638553 => c.freq; 0.788258726865::T => now;
1878+ 28.2045775408 => c.freq; 0.753953927236::T => now;
1879+ 35.5272011789 => c.freq; 0.537793462322::T => now;
1880+ 48.8174762859 => c.freq; 0.746139240207::T => now;
1881+ 21.5772789394 => c.freq; 0.460229529242::T => now;
1882+ 53.2483212703 => c.freq; 0.974618201641::T => now;
1883+ 8.39420479412 => c.freq; 0.712430511367::T => now;
1884+ 94.1412601813 => c.freq; 0.789783283426::T => now;
1885+ 22.7259402831 => c.freq; 0.571853249164::T => now;
1886+ 37.62738641 => c.freq; 0.155804212259::T => now;
1887+ 24.7410864394 => c.freq; 0.789535985919::T => now;
1888+ 16.8648990013 => c.freq; 0.159252905472::T => now;
1889+ 28.9079990034 => c.freq; 0.907719737104::T => now;
1890+ 60.4867532489 => c.freq; 0.896215593472::T => now;
1891+ 53.9949091227 => c.freq; 0.606393432988::T => now;
1892+ 58.5674922482 => c.freq; 0.267251858167::T => now;
1893+ 75.3412338585 => c.freq; 0.927872058692::T => now;
1894+ 61.1770871374 => c.freq; 0.328926942833::T => now;
1895+ 1.44097785444 => c.freq; 0.0223384712963::T => now;
1896+ 51.0561990819 => c.freq; 0.893238581039::T => now;
1897+ 58.2684359741 => c.freq; 0.624446636853::T => now;
1898+ 30.6552411327 => c.freq; 0.195011717798::T => now;
1899+ 68.7118926494 => c.freq; 0.619972647793::T => now;
1900+ 30.825387103 => c.freq; 0.457055902411::T => now;
1901+ 13.7376567337 => c.freq; 0.831988494584::T => now;
1902+ 87.5865705461 => c.freq; 0.456677048766::T => now;
1903+ 10.9963381301 => c.freq; 0.414941060809::T => now;
1904+ 84.9345785496 => c.freq; 0.683480023168::T => now;
1905+ 53.3746088305 => c.freq; 0.793624056216::T => now;
1906+ 70.3579325877 => c.freq; 0.795274313973::T => now;
1907+ 11.2994663847 => c.freq; 0.89977706362::T => now;
1908+ 95.9606211012 => c.freq; 0.50419306911::T => now;
1909+ 5.74823778088 => c.freq; 0.904964444807::T => now;
1910+ 28.757113591 => c.freq; 0.627504824646::T => now;
1911+ 32.1191964371 => c.freq; 0.386795482629::T => now;
1912+ 15.2290558426 => c.freq; 0.551785220336::T => now;
1913+ 42.8376834284 => c.freq; 0.652566291244::T => now;
1914+ 95.9000618294 => c.freq; 0.39849532234::T => now;
1915+ 54.1929651177 => c.freq; 0.248145295694::T => now;
1916+ 64.8711461939 => c.freq; 0.754479708933::T => now;
1917+ 63.3880569387 => c.freq; 0.917898205013::T => now;
1918+ 97.5678729336 => c.freq; 0.111226719804::T => now;
1919+ 42.2085567862 => c.freq; 0.171612882353::T => now;
1920+ 76.0981450326 => c.freq; 0.954233201187::T => now;
1921+ 85.5190887724 => c.freq; 0.0922913408693::T => now;
1922+ 19.8462895415 => c.freq; 0.748085014754::T => now;
1923+ 45.295319112 => c.freq; 0.457232704819::T => now;
1924+ 11.1216252087 => c.freq; 0.706104549223::T => now;
1925+ 63.192313611 => c.freq; 0.140670638553::T => now;
1926+ 70.8117365548 => c.freq; 0.282045775408::T => now;
1927+ 11.8726918397 => c.freq; 0.355272011789::T => now;
1928+ 0.227435035027 => c.freq; 0.488174762859::T => now;
1929+ 78.8258726865 => c.freq; 0.215772789394::T => now;
1930+ 75.3953927236 => c.freq; 0.532483212703::T => now;
1931+ 53.7793462322 => c.freq; 0.0839420479412::T => now;
1932+ 74.6139240207 => c.freq; 0.941412601813::T => now;
1933+ 46.0229529242 => c.freq; 0.227259402831::T => now;
1934+ 97.4618201641 => c.freq; 0.3762738641::T => now;
1935+ 71.2430511367 => c.freq; 0.247410864394::T => now;
1936+ 78.9783283426 => c.freq; 0.168648990013::T => now;
1937+ 57.1853249164 => c.freq; 0.152290558426::T => now;
1938+ 15.5804212259 => c.freq; 0.428376834284::T => now;
1939+ 78.9535985919 => c.freq; 0.959000618294::T => now;
1940+ 15.9252905472 => c.freq; 0.541929651177::T => now;
1941+ 90.7719737104 => c.freq; 0.648711461939::T => now;
1942+ 89.6215593472 => c.freq; 0.633880569387::T => now;
1943+ 60.6393432988 => c.freq; 0.975678729336::T => now;
1944+ 26.7251858167 => c.freq; 0.422085567862::T => now;
1945+ 92.7872058692 => c.freq; 0.760981450326::T => now;
1946+ 32.8926942833 => c.freq; 0.855190887724::T => now;
1947+ 2.23384712963 => c.freq; 0.198462895415::T => now;
1948+ 89.3238581039 => c.freq; 0.45295319112::T => now;
1949+ 62.4446636853 => c.freq; 0.111216252087::T => now;
1950+ 19.5011717798 => c.freq; 0.63192313611::T => now;
1951+ 61.9972647793 => c.freq; 0.708117365548::T => now;
1952+ 45.7055902411 => c.freq; 0.118726918397::T => now;
1953+ 83.1988494584 => c.freq; 0.00227435035027::T => now;
1954+ 45.6677048766 => c.freq; 0.788258726865::T => now;
1955+ 41.4941060809 => c.freq; 0.753953927236::T => now;
1956+ 68.3480023168 => c.freq; 0.537793462322::T => now;
1957+ 79.3624056216 => c.freq; 0.746139240207::T => now;
1958+ 79.5274313973 => c.freq; 0.460229529242::T => now;
1959+ 89.977706362 => c.freq; 0.974618201641::T => now;
1960+ 50.419306911 => c.freq; 0.712430511367::T => now;
1961+ 90.4964444807 => c.freq; 0.789783283426::T => now;
1962+ 62.7504824646 => c.freq; 0.571853249164::T => now;
1963+ 38.6795482629 => c.freq; 0.155804212259::T => now;
1964+ 55.1785220336 => c.freq; 0.789535985919::T => now;
1965+ 65.2566291244 => c.freq; 0.159252905472::T => now;
1966+ 39.849532234 => c.freq; 0.907719737104::T => now;
1967+ 24.8145295694 => c.freq; 0.896215593472::T => now;
1968+ 75.4479708933 => c.freq; 0.606393432988::T => now;
1969+ 91.7898205013 => c.freq; 0.267251858167::T => now;
1970+ 11.1226719804 => c.freq; 0.927872058692::T => now;
1971+ 17.1612882353 => c.freq; 0.328926942833::T => now;
1972+ 95.4233201187 => c.freq; 0.0223384712963::T => now;
1973+ 9.22913408693 => c.freq; 0.893238581039::T => now;
1974+ 74.8085014754 => c.freq; 0.624446636853::T => now;
1975+ 45.7232704819 => c.freq; 0.195011717798::T => now;
1976+ 70.6104549223 => c.freq; 0.619972647793::T => now;
1977+ 14.0670638553 => c.freq; 0.457055902411::T => now;
1978+ 28.2045775408 => c.freq; 0.831988494584::T => now;
1979+ 35.5272011789 => c.freq; 0.456677048766::T => now;
1980+ 48.8174762859 => c.freq; 0.414941060809::T => now;
1981+ 21.5772789394 => c.freq; 0.683480023168::T => now;
1982+ 53.2483212703 => c.freq; 0.793624056216::T => now;
1983+ 8.39420479412 => c.freq; 0.795274313973::T => now;
1984+ 94.1412601813 => c.freq; 0.89977706362::T => now;
1985+ 22.7259402831 => c.freq; 0.50419306911::T => now;
1986+ 37.62738641 => c.freq; 0.904964444807::T => now;
1987+ 24.7410864394 => c.freq; 0.627504824646::T => now;
1988+ 16.8648990013 => c.freq; 0.386795482629::T => now;
1989+ 28.9079990034 => c.freq; 0.551785220336::T => now;
1990+ 60.4867532489 => c.freq; 0.652566291244::T => now;
1991+ 53.9949091227 => c.freq; 0.39849532234::T => now;
1992+ 58.5674922482 => c.freq; 0.248145295694::T => now;
1993+ 75.3412338585 => c.freq; 0.754479708933::T => now;
1994+ 61.1770871374 => c.freq; 0.917898205013::T => now;
1995+ 1.44097785444 => c.freq; 0.111226719804::T => now;
1996+ 51.0561990819 => c.freq; 0.171612882353::T => now;
1997+ 58.2684359741 => c.freq; 0.954233201187::T => now;
1998+ 30.6552411327 => c.freq; 0.0922913408693::T => now;
1999+ 68.7118926494 => c.freq; 0.748085014754::T => now;
2000+ 30.825387103 => c.freq; 0.457232704819::T => now;
2001+ 13.7376567337 => c.freq; 0.706104549223::T => now;
2002+ 87.5865705461 => c.freq; 0.140670638553::T => now;
2003+ 10.9963381301 => c.freq; 0.282045775408::T => now;
2004+ 84.9345785496 => c.freq; 0.355272011789::T => now;
2005+ 53.3746088305 => c.freq; 0.488174762859::T => now;
2006+ 70.3579325877 => c.freq; 0.215772789394::T => now;
2007+ 11.2994663847 => c.freq; 0.532483212703::T => now;
2008+ 95.9606211012 => c.freq; 0.0839420479412::T => now;
2009+ 5.74823778088 => c.freq; 0.941412601813::T => now;
2010+ 28.757113591 => c.freq; 0.227259402831::T => now;
2011+ 32.1191964371 => c.freq; 0.3762738641::T => now;
2012+ 15.2290558426 => c.freq; 0.247410864394::T => now;
2013+ 42.8376834284 => c.freq; 0.168648990013::T => now;
2014+ 95.9000618294 => c.freq; 0.152290558426::T => now;
2015+ 54.1929651177 => c.freq; 0.428376834284::T => now;
2016+ 64.8711461939 => c.freq; 0.959000618294::T => now;
2017+ 63.3880569387 => c.freq; 0.541929651177::T => now;
2018+ 97.5678729336 => c.freq; 0.648711461939::T => now;
2019+ 42.2085567862 => c.freq; 0.633880569387::T => now;
2020+ 76.0981450326 => c.freq; 0.975678729336::T => now;
2021+ 85.5190887724 => c.freq; 0.422085567862::T => now;
2022+ 19.8462895415 => c.freq; 0.760981450326::T => now;
2023+ 45.295319112 => c.freq; 0.855190887724::T => now;
2024+ 11.1216252087 => c.freq; 0.198462895415::T => now;
2025+ 63.192313611 => c.freq; 0.45295319112::T => now;
2026+ 70.8117365548 => c.freq; 0.111216252087::T => now;
2027+ 11.8726918397 => c.freq; 0.63192313611::T => now;
2028+ 0.227435035027 => c.freq; 0.708117365548::T => now;
2029+ 78.8258726865 => c.freq; 0.118726918397::T => now;
2030+ 75.3953927236 => c.freq; 0.00227435035027::T => now;
2031+ 53.7793462322 => c.freq; 0.788258726865::T => now;
2032+ 74.6139240207 => c.freq; 0.753953927236::T => now;
2033+ 46.0229529242 => c.freq; 0.537793462322::T => now;
2034+ 97.4618201641 => c.freq; 0.746139240207::T => now;
2035+ 71.2430511367 => c.freq; 0.460229529242::T => now;
2036+ 78.9783283426 => c.freq; 0.974618201641::T => now;
2037+ 57.1853249164 => c.freq; 0.712430511367::T => now;
2038+ 15.5804212259 => c.freq; 0.789783283426::T => now;
2039+ 78.9535985919 => c.freq; 0.571853249164::T => now;
2040+ 15.9252905472 => c.freq; 0.155804212259::T => now;
2041+ 90.7719737104 => c.freq; 0.789535985919::T => now;
2042+ 89.6215593472 => c.freq; 0.159252905472::T => now;
2043+ 60.6393432988 => c.freq; 0.907719737104::T => now;
2044+ 26.7251858167 => c.freq; 0.896215593472::T => now;
2045+ 92.7872058692 => c.freq; 0.606393432988::T => now;
2046+ 32.8926942833 => c.freq; 0.267251858167::T => now;
2047+ 2.23384712963 => c.freq; 0.927872058692::T => now;
2048+ 89.3238581039 => c.freq; 0.328926942833::T => now;
2049+ 62.4446636853 => c.freq; 0.0223384712963::T => now;
2050+ 19.5011717798 => c.freq; 0.893238581039::T => now;
2051+ 61.9972647793 => c.freq; 0.624446636853::T => now;
2052+ 45.7055902411 => c.freq; 0.195011717798::T => now;
2053+ 83.1988494584 => c.freq; 0.619972647793::T => now;
2054+ 45.6677048766 => c.freq; 0.457055902411::T => now;
2055+ 41.4941060809 => c.freq; 0.831988494584::T => now;
2056+ 68.3480023168 => c.freq; 0.456677048766::T => now;
2057+ 79.3624056216 => c.freq; 0.414941060809::T => now;
2058+ 79.5274313973 => c.freq; 0.683480023168::T => now;
2059+ 89.977706362 => c.freq; 0.793624056216::T => now;
2060+ 50.419306911 => c.freq; 0.795274313973::T => now;
2061+ 90.4964444807 => c.freq; 0.89977706362::T => now;
2062+ 62.7504824646 => c.freq; 0.50419306911::T => now;
2063+ 38.6795482629 => c.freq; 0.904964444807::T => now;
2064+ 55.1785220336 => c.freq; 0.627504824646::T => now;
2065+ 65.2566291244 => c.freq; 0.386795482629::T => now;
2066+ 39.849532234 => c.freq; 0.551785220336::T => now;
2067+ 24.8145295694 => c.freq; 0.652566291244::T => now;
2068+ 75.4479708933 => c.freq; 0.39849532234::T => now;
2069+ 91.7898205013 => c.freq; 0.248145295694::T => now;
2070+ 11.1226719804 => c.freq; 0.754479708933::T => now;
2071+ 17.1612882353 => c.freq; 0.917898205013::T => now;
2072+ 95.4233201187 => c.freq; 0.111226719804::T => now;
2073+ 9.22913408693 => c.freq; 0.171612882353::T => now;
2074+ 74.8085014754 => c.freq; 0.954233201187::T => now;
2075+ 45.7232704819 => c.freq; 0.0922913408693::T => now;
2076+ 70.6104549223 => c.freq; 0.748085014754::T => now;
2077+ 14.0670638553 => c.freq; 0.457232704819::T => now;
2078+ 28.2045775408 => c.freq; 0.706104549223::T => now;
2079+ 35.5272011789 => c.freq; 0.140670638553::T => now;
2080+ 48.8174762859 => c.freq; 0.282045775408::T => now;
2081+ 21.5772789394 => c.freq; 0.355272011789::T => now;
2082+ 53.2483212703 => c.freq; 0.488174762859::T => now;
2083+ 8.39420479412 => c.freq; 0.215772789394::T => now;
2084+ 94.1412601813 => c.freq; 0.532483212703::T => now;
2085+ 22.7259402831 => c.freq; 0.0839420479412::T => now;
2086+ 37.62738641 => c.freq; 0.941412601813::T => now;
2087+ 24.7410864394 => c.freq; 0.227259402831::T => now;
2088+ 16.8648990013 => c.freq; 0.3762738641::T => now;
2089+ 28.9079990034 => c.freq; 0.247410864394::T => now;
2090+ 60.4867532489 => c.freq; 0.168648990013::T => now;
2091+ 53.9949091227 => c.freq; 0.152290558426::T => now;
2092+ 58.5674922482 => c.freq; 0.428376834284::T => now;
2093+ 75.3412338585 => c.freq; 0.959000618294::T => now;
2094+ 61.1770871374 => c.freq; 0.541929651177::T => now;
2095+ 1.44097785444 => c.freq; 0.648711461939::T => now;
2096+ 51.0561990819 => c.freq; 0.633880569387::T => now;
2097+ 58.2684359741 => c.freq; 0.975678729336::T => now;
2098+ 30.6552411327 => c.freq; 0.422085567862::T => now;
2099+ 68.7118926494 => c.freq; 0.760981450326::T => now;
2100+ 30.825387103 => c.freq; 0.855190887724::T => now;
2101+ 13.7376567337 => c.freq; 0.198462895415::T => now;
2102+ 87.5865705461 => c.freq; 0.45295319112::T => now;
2103+ 10.9963381301 => c.freq; 0.111216252087::T => now;
2104+ 84.9345785496 => c.freq; 0.63192313611::T => now;
2105+ 53.3746088305 => c.freq; 0.708117365548::T => now;
2106+ 70.3579325877 => c.freq; 0.118726918397::T => now;
2107+ 11.2994663847 => c.freq; 0.00227435035027::T => now;
2108+ 95.9606211012 => c.freq; 0.788258726865::T => now;
2109+ 5.74823778088 => c.freq; 0.753953927236::T => now;
2110+ 28.757113591 => c.freq; 0.537793462322::T => now;
2111+ 32.1191964371 => c.freq; 0.746139240207::T => now;
2112+ 15.2290558426 => c.freq; 0.460229529242::T => now;
2113+ 42.8376834284 => c.freq; 0.974618201641::T => now;
2114+ 95.9000618294 => c.freq; 0.712430511367::T => now;
2115+ 54.1929651177 => c.freq; 0.789783283426::T => now;
2116+ 64.8711461939 => c.freq; 0.571853249164::T => now;
2117+ 63.3880569387 => c.freq; 0.155804212259::T => now;
2118+ 97.5678729336 => c.freq; 0.789535985919::T => now;
2119+ 42.2085567862 => c.freq; 0.159252905472::T => now;
2120+ 76.0981450326 => c.freq; 0.907719737104::T => now;
2121+ 85.5190887724 => c.freq; 0.896215593472::T => now;
2122+ 19.8462895415 => c.freq; 0.606393432988::T => now;
2123+ 45.295319112 => c.freq; 0.267251858167::T => now;
2124+ 11.1216252087 => c.freq; 0.927872058692::T => now;
2125+ 63.192313611 => c.freq; 0.328926942833::T => now;
2126+ 70.8117365548 => c.freq; 0.0223384712963::T => now;
2127+ 11.8726918397 => c.freq; 0.893238581039::T => now;
2128+ 0.227435035027 => c.freq; 0.624446636853::T => now;
2129+ 78.8258726865 => c.freq; 0.195011717798::T => now;
2130+ 75.3953927236 => c.freq; 0.619972647793::T => now;
2131+ 53.7793462322 => c.freq; 0.457055902411::T => now;
2132+ 74.6139240207 => c.freq; 0.831988494584::T => now;
2133+ 46.0229529242 => c.freq; 0.456677048766::T => now;
2134+ 97.4618201641 => c.freq; 0.414941060809::T => now;
2135+ 71.2430511367 => c.freq; 0.683480023168::T => now;
2136+ 78.9783283426 => c.freq; 0.793624056216::T => now;
2137+ 57.1853249164 => c.freq; 0.795274313973::T => now;
2138+ 15.5804212259 => c.freq; 0.89977706362::T => now;
2139+ 78.9535985919 => c.freq; 0.50419306911::T => now;
2140+ 15.9252905472 => c.freq; 0.904964444807::T => now;
2141+ 90.7719737104 => c.freq; 0.627504824646::T => now;
2142+ 89.6215593472 => c.freq; 0.386795482629::T => now;
2143+ 60.6393432988 => c.freq; 0.551785220336::T => now;
2144+ 26.7251858167 => c.freq; 0.652566291244::T => now;
2145+ 92.7872058692 => c.freq; 0.39849532234::T => now;
2146+ 32.8926942833 => c.freq; 0.248145295694::T => now;
2147+ 2.23384712963 => c.freq; 0.754479708933::T => now;
2148+ 89.3238581039 => c.freq; 0.917898205013::T => now;
2149+ 62.4446636853 => c.freq; 0.111226719804::T => now;
2150+ 19.5011717798 => c.freq; 0.171612882353::T => now;
2151+ 61.9972647793 => c.freq; 0.954233201187::T => now;
2152+ 45.7055902411 => c.freq; 0.0922913408693::T => now;
2153+ 83.1988494584 => c.freq; 0.748085014754::T => now;
2154+ 45.6677048766 => c.freq; 0.457232704819::T => now;
2155+ 41.4941060809 => c.freq; 0.706104549223::T => now;
2156+ 68.3480023168 => c.freq; 0.140670638553::T => now;
2157+ 79.3624056216 => c.freq; 0.282045775408::T => now;
2158+ 79.5274313973 => c.freq; 0.355272011789::T => now;
2159+ 89.977706362 => c.freq; 0.488174762859::T => now;
2160+ 50.419306911 => c.freq; 0.215772789394::T => now;
2161+ 90.4964444807 => c.freq; 0.532483212703::T => now;
2162+ 62.7504824646 => c.freq; 0.0839420479412::T => now;
2163+ 38.6795482629 => c.freq; 0.941412601813::T => now;
2164+ 55.1785220336 => c.freq; 0.227259402831::T => now;
2165+ 65.2566291244 => c.freq; 0.3762738641::T => now;
2166+ 39.849532234 => c.freq; 0.247410864394::T => now;
2167+ 24.8145295694 => c.freq; 0.168648990013::T => now;
2168+ 75.4479708933 => c.freq; 0.152290558426::T => now;
2169+ 91.7898205013 => c.freq; 0.428376834284::T => now;
2170+ 11.1226719804 => c.freq; 0.959000618294::T => now;
2171+ 17.1612882353 => c.freq; 0.541929651177::T => now;
2172+ 95.4233201187 => c.freq; 0.648711461939::T => now;
2173+ 9.22913408693 => c.freq; 0.633880569387::T => now;
2174+ 74.8085014754 => c.freq; 0.975678729336::T => now;
2175+ 45.7232704819 => c.freq; 0.422085567862::T => now;
2176+ 70.6104549223 => c.freq; 0.760981450326::T => now;
2177+ 14.0670638553 => c.freq; 0.855190887724::T => now;
2178+ 28.2045775408 => c.freq; 0.198462895415::T => now;
2179+ 35.5272011789 => c.freq; 0.45295319112::T => now;
2180+ 48.8174762859 => c.freq; 0.111216252087::T => now;
2181+ 21.5772789394 => c.freq; 0.63192313611::T => now;
2182+ 53.2483212703 => c.freq; 0.708117365548::T => now;
2183+ 8.39420479412 => c.freq; 0.118726918397::T => now;
2184+ 94.1412601813 => c.freq; 0.00227435035027::T => now;
2185+ 22.7259402831 => c.freq; 0.788258726865::T => now;
2186+ 37.62738641 => c.freq; 0.753953927236::T => now;
2187+ 24.7410864394 => c.freq; 0.537793462322::T => now;
2188+ 16.8648990013 => c.freq; 0.746139240207::T => now;
2189+ 28.9079990034 => c.freq; 0.460229529242::T => now;
2190+ 60.4867532489 => c.freq; 0.974618201641::T => now;
2191+ 53.9949091227 => c.freq; 0.712430511367::T => now;
2192+ 58.5674922482 => c.freq; 0.789783283426::T => now;
2193+ 75.3412338585 => c.freq; 0.571853249164::T => now;
2194+ 61.1770871374 => c.freq; 0.155804212259::T => now;
2195+ 1.44097785444 => c.freq; 0.789535985919::T => now;
2196+ 51.0561990819 => c.freq; 0.159252905472::T => now;
2197+ 58.2684359741 => c.freq; 0.907719737104::T => now;
2198+ 30.6552411327 => c.freq; 0.896215593472::T => now;
2199+ 68.7118926494 => c.freq; 0.606393432988::T => now;
2200+ 30.825387103 => c.freq; 0.267251858167::T => now;
2201+ 13.7376567337 => c.freq; 0.927872058692::T => now;
2202+ 87.5865705461 => c.freq; 0.328926942833::T => now;
2203+ 10.9963381301 => c.freq; 0.0223384712963::T => now;
2204+ 84.9345785496 => c.freq; 0.893238581039::T => now;
2205+ 53.3746088305 => c.freq; 0.624446636853::T => now;
2206+ 70.3579325877 => c.freq; 0.195011717798::T => now;
2207+ 11.2994663847 => c.freq; 0.619972647793::T => now;
2208+ 95.9606211012 => c.freq; 0.457055902411::T => now;
2209+ 5.74823778088 => c.freq; 0.831988494584::T => now;
2210+ 28.757113591 => c.freq; 0.456677048766::T => now;
2211+ 32.1191964371 => c.freq; 0.414941060809::T => now;
2212+ 15.2290558426 => c.freq; 0.683480023168::T => now;
2213+ 42.8376834284 => c.freq; 0.793624056216::T => now;
2214+ 95.9000618294 => c.freq; 0.795274313973::T => now;
2215+ 54.1929651177 => c.freq; 0.89977706362::T => now;
2216+ 64.8711461939 => c.freq; 0.50419306911::T => now;
2217+ 63.3880569387 => c.freq; 0.904964444807::T => now;
2218+ 97.5678729336 => c.freq; 0.627504824646::T => now;
2219+ 42.2085567862 => c.freq; 0.386795482629::T => now;
2220+ 76.0981450326 => c.freq; 0.551785220336::T => now;
2221+ 85.5190887724 => c.freq; 0.652566291244::T => now;
2222+ 19.8462895415 => c.freq; 0.39849532234::T => now;
2223+ 45.295319112 => c.freq; 0.248145295694::T => now;
2224+ 11.1216252087 => c.freq; 0.754479708933::T => now;
2225+ 63.192313611 => c.freq; 0.917898205013::T => now;
2226+ 70.8117365548 => c.freq; 0.111226719804::T => now;
2227+ 11.8726918397 => c.freq; 0.171612882353::T => now;
2228+ 0.227435035027 => c.freq; 0.954233201187::T => now;
2229+ 78.8258726865 => c.freq; 0.0922913408693::T => now;
2230+ 75.3953927236 => c.freq; 0.748085014754::T => now;
2231+ 53.7793462322 => c.freq; 0.457232704819::T => now;
2232+ 74.6139240207 => c.freq; 0.706104549223::T => now;
2233+ 46.0229529242 => c.freq; 0.140670638553::T => now;
2234+ 97.4618201641 => c.freq; 0.282045775408::T => now;
2235+ 71.2430511367 => c.freq; 0.355272011789::T => now;
2236+ 78.9783283426 => c.freq; 0.488174762859::T => now;
2237+ 57.1853249164 => c.freq; 0.215772789394::T => now;
2238+ 15.5804212259 => c.freq; 0.532483212703::T => now;
2239+ 78.9535985919 => c.freq; 0.0839420479412::T => now;
2240+ 15.9252905472 => c.freq; 0.941412601813::T => now;
2241+ 90.7719737104 => c.freq; 0.227259402831::T => now;
2242+ 89.6215593472 => c.freq; 0.3762738641::T => now;
2243+ 60.6393432988 => c.freq; 0.247410864394::T => now;
2244+ 26.7251858167 => c.freq; 0.168648990013::T => now;
2245+ 92.7872058692 => c.freq; 0.152290558426::T => now;
2246+ 32.8926942833 => c.freq; 0.428376834284::T => now;
2247+ 2.23384712963 => c.freq; 0.959000618294::T => now;
2248+ 89.3238581039 => c.freq; 0.541929651177::T => now;
2249+ 62.4446636853 => c.freq; 0.648711461939::T => now;
2250+ 19.5011717798 => c.freq; 0.633880569387::T => now;
2251+ 61.9972647793 => c.freq; 0.975678729336::T => now;
2252+ 45.7055902411 => c.freq; 0.422085567862::T => now;
2253+ 83.1988494584 => c.freq; 0.760981450326::T => now;
2254+ 45.6677048766 => c.freq; 0.855190887724::T => now;
2255+ 41.4941060809 => c.freq; 0.198462895415::T => now;
2256+ 68.3480023168 => c.freq; 0.45295319112::T => now;
2257+ 79.3624056216 => c.freq; 0.111216252087::T => now;
2258+ 79.5274313973 => c.freq; 0.63192313611::T => now;
2259+ 89.977706362 => c.freq; 0.708117365548::T => now;
2260+ 50.419306911 => c.freq; 0.118726918397::T => now;
2261+ 90.4964444807 => c.freq; 0.00227435035027::T => now;
2262+ 62.7504824646 => c.freq; 0.788258726865::T => now;
2263+ 38.6795482629 => c.freq; 0.753953927236::T => now;
2264+ 55.1785220336 => c.freq; 0.537793462322::T => now;
2265+ 65.2566291244 => c.freq; 0.746139240207::T => now;
2266+ 39.849532234 => c.freq; 0.460229529242::T => now;
2267+ 24.8145295694 => c.freq; 0.974618201641::T => now;
2268+ 75.4479708933 => c.freq; 0.712430511367::T => now;
2269+ 91.7898205013 => c.freq; 0.789783283426::T => now;
2270+ 11.1226719804 => c.freq; 0.571853249164::T => now;
2271+ 17.1612882353 => c.freq; 0.155804212259::T => now;
2272+ 95.4233201187 => c.freq; 0.789535985919::T => now;
2273+ 9.22913408693 => c.freq; 0.159252905472::T => now;
2274+ 74.8085014754 => c.freq; 0.907719737104::T => now;
2275+ 45.7232704819 => c.freq; 0.896215593472::T => now;
2276+ 70.6104549223 => c.freq; 0.606393432988::T => now;
2277+ 14.0670638553 => c.freq; 0.267251858167::T => now;
2278+ 28.2045775408 => c.freq; 0.927872058692::T => now;
2279+ 35.5272011789 => c.freq; 0.328926942833::T => now;
2280+ 48.8174762859 => c.freq; 0.0223384712963::T => now;
2281+ 21.5772789394 => c.freq; 0.893238581039::T => now;
2282+ 53.2483212703 => c.freq; 0.624446636853::T => now;
2283+ 8.39420479412 => c.freq; 0.195011717798::T => now;
2284+ 94.1412601813 => c.freq; 0.619972647793::T => now;
2285+ 22.7259402831 => c.freq; 0.457055902411::T => now;
2286+ 37.62738641 => c.freq; 0.831988494584::T => now;
2287+ 24.7410864394 => c.freq; 0.456677048766::T => now;
2288+ 16.8648990013 => c.freq; 0.414941060809::T => now;
2289+ 28.9079990034 => c.freq; 0.683480023168::T => now;
2290+ 60.4867532489 => c.freq; 0.793624056216::T => now;
2291+ 53.9949091227 => c.freq; 0.795274313973::T => now;
2292+ 58.5674922482 => c.freq; 0.89977706362::T => now;
2293+ 75.3412338585 => c.freq; 0.50419306911::T => now;
2294+ 61.1770871374 => c.freq; 0.904964444807::T => now;
2295+ 1.44097785444 => c.freq; 0.627504824646::T => now;
2296+ 51.0561990819 => c.freq; 0.386795482629::T => now;
2297+ 58.2684359741 => c.freq; 0.551785220336::T => now;
2298+ 30.6552411327 => c.freq; 0.652566291244::T => now;
2299+ 68.7118926494 => c.freq; 0.39849532234::T => now;
2300+ 30.825387103 => c.freq; 0.248145295694::T => now;
2301+ 13.7376567337 => c.freq; 0.754479708933::T => now;
2302+ 87.5865705461 => c.freq; 0.917898205013::T => now;
2303+ 10.9963381301 => c.freq; 0.111226719804::T => now;
2304+ 84.9345785496 => c.freq; 0.171612882353::T => now;
2305+ 53.3746088305 => c.freq; 0.954233201187::T => now;
2306+ 70.3579325877 => c.freq; 0.0922913408693::T => now;
2307+ 11.2994663847 => c.freq; 0.748085014754::T => now;
2308+ 95.9606211012 => c.freq; 0.457232704819::T => now;
2309+ 5.74823778088 => c.freq; 0.706104549223::T => now;
2310+ 28.757113591 => c.freq; 0.140670638553::T => now;
2311+ 32.1191964371 => c.freq; 0.282045775408::T => now;
2312+ 15.2290558426 => c.freq; 0.355272011789::T => now;
2313+ 42.8376834284 => c.freq; 0.488174762859::T => now;
2314+ 95.9000618294 => c.freq; 0.215772789394::T => now;
2315+ 54.1929651177 => c.freq; 0.532483212703::T => now;
2316+ 64.8711461939 => c.freq; 0.0839420479412::T => now;
2317+ 63.3880569387 => c.freq; 0.941412601813::T => now;
2318+ 97.5678729336 => c.freq; 0.227259402831::T => now;
2319+ 42.2085567862 => c.freq; 0.3762738641::T => now;
2320+ 76.0981450326 => c.freq; 0.247410864394::T => now;
2321+ 85.5190887724 => c.freq; 0.168648990013::T => now;
2322+ 19.8462895415 => c.freq; 0.152290558426::T => now;
2323+ 45.295319112 => c.freq; 0.428376834284::T => now;
2324+ 11.1216252087 => c.freq; 0.959000618294::T => now;
2325+ 63.192313611 => c.freq; 0.541929651177::T => now;
2326+ 70.8117365548 => c.freq; 0.648711461939::T => now;
2327+ 11.8726918397 => c.freq; 0.633880569387::T => now;
2328+ 0.227435035027 => c.freq; 0.975678729336::T => now;
2329+ 78.8258726865 => c.freq; 0.422085567862::T => now;
2330+ 75.3953927236 => c.freq; 0.760981450326::T => now;
2331+ 53.7793462322 => c.freq; 0.855190887724::T => now;
2332+ 74.6139240207 => c.freq; 0.198462895415::T => now;
2333+ 46.0229529242 => c.freq; 0.45295319112::T => now;
2334+ 97.4618201641 => c.freq; 0.111216252087::T => now;
2335+ 71.2430511367 => c.freq; 0.63192313611::T => now;
2336+ 78.9783283426 => c.freq; 0.708117365548::T => now;
2337+ 57.1853249164 => c.freq; 0.118726918397::T => now;
2338+ 15.5804212259 => c.freq; 0.00227435035027::T => now;
2339+ 78.9535985919 => c.freq; 0.788258726865::T => now;
2340+ 15.9252905472 => c.freq; 0.753953927236::T => now;
2341+ 90.7719737104 => c.freq; 0.537793462322::T => now;
2342+ 89.6215593472 => c.freq; 0.746139240207::T => now;
2343+ 60.6393432988 => c.freq; 0.460229529242::T => now;
2344+ 26.7251858167 => c.freq; 0.974618201641::T => now;
2345+ 92.7872058692 => c.freq; 0.712430511367::T => now;
2346+ 32.8926942833 => c.freq; 0.789783283426::T => now;
2347+ 2.23384712963 => c.freq; 0.571853249164::T => now;
2348+ 89.3238581039 => c.freq; 0.155804212259::T => now;
2349+ 62.4446636853 => c.freq; 0.789535985919::T => now;
2350+ 19.5011717798 => c.freq; 0.159252905472::T => now;
2351+ 61.9972647793 => c.freq; 0.907719737104::T => now;
2352+ 45.7055902411 => c.freq; 0.896215593472::T => now;
2353+ 83.1988494584 => c.freq; 0.606393432988::T => now;
2354+ 45.6677048766 => c.freq; 0.267251858167::T => now;
2355+ 41.4941060809 => c.freq; 0.927872058692::T => now;
2356+ 68.3480023168 => c.freq; 0.328926942833::T => now;
2357+ 79.3624056216 => c.freq; 0.0223384712963::T => now;
2358+ 79.5274313973 => c.freq; 0.893238581039::T => now;
2359+ 89.977706362 => c.freq; 0.624446636853::T => now;
2360+ 50.419306911 => c.freq; 0.195011717798::T => now;
2361+ 90.4964444807 => c.freq; 0.619972647793::T => now;
2362+ 62.7504824646 => c.freq; 0.457055902411::T => now;
2363+ 38.6795482629 => c.freq; 0.831988494584::T => now;
2364+ 55.1785220336 => c.freq; 0.456677048766::T => now;
2365+ 65.2566291244 => c.freq; 0.414941060809::T => now;
2366+ 39.849532234 => c.freq; 0.683480023168::T => now;
2367+ 24.8145295694 => c.freq; 0.793624056216::T => now;
2368+ 75.4479708933 => c.freq; 0.795274313973::T => now;
2369+ 91.7898205013 => c.freq; 0.89977706362::T => now;
2370+ 11.1226719804 => c.freq; 0.50419306911::T => now;
2371+ 17.1612882353 => c.freq; 0.904964444807::T => now;
2372+ 95.4233201187 => c.freq; 0.627504824646::T => now;
2373+ 9.22913408693 => c.freq; 0.386795482629::T => now;
2374+ 74.8085014754 => c.freq; 0.551785220336::T => now;
2375+ 45.7232704819 => c.freq; 0.652566291244::T => now;
2376+ 70.6104549223 => c.freq; 0.39849532234::T => now;
2377+ 14.0670638553 => c.freq; 0.248145295694::T => now;
2378+ 28.2045775408 => c.freq; 0.754479708933::T => now;
2379+ 35.5272011789 => c.freq; 0.917898205013::T => now;
2380+ 48.8174762859 => c.freq; 0.111226719804::T => now;
2381+ 21.5772789394 => c.freq; 0.171612882353::T => now;
2382+ 53.2483212703 => c.freq; 0.954233201187::T => now;
2383+ 8.39420479412 => c.freq; 0.0922913408693::T => now;
2384+ 94.1412601813 => c.freq; 0.748085014754::T => now;
2385+ 22.7259402831 => c.freq; 0.457232704819::T => now;
2386+ 37.62738641 => c.freq; 0.706104549223::T => now;
2387+ 24.7410864394 => c.freq; 0.140670638553::T => now;
2388+ 16.8648990013 => c.freq; 0.282045775408::T => now;
2389+ 28.9079990034 => c.freq; 0.355272011789::T => now;
2390+ 60.4867532489 => c.freq; 0.488174762859::T => now;
2391+ 53.9949091227 => c.freq; 0.215772789394::T => now;
2392+ 58.5674922482 => c.freq; 0.532483212703::T => now;
2393+ 75.3412338585 => c.freq; 0.0839420479412::T => now;
2394+ 61.1770871374 => c.freq; 0.941412601813::T => now;
2395+ 1.44097785444 => c.freq; 0.227259402831::T => now;
2396+ 51.0561990819 => c.freq; 0.3762738641::T => now;
2397+ 58.2684359741 => c.freq; 0.247410864394::T => now;
2398+ 30.6552411327 => c.freq; 0.168648990013::T => now;
2399+ 68.7118926494 => c.freq; 0.152290558426::T => now;
2400+ 30.825387103 => c.freq; 0.428376834284::T => now;
2401+ 13.7376567337 => c.freq; 0.959000618294::T => now;
2402+ 87.5865705461 => c.freq; 0.541929651177::T => now;
2403+ 10.9963381301 => c.freq; 0.648711461939::T => now;
2404+ 84.9345785496 => c.freq; 0.633880569387::T => now;
2405+ 53.3746088305 => c.freq; 0.975678729336::T => now;
2406+ 70.3579325877 => c.freq; 0.422085567862::T => now;
2407+ 11.2994663847 => c.freq; 0.760981450326::T => now;
2408+ 95.9606211012 => c.freq; 0.855190887724::T => now;
2409+ 5.74823778088 => c.freq; 0.198462895415::T => now;
2410+ 28.757113591 => c.freq; 0.45295319112::T => now;
2411+ 32.1191964371 => c.freq; 0.111216252087::T => now;
2412+ 15.2290558426 => c.freq; 0.63192313611::T => now;
2413+ 42.8376834284 => c.freq; 0.708117365548::T => now;
2414+ 95.9000618294 => c.freq; 0.118726918397::T => now;
2415+ 54.1929651177 => c.freq; 0.00227435035027::T => now;
2416+ 64.8711461939 => c.freq; 0.788258726865::T => now;
2417+ 63.3880569387 => c.freq; 0.753953927236::T => now;
2418+ 97.5678729336 => c.freq; 0.537793462322::T => now;
2419+ 42.2085567862 => c.freq; 0.746139240207::T => now;
2420+ 76.0981450326 => c.freq; 0.460229529242::T => now;
2421+ 85.5190887724 => c.freq; 0.974618201641::T => now;
2422+ 19.8462895415 => c.freq; 0.712430511367::T => now;
2423+ 45.295319112 => c.freq; 0.789783283426::T => now;
2424+ 11.1216252087 => c.freq; 0.571853249164::T => now;
2425+ 63.192313611 => c.freq; 0.155804212259::T => now;
2426+ 70.8117365548 => c.freq; 0.789535985919::T => now;
2427+ 11.8726918397 => c.freq; 0.159252905472::T => now;
2428+ 0.227435035027 => c.freq; 0.907719737104::T => now;
2429+ 78.8258726865 => c.freq; 0.896215593472::T => now;
2430+ 75.3953927236 => c.freq; 0.606393432988::T => now;
2431+ 53.7793462322 => c.freq; 0.267251858167::T => now;
2432+ 74.6139240207 => c.freq; 0.927872058692::T => now;
2433+ 46.0229529242 => c.freq; 0.328926942833::T => now;
2434+ 97.4618201641 => c.freq; 0.0223384712963::T => now;
2435+ 71.2430511367 => c.freq; 0.893238581039::T => now;
2436+ 78.9783283426 => c.freq; 0.624446636853::T => now;
2437+ 57.1853249164 => c.freq; 0.195011717798::T => now;
2438+ 15.5804212259 => c.freq; 0.619972647793::T => now;
2439+ 78.9535985919 => c.freq; 0.457055902411::T => now;
2440+ 15.9252905472 => c.freq; 0.831988494584::T => now;
2441+ 90.7719737104 => c.freq; 0.456677048766::T => now;
2442+ 89.6215593472 => c.freq; 0.414941060809::T => now;
2443+ 60.6393432988 => c.freq; 0.683480023168::T => now;
2444+ 26.7251858167 => c.freq; 0.793624056216::T => now;
2445+ 92.7872058692 => c.freq; 0.795274313973::T => now;
2446+ 32.8926942833 => c.freq; 0.89977706362::T => now;
2447+ 2.23384712963 => c.freq; 0.50419306911::T => now;
2448+ 89.3238581039 => c.freq; 0.904964444807::T => now;
2449+ 62.4446636853 => c.freq; 0.627504824646::T => now;
2450+ 19.5011717798 => c.freq; 0.386795482629::T => now;
2451+ 61.9972647793 => c.freq; 0.551785220336::T => now;
2452+ 45.7055902411 => c.freq; 0.652566291244::T => now;
2453+ 83.1988494584 => c.freq; 0.39849532234::T => now;
2454+ 45.6677048766 => c.freq; 0.248145295694::T => now;
2455+ 41.4941060809 => c.freq; 0.754479708933::T => now;
2456+ 68.3480023168 => c.freq; 0.917898205013::T => now;
2457+ 79.3624056216 => c.freq; 0.111226719804::T => now;
2458+ 79.5274313973 => c.freq; 0.171612882353::T => now;
2459+ 89.977706362 => c.freq; 0.954233201187::T => now;
2460+ 50.419306911 => c.freq; 0.0922913408693::T => now;
2461+ 90.4964444807 => c.freq; 0.748085014754::T => now;
2462+ 62.7504824646 => c.freq; 0.457232704819::T => now;
2463+ 38.6795482629 => c.freq; 0.706104549223::T => now;
2464+ 55.1785220336 => c.freq; 0.140670638553::T => now;
2465+ 65.2566291244 => c.freq; 0.282045775408::T => now;
2466+ 39.849532234 => c.freq; 0.355272011789::T => now;
2467+ 24.8145295694 => c.freq; 0.488174762859::T => now;
2468+ 75.4479708933 => c.freq; 0.215772789394::T => now;
2469+ 91.7898205013 => c.freq; 0.532483212703::T => now;
2470+ 11.1226719804 => c.freq; 0.0839420479412::T => now;
2471+ 17.1612882353 => c.freq; 0.941412601813::T => now;
2472+ 95.4233201187 => c.freq; 0.227259402831::T => now;
2473+ 9.22913408693 => c.freq; 0.3762738641::T => now;
2474+ 74.8085014754 => c.freq; 0.247410864394::T => now;
2475+ 45.7232704819 => c.freq; 0.168648990013::T => now;
2476+ 70.6104549223 => c.freq; 0.152290558426::T => now;
2477+ 14.0670638553 => c.freq; 0.428376834284::T => now;
2478+ 28.2045775408 => c.freq; 0.959000618294::T => now;
2479+ 35.5272011789 => c.freq; 0.541929651177::T => now;
2480+ 48.8174762859 => c.freq; 0.648711461939::T => now;
2481+ 21.5772789394 => c.freq; 0.633880569387::T => now;
2482+ 53.2483212703 => c.freq; 0.975678729336::T => now;
2483+ 8.39420479412 => c.freq; 0.422085567862::T => now;
2484+ 94.1412601813 => c.freq; 0.760981450326::T => now;
2485+ 22.7259402831 => c.freq; 0.855190887724::T => now;
2486+ 37.62738641 => c.freq; 0.198462895415::T => now;
2487+ 24.7410864394 => c.freq; 0.45295319112::T => now;
2488+ 16.8648990013 => c.freq; 0.111216252087::T => now;
2489+ 28.9079990034 => c.freq; 0.63192313611::T => now;
2490+ 60.4867532489 => c.freq; 0.708117365548::T => now;
2491+ 53.9949091227 => c.freq; 0.118726918397::T => now;
2492+ 58.5674922482 => c.freq; 0.00227435035027::T => now;
2493+ 75.3412338585 => c.freq; 0.788258726865::T => now;
2494+ 61.1770871374 => c.freq; 0.753953927236::T => now;
2495+ 1.44097785444 => c.freq; 0.537793462322::T => now;
2496+ 51.0561990819 => c.freq; 0.746139240207::T => now;
2497+ 58.2684359741 => c.freq; 0.460229529242::T => now;
2498+ 30.6552411327 => c.freq; 0.974618201641::T => now;
2499+ 68.7118926494 => c.freq; 0.712430511367::T => now;
2500+ 30.825387103 => c.freq; 0.789783283426::T => now;
2501+ 13.7376567337 => c.freq; 0.571853249164::T => now;
2502+ 87.5865705461 => c.freq; 0.155804212259::T => now;
2503+ 10.9963381301 => c.freq; 0.789535985919::T => now;
2504+ 84.9345785496 => c.freq; 0.159252905472::T => now;
2505+ 53.3746088305 => c.freq; 0.907719737104::T => now;
2506+ 70.3579325877 => c.freq; 0.896215593472::T => now;
2507+ 11.2994663847 => c.freq; 0.606393432988::T => now;
2508+ 95.9606211012 => c.freq; 0.267251858167::T => now;
2509+ 5.74823778088 => c.freq; 0.927872058692::T => now;
2510+ 28.757113591 => c.freq; 0.328926942833::T => now;
2511+ 32.1191964371 => c.freq; 0.0223384712963::T => now;
2512+ 15.2290558426 => c.freq; 0.893238581039::T => now;
2513+ 42.8376834284 => c.freq; 0.624446636853::T => now;
2514+ 95.9000618294 => c.freq; 0.195011717798::T => now;
2515+ 54.1929651177 => c.freq; 0.619972647793::T => now;
2516+ 64.8711461939 => c.freq; 0.457055902411::T => now;
2517+ 63.3880569387 => c.freq; 0.831988494584::T => now;
2518+ 97.5678729336 => c.freq; 0.456677048766::T => now;
2519+ 42.2085567862 => c.freq; 0.414941060809::T => now;
2520+ 76.0981450326 => c.freq; 0.683480023168::T => now;
2521+ 85.5190887724 => c.freq; 0.793624056216::T => now;
2522+ 19.8462895415 => c.freq; 0.795274313973::T => now;
2523+ 45.295319112 => c.freq; 0.89977706362::T => now;
2524+ 11.1216252087 => c.freq; 0.50419306911::T => now;
2525+ 63.192313611 => c.freq; 0.904964444807::T => now;
2526+ 70.8117365548 => c.freq; 0.627504824646::T => now;
2527+ 11.8726918397 => c.freq; 0.386795482629::T => now;
2528+ 0.227435035027 => c.freq; 0.551785220336::T => now;
2529+ 78.8258726865 => c.freq; 0.652566291244::T => now;
2530+ 75.3953927236 => c.freq; 0.39849532234::T => now;
2531+ 53.7793462322 => c.freq; 0.248145295694::T => now;
2532+ 74.6139240207 => c.freq; 0.754479708933::T => now;
2533+ 46.0229529242 => c.freq; 0.917898205013::T => now;
2534+ 97.4618201641 => c.freq; 0.111226719804::T => now;
2535+ 71.2430511367 => c.freq; 0.171612882353::T => now;
2536+ 78.9783283426 => c.freq; 0.954233201187::T => now;
2537+ 57.1853249164 => c.freq; 0.0922913408693::T => now;
2538+ 15.5804212259 => c.freq; 0.748085014754::T => now;
2539+ 78.9535985919 => c.freq; 0.457232704819::T => now;
2540+ 15.9252905472 => c.freq; 0.706104549223::T => now;
2541+ 90.7719737104 => c.freq; 0.140670638553::T => now;
2542+ 89.6215593472 => c.freq; 0.282045775408::T => now;
2543+ 60.6393432988 => c.freq; 0.355272011789::T => now;
2544+ 26.7251858167 => c.freq; 0.488174762859::T => now;
2545+ 92.7872058692 => c.freq; 0.215772789394::T => now;
2546+ 32.8926942833 => c.freq; 0.532483212703::T => now;
2547+ 2.23384712963 => c.freq; 0.0839420479412::T => now;
2548+ 89.3238581039 => c.freq; 0.941412601813::T => now;
2549+ 62.4446636853 => c.freq; 0.227259402831::T => now;
2550+ 19.5011717798 => c.freq; 0.3762738641::T => now;
2551+ 61.9972647793 => c.freq; 0.247410864394::T => now;
2552+ 45.7055902411 => c.freq; 0.168648990013::T => now;
2553+ 83.1988494584 => c.freq; 0.152290558426::T => now;
2554+ 45.6677048766 => c.freq; 0.428376834284::T => now;
2555+ 41.4941060809 => c.freq; 0.959000618294::T => now;
2556+ 68.3480023168 => c.freq; 0.541929651177::T => now;
2557+ 79.3624056216 => c.freq; 0.648711461939::T => now;
2558+ 79.5274313973 => c.freq; 0.633880569387::T => now;
2559+ 89.977706362 => c.freq; 0.975678729336::T => now;
2560+ 50.419306911 => c.freq; 0.422085567862::T => now;
2561+ 90.4964444807 => c.freq; 0.760981450326::T => now;
2562+ 62.7504824646 => c.freq; 0.855190887724::T => now;
2563+ 38.6795482629 => c.freq; 0.198462895415::T => now;
2564+ 55.1785220336 => c.freq; 0.45295319112::T => now;
2565+ 65.2566291244 => c.freq; 0.111216252087::T => now;
2566+ 39.849532234 => c.freq; 0.63192313611::T => now;
2567+ 24.8145295694 => c.freq; 0.708117365548::T => now;
2568+ 75.4479708933 => c.freq; 0.118726918397::T => now;
2569+ 91.7898205013 => c.freq; 0.00227435035027::T => now;
2570+ 11.1226719804 => c.freq; 0.788258726865::T => now;
2571+ 17.1612882353 => c.freq; 0.753953927236::T => now;
2572+ 95.4233201187 => c.freq; 0.537793462322::T => now;
2573+ 9.22913408693 => c.freq; 0.746139240207::T => now;
2574+ 74.8085014754 => c.freq; 0.460229529242::T => now;
2575+ 45.7232704819 => c.freq; 0.974618201641::T => now;
2576+ 70.6104549223 => c.freq; 0.712430511367::T => now;
2577+ 14.0670638553 => c.freq; 0.789783283426::T => now;
2578+ 28.2045775408 => c.freq; 0.571853249164::T => now;
2579+ 35.5272011789 => c.freq; 0.155804212259::T => now;
2580+ 48.8174762859 => c.freq; 0.789535985919::T => now;
2581+ 21.5772789394 => c.freq; 0.159252905472::T => now;
2582+ 53.2483212703 => c.freq; 0.907719737104::T => now;
2583+ 8.39420479412 => c.freq; 0.896215593472::T => now;
2584+ 94.1412601813 => c.freq; 0.606393432988::T => now;
2585+ 22.7259402831 => c.freq; 0.267251858167::T => now;
2586+ 37.62738641 => c.freq; 0.927872058692::T => now;
2587+ 24.7410864394 => c.freq; 0.328926942833::T => now;
2588+ 16.8648990013 => c.freq; 0.0223384712963::T => now;
2589+ 28.9079990034 => c.freq; 0.893238581039::T => now;
2590+ 60.4867532489 => c.freq; 0.624446636853::T => now;
2591+ 53.9949091227 => c.freq; 0.195011717798::T => now;
2592+ 58.5674922482 => c.freq; 0.619972647793::T => now;
2593+ 75.3412338585 => c.freq; 0.457055902411::T => now;
2594+ 61.1770871374 => c.freq; 0.831988494584::T => now;
2595+ 1.44097785444 => c.freq; 0.456677048766::T => now;
2596+ 51.0561990819 => c.freq; 0.414941060809::T => now;
2597+ 58.2684359741 => c.freq; 0.683480023168::T => now;
2598+ 30.6552411327 => c.freq; 0.793624056216::T => now;
2599+ 68.7118926494 => c.freq; 0.795274313973::T => now;
2600+ 30.825387103 => c.freq; 0.89977706362::T => now;
2601+ 13.7376567337 => c.freq; 0.50419306911::T => now;
2602+ 87.5865705461 => c.freq; 0.904964444807::T => now;
2603+ 10.9963381301 => c.freq; 0.627504824646::T => now;
2604+ 84.9345785496 => c.freq; 0.386795482629::T => now;
2605+ 53.3746088305 => c.freq; 0.551785220336::T => now;
2606+ 70.3579325877 => c.freq; 0.652566291244::T => now;
2607+ 11.2994663847 => c.freq; 0.39849532234::T => now;
2608+ 95.9606211012 => c.freq; 0.248145295694::T => now;
2609+ 5.74823778088 => c.freq; 0.754479708933::T => now;
2610+ 28.757113591 => c.freq; 0.917898205013::T => now;
2611+ 32.1191964371 => c.freq; 0.111226719804::T => now;
2612+ 15.2290558426 => c.freq; 0.171612882353::T => now;
2613+ 42.8376834284 => c.freq; 0.954233201187::T => now;
2614+ 95.9000618294 => c.freq; 0.0922913408693::T => now;
2615+ 54.1929651177 => c.freq; 0.748085014754::T => now;
2616+ 64.8711461939 => c.freq; 0.457232704819::T => now;
2617+ 63.3880569387 => c.freq; 0.706104549223::T => now;
2618+ 97.5678729336 => c.freq; 0.140670638553::T => now;
2619+ 42.2085567862 => c.freq; 0.282045775408::T => now;
2620+ 76.0981450326 => c.freq; 0.355272011789::T => now;
2621+ 85.5190887724 => c.freq; 0.488174762859::T => now;
2622+ 19.8462895415 => c.freq; 0.215772789394::T => now;
2623+ 45.295319112 => c.freq; 0.532483212703::T => now;
2624+ 11.1216252087 => c.freq; 0.0839420479412::T => now;
2625+ 63.192313611 => c.freq; 0.941412601813::T => now;
2626+ 70.8117365548 => c.freq; 0.227259402831::T => now;
2627+ 11.8726918397 => c.freq; 0.3762738641::T => now;
2628+ 0.227435035027 => c.freq; 0.247410864394::T => now;
2629+ 78.8258726865 => c.freq; 0.168648990013::T => now;
2630+ 75.3953927236 => c.freq; 0.152290558426::T => now;
2631+ 53.7793462322 => c.freq; 0.428376834284::T => now;
2632+ 74.6139240207 => c.freq; 0.959000618294::T => now;
2633+ 46.0229529242 => c.freq; 0.541929651177::T => now;
2634+ 97.4618201641 => c.freq; 0.648711461939::T => now;
2635+ 71.2430511367 => c.freq; 0.633880569387::T => now;
2636+ 78.9783283426 => c.freq; 0.975678729336::T => now;
2637+ 57.1853249164 => c.freq; 0.422085567862::T => now;
2638+ 15.5804212259 => c.freq; 0.760981450326::T => now;
2639+ 78.9535985919 => c.freq; 0.855190887724::T => now;
2640+ 15.9252905472 => c.freq; 0.198462895415::T => now;
2641+ 90.7719737104 => c.freq; 0.45295319112::T => now;
2642+ 89.6215593472 => c.freq; 0.111216252087::T => now;
2643+ 60.6393432988 => c.freq; 0.63192313611::T => now;
2644+ 26.7251858167 => c.freq; 0.708117365548::T => now;
2645+ 92.7872058692 => c.freq; 0.118726918397::T => now;
2646+ 32.8926942833 => c.freq; 0.00227435035027::T => now;
2647+ 2.23384712963 => c.freq; 0.788258726865::T => now;
2648+ 89.3238581039 => c.freq; 0.753953927236::T => now;
2649+ 62.4446636853 => c.freq; 0.537793462322::T => now;
2650+ 19.5011717798 => c.freq; 0.746139240207::T => now;
2651+ 61.9972647793 => c.freq; 0.460229529242::T => now;
2652+ 45.7055902411 => c.freq; 0.974618201641::T => now;
2653+ 83.1988494584 => c.freq; 0.712430511367::T => now;
2654+ 45.6677048766 => c.freq; 0.789783283426::T => now;
2655+ 41.4941060809 => c.freq; 0.571853249164::T => now;
2656+ 68.3480023168 => c.freq; 0.155804212259::T => now;
2657+ 79.3624056216 => c.freq; 0.789535985919::T => now;
2658+ 79.5274313973 => c.freq; 0.159252905472::T => now;
2659+ 89.977706362 => c.freq; 0.907719737104::T => now;
2660+ 50.419306911 => c.freq; 0.896215593472::T => now;
2661+ 90.4964444807 => c.freq; 0.606393432988::T => now;
2662+ 62.7504824646 => c.freq; 0.267251858167::T => now;
2663+ 38.6795482629 => c.freq; 0.927872058692::T => now;
2664+ 55.1785220336 => c.freq; 0.328926942833::T => now;
2665+ 65.2566291244 => c.freq; 0.0223384712963::T => now;
2666+ 39.849532234 => c.freq; 0.893238581039::T => now;
2667+ 24.8145295694 => c.freq; 0.624446636853::T => now;
2668+ 75.4479708933 => c.freq; 0.195011717798::T => now;
2669+ 91.7898205013 => c.freq; 0.619972647793::T => now;
2670+ 11.1226719804 => c.freq; 0.457055902411::T => now;
2671+ 17.1612882353 => c.freq; 0.831988494584::T => now;
2672+ 95.4233201187 => c.freq; 0.456677048766::T => now;
2673+ 9.22913408693 => c.freq; 0.414941060809::T => now;
2674+ 74.8085014754 => c.freq; 0.683480023168::T => now;
2675+ 45.7232704819 => c.freq; 0.793624056216::T => now;
2676+ 70.6104549223 => c.freq; 0.795274313973::T => now;
2677+ 14.0670638553 => c.freq; 0.89977706362::T => now;
2678+ 28.2045775408 => c.freq; 0.50419306911::T => now;
2679+ 35.5272011789 => c.freq; 0.904964444807::T => now;
2680+ 48.8174762859 => c.freq; 0.627504824646::T => now;
2681+ 21.5772789394 => c.freq; 0.386795482629::T => now;
2682+ 53.2483212703 => c.freq; 0.551785220336::T => now;
2683+ 8.39420479412 => c.freq; 0.652566291244::T => now;
2684+ 94.1412601813 => c.freq; 0.39849532234::T => now;
2685+ 22.7259402831 => c.freq; 0.248145295694::T => now;
2686+ 37.62738641 => c.freq; 0.754479708933::T => now;
2687+ 24.7410864394 => c.freq; 0.917898205013::T => now;
2688+ 16.8648990013 => c.freq; 0.111226719804::T => now;
2689+ 28.9079990034 => c.freq; 0.171612882353::T => now;
2690+ 60.4867532489 => c.freq; 0.954233201187::T => now;
2691+ 53.9949091227 => c.freq; 0.0922913408693::T => now;
2692+ 58.5674922482 => c.freq; 0.748085014754::T => now;
2693+ 75.3412338585 => c.freq; 0.457232704819::T => now;
2694+ 61.1770871374 => c.freq; 0.706104549223::T => now;
2695+ 1.44097785444 => c.freq; 0.140670638553::T => now;
2696+ 51.0561990819 => c.freq; 0.282045775408::T => now;
2697+ 58.2684359741 => c.freq; 0.355272011789::T => now;
2698+ 30.6552411327 => c.freq; 0.488174762859::T => now;
2699+ 68.7118926494 => c.freq; 0.215772789394::T => now;
2700+ 30.825387103 => c.freq; 0.532483212703::T => now;
2701+ 13.7376567337 => c.freq; 0.0839420479412::T => now;
2702+ 87.5865705461 => c.freq; 0.941412601813::T => now;
2703+ 10.9963381301 => c.freq; 0.227259402831::T => now;
2704+ 84.9345785496 => c.freq; 0.3762738641::T => now;
2705+ 53.3746088305 => c.freq; 0.247410864394::T => now;
2706+ 70.3579325877 => c.freq; 0.168648990013::T => now;
2707+ 11.2994663847 => c.freq; 0.152290558426::T => now;
2708+ 95.9606211012 => c.freq; 0.428376834284::T => now;
2709+ 5.74823778088 => c.freq; 0.959000618294::T => now;
2710+ 28.757113591 => c.freq; 0.541929651177::T => now;
2711+ 32.1191964371 => c.freq; 0.648711461939::T => now;
2712+ 15.2290558426 => c.freq; 0.633880569387::T => now;
2713+ 42.8376834284 => c.freq; 0.975678729336::T => now;
2714+ 95.9000618294 => c.freq; 0.422085567862::T => now;
2715+ 54.1929651177 => c.freq; 0.760981450326::T => now;
2716+ 64.8711461939 => c.freq; 0.855190887724::T => now;
2717+ 63.3880569387 => c.freq; 0.198462895415::T => now;
2718+ 97.5678729336 => c.freq; 0.45295319112::T => now;
2719+ 42.2085567862 => c.freq; 0.111216252087::T => now;
2720+ 76.0981450326 => c.freq; 0.63192313611::T => now;
2721+ 85.5190887724 => c.freq; 0.708117365548::T => now;
2722+ 19.8462895415 => c.freq; 0.118726918397::T => now;
2723+ 45.295319112 => c.freq; 0.00227435035027::T => now;
2724+ 11.1216252087 => c.freq; 0.788258726865::T => now;
2725+ 63.192313611 => c.freq; 0.753953927236::T => now;
2726+ 70.8117365548 => c.freq; 0.537793462322::T => now;
2727+ 11.8726918397 => c.freq; 0.746139240207::T => now;
2728+ 0.227435035027 => c.freq; 0.460229529242::T => now;
2729+ 78.8258726865 => c.freq; 0.974618201641::T => now;
2730+ 75.3953927236 => c.freq; 0.712430511367::T => now;
2731+ 53.7793462322 => c.freq; 0.789783283426::T => now;
2732+ 74.6139240207 => c.freq; 0.571853249164::T => now;
2733+ 46.0229529242 => c.freq; 0.155804212259::T => now;
2734+ 97.4618201641 => c.freq; 0.789535985919::T => now;
2735+ 71.2430511367 => c.freq; 0.159252905472::T => now;
2736+ 78.9783283426 => c.freq; 0.907719737104::T => now;
2737+ 57.1853249164 => c.freq; 0.896215593472::T => now;
2738+ 15.5804212259 => c.freq; 0.606393432988::T => now;
2739+ 78.9535985919 => c.freq; 0.267251858167::T => now;
2740+ 15.9252905472 => c.freq; 0.927872058692::T => now;
2741+ 90.7719737104 => c.freq; 0.328926942833::T => now;
2742+ 89.6215593472 => c.freq; 0.0223384712963::T => now;
2743+ 60.6393432988 => c.freq; 0.893238581039::T => now;
2744+ 26.7251858167 => c.freq; 0.624446636853::T => now;
2745+ 92.7872058692 => c.freq; 0.195011717798::T => now;
2746+ 32.8926942833 => c.freq; 0.619972647793::T => now;
2747+ 2.23384712963 => c.freq; 0.457055902411::T => now;
2748+ 89.3238581039 => c.freq; 0.831988494584::T => now;
2749+ 62.4446636853 => c.freq; 0.456677048766::T => now;
2750+ 19.5011717798 => c.freq; 0.414941060809::T => now;
2751+ 61.9972647793 => c.freq; 0.683480023168::T => now;
2752+ 45.7055902411 => c.freq; 0.793624056216::T => now;
2753+ 83.1988494584 => c.freq; 0.795274313973::T => now;
2754+ 45.6677048766 => c.freq; 0.89977706362::T => now;
2755+ 41.4941060809 => c.freq; 0.50419306911::T => now;
2756+ 68.3480023168 => c.freq; 0.904964444807::T => now;
2757+ 79.3624056216 => c.freq; 0.627504824646::T => now;
2758+ 79.5274313973 => c.freq; 0.386795482629::T => now;
2759+ 89.977706362 => c.freq; 0.551785220336::T => now;
2760+ 50.419306911 => c.freq; 0.652566291244::T => now;
2761+ 90.4964444807 => c.freq; 0.39849532234::T => now;
2762+ 62.7504824646 => c.freq; 0.248145295694::T => now;
2763+ 38.6795482629 => c.freq; 0.754479708933::T => now;
2764+ 55.1785220336 => c.freq; 0.917898205013::T => now;
2765+ 65.2566291244 => c.freq; 0.111226719804::T => now;
2766+ 39.849532234 => c.freq; 0.171612882353::T => now;
2767+ 24.8145295694 => c.freq; 0.954233201187::T => now;
2768+ 75.4479708933 => c.freq; 0.0922913408693::T => now;
2769+ 91.7898205013 => c.freq; 0.748085014754::T => now;
2770+ 11.1226719804 => c.freq; 0.457232704819::T => now;
2771+ 17.1612882353 => c.freq; 0.706104549223::T => now;
2772+ 95.4233201187 => c.freq; 0.140670638553::T => now;
2773+ 9.22913408693 => c.freq; 0.282045775408::T => now;
2774+ 74.8085014754 => c.freq; 0.355272011789::T => now;
2775+ 45.7232704819 => c.freq; 0.488174762859::T => now;
2776+ 70.6104549223 => c.freq; 0.215772789394::T => now;
2777+ 14.0670638553 => c.freq; 0.532483212703::T => now;
2778+ 28.2045775408 => c.freq; 0.0839420479412::T => now;
2779+ 35.5272011789 => c.freq; 0.941412601813::T => now;
2780+ 48.8174762859 => c.freq; 0.227259402831::T => now;
2781+ 21.5772789394 => c.freq; 0.3762738641::T => now;
2782+ 53.2483212703 => c.freq; 0.247410864394::T => now;
2783+ 8.39420479412 => c.freq; 0.168648990013::T => now;
2784+ 94.1412601813 => c.freq; 0.152290558426::T => now;
2785+ 22.7259402831 => c.freq; 0.428376834284::T => now;
2786+ 37.62738641 => c.freq; 0.959000618294::T => now;
2787+ 24.7410864394 => c.freq; 0.541929651177::T => now;
2788+ 16.8648990013 => c.freq; 0.648711461939::T => now;
2789+ 28.9079990034 => c.freq; 0.633880569387::T => now;
2790+ 60.4867532489 => c.freq; 0.975678729336::T => now;
2791+ 53.9949091227 => c.freq; 0.422085567862::T => now;
2792+ 58.5674922482 => c.freq; 0.760981450326::T => now;
2793+ 75.3412338585 => c.freq; 0.855190887724::T => now;
2794+ 61.1770871374 => c.freq; 0.198462895415::T => now;
2795+ 1.44097785444 => c.freq; 0.45295319112::T => now;
2796+ 51.0561990819 => c.freq; 0.111216252087::T => now;
2797+ 58.2684359741 => c.freq; 0.63192313611::T => now;
2798+ 30.6552411327 => c.freq; 0.708117365548::T => now;
2799+ 68.7118926494 => c.freq; 0.118726918397::T => now;
2800+ 30.825387103 => c.freq; 0.00227435035027::T => now;
2801+ 13.7376567337 => c.freq; 0.788258726865::T => now;
2802+ 87.5865705461 => c.freq; 0.753953927236::T => now;
2803+ 10.9963381301 => c.freq; 0.537793462322::T => now;
2804+ 84.9345785496 => c.freq; 0.746139240207::T => now;
2805+ 53.3746088305 => c.freq; 0.460229529242::T => now;
2806+ 70.3579325877 => c.freq; 0.974618201641::T => now;
2807+ 11.2994663847 => c.freq; 0.712430511367::T => now;
2808+ 95.9606211012 => c.freq; 0.789783283426::T => now;
2809+ 5.74823778088 => c.freq; 0.571853249164::T => now;
2810+ 28.757113591 => c.freq; 0.155804212259::T => now;
2811+ 32.1191964371 => c.freq; 0.789535985919::T => now;
2812+ 15.2290558426 => c.freq; 0.159252905472::T => now;
2813+ 42.8376834284 => c.freq; 0.907719737104::T => now;
2814+ 95.9000618294 => c.freq; 0.896215593472::T => now;
2815+ 54.1929651177 => c.freq; 0.606393432988::T => now;
2816+ 64.8711461939 => c.freq; 0.267251858167::T => now;
2817+ 63.3880569387 => c.freq; 0.927872058692::T => now;
2818+ 97.5678729336 => c.freq; 0.328926942833::T => now;
2819+ 42.2085567862 => c.freq; 0.0223384712963::T => now;
2820+ 76.0981450326 => c.freq; 0.893238581039::T => now;
2821+ 85.5190887724 => c.freq; 0.624446636853::T => now;
2822+ 19.8462895415 => c.freq; 0.195011717798::T => now;
2823+ 45.295319112 => c.freq; 0.619972647793::T => now;
2824+ 11.1216252087 => c.freq; 0.457055902411::T => now;
2825+ 63.192313611 => c.freq; 0.831988494584::T => now;
2826+ 70.8117365548 => c.freq; 0.456677048766::T => now;
2827+ 11.8726918397 => c.freq; 0.414941060809::T => now;
2828+ 0.227435035027 => c.freq; 0.683480023168::T => now;
2829+ 78.8258726865 => c.freq; 0.793624056216::T => now;
2830+ 75.3953927236 => c.freq; 0.795274313973::T => now;
2831+ 53.7793462322 => c.freq; 0.89977706362::T => now;
2832+ 74.6139240207 => c.freq; 0.50419306911::T => now;
2833+ 46.0229529242 => c.freq; 0.904964444807::T => now;
2834+ 97.4618201641 => c.freq; 0.627504824646::T => now;
2835+ 71.2430511367 => c.freq; 0.386795482629::T => now;
2836+ 78.9783283426 => c.freq; 0.551785220336::T => now;
2837+ 57.1853249164 => c.freq; 0.652566291244::T => now;
2838+ 15.5804212259 => c.freq; 0.39849532234::T => now;
2839+ 78.9535985919 => c.freq; 0.248145295694::T => now;
2840+ 15.9252905472 => c.freq; 0.754479708933::T => now;
2841+ 90.7719737104 => c.freq; 0.917898205013::T => now;
2842+ 89.6215593472 => c.freq; 0.111226719804::T => now;
2843+ 60.6393432988 => c.freq; 0.171612882353::T => now;
2844+ 26.7251858167 => c.freq; 0.954233201187::T => now;
2845+ 92.7872058692 => c.freq; 0.0922913408693::T => now;
2846+ 32.8926942833 => c.freq; 0.748085014754::T => now;
2847+ 2.23384712963 => c.freq; 0.457232704819::T => now;
2848+ 89.3238581039 => c.freq; 0.706104549223::T => now;
2849+ 62.4446636853 => c.freq; 0.140670638553::T => now;
2850+ 19.5011717798 => c.freq; 0.282045775408::T => now;
2851+ 61.9972647793 => c.freq; 0.355272011789::T => now;
2852+ 45.7055902411 => c.freq; 0.488174762859::T => now;
2853+ 83.1988494584 => c.freq; 0.215772789394::T => now;
2854+ 45.6677048766 => c.freq; 0.532483212703::T => now;
2855+ 41.4941060809 => c.freq; 0.0839420479412::T => now;
2856+ 68.3480023168 => c.freq; 0.941412601813::T => now;
2857+ 79.3624056216 => c.freq; 0.227259402831::T => now;
2858+ 79.5274313973 => c.freq; 0.3762738641::T => now;
2859+ 89.977706362 => c.freq; 0.247410864394::T => now;
2860+ 50.419306911 => c.freq; 0.168648990013::T => now;
2861+ 90.4964444807 => c.freq; 0.152290558426::T => now;
2862+ 62.7504824646 => c.freq; 0.428376834284::T => now;
2863+ 38.6795482629 => c.freq; 0.959000618294::T => now;
2864+ 55.1785220336 => c.freq; 0.541929651177::T => now;
2865+ 65.2566291244 => c.freq; 0.648711461939::T => now;
2866+ 39.849532234 => c.freq; 0.633880569387::T => now;
2867+ 24.8145295694 => c.freq; 0.975678729336::T => now;
2868+ 75.4479708933 => c.freq; 0.422085567862::T => now;
2869+ 91.7898205013 => c.freq; 0.760981450326::T => now;
2870+ 11.1226719804 => c.freq; 0.855190887724::T => now;
2871+ 17.1612882353 => c.freq; 0.198462895415::T => now;
2872+ 95.4233201187 => c.freq; 0.45295319112::T => now;
2873+ 9.22913408693 => c.freq; 0.111216252087::T => now;
2874+ 74.8085014754 => c.freq; 0.63192313611::T => now;
2875+ 45.7232704819 => c.freq; 0.708117365548::T => now;
2876+ 70.6104549223 => c.freq; 0.118726918397::T => now;
2877+ 14.0670638553 => c.freq; 0.00227435035027::T => now;
2878+ 28.2045775408 => c.freq; 0.788258726865::T => now;
2879+ 35.5272011789 => c.freq; 0.753953927236::T => now;
2880+ 48.8174762859 => c.freq; 0.537793462322::T => now;
2881+ 21.5772789394 => c.freq; 0.746139240207::T => now;
2882+ 53.2483212703 => c.freq; 0.460229529242::T => now;
2883+ 8.39420479412 => c.freq; 0.974618201641::T => now;
2884+ 94.1412601813 => c.freq; 0.712430511367::T => now;
2885+ 22.7259402831 => c.freq; 0.789783283426::T => now;
2886+ 37.62738641 => c.freq; 0.571853249164::T => now;
2887+ 24.7410864394 => c.freq; 0.155804212259::T => now;
2888+ 16.8648990013 => c.freq; 0.789535985919::T => now;
2889+ 28.9079990034 => c.freq; 0.159252905472::T => now;
2890+ 60.4867532489 => c.freq; 0.907719737104::T => now;
2891+ 53.9949091227 => c.freq; 0.896215593472::T => now;
2892+ 58.5674922482 => c.freq; 0.606393432988::T => now;
2893+ 75.3412338585 => c.freq; 0.267251858167::T => now;
2894+ 61.1770871374 => c.freq; 0.927872058692::T => now;
2895+ 1.44097785444 => c.freq; 0.328926942833::T => now;
2896+ 51.0561990819 => c.freq; 0.0223384712963::T => now;
2897+ 58.2684359741 => c.freq; 0.893238581039::T => now;
2898+ 30.6552411327 => c.freq; 0.624446636853::T => now;
2899+ 68.7118926494 => c.freq; 0.195011717798::T => now;
2900+ 30.825387103 => c.freq; 0.619972647793::T => now;
2901+ 13.7376567337 => c.freq; 0.457055902411::T => now;
2902+ 87.5865705461 => c.freq; 0.831988494584::T => now;
2903+ 10.9963381301 => c.freq; 0.456677048766::T => now;
2904+ 84.9345785496 => c.freq; 0.414941060809::T => now;
2905+ 53.3746088305 => c.freq; 0.683480023168::T => now;
2906+ 70.3579325877 => c.freq; 0.793624056216::T => now;
2907+ 11.2994663847 => c.freq; 0.795274313973::T => now;
2908+ 95.9606211012 => c.freq; 0.89977706362::T => now;
2909+ 5.74823778088 => c.freq; 0.50419306911::T => now;
2910+ 28.757113591 => c.freq; 0.904964444807::T => now;
2911+ 32.1191964371 => c.freq; 0.627504824646::T => now;
2912+ 15.2290558426 => c.freq; 0.386795482629::T => now;
2913+ 42.8376834284 => c.freq; 0.551785220336::T => now;
2914+ 95.9000618294 => c.freq; 0.652566291244::T => now;
2915+ 54.1929651177 => c.freq; 0.39849532234::T => now;
2916+ 64.8711461939 => c.freq; 0.248145295694::T => now;
2917+ 63.3880569387 => c.freq; 0.754479708933::T => now;
2918+ 97.5678729336 => c.freq; 0.917898205013::T => now;
2919+ 42.2085567862 => c.freq; 0.111226719804::T => now;
2920+ 76.0981450326 => c.freq; 0.171612882353::T => now;
2921+ 85.5190887724 => c.freq; 0.954233201187::T => now;
2922+ 19.8462895415 => c.freq; 0.0922913408693::T => now;
2923+ 45.295319112 => c.freq; 0.748085014754::T => now;
2924+ 11.1216252087 => c.freq; 0.457232704819::T => now;
2925+ 63.192313611 => c.freq; 0.706104549223::T => now;
2926+ 70.8117365548 => c.freq; 0.140670638553::T => now;
2927+ 11.8726918397 => c.freq; 0.282045775408::T => now;
2928+ 0.227435035027 => c.freq; 0.355272011789::T => now;
2929+ 78.8258726865 => c.freq; 0.488174762859::T => now;
2930+ 75.3953927236 => c.freq; 0.215772789394::T => now;
2931+ 53.7793462322 => c.freq; 0.532483212703::T => now;
2932+ 74.6139240207 => c.freq; 0.0839420479412::T => now;
2933+ 46.0229529242 => c.freq; 0.941412601813::T => now;
2934+ 97.4618201641 => c.freq; 0.227259402831::T => now;
2935+ 71.2430511367 => c.freq; 0.3762738641::T => now;
2936+ 78.9783283426 => c.freq; 0.247410864394::T => now;
2937+ 57.1853249164 => c.freq; 0.168648990013::T => now;
2938+ 15.5804212259 => c.freq; 0.152290558426::T => now;
2939+ 78.9535985919 => c.freq; 0.428376834284::T => now;
2940+ 15.9252905472 => c.freq; 0.959000618294::T => now;
2941+ 90.7719737104 => c.freq; 0.541929651177::T => now;
2942+ 89.6215593472 => c.freq; 0.648711461939::T => now;
2943+ 60.6393432988 => c.freq; 0.633880569387::T => now;
2944+ 26.7251858167 => c.freq; 0.975678729336::T => now;
2945+ 92.7872058692 => c.freq; 0.422085567862::T => now;
2946+ 32.8926942833 => c.freq; 0.760981450326::T => now;
2947+ 2.23384712963 => c.freq; 0.855190887724::T => now;
2948+ 89.3238581039 => c.freq; 0.198462895415::T => now;
2949+ 62.4446636853 => c.freq; 0.45295319112::T => now;
2950+ 19.5011717798 => c.freq; 0.111216252087::T => now;
2951+ 61.9972647793 => c.freq; 0.63192313611::T => now;
2952+ 45.7055902411 => c.freq; 0.708117365548::T => now;
2953+ 83.1988494584 => c.freq; 0.118726918397::T => now;
2954+ 45.6677048766 => c.freq; 0.00227435035027::T => now;
2955+ 41.4941060809 => c.freq; 0.788258726865::T => now;
2956+ 68.3480023168 => c.freq; 0.753953927236::T => now;
2957+ 79.3624056216 => c.freq; 0.537793462322::T => now;
2958+ 79.5274313973 => c.freq; 0.746139240207::T => now;
2959+ 89.977706362 => c.freq; 0.460229529242::T => now;
2960+ 50.419306911 => c.freq; 0.974618201641::T => now;
2961+ 90.4964444807 => c.freq; 0.712430511367::T => now;
2962+ 62.7504824646 => c.freq; 0.789783283426::T => now;
2963+ 38.6795482629 => c.freq; 0.571853249164::T => now;
2964+ 55.1785220336 => c.freq; 0.155804212259::T => now;
2965+ 65.2566291244 => c.freq; 0.789535985919::T => now;
2966+ 39.849532234 => c.freq; 0.159252905472::T => now;
2967+ 24.8145295694 => c.freq; 0.907719737104::T => now;
2968+ 75.4479708933 => c.freq; 0.896215593472::T => now;
2969+ 91.7898205013 => c.freq; 0.606393432988::T => now;
2970+ 11.1226719804 => c.freq; 0.267251858167::T => now;
2971+ 17.1612882353 => c.freq; 0.927872058692::T => now;
2972+ 95.4233201187 => c.freq; 0.328926942833::T => now;
2973+ 9.22913408693 => c.freq; 0.0223384712963::T => now;
2974+ 74.8085014754 => c.freq; 0.893238581039::T => now;
2975+ 45.7232704819 => c.freq; 0.624446636853::T => now;
2976+ 70.6104549223 => c.freq; 0.195011717798::T => now;
2977+ 14.0670638553 => c.freq; 0.619972647793::T => now;
2978+ 28.2045775408 => c.freq; 0.457055902411::T => now;
2979+ 35.5272011789 => c.freq; 0.831988494584::T => now;
2980+ 48.8174762859 => c.freq; 0.456677048766::T => now;
2981+ 21.5772789394 => c.freq; 0.414941060809::T => now;
2982+ 53.2483212703 => c.freq; 0.683480023168::T => now;
2983+ 8.39420479412 => c.freq; 0.793624056216::T => now;
2984+ 94.1412601813 => c.freq; 0.795274313973::T => now;
2985+ 22.7259402831 => c.freq; 0.89977706362::T => now;
2986+ 37.62738641 => c.freq; 0.50419306911::T => now;
2987+ 24.7410864394 => c.freq; 0.904964444807::T => now;
2988+ 16.8648990013 => c.freq; 0.627504824646::T => now;
2989+ 28.9079990034 => c.freq; 0.386795482629::T => now;
2990+ 60.4867532489 => c.freq; 0.551785220336::T => now;
2991+ 53.9949091227 => c.freq; 0.652566291244::T => now;
2992+ 58.5674922482 => c.freq; 0.39849532234::T => now;
2993+ 75.3412338585 => c.freq; 0.248145295694::T => now;
2994+ 61.1770871374 => c.freq; 0.754479708933::T => now;
2995+ 1.44097785444 => c.freq; 0.917898205013::T => now;
2996+ 51.0561990819 => c.freq; 0.111226719804::T => now;
2997+ 58.2684359741 => c.freq; 0.171612882353::T => now;
2998+ 30.6552411327 => c.freq; 0.954233201187::T => now;
2999+ 68.7118926494 => c.freq; 0.0922913408693::T => now;
3000+ 30.825387103 => c.freq; 0.748085014754::T => now;
3001+ 13.7376567337 => c.freq; 0.457232704819::T => now;
3002+ 87.5865705461 => c.freq; 0.706104549223::T => now;
3003+ 10.9963381301 => c.freq; 0.140670638553::T => now;
3004+ 84.9345785496 => c.freq; 0.282045775408::T => now;
3005+ 53.3746088305 => c.freq; 0.355272011789::T => now;
3006+ 70.3579325877 => c.freq; 0.488174762859::T => now;
3007+ 11.2994663847 => c.freq; 0.215772789394::T => now;
3008+ 95.9606211012 => c.freq; 0.532483212703::T => now;
3009+ 5.74823778088 => c.freq; 0.0839420479412::T => now;
3010+ 28.757113591 => c.freq; 0.941412601813::T => now;
3011+ 32.1191964371 => c.freq; 0.227259402831::T => now;
3012+ 15.2290558426 => c.freq; 0.3762738641::T => now;
3013+ 42.8376834284 => c.freq; 0.247410864394::T => now;
3014+ 95.9000618294 => c.freq; 0.168648990013::T => now;
3015+ 54.1929651177 => c.freq; 0.152290558426::T => now;
3016+ 64.8711461939 => c.freq; 0.428376834284::T => now;
3017+ 63.3880569387 => c.freq; 0.959000618294::T => now;
3018+ 97.5678729336 => c.freq; 0.541929651177::T => now;
3019+ 42.2085567862 => c.freq; 0.648711461939::T => now;
3020+ 76.0981450326 => c.freq; 0.633880569387::T => now;
3021+ 85.5190887724 => c.freq; 0.975678729336::T => now;
3022+ 19.8462895415 => c.freq; 0.422085567862::T => now;
3023+ 45.295319112 => c.freq; 0.760981450326::T => now;
3024+ 11.1216252087 => c.freq; 0.855190887724::T => now;
3025+ 63.192313611 => c.freq; 0.198462895415::T => now;
3026+ 70.8117365548 => c.freq; 0.45295319112::T => now;
3027+ 11.8726918397 => c.freq; 0.111216252087::T => now;
3028+ 0.227435035027 => c.freq; 0.63192313611::T => now;
3029+ 78.8258726865 => c.freq; 0.708117365548::T => now;
3030+ 75.3953927236 => c.freq; 0.118726918397::T => now;
3031+ 53.7793462322 => c.freq; 0.00227435035027::T => now;
3032+ 74.6139240207 => c.freq; 0.788258726865::T => now;
3033+ 46.0229529242 => c.freq; 0.753953927236::T => now;
3034+ 97.4618201641 => c.freq; 0.537793462322::T => now;
3035+ 71.2430511367 => c.freq; 0.746139240207::T => now;
3036+ 78.9783283426 => c.freq; 0.460229529242::T => now;
3037+ 57.1853249164 => c.freq; 0.974618201641::T => now;
3038+ 15.5804212259 => c.freq; 0.712430511367::T => now;
3039+ 78.9535985919 => c.freq; 0.789783283426::T => now;
3040+ 15.9252905472 => c.freq; 0.571853249164::T => now;
3041+ 90.7719737104 => c.freq; 0.155804212259::T => now;
3042+ 89.6215593472 => c.freq; 0.789535985919::T => now;
3043+ 60.6393432988 => c.freq; 0.159252905472::T => now;
3044+ 26.7251858167 => c.freq; 0.907719737104::T => now;
3045+ 92.7872058692 => c.freq; 0.896215593472::T => now;
3046+ 32.8926942833 => c.freq; 0.606393432988::T => now;
3047+ 2.23384712963 => c.freq; 0.267251858167::T => now;
3048+ 89.3238581039 => c.freq; 0.927872058692::T => now;
3049+ 62.4446636853 => c.freq; 0.328926942833::T => now;
3050+ 19.5011717798 => c.freq; 0.0223384712963::T => now;
3051+ 61.9972647793 => c.freq; 0.893238581039::T => now;
3052+ 45.7055902411 => c.freq; 0.624446636853::T => now;
3053+ 83.1988494584 => c.freq; 0.195011717798::T => now;
3054+ 45.6677048766 => c.freq; 0.619972647793::T => now;
3055+ 41.4941060809 => c.freq; 0.457055902411::T => now;
3056+ 68.3480023168 => c.freq; 0.831988494584::T => now;
3057+ 79.3624056216 => c.freq; 0.456677048766::T => now;
3058+ 79.5274313973 => c.freq; 0.414941060809::T => now;
3059+ 89.977706362 => c.freq; 0.683480023168::T => now;
3060+ 50.419306911 => c.freq; 0.793624056216::T => now;
3061+ 90.4964444807 => c.freq; 0.795274313973::T => now;
3062+ 62.7504824646 => c.freq; 0.89977706362::T => now;
3063+ 38.6795482629 => c.freq; 0.50419306911::T => now;
3064+ 55.1785220336 => c.freq; 0.904964444807::T => now;
3065+ 65.2566291244 => c.freq; 0.627504824646::T => now;
3066+ 39.849532234 => c.freq; 0.386795482629::T => now;
3067+ 24.8145295694 => c.freq; 0.551785220336::T => now;
3068+ 75.4479708933 => c.freq; 0.652566291244::T => now;
3069+ 91.7898205013 => c.freq; 0.39849532234::T => now;
3070+ 11.1226719804 => c.freq; 0.248145295694::T => now;
3071+ 17.1612882353 => c.freq; 0.754479708933::T => now;
3072+ 95.4233201187 => c.freq; 0.917898205013::T => now;
3073+ 9.22913408693 => c.freq; 0.111226719804::T => now;
3074+ 74.8085014754 => c.freq; 0.171612882353::T => now;
3075+ 45.7232704819 => c.freq; 0.954233201187::T => now;
3076+ 70.6104549223 => c.freq; 0.0922913408693::T => now;
3077+ 14.0670638553 => c.freq; 0.748085014754::T => now;
3078+ 28.2045775408 => c.freq; 0.457232704819::T => now;
3079+ 35.5272011789 => c.freq; 0.706104549223::T => now;
3080+ 48.8174762859 => c.freq; 0.140670638553::T => now;
3081+ 21.5772789394 => c.freq; 0.282045775408::T => now;
3082+ 53.2483212703 => c.freq; 0.355272011789::T => now;
3083+ 8.39420479412 => c.freq; 0.488174762859::T => now;
3084+ 94.1412601813 => c.freq; 0.215772789394::T => now;
3085+ 22.7259402831 => c.freq; 0.532483212703::T => now;
3086+ 37.62738641 => c.freq; 0.0839420479412::T => now;
3087+ 24.7410864394 => c.freq; 0.941412601813::T => now;
3088+ 16.8648990013 => c.freq; 0.227259402831::T => now;
3089+ 28.9079990034 => c.freq; 0.3762738641::T => now;
3090+ 60.4867532489 => c.freq; 0.247410864394::T => now;
3091+ 53.9949091227 => c.freq; 0.168648990013::T => now;
3092+ 58.5674922482 => c.freq; 0.152290558426::T => now;
3093+ 75.3412338585 => c.freq; 0.428376834284::T => now;
3094+ 61.1770871374 => c.freq; 0.959000618294::T => now;
3095+ 1.44097785444 => c.freq; 0.541929651177::T => now;
3096+ 51.0561990819 => c.freq; 0.648711461939::T => now;
3097+ 58.2684359741 => c.freq; 0.633880569387::T => now;
3098+ 30.6552411327 => c.freq; 0.975678729336::T => now;
3099+ 68.7118926494 => c.freq; 0.422085567862::T => now;
3100+ 30.825387103 => c.freq; 0.760981450326::T => now;
3101+ 13.7376567337 => c.freq; 0.855190887724::T => now;
3102+ 87.5865705461 => c.freq; 0.198462895415::T => now;
3103+ 10.9963381301 => c.freq; 0.45295319112::T => now;
3104+ 84.9345785496 => c.freq; 0.111216252087::T => now;
3105+ 53.3746088305 => c.freq; 0.63192313611::T => now;
3106+ 70.3579325877 => c.freq; 0.708117365548::T => now;
3107+ 11.2994663847 => c.freq; 0.118726918397::T => now;
3108+ 95.9606211012 => c.freq; 0.00227435035027::T => now;
3109+ 5.74823778088 => c.freq; 0.788258726865::T => now;
3110+ 28.757113591 => c.freq; 0.753953927236::T => now;
3111+ 32.1191964371 => c.freq; 0.537793462322::T => now;
3112+ 15.2290558426 => c.freq; 0.746139240207::T => now;
3113+ 42.8376834284 => c.freq; 0.460229529242::T => now;
3114+ 95.9000618294 => c.freq; 0.974618201641::T => now;
3115+ 54.1929651177 => c.freq; 0.712430511367::T => now;
3116+ 64.8711461939 => c.freq; 0.789783283426::T => now;
3117+ 63.3880569387 => c.freq; 0.571853249164::T => now;
3118+ 97.5678729336 => c.freq; 0.155804212259::T => now;
3119+ 42.2085567862 => c.freq; 0.789535985919::T => now;
3120+ 76.0981450326 => c.freq; 0.159252905472::T => now;
3121+ 85.5190887724 => c.freq; 0.907719737104::T => now;
3122+ 19.8462895415 => c.freq; 0.896215593472::T => now;
3123+ 45.295319112 => c.freq; 0.606393432988::T => now;
3124+ 11.1216252087 => c.freq; 0.267251858167::T => now;
3125+ 63.192313611 => c.freq; 0.927872058692::T => now;
3126+ 70.8117365548 => c.freq; 0.328926942833::T => now;
3127+ 11.8726918397 => c.freq; 0.0223384712963::T => now;
3128+ 0.227435035027 => c.freq; 0.893238581039::T => now;
3129+ 78.8258726865 => c.freq; 0.624446636853::T => now;
3130+ 75.3953927236 => c.freq; 0.195011717798::T => now;
3131+ 53.7793462322 => c.freq; 0.619972647793::T => now;
3132+ 74.6139240207 => c.freq; 0.457055902411::T => now;
3133+ 46.0229529242 => c.freq; 0.831988494584::T => now;
3134+ 97.4618201641 => c.freq; 0.456677048766::T => now;
3135+ 71.2430511367 => c.freq; 0.414941060809::T => now;
3136+ 78.9783283426 => c.freq; 0.683480023168::T => now;
3137+ 57.1853249164 => c.freq; 0.793624056216::T => now;
3138+ 15.5804212259 => c.freq; 0.795274313973::T => now;
3139+ 78.9535985919 => c.freq; 0.89977706362::T => now;
3140+ 15.9252905472 => c.freq; 0.50419306911::T => now;
3141+ 90.7719737104 => c.freq; 0.904964444807::T => now;
3142+ 89.6215593472 => c.freq; 0.627504824646::T => now;
3143+ 60.6393432988 => c.freq; 0.386795482629::T => now;
3144+ 26.7251858167 => c.freq; 0.551785220336::T => now;
3145+ 92.7872058692 => c.freq; 0.652566291244::T => now;
3146+ 32.8926942833 => c.freq; 0.39849532234::T => now;
3147+ 2.23384712963 => c.freq; 0.248145295694::T => now;
3148+ 89.3238581039 => c.freq; 0.754479708933::T => now;
3149+ 62.4446636853 => c.freq; 0.917898205013::T => now;
3150+ 19.5011717798 => c.freq; 0.111226719804::T => now;
3151+ 61.9972647793 => c.freq; 0.171612882353::T => now;
3152+ 45.7055902411 => c.freq; 0.954233201187::T => now;
3153+ 83.1988494584 => c.freq; 0.0922913408693::T => now;
3154+ 45.6677048766 => c.freq; 0.748085014754::T => now;
3155+ 41.4941060809 => c.freq; 0.457232704819::T => now;
3156+ 68.3480023168 => c.freq; 0.706104549223::T => now;
3157+ 79.3624056216 => c.freq; 0.140670638553::T => now;
3158+ 79.5274313973 => c.freq; 0.282045775408::T => now;
3159+ 89.977706362 => c.freq; 0.355272011789::T => now;
3160+ 50.419306911 => c.freq; 0.488174762859::T => now;
3161+ 90.4964444807 => c.freq; 0.215772789394::T => now;
3162+ 62.7504824646 => c.freq; 0.532483212703::T => now;
3163+ 38.6795482629 => c.freq; 0.0839420479412::T => now;
3164+ 55.1785220336 => c.freq; 0.941412601813::T => now;
3165+ 65.2566291244 => c.freq; 0.227259402831::T => now;
3166+ 39.849532234 => c.freq; 0.3762738641::T => now;
3167+ 24.8145295694 => c.freq; 0.247410864394::T => now;
3168+ 75.4479708933 => c.freq; 0.168648990013::T => now;
3169+ 91.7898205013 => c.freq; 0.152290558426::T => now;
3170+ 11.1226719804 => c.freq; 0.428376834284::T => now;
3171+ 17.1612882353 => c.freq; 0.959000618294::T => now;
3172+ 95.4233201187 => c.freq; 0.541929651177::T => now;
3173+ 9.22913408693 => c.freq; 0.648711461939::T => now;
3174+ 74.8085014754 => c.freq; 0.633880569387::T => now;
3175+ 45.7232704819 => c.freq; 0.975678729336::T => now;
3176+ 70.6104549223 => c.freq; 0.422085567862::T => now;
3177+ 14.0670638553 => c.freq; 0.760981450326::T => now;
3178+ 28.2045775408 => c.freq; 0.855190887724::T => now;
3179+ 35.5272011789 => c.freq; 0.198462895415::T => now;
3180+ 48.8174762859 => c.freq; 0.45295319112::T => now;
3181+ 21.5772789394 => c.freq; 0.111216252087::T => now;
3182+ 53.2483212703 => c.freq; 0.63192313611::T => now;
3183+ 8.39420479412 => c.freq; 0.708117365548::T => now;
3184+ 94.1412601813 => c.freq; 0.118726918397::T => now;
3185+ 22.7259402831 => c.freq; 0.00227435035027::T => now;
3186+ 37.62738641 => c.freq; 0.788258726865::T => now;
3187+ 24.7410864394 => c.freq; 0.753953927236::T => now;
3188+ 16.8648990013 => c.freq; 0.537793462322::T => now;
3189+ 28.9079990034 => c.freq; 0.746139240207::T => now;
3190+ 60.4867532489 => c.freq; 0.460229529242::T => now;
3191+ 53.9949091227 => c.freq; 0.974618201641::T => now;
3192+ 58.5674922482 => c.freq; 0.712430511367::T => now;
3193+ 75.3412338585 => c.freq; 0.789783283426::T => now;
3194+ 61.1770871374 => c.freq; 0.571853249164::T => now;
3195+ 1.44097785444 => c.freq; 0.155804212259::T => now;
3196+ 51.0561990819 => c.freq; 0.789535985919::T => now;
3197+ 58.2684359741 => c.freq; 0.159252905472::T => now;
3198+ 30.6552411327 => c.freq; 0.907719737104::T => now;
3199+ 68.7118926494 => c.freq; 0.896215593472::T => now;
3200+ 30.825387103 => c.freq; 0.606393432988::T => now;
3201+ 13.7376567337 => c.freq; 0.267251858167::T => now;
3202+ 87.5865705461 => c.freq; 0.927872058692::T => now;
3203+ 10.9963381301 => c.freq; 0.328926942833::T => now;
3204+ 84.9345785496 => c.freq; 0.0223384712963::T => now;
3205+ 53.3746088305 => c.freq; 0.893238581039::T => now;
3206+ 70.3579325877 => c.freq; 0.624446636853::T => now;
3207+ 11.2994663847 => c.freq; 0.195011717798::T => now;
3208+ 95.9606211012 => c.freq; 0.619972647793::T => now;
3209+ 5.74823778088 => c.freq; 0.457055902411::T => now;
3210+ 28.757113591 => c.freq; 0.831988494584::T => now;
3211+ 32.1191964371 => c.freq; 0.456677048766::T => now;
3212+ 15.2290558426 => c.freq; 0.414941060809::T => now;
3213+ 42.8376834284 => c.freq; 0.683480023168::T => now;
3214+ 95.9000618294 => c.freq; 0.793624056216::T => now;
3215+ 54.1929651177 => c.freq; 0.795274313973::T => now;
3216+ 64.8711461939 => c.freq; 0.89977706362::T => now;
3217+ 63.3880569387 => c.freq; 0.50419306911::T => now;
3218+ 97.5678729336 => c.freq; 0.904964444807::T => now;
3219+ 42.2085567862 => c.freq; 0.627504824646::T => now;
3220+ 76.0981450326 => c.freq; 0.386795482629::T => now;
3221+ 85.5190887724 => c.freq; 0.551785220336::T => now;
3222+ 19.8462895415 => c.freq; 0.652566291244::T => now;
3223+ 45.295319112 => c.freq; 0.39849532234::T => now;
3224+ 11.1216252087 => c.freq; 0.248145295694::T => now;
3225+ 63.192313611 => c.freq; 0.754479708933::T => now;
3226+ 70.8117365548 => c.freq; 0.917898205013::T => now;
3227+ 11.8726918397 => c.freq; 0.111226719804::T => now;
3228+ 0.227435035027 => c.freq; 0.171612882353::T => now;
3229+ 78.8258726865 => c.freq; 0.954233201187::T => now;
3230+ 75.3953927236 => c.freq; 0.0922913408693::T => now;
3231+ 53.7793462322 => c.freq; 0.748085014754::T => now;
3232+ 74.6139240207 => c.freq; 0.457232704819::T => now;
3233+ 46.0229529242 => c.freq; 0.706104549223::T => now;
3234+ 97.4618201641 => c.freq; 0.140670638553::T => now;
3235+ 71.2430511367 => c.freq; 0.282045775408::T => now;
3236+ 78.9783283426 => c.freq; 0.355272011789::T => now;
3237+ 57.1853249164 => c.freq; 0.488174762859::T => now;
3238+ 15.5804212259 => c.freq; 0.215772789394::T => now;
3239+ 78.9535985919 => c.freq; 0.532483212703::T => now;
3240+ 15.9252905472 => c.freq; 0.0839420479412::T => now;
3241+ 90.7719737104 => c.freq; 0.941412601813::T => now;
3242+ 89.6215593472 => c.freq; 0.227259402831::T => now;
3243+ 60.6393432988 => c.freq; 0.3762738641::T => now;
3244+ 26.7251858167 => c.freq; 0.247410864394::T => now;
3245+ 92.7872058692 => c.freq; 0.168648990013::T => now;
3246+ 32.8926942833 => c.freq; 0.152290558426::T => now;
3247+ 2.23384712963 => c.freq; 0.428376834284::T => now;
3248+ 89.3238581039 => c.freq; 0.959000618294::T => now;
3249+ 62.4446636853 => c.freq; 0.541929651177::T => now;
3250+ 19.5011717798 => c.freq; 0.648711461939::T => now;
3251+ 61.9972647793 => c.freq; 0.633880569387::T => now;
3252+ 45.7055902411 => c.freq; 0.975678729336::T => now;
3253+ 83.1988494584 => c.freq; 0.422085567862::T => now;
3254+ 45.6677048766 => c.freq; 0.760981450326::T => now;
3255+ 41.4941060809 => c.freq; 0.855190887724::T => now;
3256+ 68.3480023168 => c.freq; 0.198462895415::T => now;
3257+ 79.3624056216 => c.freq; 0.45295319112::T => now;
3258+ 79.5274313973 => c.freq; 0.111216252087::T => now;
3259+ 89.977706362 => c.freq; 0.63192313611::T => now;
3260+ 50.419306911 => c.freq; 0.708117365548::T => now;
3261+ 90.4964444807 => c.freq; 0.118726918397::T => now;
3262+ 62.7504824646 => c.freq; 0.00227435035027::T => now;
3263+ 38.6795482629 => c.freq; 0.788258726865::T => now;
3264+ 55.1785220336 => c.freq; 0.753953927236::T => now;
3265+ 65.2566291244 => c.freq; 0.537793462322::T => now;
3266+ 39.849532234 => c.freq; 0.746139240207::T => now;
3267+ 24.8145295694 => c.freq; 0.460229529242::T => now;
3268+ 75.4479708933 => c.freq; 0.974618201641::T => now;
3269+ 91.7898205013 => c.freq; 0.712430511367::T => now;
3270+ 11.1226719804 => c.freq; 0.789783283426::T => now;
3271+ 17.1612882353 => c.freq; 0.571853249164::T => now;
3272+ 95.4233201187 => c.freq; 0.155804212259::T => now;
3273+ 9.22913408693 => c.freq; 0.789535985919::T => now;
3274+ 74.8085014754 => c.freq; 0.159252905472::T => now;
3275+ 45.7232704819 => c.freq; 0.907719737104::T => now;
3276+ 70.6104549223 => c.freq; 0.896215593472::T => now;
3277+ 14.0670638553 => c.freq; 0.606393432988::T => now;
3278+ 28.2045775408 => c.freq; 0.267251858167::T => now;
3279+ 35.5272011789 => c.freq; 0.927872058692::T => now;
3280+ 48.8174762859 => c.freq; 0.328926942833::T => now;
3281+ 21.5772789394 => c.freq; 0.0223384712963::T => now;
3282+ 53.2483212703 => c.freq; 0.893238581039::T => now;
3283+ 8.39420479412 => c.freq; 0.624446636853::T => now;
3284+ 94.1412601813 => c.freq; 0.195011717798::T => now;
3285+ 22.7259402831 => c.freq; 0.619972647793::T => now;
3286+ 37.62738641 => c.freq; 0.457055902411::T => now;
3287+ 24.7410864394 => c.freq; 0.831988494584::T => now;
3288+ 16.8648990013 => c.freq; 0.456677048766::T => now;
3289+ 28.9079990034 => c.freq; 0.414941060809::T => now;
3290+ 60.4867532489 => c.freq; 0.683480023168::T => now;
3291+ 53.9949091227 => c.freq; 0.793624056216::T => now;
3292+ 58.5674922482 => c.freq; 0.795274313973::T => now;
3293+ 75.3412338585 => c.freq; 0.89977706362::T => now;
3294+ 61.1770871374 => c.freq; 0.50419306911::T => now;
3295+ 1.44097785444 => c.freq; 0.904964444807::T => now;
3296+ 51.0561990819 => c.freq; 0.627504824646::T => now;
3297+ 58.2684359741 => c.freq; 0.386795482629::T => now;
3298+ 30.6552411327 => c.freq; 0.551785220336::T => now;
3299+ 68.7118926494 => c.freq; 0.652566291244::T => now;
3300+ 30.825387103 => c.freq; 0.39849532234::T => now;
3301+ 13.7376567337 => c.freq; 0.248145295694::T => now;
3302+ 87.5865705461 => c.freq; 0.754479708933::T => now;
3303+ 10.9963381301 => c.freq; 0.917898205013::T => now;
3304+ 84.9345785496 => c.freq; 0.111226719804::T => now;
3305+ 53.3746088305 => c.freq; 0.171612882353::T => now;
3306+ 70.3579325877 => c.freq; 0.954233201187::T => now;
3307+ 11.2994663847 => c.freq; 0.0922913408693::T => now;
3308+ 95.9606211012 => c.freq; 0.748085014754::T => now;
3309+ 5.74823778088 => c.freq; 0.457232704819::T => now;
3310+ 28.757113591 => c.freq; 0.706104549223::T => now;
3311+ 32.1191964371 => c.freq; 0.140670638553::T => now;
3312+ 15.2290558426 => c.freq; 0.282045775408::T => now;
3313+ 42.8376834284 => c.freq; 0.355272011789::T => now;
3314+ 95.9000618294 => c.freq; 0.488174762859::T => now;
3315+ 54.1929651177 => c.freq; 0.215772789394::T => now;
3316+ 64.8711461939 => c.freq; 0.532483212703::T => now;
3317+ 63.3880569387 => c.freq; 0.0839420479412::T => now;
3318+ 97.5678729336 => c.freq; 0.941412601813::T => now;
3319+ 42.2085567862 => c.freq; 0.227259402831::T => now;
3320+ 76.0981450326 => c.freq; 0.3762738641::T => now;
3321+ 85.5190887724 => c.freq; 0.247410864394::T => now;
3322+ 19.8462895415 => c.freq; 0.168648990013::T => now;
3323+ 45.295319112 => c.freq; 0.152290558426::T => now;
3324+ 11.1216252087 => c.freq; 0.428376834284::T => now;
3325+ 63.192313611 => c.freq; 0.959000618294::T => now;
3326+ 70.8117365548 => c.freq; 0.541929651177::T => now;
3327+ 11.8726918397 => c.freq; 0.648711461939::T => now;
3328+ 0.227435035027 => c.freq; 0.633880569387::T => now;
3329+ 78.8258726865 => c.freq; 0.975678729336::T => now;
3330+ 75.3953927236 => c.freq; 0.422085567862::T => now;
3331+ 53.7793462322 => c.freq; 0.760981450326::T => now;
3332+ 74.6139240207 => c.freq; 0.855190887724::T => now;
3333+ 46.0229529242 => c.freq; 0.198462895415::T => now;
3334+ 97.4618201641 => c.freq; 0.45295319112::T => now;
3335+ 71.2430511367 => c.freq; 0.111216252087::T => now;
3336+ 78.9783283426 => c.freq; 0.63192313611::T => now;
3337+ 57.1853249164 => c.freq; 0.708117365548::T => now;
3338+ 15.5804212259 => c.freq; 0.118726918397::T => now;
3339+ 78.9535985919 => c.freq; 0.00227435035027::T => now;
3340+ 15.9252905472 => c.freq; 0.788258726865::T => now;
3341+ 90.7719737104 => c.freq; 0.753953927236::T => now;
3342+ 89.6215593472 => c.freq; 0.537793462322::T => now;
3343+ 60.6393432988 => c.freq; 0.746139240207::T => now;
3344+ 26.7251858167 => c.freq; 0.460229529242::T => now;
3345+ 92.7872058692 => c.freq; 0.974618201641::T => now;
3346+ 32.8926942833 => c.freq; 0.712430511367::T => now;
3347+ 2.23384712963 => c.freq; 0.789783283426::T => now;
3348+ 89.3238581039 => c.freq; 0.571853249164::T => now;
3349+ 62.4446636853 => c.freq; 0.155804212259::T => now;
3350+ 19.5011717798 => c.freq; 0.789535985919::T => now;
3351+ 61.9972647793 => c.freq; 0.159252905472::T => now;
3352+ 45.7055902411 => c.freq; 0.907719737104::T => now;
3353+ 83.1988494584 => c.freq; 0.896215593472::T => now;
3354+ 45.6677048766 => c.freq; 0.606393432988::T => now;
3355+ 41.4941060809 => c.freq; 0.267251858167::T => now;
3356+ 68.3480023168 => c.freq; 0.927872058692::T => now;
3357+ 79.3624056216 => c.freq; 0.328926942833::T => now;
3358+ 79.5274313973 => c.freq; 0.0223384712963::T => now;
3359+ 89.977706362 => c.freq; 0.893238581039::T => now;
3360+ 50.419306911 => c.freq; 0.624446636853::T => now;
3361+ 90.4964444807 => c.freq; 0.195011717798::T => now;
3362+ 62.7504824646 => c.freq; 0.619972647793::T => now;
3363+ 38.6795482629 => c.freq; 0.457055902411::T => now;
3364+ 55.1785220336 => c.freq; 0.831988494584::T => now;
3365+ 65.2566291244 => c.freq; 0.456677048766::T => now;
3366+ 39.849532234 => c.freq; 0.414941060809::T => now;
3367+ 24.8145295694 => c.freq; 0.683480023168::T => now;
3368+ 75.4479708933 => c.freq; 0.793624056216::T => now;
3369+ 91.7898205013 => c.freq; 0.795274313973::T => now;
3370+ 11.1226719804 => c.freq; 0.89977706362::T => now;
3371+ 17.1612882353 => c.freq; 0.50419306911::T => now;
3372+ 95.4233201187 => c.freq; 0.904964444807::T => now;
3373+ 9.22913408693 => c.freq; 0.627504824646::T => now;
3374+ 74.8085014754 => c.freq; 0.386795482629::T => now;
3375+ 45.7232704819 => c.freq; 0.551785220336::T => now;
3376+ 70.6104549223 => c.freq; 0.652566291244::T => now;
3377+ 14.0670638553 => c.freq; 0.39849532234::T => now;
3378+ 28.2045775408 => c.freq; 0.248145295694::T => now;
3379+ 35.5272011789 => c.freq; 0.754479708933::T => now;
3380+ 48.8174762859 => c.freq; 0.917898205013::T => now;
3381+ 21.5772789394 => c.freq; 0.111226719804::T => now;
3382+ 53.2483212703 => c.freq; 0.171612882353::T => now;
3383+ 8.39420479412 => c.freq; 0.954233201187::T => now;
3384+ 94.1412601813 => c.freq; 0.0922913408693::T => now;
3385+ 22.7259402831 => c.freq; 0.748085014754::T => now;
3386+ 37.62738641 => c.freq; 0.457232704819::T => now;
3387+ 24.7410864394 => c.freq; 0.706104549223::T => now;
3388+ 16.8648990013 => c.freq; 0.140670638553::T => now;
3389+ 28.9079990034 => c.freq; 0.282045775408::T => now;
3390+ 60.4867532489 => c.freq; 0.355272011789::T => now;
3391+ 53.9949091227 => c.freq; 0.488174762859::T => now;
3392+ 58.5674922482 => c.freq; 0.215772789394::T => now;
3393+ 75.3412338585 => c.freq; 0.532483212703::T => now;
3394+ 61.1770871374 => c.freq; 0.0839420479412::T => now;
3395+ 1.44097785444 => c.freq; 0.941412601813::T => now;
3396+ 51.0561990819 => c.freq; 0.227259402831::T => now;
3397+ 58.2684359741 => c.freq; 0.3762738641::T => now;
3398+ 30.6552411327 => c.freq; 0.247410864394::T => now;
3399+ 68.7118926494 => c.freq; 0.168648990013::T => now;
3400+ 30.825387103 => c.freq; 0.152290558426::T => now;
3401+ 13.7376567337 => c.freq; 0.428376834284::T => now;
3402+ 87.5865705461 => c.freq; 0.959000618294::T => now;
3403+ 10.9963381301 => c.freq; 0.541929651177::T => now;
3404+ 84.9345785496 => c.freq; 0.648711461939::T => now;
3405+ 53.3746088305 => c.freq; 0.633880569387::T => now;
3406+ 70.3579325877 => c.freq; 0.975678729336::T => now;
3407+ 11.2994663847 => c.freq; 0.422085567862::T => now;
3408+ 95.9606211012 => c.freq; 0.760981450326::T => now;
3409+ 5.74823778088 => c.freq; 0.855190887724::T => now;
3410+ 28.757113591 => c.freq; 0.198462895415::T => now;
3411+ 32.1191964371 => c.freq; 0.45295319112::T => now;
3412+ 15.2290558426 => c.freq; 0.111216252087::T => now;
3413+ 42.8376834284 => c.freq; 0.63192313611::T => now;
3414+ 95.9000618294 => c.freq; 0.708117365548::T => now;
3415+ 54.1929651177 => c.freq; 0.118726918397::T => now;
3416+ 64.8711461939 => c.freq; 0.00227435035027::T => now;
3417+ 63.3880569387 => c.freq; 0.788258726865::T => now;
3418+ 97.5678729336 => c.freq; 0.753953927236::T => now;
3419+ 42.2085567862 => c.freq; 0.537793462322::T => now;
3420+ 76.0981450326 => c.freq; 0.746139240207::T => now;
3421+ 85.5190887724 => c.freq; 0.460229529242::T => now;
3422+ 19.8462895415 => c.freq; 0.974618201641::T => now;
3423+ 45.295319112 => c.freq; 0.712430511367::T => now;
3424+ 11.1216252087 => c.freq; 0.789783283426::T => now;
3425+ 63.192313611 => c.freq; 0.571853249164::T => now;
3426+ 70.8117365548 => c.freq; 0.155804212259::T => now;
3427+ 11.8726918397 => c.freq; 0.789535985919::T => now;
3428+ 0.227435035027 => c.freq; 0.159252905472::T => now;
3429+ 78.8258726865 => c.freq; 0.907719737104::T => now;
3430+ 75.3953927236 => c.freq; 0.896215593472::T => now;
3431+ 53.7793462322 => c.freq; 0.606393432988::T => now;
3432+ 74.6139240207 => c.freq; 0.267251858167::T => now;
3433+ 46.0229529242 => c.freq; 0.927872058692::T => now;
3434+ 97.4618201641 => c.freq; 0.328926942833::T => now;
3435+ 71.2430511367 => c.freq; 0.0223384712963::T => now;
3436+ 78.9783283426 => c.freq; 0.893238581039::T => now;
3437+ 57.1853249164 => c.freq; 0.624446636853::T => now;
3438+ 15.5804212259 => c.freq; 0.195011717798::T => now;
3439+ 78.9535985919 => c.freq; 0.619972647793::T => now;
3440+ 15.9252905472 => c.freq; 0.457055902411::T => now;
3441+ 90.7719737104 => c.freq; 0.831988494584::T => now;
3442+ 89.6215593472 => c.freq; 0.456677048766::T => now;
3443+ 60.6393432988 => c.freq; 0.414941060809::T => now;
3444+ 26.7251858167 => c.freq; 0.683480023168::T => now;
3445+ 92.7872058692 => c.freq; 0.793624056216::T => now;
3446+ 32.8926942833 => c.freq; 0.795274313973::T => now;
3447+ 2.23384712963 => c.freq; 0.89977706362::T => now;
3448+ 89.3238581039 => c.freq; 0.50419306911::T => now;
3449+ 62.4446636853 => c.freq; 0.904964444807::T => now;
3450+ 19.5011717798 => c.freq; 0.627504824646::T => now;
3451+ 61.9972647793 => c.freq; 0.386795482629::T => now;
3452+ 45.7055902411 => c.freq; 0.551785220336::T => now;
3453+ 83.1988494584 => c.freq; 0.652566291244::T => now;
3454+ 45.6677048766 => c.freq; 0.39849532234::T => now;
3455+ 41.4941060809 => c.freq; 0.248145295694::T => now;
3456+ 68.3480023168 => c.freq; 0.754479708933::T => now;
3457+ 79.3624056216 => c.freq; 0.917898205013::T => now;
3458+ 79.5274313973 => c.freq; 0.111226719804::T => now;
3459+ 89.977706362 => c.freq; 0.171612882353::T => now;
3460+ 50.419306911 => c.freq; 0.954233201187::T => now;
3461+ 90.4964444807 => c.freq; 0.0922913408693::T => now;
3462+ 62.7504824646 => c.freq; 0.748085014754::T => now;
3463+ 38.6795482629 => c.freq; 0.457232704819::T => now;
3464+ 55.1785220336 => c.freq; 0.706104549223::T => now;
3465+ 65.2566291244 => c.freq; 0.140670638553::T => now;
3466+ 39.849532234 => c.freq; 0.282045775408::T => now;
3467+ 24.8145295694 => c.freq; 0.355272011789::T => now;
3468+ 75.4479708933 => c.freq; 0.488174762859::T => now;
3469+ 91.7898205013 => c.freq; 0.215772789394::T => now;
3470+ 11.1226719804 => c.freq; 0.532483212703::T => now;
3471+ 17.1612882353 => c.freq; 0.0839420479412::T => now;
3472+ 95.4233201187 => c.freq; 0.941412601813::T => now;
3473+ 9.22913408693 => c.freq; 0.227259402831::T => now;
3474+ 74.8085014754 => c.freq; 0.3762738641::T => now;
3475+ 45.7232704819 => c.freq; 0.247410864394::T => now;
3476+ 70.6104549223 => c.freq; 0.168648990013::T => now;
3477+ 14.0670638553 => c.freq; 0.152290558426::T => now;
3478+ 28.2045775408 => c.freq; 0.428376834284::T => now;
3479+ 35.5272011789 => c.freq; 0.959000618294::T => now;
3480+ 48.8174762859 => c.freq; 0.541929651177::T => now;
3481+ 21.5772789394 => c.freq; 0.648711461939::T => now;
3482+ 53.2483212703 => c.freq; 0.633880569387::T => now;
3483+ 8.39420479412 => c.freq; 0.975678729336::T => now;
3484+ 94.1412601813 => c.freq; 0.422085567862::T => now;
3485+ 22.7259402831 => c.freq; 0.760981450326::T => now;
3486+ 37.62738641 => c.freq; 0.855190887724::T => now;
3487+ 24.7410864394 => c.freq; 0.198462895415::T => now;
3488+ 16.8648990013 => c.freq; 0.45295319112::T => now;
3489+ 28.9079990034 => c.freq; 0.111216252087::T => now;
3490+ 60.4867532489 => c.freq; 0.63192313611::T => now;
3491+ 53.9949091227 => c.freq; 0.708117365548::T => now;
3492+ 58.5674922482 => c.freq; 0.118726918397::T => now;
3493+ 75.3412338585 => c.freq; 0.00227435035027::T => now;
3494+ 61.1770871374 => c.freq; 0.788258726865::T => now;
3495+ 1.44097785444 => c.freq; 0.753953927236::T => now;
3496+ 51.0561990819 => c.freq; 0.537793462322::T => now;
3497+ 58.2684359741 => c.freq; 0.746139240207::T => now;
3498+ 30.6552411327 => c.freq; 0.460229529242::T => now;
3499+ 68.7118926494 => c.freq; 0.974618201641::T => now;
3500+ 30.825387103 => c.freq; 0.712430511367::T => now;
3501+ 13.7376567337 => c.freq; 0.789783283426::T => now;
3502+ 87.5865705461 => c.freq; 0.571853249164::T => now;
3503+ 10.9963381301 => c.freq; 0.155804212259::T => now;
3504+ 84.9345785496 => c.freq; 0.789535985919::T => now;
3505+ 53.3746088305 => c.freq; 0.159252905472::T => now;
3506+ 70.3579325877 => c.freq; 0.907719737104::T => now;
3507+ 11.2994663847 => c.freq; 0.896215593472::T => now;
3508+ 95.9606211012 => c.freq; 0.606393432988::T => now;
3509+ 5.74823778088 => c.freq; 0.267251858167::T => now;
3510+ 28.757113591 => c.freq; 0.927872058692::T => now;
3511+ 32.1191964371 => c.freq; 0.328926942833::T => now;
3512+ 15.2290558426 => c.freq; 0.0223384712963::T => now;
3513+ 42.8376834284 => c.freq; 0.893238581039::T => now;
3514+ 95.9000618294 => c.freq; 0.624446636853::T => now;
3515+ 54.1929651177 => c.freq; 0.195011717798::T => now;
3516+ 64.8711461939 => c.freq; 0.619972647793::T => now;
3517+ 63.3880569387 => c.freq; 0.457055902411::T => now;
3518+ 97.5678729336 => c.freq; 0.831988494584::T => now;
3519+ 42.2085567862 => c.freq; 0.456677048766::T => now;
3520+ 76.0981450326 => c.freq; 0.414941060809::T => now;
3521+ 85.5190887724 => c.freq; 0.683480023168::T => now;
3522+ 19.8462895415 => c.freq; 0.793624056216::T => now;
3523+ 45.295319112 => c.freq; 0.795274313973::T => now;
3524+ 11.1216252087 => c.freq; 0.89977706362::T => now;
3525+ 63.192313611 => c.freq; 0.50419306911::T => now;
3526+ 70.8117365548 => c.freq; 0.904964444807::T => now;
3527+ 11.8726918397 => c.freq; 0.627504824646::T => now;
3528+ 0.227435035027 => c.freq; 0.386795482629::T => now;
3529+ 78.8258726865 => c.freq; 0.551785220336::T => now;
3530+ 75.3953927236 => c.freq; 0.652566291244::T => now;
3531+ 53.7793462322 => c.freq; 0.39849532234::T => now;
3532+ 74.6139240207 => c.freq; 0.248145295694::T => now;
3533+ 46.0229529242 => c.freq; 0.754479708933::T => now;
3534+ 97.4618201641 => c.freq; 0.917898205013::T => now;
3535+ 71.2430511367 => c.freq; 0.111226719804::T => now;
3536+ 78.9783283426 => c.freq; 0.171612882353::T => now;
3537+ 57.1853249164 => c.freq; 0.954233201187::T => now;
3538+ 15.5804212259 => c.freq; 0.0922913408693::T => now;
3539+ 78.9535985919 => c.freq; 0.748085014754::T => now;
3540+ 15.9252905472 => c.freq; 0.457232704819::T => now;
3541+ 90.7719737104 => c.freq; 0.706104549223::T => now;
3542+ 89.6215593472 => c.freq; 0.140670638553::T => now;
3543+ 60.6393432988 => c.freq; 0.282045775408::T => now;
3544+ 26.7251858167 => c.freq; 0.355272011789::T => now;
3545+ 92.7872058692 => c.freq; 0.488174762859::T => now;
3546+ 32.8926942833 => c.freq; 0.215772789394::T => now;
3547+ 2.23384712963 => c.freq; 0.532483212703::T => now;
3548+ 89.3238581039 => c.freq; 0.0839420479412::T => now;
3549+ 62.4446636853 => c.freq; 0.941412601813::T => now;
3550+ 19.5011717798 => c.freq; 0.227259402831::T => now;
3551+ 61.9972647793 => c.freq; 0.3762738641::T => now;
3552+ 45.7055902411 => c.freq; 0.247410864394::T => now;
3553+ 83.1988494584 => c.freq; 0.168648990013::T => now;
3554+ 45.6677048766 => c.freq; 0.152290558426::T => now;
3555+ 41.4941060809 => c.freq; 0.428376834284::T => now;
3556+ 68.3480023168 => c.freq; 0.959000618294::T => now;
3557+ 79.3624056216 => c.freq; 0.541929651177::T => now;
3558+ 79.5274313973 => c.freq; 0.648711461939::T => now;
3559+ 89.977706362 => c.freq; 0.633880569387::T => now;
3560+ 50.419306911 => c.freq; 0.975678729336::T => now;
3561+ 90.4964444807 => c.freq; 0.422085567862::T => now;
3562+ 62.7504824646 => c.freq; 0.760981450326::T => now;
3563+ 38.6795482629 => c.freq; 0.855190887724::T => now;
3564+ 55.1785220336 => c.freq; 0.198462895415::T => now;
3565+ 65.2566291244 => c.freq; 0.45295319112::T => now;
3566+ 39.849532234 => c.freq; 0.111216252087::T => now;
3567+ 24.8145295694 => c.freq; 0.63192313611::T => now;
3568+ 75.4479708933 => c.freq; 0.708117365548::T => now;
3569+ 91.7898205013 => c.freq; 0.118726918397::T => now;
3570+ 11.1226719804 => c.freq; 0.00227435035027::T => now;
3571+ 17.1612882353 => c.freq; 0.788258726865::T => now;
3572+ 95.4233201187 => c.freq; 0.753953927236::T => now;
3573+ 9.22913408693 => c.freq; 0.537793462322::T => now;
3574+ 74.8085014754 => c.freq; 0.746139240207::T => now;
3575+ 45.7232704819 => c.freq; 0.460229529242::T => now;
3576+ 70.6104549223 => c.freq; 0.974618201641::T => now;
3577+ 14.0670638553 => c.freq; 0.712430511367::T => now;
3578+ 28.2045775408 => c.freq; 0.789783283426::T => now;
3579+ 35.5272011789 => c.freq; 0.571853249164::T => now;
3580+ 48.8174762859 => c.freq; 0.155804212259::T => now;
3581+ 21.5772789394 => c.freq; 0.789535985919::T => now;
3582+ 53.2483212703 => c.freq; 0.159252905472::T => now;
3583+ 8.39420479412 => c.freq; 0.907719737104::T => now;
3584+ 94.1412601813 => c.freq; 0.896215593472::T => now;
3585+ 22.7259402831 => c.freq; 0.606393432988::T => now;
3586+ 37.62738641 => c.freq; 0.267251858167::T => now;
3587+ 24.7410864394 => c.freq; 0.927872058692::T => now;

1621 more lines aren’t shown here.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t