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 @@
1*.d1*.d
2*.o2*.o
3 3
4src/chuck4/src/chuck
5src/chuck.output5/src/core/chuck.output
6src/chuck.tab.c6/src/core/chuck.tab.c
7src/chuck.tab.h7/src/core/chuck.tab.h
8src/chuck.yy.c8/src/core/chuck.yy.c
9src/Release9/src/Release
10src/Debug10/src/Debug
11 11
12.DS_Store12.DS_Store
13project.xcworkspace13project.xcworkspace
14xcuserdata14xcuserdata
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
3Please 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
2## Strongly-timed, Concurrent, and On-the-fly Music Programming Language 9## Strongly-timed, Concurrent, and On-the-fly Music Programming Language
3 10
4Welcome to ChucK! 11Welcome to ChucK!
5 12
6what 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.13what 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.
7 14
8For more information, including documentation, research publications, and community resources, please check out the ChucK website:15For more information, including documentation, research publications, and community resources, please check out the ChucK website:
9http://chuck.stanford.edu/16http://chuck.stanford.edu/
10
11
examples/basic/adsr.ck+28−9
@@ -1,9 +1,21 @@
1// an ADSR envelope1// name: adsr.ck
2// (also see envelope.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
3SinOsc s => ADSR e => dac;13SinOsc s => ADSR e => dac;
4 14
5// set a, d, s, and r15// set A, D, S, and R
6e.set( 10::ms, 8::ms, .5, 500::ms );16e.set( 10::ms, 8::ms, .5, 500::ms );
17// (note: A, D, R are durations; S is a number between 0 and 1)
18
7// set gain19// set gain
8.5 => s.gain;20.5 => s.gain;
9 21
@@ -11,14 +23,21 @@ e.set( 10::ms, 8::ms, .5, 500::ms ); · 1 unmodified line
11while( true )23while( true )
12{24{
13 // choose freq25 // choose freq
14 Math.random2( 20, 120 ) => Std.mtof => s.freq;26 Math.random2( 32, 96 ) => Std.mtof => s.freq;
15 27
16 // key on - start attack28 // key on: begin ATTACK
29 // (note: ATTACK automatically transitions to DECAY;
30 // DECAY automatically transitions to SUSTAIN)
17 e.keyOn();31 e.keyOn();
18 // advance time by 800 ms32 // advance time by 500 ms
33 // (note: this is the duration from the
34 // beginning of ATTACK to the end of SUSTAIN)
19 500::ms => now;35 500::ms => now;
20 // key off - start release36 // key off; start RELEASE
21 e.keyOff();37 e.keyOff();
22 // advance time by 800 ms38 // allow the RELEASE to ramp down to 0
23 800::ms => now;39 e.releaseTime() => now;
40
41 // advance time by 300 ms (duration until the next sound)
42 300::ms => now;
24}43}
examples/deep/shepard.ck+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
3// desc: continuous shepard-risset tone generator; 3// desc: continuous shepard-risset tone generator;
4// descending but can easily made to ascend4// descending but can easily made to ascend
5//5//
6// author: Ge Wang (http://www.gewang.com/)6// author: Ge Wang (https://ccrma.stanford.edu/~ge/)
7// date: spring 20167// date: spring 2016
8//--------------------------------------------------------------------8//--------------------------------------------------------------------
9 9
examples/deep/thx.ck+76−21
@@ -1,32 +1,81 @@
1//---------------------------------------------------------------------1//--------------------------------------------------------------------
2// name: thx.ck2// name: thx.ck
3// desc: THX Deep Note emulator3// desc: emulation of the original THX Deep Note
4// (original Deep Note by James Andy Moorer)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/)
5//8//
6// authors:
7// Perry R. Cook (Jan 8, 2007) -- original ChucK version9// Perry R. Cook (Jan 8, 2007) -- original ChucK version
8// Ge Wang -- modified final chord: D1,D1,D2,D3,D4,A4,D5,A5,D6,A610// Ge Wang -- modified final chord to align with original Deep Note
9// -- added detune (original Deep Note root between D and Eb)11// -- added beginning "chaotic" section
10// -- time-driven loops (was counter-driven loops)12// -- time-driven loops (was counter-driven loops)
11//---------------------------------------------------------------------13//
12 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
13// 30 target frequencies, corresponding to pitches in a big chord:60// 30 target frequencies, corresponding to pitches in a big chord:
14// D1, D1, D2, D3, D4, A4, D5, A5, D6, A661// D1, D2, D3, D4, D5, A5, D6, F#6, A6
15[ 36.7, 36.7, 73.4, 146.8, 293.7, 440.0, 587.3, 880.0, 1174.7, 1760.0,62[ 37.5, 75, 150, 300, 600, 900, 1200, 1500, 1800,
16 36.7, 36.7, 73.4, 146.8, 293.7, 440.0, 587.3, 880.0, 1174.7, 1760.15,63 37.5, 75, 150, 300, 600, 900, 1200, 1500, 1800,
17 36.7, 36.7, 73.4, 146.8, 293.7, 440.0, 587.3, 880.0, 1174.7, 1759.85 64 37.5, 75, 150, 300, 600, 900, 1200, 1800,
65 150, 300, 900, 1200
18] @=> float targets[];66] @=> float targets[];
19// detune mutiplier (original Deep Note between D and Eb)
20Math.mtof(26.3) / Math.mtof(26) => float detune;
21 67
22// initial frequencies68// initial frequencies
23float initials[30];69float initials[30];
70// for the initial "wavering" in the steady state
71float initialsBase[30];
72float randomRates[30];
24 73
25// parameters (play with these to control timing)74// parameters (play with these to control timing)
263.0::second => dur initialHold; // initial steady segment7512.5::second => dur initialHold; // initial steady segment
275.5::second => dur sweepTime; // duration over which to change freq766.0::second => dur sweepTime; // duration over which to change freq
283.5::second => dur targetHold; // duration to hold target chord775.5::second => dur targetHold; // duration to hold target chord
292.0::second => dur decayTime; // duration for reverb tail to decay to 0786.0::second => dur decayTime; // duration for reverb tail to decay to 0
30 79
31// sound objects80// sound objects
32SawOsc saw[30]; // sawtooth waveform (30 of them)81SawOsc saw[30]; // sawtooth waveform (30 of them)
@@ -46,13 +95,16 @@ for( 0 => int i; i < 30; i++ ) · 13 unmodified lines
46 // connect sound objects (right channel)95 // connect sound objects (right channel)
47 saw[i] => gainR[i] => reverbR;96 saw[i] => gainR[i] => reverbR;
48 // randomize initial frequencies97 // 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;
50 // initial gain for each sawtooth generator100 // initial gain for each sawtooth generator
51 0.1 => saw[i].gain;101 0.1 => saw[i].gain;
52 // randomize gain (volume)102 // randomize gain (volume)
53 Math.random2f( 0.0, 1.0 ) => gainL[i].gain;103 Math.random2f( 0.0, 1.0 ) => gainL[i].gain;
54 // right.gain is 1-left.gain -- effectively panning in stereo104 // right.gain is 1-left.gain -- effectively panning in stereo
55 1.0 - gainL[i].gain() => gainR[i].gain;105 1.0 - gainL[i].gain() => gainR[i].gain;
106 // rate at which to waver the initial voices
107 Math.random2f(.1,1) => randomRates[i];
56}108}
57 109
58// hold steady cluster (initial chaotic random frequencies)110// hold steady cluster (initial chaotic random frequencies)
@@ -66,6 +118,9 @@ while( now < end ) · 7 unmodified lines
66 for( 0 => int i; i < 30; i++ ) {118 for( 0 => int i; i < 30; i++ ) {
67 // set gradually decaying values to volume119 // set gradually decaying values to volume
68 0.1 * Math.pow(progress,3) => saw[i].gain;120 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;
69 }124 }
70 // advance time125 // advance time
71 10::ms => now;126 10::ms => now;
@@ -81,7 +136,7 @@ while( now < end ) · 9 unmodified lines
81 // for each sawtooth136 // for each sawtooth
82 for( 0 => int i; i < 30; i++ ) {137 for( 0 => int i; i < 30; i++ ) {
83 // update frequency by delta, towards target138 // 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;
85 }140 }
86 // advance time141 // advance time
87 10::ms => now;142 10::ms => now;
@@ -107,4 +162,4 @@ while( now < end ) · 19 unmodified lines
107}162}
108 163
109// wait for reverb tail before ending164// wait for reverb tail before ending
1102::second => now;1655::second => now;
examples/extend/chugraph.ckrenamed from examples/extend/chubgraph.ck+2−2
@@ -1,7 +1,7 @@
1// Chubgraph1// Chugraph
2// Create new UGens by compositing existing UGens2// Create new UGens by compositing existing UGens
3 3
4class MyString extends Chubgraph4class MyString extends Chugraph
5{5{
6 // karplus + strong plucked string filter6 // karplus + strong plucked string filter
7 // Ge Wang (gewang@cs.princeton.edu)7 // 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
1 3
4// path
2NRev reverb => dac;5NRev reverb => dac;
30.01 => reverb.mix;6// just a bit of reverb
70.025 => reverb.mix;
4 8
9// the MIDI file in object
5MidiFileIn min;10MidiFileIn min;
11// the MIDI message shuttle
6MidiMsg msg;12MidiMsg msg;
7 13
14// the filename
8string filename;15string filename;
9if(me.args() == 0)16// if no command line arguments provided
10 me.sourceDir() + "/bwv772.mid" => filename;17if( me.args() == 0 ) me.sourceDir() + "bwv772.mid" => filename;
11else18// else use that filename
12 me.arg(0) => filename;19else me.arg(0) => filename;
13 20
14if(!min.open(filename))21// open the file
22if( !min.open(filename) )
15{23{
24 // error!
16 cherr <= "unable to open MIDI file: '" <= filename <= "'\n";25 cherr <= "unable to open MIDI file: '" <= filename <= "'\n";
26 // done
17 me.exit();27 me.exit();
18}28}
19 29
20chout <= filename <= ": " <= min.numTracks() <= " tracks\n";30// print out
31cherr <= "----------" <= IO.newline();
32cherr <= "MIDI file: " <= IO.newline()
33 <= " |- " <= filename <= IO.newline()
34 <= " |- contains " <= min.numTracks() <= " tracks" <= IO.newline();
35// print
36cherr <= "----------" <= IO.newline();
37cherr <= "playing..." <= IO.newline();
38cherr <= "----------" <= IO.newline();
21 39
40// flag
22int done;41int done;
23 42
24for(int t; t < min.numTracks(); t++)43// for each track, spork a separate shred with the track number
25 spork ~ track(t);44for( int t; t < min.numTracks(); t++ )
45 spork ~ doTrack( t, 1 );
26 46
27while(done < min.numTracks())47// keeping track of how many tracks are done
48while( done < min.numTracks() )
28 1::second => now;49 1::second => now;
29 50
51// done
52cherr <= "done; cleaning up..." <= IO.newline();
53
54// close the file
30min.close();55min.close();
31 56
32fun void track(int t)57// entry point for each shred assigned to a track
58fun void doTrack( int track, float speed )
33{59{
34 // hack polyphony60 // hack polyphony
35 Mandolin s[4];61 Wurley s[4];
36 for(int i; i < s.size(); i++) s[i] => reverb;62 // for each voice
37 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
38 int v;71 int v;
39 72
40 while(min.read(msg, t))73 // read through all MIDI messages on track
74 while( min.read( msg, track ) )
41 {75 {
42 if(msg.when > 0::second)76 // this means no more MIDI events at current time; advance time
43 msg.when => now;77 if( msg.when > 0::second )
78 msg.when * speed => now; // speed of 1 is nominal
44 79
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 )
46 {82 {
83 // get the pitch and convert to frequencey; set
47 msg.data2 => Std.mtof => s[v].freq;84 msg.data2 => Std.mtof => s[v].freq;
85 // velocity data; note on
48 msg.data3/127.0 => s[v].noteOn;86 msg.data3/127.0 => s[v].noteOn;
49 87 // cycle the voices
50 (v+1)%s.size() => v;88 (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();
51 }99 }
52 }100 }
53 101
102 // done with track
54 done++;103 done++;
55}104}
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//----------------------------------------------------------------------------
2 6
3// the patch7// the patch
4SinOsc s => JCRev r => dac;8SinOsc s => JCRev r => dac;
@@ -11,8 +15,8 @@ OscIn oin; · 6 unmodified lines
11OscMsg msg;15OscMsg msg;
12// use port 6449 (or whatever)16// use port 6449 (or whatever)
136449 => oin.port;176449 => oin.port;
14// create an address in the receiver18// create an address in the receiver, expect an int and a float
15oin.addAddress( "/foo/notes, if" );19oin.addAddress( "/foo/notes, i f" );
16 20
17// infinite event loop21// infinite event loop
18while( true )22while( true )
@@ -23,11 +27,13 @@ while( true ) · 4 unmodified lines
23 // grab the next message from the queue. 27 // grab the next message from the queue.
24 while( oin.recv(msg) )28 while( oin.recv(msg) )
25 { 29 {
30 // expected datatypes (note: as indicated by "i f")
26 int i;31 int i;
27 float f;32 float f;
28 33
29 // getFloat fetches the expected float (as indicated by "i f")34 // fetch the first data element as int
30 msg.getInt(0) => i => Std.mtof => s.freq;35 msg.getInt(0) => i => Std.mtof => s.freq;
36 // fetch the second data element as float
31 msg.getFloat(1) => f => s.gain;37 msg.getFloat(1) => f => s.gain;
32 38
33 // print39 // print
examples/osc/s.ck+9−4
@@ -1,17 +1,22 @@
1// launch with r.ck1//----------------------------------------------------------------------------
2// name: s.ck ('s' is "sender")
3// desc: OpenSoundControl (OSC) sender example
4// note: launch with r.ck (that's the receiver)
5//----------------------------------------------------------------------------
2 6
3// name7// destination host name
4"localhost" => string hostname;8"localhost" => string hostname;
9// destination port number
56449 => int port;106449 => int port;
6 11
7// check command line12// check command line
8if( me.args() ) me.arg(0) => hostname;13if( me.args() ) me.arg(0) => hostname;
9if( me.args() > 1 ) me.arg(1) => Std.atoi => port;14if( me.args() > 1 ) me.arg(1) => Std.atoi => port;
10 15
11// send object16// sender object
12OscOut xmit;17OscOut xmit;
13 18
14// aim the transmitter19// aim the transmitter at destination
15xmit.dest( hostname, port );20xmit.dest( hostname, port );
16 21
17// infinite time loop22// infinite time loop
notes/VERSIONS+33−0
@@ -1,3 +1,36 @@
11.4.0.2
2---
3 - (deprecated) Chubgraph => (new) Chugraph;
4 Chubgraph will continue to function.
5
61.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
11.4.0.0341.4.0.0
2---35---
3 ********************************************************36 ********************************************************
src/core/chuck.cpp+36−7
@@ -90,7 +90,7 @@ · 89 unmodified lines
90 90
91 91
92// chuck statics92// chuck statics
93const char ChucK::VERSION[] = "1.4.0.0 (numchucks)";93const char ChucK::VERSION[] = "1.4.0.1 (numchucks)";
94t_CKUINT ChucK::o_numVMs = 0;94t_CKUINT ChucK::o_numVMs = 0;
95t_CKBOOL ChucK::o_isGlobalInit = FALSE;95t_CKBOOL ChucK::o_isGlobalInit = FALSE;
96t_CKBOOL ChucK::enableSystemCall = FALSE;96t_CKBOOL ChucK::enableSystemCall = FALSE;
@@ -140,6 +140,8 @@ ChucK::ChucK() · 43 unmodified lines
140 initDefaultParams();140 initDefaultParams();
141 // did user init?141 // did user init?
142 m_init = FALSE;142 m_init = FALSE;
143 // zero out the hook
144 m_hook = NULL; // m_hook = nullptr
143 145
144 // global init, if needed146 // global init, if needed
145 if( !o_isGlobalInit ) globalInit();147 if( !o_isGlobalInit ) globalInit();
@@ -684,22 +686,23 @@ bool ChucK::shutdown() · 538 unmodified lines
684 stk_detach( m_carrier );686 stk_detach( m_carrier );
685 687
686 // cancel otf thread688 // cancel otf thread
687#ifndef __DISABLE_OTF_SERVER__689 if(m_carrier->otf_thread)
690 {
688#if !defined(__PLATFORM_WIN32__) || defined(__WINDOWS_PTHREAD__)691#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 );
690#else693#else
691 if( m_carrier->otf_thread ) CloseHandle( m_carrier->otf_thread );694 CloseHandle( m_carrier->otf_thread ); // doesn't cancel thread
692#endif695#endif
696 m_carrier->otf_thread = 0; // signals thread shutdown
697 }
698
693 // close otf socket699 // close otf socket
694 if( m_carrier->otf_socket ) ck_close( m_carrier->otf_socket );700 if( m_carrier->otf_socket ) ck_close( m_carrier->otf_socket );
695 701
696 // reset702 // reset
697 m_carrier->otf_socket = NULL;703 m_carrier->otf_socket = NULL;
698 m_carrier->otf_port = 0;704 m_carrier->otf_port = 0;
699 m_carrier->otf_thread = 0;
700 705
701#endif
702
703 // TODO: a different way to unlock?706 // TODO: a different way to unlock?
704 // unlock all objects to delete chout, cherr707 // unlock all objects to delete chout, cherr
705 Chuck_VM_Object::unlock_all();708 Chuck_VM_Object::unlock_all();
@@ -1715,3 +1718,29 @@ void ChucK::poop() · 1009 unmodified lines
1715 ::uh();1718 ::uh();
1716 #endif1719 #endif
1717}1720}
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//-----------------------------------------------------------------------------
1730bool 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//-----------------------------------------------------------------------------
1743Chuck_DL_MainThreadHook * ChucK::getMainThreadHook()
1744{
1745 return m_hook;
1746}
src/core/chuck.h+6−0
@@ -136,6 +136,10 @@ public: · 135 unmodified lines
136public:136public:
137 // additional native chuck bindings/types (use with extra caution)137 // additional native chuck bindings/types (use with extra caution)
138 bool bind( f_ck_query queryFunc, const std::string & name );138 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();
139 143
140public:144public:
141 // get VM (dangerous)145 // get VM (dangerous)
@@ -260,6 +264,8 @@ protected: · 118 unmodified lines
260 std::map< std::string, std::list<std::string> > m_listParams;264 std::map< std::string, std::list<std::string> > m_listParams;
261 // did user init?265 // did user init?
262 t_CKBOOL m_init;266 t_CKBOOL m_init;
267 // main thread "hook" (if there is a main thread)
268 Chuck_DL_MainThreadHook * m_hook;
263};269};
264 270
265 271
src/core/chuck.y+5−4
@@ -88,7 +88,8 @@ a_Program g_program = NULL; · 87 unmodified lines
88// 1.3.5.3: changed to 39 for vec literal88// 1.3.5.3: changed to 39 for vec literal
89// 1.3.6.0: changed to 40 for external keyword89// 1.3.6.0: changed to 40 for external keyword
90// 1.4.0.0: changed to 41 for global keyword90// 1.4.0.0: changed to 41 for global keyword
91%expect 4191// 1.4.0.1: changed to 79 for left recursion
92%expect 79
92 93
93%token <sval> ID STRING_LIT CHAR_LIT94%token <sval> ID STRING_LIT CHAR_LIT
94%token <ival> NUM95%token <ival> NUM
@@ -182,7 +183,7 @@ a_Program g_program = NULL; · 87 unmodified lines
182 183
183program184program
184 : program_section { $$ = g_program = new_program( $1, EM_lineNum ); }185 : 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 ); }
186 ;187 ;
187 188
188program_section189program_section
@@ -303,7 +304,7 @@ arg_list · 114 unmodified lines
303 304
304statement_list305statement_list
305 : statement { $$ = new_stmt_list( $1, EM_lineNum ); }306 : 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 ); }
307 ;308 ;
308 309
309statement310statement
@@ -358,7 +359,7 @@ expression_statement · 48 unmodified lines
358 359
359expression360expression
360 : chuck_expression { $$ = $1; }361 : 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 ); }
362 ;363 ;
363 364
364chuck_expression365chuck_expression
src/core/chuck_absyn.cpp+55−12
@@ -45,13 +45,27 @@ a_Program new_program( a_Section section, int pos ) · 44 unmodified lines
45 return a;45 return a;
46}46}
47 47
48a_Program prepend_program( a_Section section, a_Program program, int pos )48a_Program append_program( a_Program program, a_Section section, int pos )
49{49{
50 a_Program a = new_program( section, pos );50 a_Program a = new_program( section, pos );
51 a->next = program;51 a_Program current;
52 a->linepos = pos;
53 52
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;
55}69}
56 70
57a_Section new_section_stmt( a_Stmt_List list, int pos )71a_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
94 return a;108 return a;
95}109}
96 110
97a_Stmt_List prepend_stmt_list( a_Stmt stmt, a_Stmt_List stmt_list, int pos )111a_Stmt_List append_stmt_list( a_Stmt_List stmt_list, a_Stmt stmt, int pos )
98{112{
99 a_Stmt_List a = new_stmt_list( stmt, pos );113 a_Stmt_List a = new_stmt_list( stmt, pos );
100 a->next = stmt_list;114 a_Stmt_List current;
101 a->linepos = pos;
102 115
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;
104}132}
105 133
106a_Stmt new_stmt_from_expression( a_Exp exp, int pos )134a_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
293 return a; 321 return a;
294}322}
295 323
296a_Exp prepend_expression( a_Exp exp, a_Exp list, int pos )324a_Exp append_expression( a_Exp list, a_Exp exp, int pos )
297{325{
298 exp->next = list;326 a_Exp current;
299 return exp;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;
300}343}
301 344
302a_Exp new_exp_from_binary( a_Exp lhs, ae_Operator oper, a_Exp rhs, int pos )345a_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
130// functions130// functions
131//------------------------------------------------------------------------------131//------------------------------------------------------------------------------
132a_Program new_program( a_Section section, int pos );132a_Program new_program( a_Section section, int pos );
133a_Program prepend_program( a_Section section, a_Program program, int pos );133a_Program append_program( a_Program program, a_Section section, int pos );
134a_Section new_section_stmt( a_Stmt_List stmt_list, int pos );134a_Section new_section_stmt( a_Stmt_List stmt_list, int pos );
135a_Section new_section_func_def( a_Func_Def func_def, int pos );135a_Section new_section_func_def( a_Func_Def func_def, int pos );
136a_Section new_section_class_def( a_Class_Def class_def, int pos );136a_Section new_section_class_def( a_Class_Def class_def, int pos );
137a_Stmt_List new_stmt_list( a_Stmt stmt, int pos );137a_Stmt_List new_stmt_list( a_Stmt stmt, int pos );
138a_Stmt_List prepend_stmt_list( a_Stmt stmt, a_Stmt_List stmt_list, int pos );138a_Stmt_List append_stmt_list( a_Stmt_List stmt_list, a_Stmt stmt, int pos );
139a_Stmt new_stmt_from_expression( a_Exp exp, int pos );139a_Stmt new_stmt_from_expression( a_Exp exp, int pos );
140a_Stmt new_stmt_from_code( a_Stmt_List code, int pos );140a_Stmt new_stmt_from_code( a_Stmt_List code, int pos );
141a_Stmt new_stmt_from_while( a_Exp cond, a_Stmt body, int pos );141a_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
151a_Stmt new_stmt_from_return( a_Exp exp, int pos );151a_Stmt new_stmt_from_return( a_Exp exp, int pos );
152a_Stmt new_stmt_from_label( c_str xid, int pos );152a_Stmt new_stmt_from_label( c_str xid, int pos );
153a_Stmt new_stmt_from_case( a_Exp exp, int pos );153a_Stmt new_stmt_from_case( a_Exp exp, int pos );
154a_Exp prepend_expression( a_Exp exp, a_Exp list, int pos );154a_Exp append_expression( a_Exp list, a_Exp exp, int pos );
155a_Exp new_exp_from_binary( a_Exp lhs, ae_Operator oper, a_Exp rhs, int pos );155a_Exp new_exp_from_binary( a_Exp lhs, ae_Operator oper, a_Exp rhs, int pos );
156a_Exp new_exp_from_unary( ae_Operator oper, a_Exp exp, int pos );156a_Exp new_exp_from_unary( ae_Operator oper, a_Exp exp, int pos );
157a_Exp new_exp_from_unary2( ae_Operator oper, a_Type_Decl type, a_Array_Sub array, int pos );157a_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
78 const char * extension, 78 const char * extension,
79 std::list<std::string> & chugin_search_paths,79 std::list<std::string> & chugin_search_paths,
80 std::list<std::string> & named_dls);80 std::list<std::string> & named_dls);
81t_CKBOOL load_module( Chuck_Compiler * compiler, Chuck_Env * env, f_ck_query query, const char * name, const char * nspc );81t_CKBOOL load_module( Chuck_Compiler * compiler, Chuck_Env * env,
82 f_ck_query query, const char * name, const char * nspc );
82 83
83 84
84 85
src/core/chuck_dl.cpp+48−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
40#include "chuck_instr.h"40#include "chuck_instr.h"
41#include "chuck_compile.h"41#include "chuck_compile.h"
42#include "chuck_vm.h"42#include "chuck_vm.h"
43#include "chuck.h"
43#include <sstream>44#include <sstream>
44using namespace std;45using namespace std;
45 46
@@ -556,6 +557,17 @@ t_CKBOOL CK_DLL_CALL ck_end_class( Chuck_DL_Query * query ) · 510 unmodified lines
556}557}
557 558
558 559
560//-----------------------------------------------------------------------------
561// name: ck_create_main_thread_hook()
562// desc: ...
563//-----------------------------------------------------------------------------
564Chuck_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}
559 571
560 572
561//-----------------------------------------------------------------------------573//-----------------------------------------------------------------------------
@@ -935,6 +947,7 @@ Chuck_DL_Query::Chuck_DL_Query( Chuck_Carrier * carrier ) · 373 unmodified lines
935 doc_class = ck_doc_class;947 doc_class = ck_doc_class;
936 doc_func = ck_doc_func;948 doc_func = ck_doc_func;
937 doc_var = ck_doc_var;949 doc_var = ck_doc_var;
950 create_main_thread_hook = ck_create_main_thread_hook;
938 m_carrier = carrier;951 m_carrier = carrier;
939 952
940// memset(reserved2, NULL, sizeof(void*)*RESERVED_SIZE);953// memset(reserved2, NULL, sizeof(void*)*RESERVED_SIZE);
@@ -1005,6 +1018,41 @@ Chuck_DL_Func::~Chuck_DL_Func() · 64 unmodified lines
1005}1018}
1006 1019
1007 1020
1021/*******************************************************************************
1022
1023 Main Thread Hook stuff
1024
1025*******************************************************************************/
1026
1027t_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
1034t_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//-----------------------------------------------------------------------------
1045Chuck_DL_MainThreadHook::Chuck_DL_MainThreadHook(f_mainthreadhook hook, f_mainthreadquit quit,
1046 void * bindle, Chuck_Carrier * carrier) :
1047m_hook(hook),
1048m_quit(quit),
1049m_carrier(carrier),
1050m_bindle(bindle),
1051activate(ck_mthook_activate),
1052deactivate(ck_mthook_deactivate),
1053m_active(FALSE)
1054{ }
1055
1008 1056
1009 1057
1010/*******************************************************************************1058/*******************************************************************************
src/core/chuck_dl.h+23−2
@@ -48,7 +48,7 @@ · 47 unmodified lines
48// major version must be the same between chuck:chugin48// major version must be the same between chuck:chugin
49#define CK_DLL_VERSION_MAJOR (0x0007)49#define CK_DLL_VERSION_MAJOR (0x0007)
50// minor version of chugin must be less than or equal to chuck's50// 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)
52#define CK_DLL_VERSION_MAKE(maj,min) ((t_CKUINT)(((maj) << 16) | (min)))52#define CK_DLL_VERSION_MAKE(maj,min) ((t_CKUINT)(((maj) << 16) | (min)))
53#define CK_DLL_VERSION_GETMAJOR(v) (((v) >> 16) & 0xFFFF)53#define CK_DLL_VERSION_GETMAJOR(v) (((v) >> 16) & 0xFFFF)
54#define CK_DLL_VERSION_GETMINOR(v) ((v) & 0xFFFF)54#define CK_DLL_VERSION_GETMINOR(v) ((v) & 0xFFFF)
@@ -73,6 +73,7 @@ struct Chuck_DLL; · 18 unmodified lines
73struct Chuck_UGen;73struct Chuck_UGen;
74struct Chuck_UAna;74struct Chuck_UAna;
75struct Chuck_UAnaBlobProxy;75struct Chuck_UAnaBlobProxy;
76struct Chuck_DL_MainThreadHook;
76namespace Chuck_DL_Api { struct Api; }77namespace Chuck_DL_Api { struct Api; }
77 78
78 79
@@ -306,7 +307,9 @@ typedef void (CK_DLL_CALL * f_add_ugen_ctrl)( Chuck_DL_Query * query, f_ctrl ctr · 227 unmodified lines
306 const char * type, const char * name );307 const char * type, const char * name );
307// end class/namespace - must correspondent with begin_class. returns false on error308// end class/namespace - must correspondent with begin_class. returns false on error
308typedef t_CKBOOL (CK_DLL_CALL * f_end_class)( Chuck_DL_Query * query );309typedef 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
311typedef Chuck_DL_MainThreadHook * (CK_DLL_CALL * f_create_main_thread_hook)( Chuck_DL_Query * query, f_mainthreadhook hook, f_mainthreadquit quit, void * bindle );
312
310// documentation313// documentation
311// set current class documentation314// set current class documentation
312typedef t_CKBOOL (CK_DLL_CALL * f_doc_class)( Chuck_DL_Query * query, const char * doc );315typedef t_CKBOOL (CK_DLL_CALL * f_doc_class)( Chuck_DL_Query * query, const char * doc );
@@ -334,6 +337,7 @@ public: · 21 unmodified lines
334 Chuck_Compiler * compiler() const { return m_carrier->compiler; }337 Chuck_Compiler * compiler() const { return m_carrier->compiler; }
335 Chuck_VM * vm() const { return m_carrier->vm; }338 Chuck_VM * vm() const { return m_carrier->vm; }
336 Chuck_Env * env() const { return m_carrier->env; }339 Chuck_Env * env() const { return m_carrier->env; }
340 Chuck_Carrier * carrier() const { return m_carrier; }
337 341
338public:342public:
339 // function pointers - to be called from client module343 // function pointers - to be called from client module
@@ -375,6 +379,9 @@ public: · 35 unmodified lines
375 f_doc_var doc_var;379 f_doc_var doc_var;
376 f_add_example add_ex;380 f_add_example add_ex;
377 381
382 // re-added 1.4.0.1
383 f_create_main_thread_hook create_main_thread_hook;
384
378 // NOTE: everything below std::anything cannot be reliably accessed385 // NOTE: everything below std::anything cannot be reliably accessed
379 // by offset between dynamic modules, since std::anything could be variable386 // by offset between dynamic modules, since std::anything could be variable
380 // size -- put everything need to be accessed across modules above here!387 // size -- put everything need to be accessed across modules above here!
@@ -629,6 +636,20 @@ protected: · 248 unmodified lines
629};636};
630 637
631 638
639struct Chuck_DL_MainThreadHook
640{
641public:
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};
632 653
633 654
634/* API to ChucK's innards */655/* 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
7503 if( type->size == sz_INT && iskindofint(vm->env(), type) ) // ISSUE: 64-bit (fixed 1.3.1.0)7503 if( type->size == sz_INT && iskindofint(vm->env(), type) ) // ISSUE: 64-bit (fixed 1.3.1.0)
7504 {7504 {
7505 t_CKINT * sp = (t_CKINT *)the_sp;7505 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 )
7507 {7507 {
7508 if( isa( type, vm->env()->t_object ) )7508 if( isa( type, vm->env()->t_object ) )
7509 {7509 {
7510 // print it7510 // print it
7511 if( *(sp-1) == 0 )7511 if( *(sp) == 0 )
7512 CK_FPRINTF_STDERR( "null " );7512 CK_FPRINTF_STDERR( "null " );
7513 else7513 else
7514 CK_FPRINTF_STDERR( "0x%lx ", *(sp) );7514 CK_FPRINTF_STDERR( "0x%lx ", *(sp) );
src/core/chuck_io.cpp+2498−0
@@ -35,6 +35,11 @@ · 34 unmodified lines
35#include "chuck_instr.h"35#include "chuck_instr.h"
36#include "chuck_type.h"36#include "chuck_type.h"
37#include "chuck_vm.h"37#include "chuck_vm.h"
38#include "hidio_sdl.h"
39
40#ifndef __DISABLE_MIDI__
41#include "midiio_rtmidi.h"
42#endif
38 43
39#ifndef __WINDOWS_DS__44#ifndef __WINDOWS_DS__
40#include <sys/select.h>45#include <sys/select.h>
@@ -47,6 +52,8 @@ · 6 unmodified lines
47#include <fcntl.h>52#include <fcntl.h>
48#include <math.h>53#include <math.h>
49 54
55#include <iomanip>
56#include <sstream>
50#include <iostream>57#include <iostream>
51#include <fstream>58#include <fstream>
52using namespace std;59using namespace std;
@@ -65,6 +72,2497 @@ typedef DWORD uint32_t; · 12 unmodified lines
65#include <stdint.h>72#include <stdint.h>
66#endif73#endif
67 74
75// global
76static Chuck_String * g_newline = new Chuck_String();
77
78
79
80
81//-----------------------------------------------------------------------------
82// name: init_class_io()
83// desc: ...
84//-----------------------------------------------------------------------------
85t_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
209error:
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//-----------------------------------------------------------------------------
224t_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
371error:
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//-----------------------------------------------------------------------------
386t_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
464error:
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//-----------------------------------------------------------------------------
479t_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
557error:
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
571static t_CKUINT MidiIn_offset_data = 0;
572t_CKUINT MidiMsg_offset_data1 = 0;
573t_CKUINT MidiMsg_offset_data2 = 0;
574t_CKUINT MidiMsg_offset_data3 = 0;
575t_CKUINT MidiMsg_offset_when = 0;
576static t_CKUINT MidiOut_offset_data = 0;
577
578//-----------------------------------------------------------------------------
579// name: init_class_Midi()
580// desc: ...
581//-----------------------------------------------------------------------------
582t_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
708error:
709
710 // end the class import
711 type_engine_import_class_end( env );
712
713 return FALSE;
714}
715
716
717
718
719// static
720static t_CKUINT HidIn_offset_data = 0;
721
722static t_CKUINT HidMsg_offset_device_type = 0;
723static t_CKUINT HidMsg_offset_device_num = 0;
724static t_CKUINT HidMsg_offset_type = 0;
725static t_CKUINT HidMsg_offset_which = 0;
726static t_CKUINT HidMsg_offset_idata = 0;
727static t_CKUINT HidMsg_offset_fdata = 0;
728static t_CKUINT HidMsg_offset_when = 0;
729static t_CKUINT HidMsg_offset_deltax = 0;
730static t_CKUINT HidMsg_offset_deltay = 0;
731static t_CKUINT HidMsg_offset_axis_position = 0; // deprecated
732static t_CKUINT HidMsg_offset_axis_position2 = 0;
733static t_CKUINT HidMsg_offset_scaled_axis_position = 0; // deprecated
734static t_CKUINT HidMsg_offset_hat_position = 0;
735static t_CKUINT HidMsg_offset_cursorx = 0;
736static t_CKUINT HidMsg_offset_cursory = 0;
737static t_CKUINT HidMsg_offset_scaledcursorx = 0;
738static t_CKUINT HidMsg_offset_scaledcursory = 0;
739static t_CKUINT HidMsg_offset_x = 0;
740static t_CKUINT HidMsg_offset_y = 0;
741static t_CKUINT HidMsg_offset_z = 0;
742static t_CKUINT HidMsg_offset_touchx = 0; // added 1.3.0.0
743static t_CKUINT HidMsg_offset_touchy = 0; // added 1.3.0.0
744static t_CKUINT HidMsg_offset_touchsize = 0; // added 1.3.0.0
745static t_CKUINT HidMsg_offset_ascii = 0;
746static t_CKUINT HidMsg_offset_key = 0;
747
748static t_CKUINT HidOut_offset_data = 0;
749
750//-----------------------------------------------------------------------------
751// name: init_class_HID()
752// desc: ...
753//-----------------------------------------------------------------------------
754t_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
1147error:
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
1160static t_CKUINT MidiRW_offset_data = 0;
1161static t_CKUINT MidiMsgOut_offset_data = 0;
1162static t_CKUINT MidiMsgIn_offset_data = 0;
1163//-----------------------------------------------------------------------------
1164// name: init_class_MidiRW()
1165// desc: ...
1166//-----------------------------------------------------------------------------
1167t_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
1267error:
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//-----------------------------------------------------------------------------
1283CK_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
1291CK_DLL_SFUN( io_newline )
1292{
1293 RETURN->v_string = g_newline;
1294}
1295
1296
1297//-----------------------------------------------------------------------------
1298// FileIO API
1299//-----------------------------------------------------------------------------
1300CK_DLL_CTOR( fileio_ctor )
1301{ }
1302
1303CK_DLL_DTOR( fileio_dtor )
1304{ }
1305
1306CK_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
1316CK_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
1325CK_DLL_MFUN( fileio_close )
1326{
1327 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1328 f->close();
1329}
1330
1331CK_DLL_MFUN( fileio_good )
1332{
1333 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1334 RETURN->v_int = f->good();
1335}
1336
1337CK_DLL_MFUN( fileio_flush )
1338{
1339 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1340 f->flush();
1341}
1342
1343CK_DLL_MFUN( fileio_getmode )
1344{
1345 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1346 RETURN->v_int = f->mode();
1347}
1348
1349CK_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
1358CK_DLL_MFUN( fileio_size )
1359{
1360 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1361 RETURN->v_int = f->size();
1362}
1363
1364CK_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
1372CK_DLL_MFUN( fileio_tell )
1373{
1374 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1375 RETURN->v_int = f->tell();
1376}
1377
1378CK_DLL_MFUN( fileio_isdir )
1379{
1380 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
1381 RETURN->v_int = f->isDir();
1382}
1383
1384CK_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
1402CK_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
1409CK_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
1444CK_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
1454CK_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
1461CK_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
1468CK_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
1475CK_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
1507CK_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
1539CK_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
1573CK_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//-----------------------------------------------------------------------------
1609CK_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
1617CK_DLL_MFUN( chout_good )
1618{
1619 Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1620 RETURN->v_int = c->good();
1621}
1622
1623CK_DLL_MFUN( chout_flush )
1624{
1625 Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1626 c->flush();
1627}
1628
1629CK_DLL_MFUN( chout_getmode )
1630{
1631 // problem
1632 Chuck_IO_Chout * c = SHRED->vm_ref->chout();
1633 RETURN->v_int = c->mode();
1634}
1635
1636CK_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
1654CK_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
1661CK_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
1667CK_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
1677CK_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
1684CK_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
1691CK_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
1698CK_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
1706CK_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
1714CK_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//-----------------------------------------------------------------------------
1728CK_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
1736CK_DLL_MFUN( cherr_good )
1737{
1738 Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1739 RETURN->v_int = c->good();
1740}
1741
1742CK_DLL_MFUN( cherr_flush )
1743{
1744 Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1745 c->flush();
1746}
1747
1748CK_DLL_MFUN( cherr_getmode )
1749{
1750 // problem
1751 Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
1752 RETURN->v_int = c->mode();
1753}
1754
1755CK_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
1773CK_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
1780CK_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
1786CK_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
1796CK_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
1803CK_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
1810CK_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
1817CK_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
1825CK_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
1833CK_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//-----------------------------------------------------------------------------
1849CK_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
1856CK_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
1862CK_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
1869CK_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
1876CK_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
1882CK_DLL_MFUN( MidiIn_num )
1883{
1884 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
1885 RETURN->v_int = min->num();
1886}
1887
1888CK_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
1895CK_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
1906CK_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
1921CK_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//-----------------------------------------------------------------------------
1931CK_DLL_CTOR( MidiOut_ctor )
1932{
1933 OBJ_MEMBER_INT(SELF, MidiOut_offset_data) = (t_CKUINT)new MidiOut;
1934}
1935
1936CK_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
1942CK_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
1949CK_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
1956CK_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
1962CK_DLL_MFUN( MidiOut_num )
1963{
1964 MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);
1965 RETURN->v_int = mout->num();
1966}
1967
1968CK_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
1979CK_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
1986CK_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//-----------------------------------------------------------------------------
2003CK_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
2009CK_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
2015CK_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
2021CK_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
2027CK_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
2033CK_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//-----------------------------------------------------------------------------
2042CK_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
2049CK_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
2055CK_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
2064CK_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
2072CK_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
2079CK_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
2086CK_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
2093CK_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
2099CK_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
2105CK_DLL_MFUN( HidIn_num )
2106{
2107 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);
2108 RETURN->v_int = min->num();
2109}
2110
2111CK_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
2118CK_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
2131CK_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
2178CK_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
2226CK_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
2241CK_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
2247CK_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
2286CK_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
2311CK_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
2326CK_DLL_SFUN( HidIn_start_cursor_track )
2327{
2328 RETURN->v_int = !Mouse_start_cursor_track();
2329}
2330
2331CK_DLL_SFUN( HidIn_stop_cursor_track )
2332{
2333 RETURN->v_int = !Mouse_stop_cursor_track();
2334}
2335
2336//-----------------------------------------------------------------------------
2337// HidOut API
2338//-----------------------------------------------------------------------------
2339CK_DLL_CTOR( HidOut_ctor )
2340{
2341 OBJ_MEMBER_INT(SELF, HidOut_offset_data) = (t_CKUINT)new HidOut;
2342}
2343
2344CK_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
2350CK_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
2357CK_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
2363CK_DLL_MFUN( HidOut_num )
2364{
2365 HidOut * mout = (HidOut *)OBJ_MEMBER_INT(SELF, HidOut_offset_data);
2366 RETURN->v_int = mout->num();
2367}
2368
2369CK_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
2380CK_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
2387CK_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//-----------------------------------------------------------------------------
2402CK_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
2409CK_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
2417CK_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
2426CK_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
2434CK_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
2449CK_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//-----------------------------------------------------------------------------
2467CK_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
2474CK_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
2482CK_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
2491CK_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
2499CK_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//-----------------------------------------------------------------------------
2517CK_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
2524CK_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
2532CK_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
2541CK_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
2549CK_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
68 2566
69// available baud rates2567// available baud rates
70const t_CKUINT Chuck_IO_Serial::CK_BAUD_2400 = 2400;2568const t_CKUINT Chuck_IO_Serial::CK_BAUD_2400 = 2400;
src/core/chuck_io.h+220−2
@@ -33,6 +33,7 @@ · 32 unmodified lines
33#define __CHUCK_IO_H__33#define __CHUCK_IO_H__
34 34
35#include "chuck_oo.h"35#include "chuck_oo.h"
36#include "chuck_dl.h"
36#include "util_thread.h"37#include "util_thread.h"
37#include "util_buffers.h"38#include "util_buffers.h"
38#include <list>39#include <list>
@@ -40,6 +41,225 @@ · 1 unmodified line
40 41
41 42
42 43
44// class initialization
45t_CKBOOL init_class_Midi( Chuck_Env * env );
46t_CKBOOL init_class_MidiRW( Chuck_Env * env );
47t_CKBOOL init_class_HID( Chuck_Env * env );
48t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type );
49t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type );
50// added 1.3.0.0 -- moved to be full-fledged class
51t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type );
52// added 1.3.0.0 -- moved to be full-fledged class
53t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type );
54 // added 1.3.1
55t_CKBOOL init_class_serialio( Chuck_Env * env );
56
57
58
59
60
61//-----------------------------------------------------------------------------
62// io API
63//-----------------------------------------------------------------------------
64CK_DLL_MFUN( io_dummy );
65CK_DLL_SFUN( io_newline );
66CK_DLL_SFUN( io_openfile );
67
68
69//-----------------------------------------------------------------------------
70// fileio API
71//-----------------------------------------------------------------------------
72CK_DLL_CTOR( fileio_ctor );
73CK_DLL_DTOR( fileio_dtor );
74CK_DLL_MFUN( fileio_open );
75CK_DLL_MFUN( fileio_openflags );
76CK_DLL_MFUN( fileio_good );
77CK_DLL_MFUN( fileio_close );
78CK_DLL_MFUN( fileio_flush );
79CK_DLL_MFUN( fileio_getmode );
80CK_DLL_MFUN( fileio_setmode );
81CK_DLL_MFUN( fileio_size );
82CK_DLL_MFUN( fileio_seek );
83CK_DLL_MFUN( fileio_tell );
84CK_DLL_MFUN( fileio_isdir );
85CK_DLL_MFUN( fileio_dirlist );
86CK_DLL_MFUN( fileio_read );
87CK_DLL_MFUN( fileio_readline );
88CK_DLL_MFUN( fileio_readint );
89CK_DLL_MFUN( fileio_readintflags );
90CK_DLL_MFUN( fileio_readfloat );
91CK_DLL_MFUN( fileio_eof );
92CK_DLL_MFUN( fileio_more );
93CK_DLL_MFUN( fileio_writestring );
94CK_DLL_MFUN( fileio_writeint );
95CK_DLL_MFUN( fileio_writeintflags );
96CK_DLL_MFUN( fileio_writefloat );
97
98
99//-----------------------------------------------------------------------------
100// chout API -- added 1.3.0.0 as full class
101//-----------------------------------------------------------------------------
102CK_DLL_MFUN( chout_good );
103CK_DLL_MFUN( chout_close );
104CK_DLL_MFUN( chout_flush );
105CK_DLL_MFUN( chout_getmode );
106CK_DLL_MFUN( chout_setmode );
107CK_DLL_MFUN( chout_read );
108CK_DLL_MFUN( chout_readline );
109CK_DLL_MFUN( chout_readint );
110CK_DLL_MFUN( chout_readintflags );
111CK_DLL_MFUN( chout_readfloat );
112CK_DLL_MFUN( chout_eof );
113CK_DLL_MFUN( chout_more );
114CK_DLL_MFUN( chout_writestring );
115CK_DLL_MFUN( chout_writeint );
116CK_DLL_MFUN( chout_writefloat );
117
118
119//-----------------------------------------------------------------------------
120// cherr API -- added 1.3.0.0 as full class
121//-----------------------------------------------------------------------------
122CK_DLL_MFUN( cherr_good );
123CK_DLL_MFUN( cherr_close );
124CK_DLL_MFUN( cherr_flush );
125CK_DLL_MFUN( cherr_getmode );
126CK_DLL_MFUN( cherr_setmode );
127CK_DLL_MFUN( cherr_read );
128CK_DLL_MFUN( cherr_readline );
129CK_DLL_MFUN( cherr_readint );
130CK_DLL_MFUN( cherr_readintflags );
131CK_DLL_MFUN( cherr_readfloat );
132CK_DLL_MFUN( cherr_eof );
133CK_DLL_MFUN( cherr_more );
134CK_DLL_MFUN( cherr_writestring );
135CK_DLL_MFUN( cherr_writeint );
136CK_DLL_MFUN( cherr_writefloat );
137
138
139
140//-----------------------------------------------------------------------------
141// MidiMsg API
142//-----------------------------------------------------------------------------
143CK_DLL_CTOR( MidiMsg_ctor );
144
145extern t_CKUINT MidiMsg_offset_data1;
146extern t_CKUINT MidiMsg_offset_data2;
147extern t_CKUINT MidiMsg_offset_data3;
148extern t_CKUINT MidiMsg_offset_when;
149
150//-----------------------------------------------------------------------------
151// MidiRW API
152//-----------------------------------------------------------------------------
153CK_DLL_CTOR( MidiRW_ctor );
154CK_DLL_DTOR( MidiRW_dtor );
155CK_DLL_MFUN( MidiRW_open );
156CK_DLL_MFUN( MidiRW_close );
157CK_DLL_MFUN( MidiRW_read );
158CK_DLL_MFUN( MidiRW_write );
159
160
161//-----------------------------------------------------------------------------
162// MidiMsgOut API
163//-----------------------------------------------------------------------------
164CK_DLL_CTOR( MidiMsgOut_ctor );
165CK_DLL_DTOR( MidiMsgOut_dtor );
166CK_DLL_MFUN( MidiMsgOut_open );
167CK_DLL_MFUN( MidiMsgOut_close );
168CK_DLL_MFUN( MidiMsgOut_write );
169
170
171//-----------------------------------------------------------------------------
172// MidiMsgIn API
173//-----------------------------------------------------------------------------
174CK_DLL_CTOR( MidiMsgIn_ctor );
175CK_DLL_DTOR( MidiMsgIn_dtor );
176CK_DLL_MFUN( MidiMsgIn_open );
177CK_DLL_MFUN( MidiMsgIn_close );
178CK_DLL_MFUN( MidiMsgIn_read );
179
180
181//-----------------------------------------------------------------------------
182// MidiIn API
183//-----------------------------------------------------------------------------
184CK_DLL_CTOR( MidiIn_ctor );
185CK_DLL_DTOR( MidiIn_dtor );
186CK_DLL_MFUN( MidiIn_open );
187CK_DLL_MFUN( MidiIn_open_named ); // added 1.3.0.0
188CK_DLL_MFUN( MidiIn_open_named_i ); // added 1.3.0.0
189CK_DLL_MFUN( MidiIn_good );
190CK_DLL_MFUN( MidiIn_num );
191CK_DLL_MFUN( MidiIn_name );
192CK_DLL_MFUN( MidiIn_printerr );
193CK_DLL_MFUN( MidiIn_recv );
194CK_DLL_MFUN( MidiIn_can_wait );
195
196
197//-----------------------------------------------------------------------------
198// MidiOut API
199//-----------------------------------------------------------------------------
200CK_DLL_CTOR( MidiOut_ctor );
201CK_DLL_DTOR( MidiOut_dtor );
202CK_DLL_MFUN( MidiOut_open );
203CK_DLL_MFUN( MidiOut_open_named ); // added 1.3.0.0
204CK_DLL_MFUN( MidiOut_open_named_i); // added 1.3.0.0
205CK_DLL_MFUN( MidiOut_good );
206CK_DLL_MFUN( MidiOut_num );
207CK_DLL_MFUN( MidiOut_name );
208CK_DLL_MFUN( MidiOut_printerr );
209CK_DLL_MFUN( MidiOut_send );
210
211
212//-----------------------------------------------------------------------------
213// HidMsg API
214//-----------------------------------------------------------------------------
215CK_DLL_MFUN( HidMsg_is_axis_motion );
216CK_DLL_MFUN( HidMsg_is_button_down );
217CK_DLL_MFUN( HidMsg_is_button_up );
218CK_DLL_MFUN( HidMsg_is_mouse_motion );
219CK_DLL_MFUN( HidMsg_is_hat_motion );
220CK_DLL_MFUN( HidMsg_is_wheel_motion );
221
222//-----------------------------------------------------------------------------
223// HidIn API
224//-----------------------------------------------------------------------------
225CK_DLL_CTOR( HidIn_ctor );
226CK_DLL_DTOR( HidIn_dtor );
227CK_DLL_MFUN( HidIn_open );
228CK_DLL_MFUN( HidIn_open_named );
229CK_DLL_MFUN( HidIn_open_named_i ); // added 1.3.0.0
230CK_DLL_MFUN( HidIn_open_joystick );
231CK_DLL_MFUN( HidIn_open_mouse );
232CK_DLL_MFUN( HidIn_open_keyboard );
233CK_DLL_MFUN( HidIn_open_tiltsensor );
234CK_DLL_MFUN( HidIn_good );
235CK_DLL_MFUN( HidIn_num );
236CK_DLL_MFUN( HidIn_name );
237CK_DLL_MFUN( HidIn_printerr );
238CK_DLL_MFUN( HidIn_recv );
239CK_DLL_MFUN( HidIn_read );
240CK_DLL_MFUN( HidIn_send );
241CK_DLL_MFUN( HidIn_can_wait );
242CK_DLL_SFUN( HidIn_read_tilt_sensor );
243CK_DLL_SFUN( HidIn_ctrl_tiltPollRate );
244CK_DLL_SFUN( HidIn_cget_tiltPollRate );
245CK_DLL_SFUN( HidIn_start_cursor_track );
246CK_DLL_SFUN( HidIn_stop_cursor_track );
247
248
249//-----------------------------------------------------------------------------
250// HidOut API
251//-----------------------------------------------------------------------------
252CK_DLL_CTOR( HidOut_ctor );
253CK_DLL_DTOR( HidOut_dtor );
254CK_DLL_MFUN( HidOut_open );
255CK_DLL_MFUN( HidOut_good );
256CK_DLL_MFUN( HidOut_num );
257CK_DLL_MFUN( HidOut_name );
258CK_DLL_MFUN( HidOut_printerr );
259CK_DLL_MFUN( HidOut_send );
260
261
262
43//-----------------------------------------------------------------------------263//-----------------------------------------------------------------------------
44// name: struct Chuck_IO_Serial264// name: struct Chuck_IO_Serial
45// desc: chuck serial I/O265// desc: chuck serial I/O
@@ -195,8 +415,6 @@ protected: · 149 unmodified lines
195};415};
196 416
197 417
198// initialize
199t_CKBOOL init_class_serialio( Chuck_Env * env ); // added 1.3.1
200 418
201 419
202 420
src/core/chuck_lang.cpp+1229−3751
@@ -38,21 +38,8 @@ · 37 unmodified lines
38#include "chuck_vm.h"38#include "chuck_vm.h"
39#include "chuck_errmsg.h"39#include "chuck_errmsg.h"
40#include "chuck_ugen.h"40#include "chuck_ugen.h"
41
42#ifndef __DISABLE_HID__
43#include "hidio_sdl.h"
44#endif
45
46#include "util_string.h"41#include "util_string.h"
47 42
48#ifndef __DISABLE_SERIAL__
49#include "util_serial.h"
50#endif
51
52#ifndef __DISABLE_MIDI__
53#include "midiio_rtmidi.h"
54#endif
55
56#include <math.h>43#include <math.h>
57#include <iostream>44#include <iostream>
58#include <iomanip>45#include <iomanip>
@@ -64,12 +51,6 @@ CK_DLL_TICK(__ugen_tick) { *out = in; return TRUE; } · 5 unmodified lines
64// object string offset51// object string offset
65static t_CKUINT Object_offset_string = 0;52static t_CKUINT Object_offset_string = 0;
66 53
67// global
68static Chuck_String * g_newline = new Chuck_String();
69
70
71
72
73 54
74 55
75 56
@@ -708,135 +689,204 @@ error: · 632 unmodified lines
708 689
709 690
710//-----------------------------------------------------------------------------691//-----------------------------------------------------------------------------
711// name: init_class_io()692// name: init_class_string()
712// desc: ...693// desc: ...
713//-----------------------------------------------------------------------------694//-----------------------------------------------------------------------------
714t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type )695t_CKBOOL init_class_string( Chuck_Env * env, Chuck_Type * type )
715{696{
716 // init as base class697 // init as base class
717 Chuck_DL_Func * func = NULL;698 Chuck_DL_Func * func = NULL;
718 699
719 // log700 // log
720 EM_log( CK_LOG_SEVERE, "class 'io'" );701 EM_log( CK_LOG_SEVERE, "class 'string'" );
721 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
722 // init as base class705 // init as base class
723 // TODO: ctor/dtor?706 // TODO: ctor/dtor
724 // TODO: replace dummy with pure function707 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
725 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL ) )
726 return FALSE;708 return FALSE;
727 709
728 // add good()710 // add length()
729 func = make_new_mfun( "int", "good", io_dummy );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.";
730 if( !type_engine_import_mfun( env, func ) ) goto error;728 if( !type_engine_import_mfun( env, func ) ) goto error;
731 729
732 // add close()730 // add rtrim()
733 func = make_new_mfun( "void", "close", io_dummy );731 func = make_new_mfun( "string", "rtrim", string_rtrim );
732 func->doc = "Return a new string in which trailing whitespace has been removed.";
734 if( !type_engine_import_mfun( env, func ) ) goto error;733 if( !type_engine_import_mfun( env, func ) ) goto error;
735 734
736 // add flush()735 // add trim()
737 func = make_new_mfun( "void", "flush", io_dummy );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.";
738 if( !type_engine_import_mfun( env, func ) ) goto error;738 if( !type_engine_import_mfun( env, func ) ) goto error;
739 739
740 // add mode(int)740 // add toString()
741 func = make_new_mfun( "int", "mode", io_dummy );741 func = make_new_mfun( "string", "toString", string_toString );
742 func->add_arg( "int", "flag" );
743 if( !type_engine_import_mfun( env, func ) ) goto error;742 if( !type_engine_import_mfun( env, func ) ) goto error;
744 743
745 // add mode()744 // add charAt()
746 func = make_new_mfun( "int", "mode", io_dummy );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.";
747 if( !type_engine_import_mfun( env, func ) ) goto error;748 if( !type_engine_import_mfun( env, func ) ) goto error;
748 749
749 // TODO: add this later?750 // add setCharAt()
750 // add read()751 func = make_new_mfun( "int", "setCharAt", string_setCharAt );
751 // func = make_new_mfun( "string", "read", io_dummy );752 func->add_arg("int", "index");
752 // func->add_arg( "int", "length" );753 func->add_arg("int", "theChar");
753 // if( !type_engine_import_mfun( env, func ) ) goto error;754 func->doc = "Set the character at the specified index.";
755 if( !type_engine_import_mfun( env, func ) ) goto error;
754 756
755 // add readLine()757 // add substring()
756 func = make_new_mfun( "string", "readLine", io_dummy );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.";
757 if( !type_engine_import_mfun( env, func ) ) goto error;761 if( !type_engine_import_mfun( env, func ) ) goto error;
758 762
759 // add readInt()763 // add substring()
760 func = make_new_mfun( "int", "readInt", io_dummy );764 func = make_new_mfun( "string", "substring", string_substringN );
761 func->add_arg( "int", "flags" );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.";
762 if( !type_engine_import_mfun( env, func ) ) goto error;768 if( !type_engine_import_mfun( env, func ) ) goto error;
763 769
764 // add readFloat()770 // add insert()
765 // func = make_new_mfun( "float", "readFloat", io_dummy );771 func = make_new_mfun( "void", "insert", string_insert );
766 // if( !type_engine_import_mfun( env, func ) ) goto error;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;
767 776
768 // add eof()777 // add replace()
769 func = make_new_mfun( "int", "eof", io_dummy );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.";
770 if( !type_engine_import_mfun( env, func ) ) goto error;782 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;
775 783
776 // add write(string)784 // add replace()
777 func = make_new_mfun( "void", "write", io_dummy );785 func = make_new_mfun( "void", "replace", string_replaceN );
778 func->add_arg( "string", "val" );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.";
779 if( !type_engine_import_mfun( env, func ) ) goto error;790 if( !type_engine_import_mfun( env, func ) ) goto error;
780 791
781 // add write(int)792 // add find()
782 func = make_new_mfun( "void", "write", io_dummy );793 func = make_new_mfun( "int", "find", string_find );
783 func->add_arg( "int", "val" );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.";
784 if( !type_engine_import_mfun( env, func ) ) goto error;796 if( !type_engine_import_mfun( env, func ) ) goto error;
785 797
786 // add write(float)798 // add find()
787 func = make_new_mfun( "void", "write", io_dummy );799 func = make_new_mfun( "int", "find", string_findStart );
788 func->add_arg( "float", "val" );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.";
789 if( !type_engine_import_mfun( env, func ) ) goto error;803 if( !type_engine_import_mfun( env, func ) ) goto error;
790 804
791 // add newline805 // add find()
792 func = make_new_sfun( "string", "newline", io_newline );806 func = make_new_mfun( "int", "find", string_findStr );
793 if( !type_engine_import_sfun( env, func ) ) goto error;807 func->add_arg( "string", "str" );
794 func = make_new_sfun( "string", "nl", io_newline );808 func->doc = "Return the index of the first occurence of str, or -1 if str is not found.";
795 if( !type_engine_import_sfun( env, func ) ) goto error;809 if( !type_engine_import_mfun( 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" );
800 810
801 // add READ_INT32811 // add find()
802 if( !type_engine_import_svar( env, "int", "READ_INT32",812 func = make_new_mfun( "int", "find", string_findStrStart );
803 TRUE, (t_CKUINT)&Chuck_IO::INT32 ) ) goto error;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;
804 817
805 // add READ_INT16818 // add rfind()
806 if( !type_engine_import_svar( env, "int", "READ_INT16",819 func = make_new_mfun( "int", "rfind", string_rfind );
807 TRUE, (t_CKUINT)&Chuck_IO::INT16 ) ) goto error;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;
808 823
809 // add READ_INT8824 // add rfind()
810 if( !type_engine_import_svar( env, "int", "READ_INT8",825 func = make_new_mfun( "int", "rfind", string_rfindStart );
811 TRUE, (t_CKUINT)&Chuck_IO::INT8 ) ) goto error;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;
812 830
813 // add INT32831 // add rfind()
814 if( !type_engine_import_svar( env, "int", "INT32",832 func = make_new_mfun( "int", "rfind", string_rfindStr );
815 TRUE, (t_CKUINT)&Chuck_IO::INT32 ) ) goto error;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;
816 836
817 // add INT16837 // add rfind()
818 if( !type_engine_import_svar( env, "int", "INT16",838 func = make_new_mfun( "int", "rfind", string_rfindStrStart );
819 TRUE, (t_CKUINT)&Chuck_IO::INT16 ) ) goto error;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;
820 843
821 // add INT8844 // add erase()
822 if( !type_engine_import_svar( env, "int", "INT8",845 func = make_new_mfun( "void", "erase", string_erase );
823 TRUE, (t_CKUINT)&Chuck_IO::INT8 ) ) goto error;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;
824 860
825 // add MODE_SYNC861 // add parent()
826 if( !type_engine_import_svar( env, "int", "MODE_SYNC",862 // disable for now
827 TRUE, (t_CKUINT)&Chuck_IO::MODE_SYNC ) ) goto error;863// func = make_new_mfun( "string", "parent", string_parent );
864// if( !type_engine_import_mfun( env, func ) ) goto error;
828 865
829 // add MODE_ASYNC866// // add toTime()
830 if( !type_engine_import_svar( env, "int", "MODE_ASYNC",867// func = make_new_mfun( "float", "toTime", string_toFloat );
831 TRUE, (t_CKUINT)&Chuck_IO::MODE_ASYNC ) ) goto error;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;
832 873
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*/
833 // end the class import883 // end the class import
834 type_engine_import_class_end( env );884 type_engine_import_class_end( env );
835 885
836 return TRUE;886 return TRUE;
837 887
838error:888error:
839 889
840 // end the class import890 // end the class import
841 type_engine_import_class_end( env );891 type_engine_import_class_end( env );
842 892
@@ -846,4094 +896,1522 @@ error: · 3 unmodified lines
846 896
847 897
848 898
849#ifndef __DISABLE_FILEIO__
850//-----------------------------------------------------------------------------899//-----------------------------------------------------------------------------
851// name: init_class_fileio()900// name: init_class_array()
852// desc: ...901// desc: ...
853//-----------------------------------------------------------------------------902//-----------------------------------------------------------------------------
854t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type )903t_CKBOOL init_class_array( Chuck_Env * env, Chuck_Type * type )
855{904{
856 // init as base class905 // init as base class
857 Chuck_DL_Func * func = NULL;906 Chuck_DL_Func * func = NULL;
858 907
859 // log908 // log
860 EM_log( CK_LOG_SEVERE, "class 'fileio'" );909 EM_log( CK_LOG_SEVERE, "class 'array'" );
861 910
862 // init as base class911 // init as base class
863 // TODO: ctor/dtor?912 // TODO: ctor/dtor?
864 // TODO: replace dummy with pure function913 const char *doc = "The array class is used to store linear sequences of data, also providing capabilities for stack and map data structures.";
865 if( !type_engine_import_class_begin( env, type, env->global(), fileio_ctor, fileio_dtor ) )914 if( !type_engine_import_class_begin( env, type, env->global(), NULL, NULL, doc ) )
866 return FALSE;915 return FALSE;
867 916
868 // add open(string)917 // add clear()
869 func = make_new_mfun( "int", "open", fileio_open );918 func = make_new_mfun( "void", "clear", array_clear );
870 func->add_arg( "string", "path" );919 func->doc = "Clear the contents of the array.";
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 );
889 if( !type_engine_import_mfun( env, func ) ) goto error;920 if( !type_engine_import_mfun( env, func ) ) goto error;
890 921
891 // add mode()922 // add reset()
892 func = make_new_mfun( "int", "mode", fileio_getmode );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.";
893 if( !type_engine_import_mfun( env, func ) ) goto error;925 if( !type_engine_import_mfun( env, func ) ) goto error;
894 926
895 // add mode(int)927 // add popBack()
896 func = make_new_mfun( "int", "mode", fileio_setmode );928 func = make_new_mfun( "void", "popBack", array_pop_back );
897 func->add_arg( "int", "flag" );929 func->doc = "Remove the last item of the array";
898 if( !type_engine_import_mfun( env, func ) ) goto error;930 if( !type_engine_import_mfun( env, func ) ) goto error;
899 931
900 // add size()932 // add size()
901 func = make_new_mfun( "int", "size", fileio_size );933 func = make_new_mfun( "int", "size", array_get_size );
902 if( !type_engine_import_mfun( env, func ) ) goto error;934 func->doc = "Return the number of elements in the array.";
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 );
915 if( !type_engine_import_mfun( env, func ) ) goto error;935 if( !type_engine_import_mfun( env, func ) ) goto error;
916 936 // add size()
917 // add dirList()937 func = make_new_mfun( "int", "size", array_set_size );
918 func = make_new_mfun( "string[]", "dirList", fileio_dirlist );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.";
919 if( !type_engine_import_mfun( env, func ) ) goto error;940 if( !type_engine_import_mfun( env, func ) ) goto error;
920 941
921 // add read()942 // add cap()
922 // func = make_new_mfun( "string", "read", fileio_read );943 func = make_new_mfun( "int", "cap", array_get_capacity_hack );
923 // func->add_arg( "int", "length" );944 func->doc = "Return current capacity of the array (number of elements that can be held without reallocating internal buffer). ";
924 // if( !type_engine_import_mfun( env, func ) ) goto error;
925
926 // add readLine()
927 func = make_new_mfun( "string", "readLine", fileio_readline );
928 if( !type_engine_import_mfun( env, func ) ) goto error;945 if( !type_engine_import_mfun( env, func ) ) goto error;
929 946
930 // add readInt()947 // add capacity()
931 // func = make_new_mfun( "int", "readInt", fileio_readint );948 // func = make_new_mfun( "int", "capacity", array_get_capacity );
932 // if( !type_engine_import_mfun( env, func ) ) goto error;949 // if( !type_engine_import_mfun( env, func ) ) goto error;
933 950 // func = make_new_mfun( "int", "capacity", array_set_capacity );
934 // add readInt(int)951 // func->add_arg( "int", "val" );
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 );
941 // if( !type_engine_import_mfun( env, func ) ) goto error;952 // if( !type_engine_import_mfun( env, func ) ) goto error;
942 953
943 // add eof()954 // add find()
944 func = make_new_mfun( "int", "eof", fileio_eof );955 func = make_new_mfun( "int", "find", array_find );
945 if( !type_engine_import_mfun( env, func ) ) goto error;956 func->add_arg( "string", "key" );
946 957 func->doc = "Return number of elements with the specified key. ";
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 if( !type_engine_import_mfun( env, func ) ) goto error;958 if( !type_engine_import_mfun( env, func ) ) goto error;
955 959
956 // add write(int)960 // add erase()
957 func = make_new_mfun( "void", "write", fileio_writeint );961 func = make_new_mfun( "int", "erase", array_erase );
958 func->add_arg( "int", "val" );962 func->add_arg( "string", "key" );
963 func->doc = "Erase all elements with the specified key. ";
959 if( !type_engine_import_mfun( env, func ) ) goto error;964 if( !type_engine_import_mfun( env, func ) ) goto error;
960 965
961 // add write(int,flags)966 // add examples
962 func = make_new_mfun( "void", "write", fileio_writeintflags );967 if( !type_engine_import_add_ex( env, "array/array_argument.ck" ) ) goto error;
963 func->add_arg( "int", "val" );968 if( !type_engine_import_add_ex( env, "array/array_assign.ck" ) ) goto error;
964 func->add_arg( "int", "flags" );969 if( !type_engine_import_add_ex( env, "array/array_dynamic.ck" ) ) goto error;
965 if( !type_engine_import_mfun( env, func ) ) 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 );
966 977
967 // add write(float)978 return TRUE;
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;
971 979
972 // add FLAG_READ_WRITE980error:
973 if( !type_engine_import_svar( env, "int", "READ_WRITE",
974 TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_READ_WRITE ) ) goto error;
975 981
976 // add FLAG_READONLY982 // end the class import
977 if( !type_engine_import_svar( env, "int", "READ",983 type_engine_import_class_end( env );
978 TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_READONLY ) ) goto error;984
985 return FALSE;
986}
979 987
980 // add FLAG_WRITEONLY
981 if( !type_engine_import_svar( env, "int", "WRITE",
982 TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_WRITEONLY ) ) goto error;
983 988
984 // add FLAG_APPEND
985 if( !type_engine_import_svar( env, "int", "APPEND",
986 TRUE, (t_CKUINT)&Chuck_IO_File::FLAG_APPEND ) ) goto error;
987 989
988 // add TYPE_ASCII
989 if( !type_engine_import_svar( env, "int", "ASCII",
990 TRUE, (t_CKUINT)&Chuck_IO_File::TYPE_ASCII ) ) goto error;
991 990
992 // add TYPE_BINARY991// Object ctor
993 if( !type_engine_import_svar( env, "int", "BINARY",992CK_DLL_CTOR( object_ctor )
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
1001error:
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//-----------------------------------------------------------------------------
1017t_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
1095error:
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//-----------------------------------------------------------------------------
1110t_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
1188error:
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//-----------------------------------------------------------------------------
1201t_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
1394error:
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//-----------------------------------------------------------------------------
1409t_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
1486error:
1487
1488 // end the class import
1489 type_engine_import_class_end( env );
1490
1491 return FALSE;
1492}
1493
1494
1495
1496// static
1497static t_CKUINT MidiIn_offset_data = 0;
1498t_CKUINT MidiMsg_offset_data1 = 0;
1499t_CKUINT MidiMsg_offset_data2 = 0;
1500t_CKUINT MidiMsg_offset_data3 = 0;
1501t_CKUINT MidiMsg_offset_when = 0;
1502static t_CKUINT MidiOut_offset_data = 0;
1503
1504//-----------------------------------------------------------------------------
1505// name: init_class_Midi()
1506// desc: ...
1507//-----------------------------------------------------------------------------
1508t_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
1634error:
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
1647static t_CKUINT HidIn_offset_data = 0;
1648
1649static t_CKUINT HidMsg_offset_device_type = 0;
1650static t_CKUINT HidMsg_offset_device_num = 0;
1651static t_CKUINT HidMsg_offset_type = 0;
1652static t_CKUINT HidMsg_offset_which = 0;
1653static t_CKUINT HidMsg_offset_idata = 0;
1654static t_CKUINT HidMsg_offset_fdata = 0;
1655static t_CKUINT HidMsg_offset_when = 0;
1656static t_CKUINT HidMsg_offset_deltax = 0;
1657static t_CKUINT HidMsg_offset_deltay = 0;
1658static t_CKUINT HidMsg_offset_axis_position = 0; // deprecated
1659static t_CKUINT HidMsg_offset_axis_position2 = 0;
1660static t_CKUINT HidMsg_offset_scaled_axis_position = 0; // deprecated
1661static t_CKUINT HidMsg_offset_hat_position = 0;
1662static t_CKUINT HidMsg_offset_cursorx = 0;
1663static t_CKUINT HidMsg_offset_cursory = 0;
1664static t_CKUINT HidMsg_offset_scaledcursorx = 0;
1665static t_CKUINT HidMsg_offset_scaledcursory = 0;
1666static t_CKUINT HidMsg_offset_x = 0;
1667static t_CKUINT HidMsg_offset_y = 0;
1668static t_CKUINT HidMsg_offset_z = 0;
1669static t_CKUINT HidMsg_offset_touchx = 0; // added 1.3.0.0
1670static t_CKUINT HidMsg_offset_touchy = 0; // added 1.3.0.0
1671static t_CKUINT HidMsg_offset_touchsize = 0; // added 1.3.0.0
1672static t_CKUINT HidMsg_offset_ascii = 0;
1673static t_CKUINT HidMsg_offset_key = 0;
1674
1675static t_CKUINT HidOut_offset_data = 0;
1676
1677//-----------------------------------------------------------------------------
1678// name: init_class_HID()
1679// desc: ...
1680//-----------------------------------------------------------------------------
1681t_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
2074error:
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
2087static t_CKUINT MidiRW_offset_data = 0;
2088static t_CKUINT MidiMsgOut_offset_data = 0;
2089static t_CKUINT MidiMsgIn_offset_data = 0;
2090//-----------------------------------------------------------------------------
2091// name: init_class_MidiRW()
2092// desc: ...
2093//-----------------------------------------------------------------------------
2094t_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
2194error:
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
2208CK_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
2219CK_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
2232CK_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
2268CK_DLL_CTOR( ugen_ctor )
2269{
2270}
2271
2272CK_DLL_DTOR( ugen_dtor )
2273{
2274 // get as ugen
2275 // Chuck_UGen * ugen = (Chuck_UGen *)SELF;
2276}
2277
2278CK_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
2301CK_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
2309CK_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
2321CK_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
2346CK_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
2354CK_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
2375CK_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
2383CK_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
2391CK_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
2399CK_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
2413CK_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
2433CK_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
2455CK_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
2465CK_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
2479CK_DLL_DTOR( uana_dtor )
2480{
2481 // TODO: GC should release the blob!
2482}
2483
2484CK_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
2532CK_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
2539CK_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
2546CK_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
2564CK_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
2582CK_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
2604Chuck_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
2612Chuck_UAnaBlobProxy::~Chuck_UAnaBlobProxy()
2613{
2614 // release
2615 SAFE_RELEASE( m_blob );
2616}
2617
2618t_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
2624Chuck_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
2632Chuck_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
2641Chuck_UAnaBlobProxy * getBlobProxy( const Chuck_UAna * uana )
2642{
2643 return (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(uana, uana_offset_blob);
2644}
2645
2646// ctor
2647CK_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
2666CK_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
2683CK_DLL_MFUN( uanablob_when )
2684{
2685 // set return
2686 RETURN->v_time = OBJ_MEMBER_TIME(SELF, uanablob_offset_when);
2687}
2688
2689CK_DLL_MFUN( uanablob_fvals )
2690{
2691 // set return
2692 RETURN->v_object = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
2693}
2694
2695CK_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
2712CK_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
2729CK_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
2736CK_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
2743CK_DLL_DTOR( event_dtor )
2744{
2745// delete (Data_Event *)OBJ_MEMBER_INT(SELF, event_offset_data);
2746}
2747
2748CK_DLL_MFUN( event_signal )
2749{
2750 Chuck_Event * d = (Chuck_Event *)SELF;
2751 d->signal();
2752 d->signal_global();
2753}
2754
2755CK_DLL_MFUN( event_broadcast )
2756{
2757 Chuck_Event * d = (Chuck_Event *)SELF;
2758 d->broadcast();
2759 d->broadcast_global();
2760}
2761
2762CK_DLL_MFUN( event_wait )
2763{
2764 // Chuck_Event * d = (Chuck_Event *)SELF;
2765 assert( FALSE );
2766}
2767
2768CK_DLL_MFUN( event_can_wait )
2769{
2770 RETURN->v_int = TRUE;
2771}
2772
2773
2774//-----------------------------------------------------------------------------
2775// vec3 API
2776//-----------------------------------------------------------------------------
2777CK_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
2788CK_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
2796CK_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
2806CK_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
2821CK_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
2831CK_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
2843CK_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
2857CK_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
2867CK_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
2881CK_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
2891CK_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//-----------------------------------------------------------------------------
2909CK_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
2921CK_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
2929CK_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
2940CK_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//-----------------------------------------------------------------------------
2961CK_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
2969CK_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//-----------------------------------------------------------------------------
2981CK_DLL_CTOR( fileio_ctor )
2982{ }
2983
2984CK_DLL_DTOR( fileio_dtor )
2985{ }
2986
2987CK_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
2997CK_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
3006CK_DLL_MFUN( fileio_close )
3007{
3008 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3009 f->close();
3010}
3011
3012CK_DLL_MFUN( fileio_good )
3013{
3014 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3015 RETURN->v_int = f->good();
3016}
3017
3018CK_DLL_MFUN( fileio_flush )
3019{
3020 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3021 f->flush();
3022}
3023
3024CK_DLL_MFUN( fileio_getmode )
3025{
3026 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3027 RETURN->v_int = f->mode();
3028}
3029
3030CK_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
3039CK_DLL_MFUN( fileio_size )
3040{
3041 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3042 RETURN->v_int = f->size();
3043}
3044
3045CK_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
3053CK_DLL_MFUN( fileio_tell )
3054{
3055 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3056 RETURN->v_int = f->tell();
3057}
3058
3059CK_DLL_MFUN( fileio_isdir )
3060{
3061 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3062 RETURN->v_int = f->isDir();
3063}
3064
3065CK_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/*
3073CK_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
3083CK_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
3090CK_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
3125CK_DLL_MFUN( fileio_readintflags )
3126{993{
3127 t_CKINT flags = GET_NEXT_INT(ARGS);994 // log
3128 995 // EM_log( CK_LOG_FINEST, "Object constructor..." );
3129 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3130 t_CKINT ret = f->readInt( flags );
3131
3132 RETURN->v_int = ret;
3133}
3134 996
3135CK_DLL_MFUN( fileio_readfloat )997 // initialize
3136{998 OBJ_MEMBER_UINT(SELF, Object_offset_string) = 0;
3137 Chuck_IO_File * f = (Chuck_IO_File *)SELF;
3138 t_CKFLOAT ret = f->readFloat();
3139 RETURN->v_float = ret;
3140}999}
3141 1000
3142CK_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}
3148 1001
3149CK_DLL_MFUN( fileio_more )1002// Object dtor
1003CK_DLL_DTOR( object_dtor )
3150{1004{
3151 Chuck_IO_File * f = (Chuck_IO_File *)SELF;1005 // log
3152 t_CKBOOL ret = !f->eof();1006 // EM_log( CK_LOG_FINEST, "Object destructor..." );
3153 RETURN->v_int = ret;
3154}
3155 1007
3156CK_DLL_MFUN( fileio_writestring )1008 // get the string
3157{1009 Chuck_String * str = (Chuck_String *)OBJ_MEMBER_UINT(SELF, Object_offset_string);
3158 std::string val = GET_NEXT_STRING(ARGS)->str();1010 // release
3159 1011 SAFE_RELEASE( str );
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
3190}1012}
3191 1013
3192CK_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}
3227 1014
3228CK_DLL_MFUN( fileio_writeintflags )1015// toString
1016CK_DLL_MFUN( object_toString )
3229{1017{
3230 t_CKINT val = GET_NEXT_INT(ARGS);1018 // get the string
3231 t_CKINT flags = GET_NEXT_INT(ARGS);1019 Chuck_String * str = (Chuck_String *)OBJ_MEMBER_UINT(SELF, Object_offset_string);
3232 1020 // allocate
3233 Chuck_IO_File * f = (Chuck_IO_File *)SELF;1021 if( !str )
3234 #ifndef __DISABLE_THREADS__
3235 if (f->mode() == Chuck_IO::MODE_ASYNC)
3236 {1022 {
3237 // TODO: pass flags in args1023 // new it
3238 // set up arguments1024 str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
3239 Chuck_IO::async_args *args = new Chuck_IO::async_args;1025 // check it
3240 args->RETURN = (void *)RETURN;1026 if( !str )
3241 args->fileio_obj = f;1027 {
3242 args->intArg = val;1028 // TODO: make this exception
3243 // set shred to wait for I/O completion1029 CK_FPRINTF_STDERR( "[chuck]: Object.toString() out of memory!\n" );
3244 assert( SHRED != NULL );1030 RETURN->v_object = NULL;
3245 f->m_asyncEvent->wait( SHRED, SHRED->vm_ref );1031 return;
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 }
3257 }1032 }
3258 } else {1033 // set it
3259 f->write(val, flags);1034 ostringstream strout( ostringstream::out );
3260 }1035 // get the type
3261 #else1036 Chuck_Type * type = SELF->type_ref;
3262 f->write( val, flags );1037 // write
3263 #endif1038 strout.setf( ios::hex, ios::basefield );
3264}1039 strout << ((type != NULL) ? type->c_name() : "[VOID]") << ":" << (t_CKUINT)SELF;
1040 strout.flush();
3265 1041
3266CK_DLL_MFUN( fileio_writefloat )1042 // done
3267{1043 str->set( strout.str() );
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);
3296 }1044 }
3297 #else
3298 f->write( val );
3299 #endif
3300}
3301#endif
3302
3303
3304
3305
3306//-----------------------------------------------------------------------------
3307// Chout API
3308//-----------------------------------------------------------------------------
3309CK_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
3317CK_DLL_MFUN( chout_good )
3318{
3319 Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3320 RETURN->v_int = c->good();
3321}
3322
3323CK_DLL_MFUN( chout_flush )
3324{
3325 Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3326 c->flush();
3327}
3328
3329CK_DLL_MFUN( chout_getmode )
3330{
3331 // problem
3332 Chuck_IO_Chout * c = SHRED->vm_ref->chout();
3333 RETURN->v_int = c->mode();
3334}
3335
3336CK_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
3354CK_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
3361CK_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
3367CK_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
3377CK_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
3384CK_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
3391CK_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
3398CK_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
3406CK_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
3414CK_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//-----------------------------------------------------------------------------
3428CK_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}
3435 1045
3436CK_DLL_MFUN( cherr_good )1046 // set return
3437{1047 RETURN->v_object = str;
3438 Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3439 RETURN->v_int = c->good();
3440}
3441
3442CK_DLL_MFUN( cherr_flush )
3443{
3444 Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3445 c->flush();
3446}
3447
3448CK_DLL_MFUN( cherr_getmode )
3449{
3450 // problem
3451 Chuck_IO_Cherr * c = SHRED->vm_ref->cherr();
3452 RETURN->v_int = c->mode();
3453}
3454
3455CK_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
3473CK_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
3480CK_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
3486CK_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
3496CK_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
3503CK_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
3510CK_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
3517CK_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
3525CK_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
3533CK_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
3551CK_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;
3557}1048}
3558 1049
3559CK_DLL_MFUN( shred_running )
3560{
3561 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3562 RETURN->v_int = derhs->is_running;
3563}
3564 1050
3565CK_DLL_MFUN( shred_done )1051// ctor
1052CK_DLL_CTOR( ugen_ctor )
3566{1053{
3567 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
3568 RETURN->v_int = derhs->is_done;
3569}1054}
3570 1055
3571CK_DLL_MFUN( shred_clone )1056CK_DLL_DTOR( ugen_dtor )
3572{1057{
1058 // get as ugen
1059 // Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3573}1060}
3574 1061
3575CK_DLL_MFUN( shred_id )1062CK_DLL_MFUN( ugen_op )
3576{1063{
3577 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;1064 // get as ugen
3578 // return the id1065 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3579 RETURN->v_int = derhs->xid;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;
3580}1083}
3581 1084
3582CK_DLL_MFUN( shred_yield )1085CK_DLL_MFUN( ugen_cget_op )
3583{1086{
3584 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;1087 // get as ugen
3585 Chuck_VM * vm = derhs->vm_ref;1088 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3586 1089 // set return
3587 // suspend1090 RETURN->v_int = ugen->m_op;
3588 derhs->is_running = FALSE;
3589 // reshredule
3590 vm->shreduler()->shredule( derhs, derhs->now );
3591}1091}
3592 1092
3593CK_DLL_MFUN( shred_numArgs )1093CK_DLL_MFUN( ugen_last )
3594{1094{
3595 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;1095 // get as ugen
3596 1096 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3597 // get the number of arguments1097 // set return
3598 RETURN->v_int = derhs->args.size();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;
3599}1103}
3600 1104
3601CK_DLL_MFUN( shred_getArg )1105CK_DLL_MFUN( ugen_next )
3602{1106{
3603 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;1107 // get as ugen
3604 1108 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3605 // get index1109 // get arg
3606 t_CKINT i = GET_NEXT_INT(ARGS);1110 t_CKFLOAT next = GET_CK_FLOAT( ARGS );
3607 // total1111 // set op
3608 t_CKINT num = derhs->args.size();1112 ugen->m_next = (SAMPLE)next;
1113 ugen->m_use_next = TRUE;
1114 // set return
1115 RETURN->v_float = (t_CKFLOAT)ugen->m_next;
3609 1116
3610 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1117 // for multiple channels
3611 str->set( ( i < num ? derhs->args[i] : "" ) );1118 Chuck_DL_Return ret;
3612 RETURN->v_string = str; 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 }
3613}1128}
3614 1129
3615CK_DLL_MFUN( shred_sourcePath ) // added 1.3.0.01130CK_DLL_MFUN( ugen_cget_next )
3616{1131{
3617 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;1132 // get as ugen
3618 1133 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3619 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1134 // set return
3620 str->set( derhs->code->filename );1135 RETURN->v_float = ugen->m_use_next ? (t_CKFLOAT)ugen->m_next : 0.0f;
3621 RETURN->v_string = str;
3622}1136}
3623 1137
3624CK_DLL_MFUN( shred_sourceDir ) // added 1.3.0.01138CK_DLL_MFUN( ugen_gain )
3625{1139{
3626 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;1140 // get as ugen
3627 1141 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3628 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1142 // get arg
3629 1143 t_CKFLOAT gain = GET_CK_FLOAT( ARGS );
3630 str->set( extract_filepath_dir(derhs->code->filename) );1144 // set op
3631 1145 ugen->m_gain = (SAMPLE)gain;
3632 RETURN->v_string = str;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;
3633}1157}
3634 1158
3635CK_DLL_MFUN( shred_sourceDir2 ) // added 1.3.2.01159CK_DLL_MFUN( ugen_cget_gain )
3636{1160{
3637 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;1161 // get as ugen
3638 // get num up1162 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3639 t_CKINT i = GET_NEXT_INT(ARGS);1163 // set return
3640 // abs1164 RETURN->v_float = (t_CKFLOAT)ugen->m_gain;
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;
3651}1165}
3652 1166
3653 1167CK_DLL_CTRL( ugen_numChannels )
3654CK_DLL_SFUN( shred_fromId ) // added 1.3.2.0
3655{1168{
3656 t_CKINT shred_id = GET_NEXT_INT(ARGS);1169 // get ugen
3657 1170 //Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3658 Chuck_VM_Shred * derhs = SHRED->vm_ref->shreduler()->lookup(shred_id);1171 // error
3659 1172 EM_error3( "setting .numChannels is not yet supported (use the command line)..." );
3660 RETURN->v_object = derhs;
3661}1173}
3662 1174
3663 1175CK_DLL_CGET( ugen_cget_numChannels )
3664CK_DLL_MFUN( string_length )
3665{1176{
3666 Chuck_String * s = (Chuck_String *)SELF;1177 // get ugen
3667 RETURN->v_int = s->str().length();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;
3668}1181}
3669 1182
3670CK_DLL_MFUN( string_upper )1183CK_DLL_CTRL( ugen_chan )
3671{1184{
3672 Chuck_String * s = (Chuck_String *)SELF;1185 // get ugen
3673 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1186 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3674 str->set( toupper( s->str() ) );1187 t_CKINT num = GET_NEXT_INT(ARGS);
3675 RETURN->v_string = str;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;
3676}1195}
3677 1196
3678CK_DLL_MFUN( string_lower )1197CK_DLL_CTRL( ugen_connected )
3679{1198{
3680 Chuck_String * s = (Chuck_String *)SELF;1199 // get ugen
3681 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1200 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3682 str->set( tolower( s->str() ) );1201 Chuck_UGen * right = (Chuck_UGen *)GET_NEXT_OBJECT(ARGS);
3683 RETURN->v_string = str;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;
3684}1215}
3685 1216
3686CK_DLL_MFUN( string_ltrim )1217CK_DLL_MFUN( ugen_buffered )
3687{1218{
3688 Chuck_String * s = (Chuck_String *)SELF;1219 // get as ugen
3689 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1220 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3690 str->set( ltrim( s->str() ) );1221 // get arg
3691 RETURN->v_string = str;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;
3692}1237}
3693 1238
3694CK_DLL_MFUN( string_rtrim )1239CK_DLL_MFUN( ugen_cget_buffered )
3695{1240{
3696 Chuck_String * s = (Chuck_String *)SELF;1241 // get as ugen
3697 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1242 Chuck_UGen * ugen = (Chuck_UGen *)SELF;
3698 str->set( rtrim( s->str() ) );1243 // set return
3699 RETURN->v_string = str;1244 RETURN->v_int = ugen->m_is_buffered;
3700}1245}
3701 1246
3702CK_DLL_MFUN( string_trim )1247
1248// ctor
1249CK_DLL_CTOR( uana_ctor )
3703{1250{
3704 Chuck_String * s = (Chuck_String *)SELF;1251 // make an actual blob
3705 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1252 Chuck_Object * blob = instantiate_and_initialize_object( SHRED->vm_ref->env()->t_uanablob, SHRED );
3706 str->set( trim( s->str() ) );1253 // TODO: check out of memory
3707 RETURN->v_string = str;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 );
3708}1261}
3709 1262
3710CK_DLL_MFUN( string_toString )1263CK_DLL_DTOR( uana_dtor )
3711{1264{
3712 Chuck_String * s = (Chuck_String *)SELF;1265 // TODO: GC should release the blob!
3713 RETURN->v_string = s;
3714}1266}
3715 1267
3716CK_DLL_MFUN(string_charAt)1268CK_DLL_MFUN( uana_upchuck )
3717{1269{
3718 Chuck_String * str = (Chuck_String *) SELF;1270 // get as uana
3719 t_CKINT index = GET_NEXT_INT(ARGS);1271 Chuck_UAna * uana = (Chuck_UAna *)SELF;
3720 1272 // get shred
3721 if(index < 0 || index >= str->str().length())1273 Chuck_VM_Shred * derhs = SHRED;
1274 // make sure it's not NULL
1275 if( !derhs )
3722 {1276 {
3723 throw_exception(SHRED, "IndexOutOfBoundsException", index);1277 EM_error3( "UAna.upchuck() encountered NULL shred; operation aborting!" );
3724 RETURN->v_int = -1;
3725 return;1278 return;
3726 }1279 }
3727 1280
3728 RETURN->v_int = str->str().at(index);1281 // get VM
3729}1282 Chuck_VM * vm = derhs->vm_ref;
3730 1283 // ensure
3731CK_DLL_MFUN(string_setCharAt)1284 if( !vm )
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())
3738 {1285 {
3739 throw_exception(SHRED, "IndexOutOfBoundsException", index);1286 EM_error3( "UAna.upchuck() encountered NULL VM ref; operation aborting!" );
3740 RETURN->v_int = -1;
3741 return;1287 return;
3742 }1288 }
3743 1289
3744 // str->str.at(index) = the_char;1290 // check if time
3745 std::string s = str->str();1291 if( uana->m_uana_time < vm->shreduler()->now_system )
3746 s.at(index) = the_char;
3747 str->set( s );
3748 RETURN->v_int = str->str().at(index);
3749}
3750
3751CK_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())
3757 {1292 {
3758 throw_exception(SHRED, "IndexOutOfBoundsException", start);1293 // for multiple channels
3759 RETURN->v_string = NULL;1294 Chuck_DL_Return ret;
3760 return;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 );
3761 }1301 }
3762 1302
3763 Chuck_String * ss = (Chuck_String *) instantiate_and_initialize_object(SHRED->vm_ref->env()->t_string, SHRED);1303 // return
3764 ss->set( str->str().substr(start) );1304 RETURN->v_object = uana->blobProxy()->realblob();
3765
3766 RETURN->v_string = ss;
3767}1305}
3768 1306
3769CK_DLL_MFUN(string_substringN)1307/* CK_DLL_MFUN( uana_blob )
3770{1308{
3771 Chuck_String * str = (Chuck_String *) SELF;1309 // get as uana
3772 t_CKINT start = GET_NEXT_INT(ARGS);1310 Chuck_UAna * uana = (Chuck_UAna *)SELF;
3773 t_CKINT length = GET_NEXT_INT(ARGS);
3774 1311
3775 if(start < 0 || start >= str->str().length())1312 // TODO: return
3776 {1313 RETURN->v_object = NULL;
3777 throw_exception(SHRED, "IndexOutOfBoundsException", start);1314} */
3778 RETURN->v_string = NULL;
3779 return;
3780 }
3781 1315
3782 if(length < 0 || start+length > str->str().length())1316CK_DLL_MFUN( uana_fvals )
3783 {1317{
3784 throw_exception(SHRED, "IndexOutOfBoundsException", length);1318 // get the fvals array
3785 RETURN->v_string = NULL;1319 Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
3786 return;1320 RETURN->v_object = &blob->fvals();
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;
3793}1321}
3794 1322
3795CK_DLL_MFUN(string_insert)1323CK_DLL_MFUN( uana_cvals )
3796{1324{
3797 Chuck_String * str = (Chuck_String *) SELF;1325 // get the fvals array
3798 t_CKINT position = GET_NEXT_INT(ARGS);1326 Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
3799 Chuck_String * str2 = GET_NEXT_STRING(ARGS);1327 RETURN->v_object = &blob->cvals();
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 );
3816}1328}
3817 1329
3818CK_DLL_MFUN(string_replace)1330CK_DLL_MFUN( uana_fval )
3819{1331{
3820 Chuck_String * str = (Chuck_String *) SELF;1332 // get index
3821 t_CKINT position = GET_NEXT_INT(ARGS);1333 t_CKINT i = GET_NEXT_INT(ARGS);
3822 Chuck_String * str2 = GET_NEXT_STRING(ARGS);1334 // get the fvals array
3823 1335 Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
3824 if(position < 0 || position >= str->str().length())1336 Chuck_Array8 & fvals = blob->fvals();
3825 {1337 // check caps
3826 throw_exception(SHRED, "IndexOutOfBoundsException", position);1338 if( i < 0 || fvals.size() <= i ) RETURN->v_float = 0;
3827 return;1339 else
3828 }
3829 if(str2 == NULL)
3830 {1340 {
3831 throw_exception(SHRED, "NullPointerException");1341 // get
3832 return;1342 t_CKFLOAT val;
1343 fvals.get( i, &val );
1344 RETURN->v_float = val;
3833 }1345 }
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 );
3845}1346}
3846 1347
3847CK_DLL_MFUN(string_replaceN)1348CK_DLL_MFUN( uana_cval )
3848{1349{
3849 Chuck_String * str = (Chuck_String *) SELF;1350 // get index
3850 t_CKINT position = GET_NEXT_INT(ARGS);1351 t_CKINT i = GET_NEXT_INT(ARGS);
3851 t_CKINT length = GET_NEXT_INT(ARGS);1352 // get the fvals array
3852 Chuck_String * str2 = GET_NEXT_STRING(ARGS);1353 Chuck_UAnaBlobProxy * blob = (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(SELF, uana_offset_blob);
3853 1354 Chuck_Array16 & cvals = blob->cvals();
3854 if(position < 0 || position >= str->str().length())1355 // check caps
1356 if( i < 0 || cvals.size() <= i ) RETURN->v_complex.re = RETURN->v_complex.im = 0;
1357 else
3855 {1358 {
3856 throw_exception(SHRED, "IndexOutOfBoundsException", position);1359 // get
3857 return;1360 t_CKCOMPLEX val;
1361 cvals.get( i, &val );
1362 RETURN->v_complex = val;
3858 }1363 }
1364}
3859 1365
3860 if(length < 0 || position+length > str->str().length())1366CK_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 )
3861 {1375 {
3862 throw_exception(SHRED, "IndexOutOfBoundsException", length);1376 ret = FALSE;
3863 return;
3864 }1377 }
3865 1378 else
3866 if(str2 == NULL)
3867 {1379 {
3868 throw_exception(SHRED, "NullPointerException");1380 ret = right->is_up_connected_from( uana );
3869 return;
3870 }1381 }
3871 1382
3872 // str->str.replace(position, length, str2->str);1383 RETURN->v_int = ret;
3873 std::string s = str->str();
3874 s.replace( position, length, str2->str() );
3875 str->set( s );
3876}1384}
3877 1385
3878CK_DLL_MFUN(string_find)1386
1387// blob proxy implementation
1388Chuck_UAnaBlobProxy::Chuck_UAnaBlobProxy( Chuck_Object * blob )
3879{1389{
3880 Chuck_String * str = (Chuck_String *) SELF;1390 m_blob = blob;
3881 t_CKINT the_char = GET_NEXT_INT(ARGS);1391 assert( m_blob != NULL );
3882 1392 // add reference
3883 string::size_type index = str->str().find(the_char);1393 m_blob->add_ref();
3884
3885 if(index == string::npos)
3886 RETURN->v_int = -1;
3887 else
3888 RETURN->v_int = index;
3889}1394}
3890 1395
3891CK_DLL_MFUN(string_findStart)1396Chuck_UAnaBlobProxy::~Chuck_UAnaBlobProxy()
3892{1397{
3893 Chuck_String * str = (Chuck_String *) SELF;1398 // release
3894 t_CKINT the_char = GET_NEXT_INT(ARGS);1399 SAFE_RELEASE( m_blob );
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;
3910}1400}
3911 1401
3912CK_DLL_MFUN(string_findStr)1402t_CKTIME & Chuck_UAnaBlobProxy::when()
3913{1403{
3914 Chuck_String * str = (Chuck_String *) SELF;1404 // TODO: DANGER: is this actually returning correct reference?!
3915 Chuck_String * the_str = GET_NEXT_STRING(ARGS);1405 return OBJ_MEMBER_TIME(m_blob, uanablob_offset_when);
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;
3923}1406}
3924 1407
3925CK_DLL_MFUN(string_findStrStart)1408Chuck_Array8 & Chuck_UAnaBlobProxy::fvals()
3926{1409{
3927 Chuck_String * str = (Chuck_String *) SELF;1410 // TODO: DANGER: is this actually returning correct reference?!
3928 Chuck_String * the_str = GET_NEXT_STRING(ARGS);1411 Chuck_Array8 * arr8 = (Chuck_Array8 *)OBJ_MEMBER_INT(m_blob, uanablob_offset_fvals);
3929 t_CKINT start = GET_NEXT_INT(ARGS);1412 assert( arr8 != NULL );
3930 1413 return *arr8;
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;
3944}1414}
3945 1415
3946CK_DLL_MFUN(string_rfind)1416Chuck_Array16 & Chuck_UAnaBlobProxy::cvals()
3947{1417{
3948 Chuck_String * str = (Chuck_String *) SELF;1418 // TODO: DANGER: is this actually returning correct reference?!
3949 t_CKINT the_char = GET_NEXT_INT(ARGS);1419 Chuck_Array16 * arr16 = (Chuck_Array16 *)OBJ_MEMBER_INT(m_blob, uanablob_offset_cvals);
3950 1420 assert( arr16 != NULL );
3951 string::size_type index = str->str().rfind(the_char);1421 return *arr16;
3952
3953 if(index == string::npos)
3954 RETURN->v_int = -1;
3955 else
3956 RETURN->v_int = index;
3957}1422}
3958 1423
3959CK_DLL_MFUN(string_rfindStart)1424// get proxy
1425Chuck_UAnaBlobProxy * getBlobProxy( const Chuck_UAna * uana )
3960{1426{
3961 Chuck_String * str = (Chuck_String *) SELF;1427 return (Chuck_UAnaBlobProxy *)OBJ_MEMBER_INT(uana, uana_offset_blob);
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;
3978}1428}
3979 1429
3980CK_DLL_MFUN(string_rfindStr)1430// ctor
1431CK_DLL_CTOR( uanablob_ctor )
3981{1432{
3982 Chuck_String * str = (Chuck_String *) SELF;1433 // when
3983 Chuck_String * the_str = GET_NEXT_STRING(ARGS);1434 OBJ_MEMBER_TIME(SELF, uanablob_offset_when) = 0;
3984 1435 // fvals
3985 string::size_type index = str->str().rfind(the_str->str());1436 Chuck_Array8 * arr8 = new Chuck_Array8( 8 );
3986 1437 initialize_object( arr8, SHRED->vm_ref->env()->t_array );
3987 if(index == string::npos)1438 // TODO: check out of memory
3988 RETURN->v_int = -1;1439 arr8->add_ref();
3989 else1440 OBJ_MEMBER_INT(SELF, uanablob_offset_fvals) = (t_CKINT)arr8;
3990 RETURN->v_int = index;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;
3991}1447}
3992 1448
3993CK_DLL_MFUN(string_rfindStrStart)1449// dtor
1450CK_DLL_DTOR( uanablob_dtor )
3994{1451{
3995 Chuck_String * str = (Chuck_String *) SELF;1452 // get array
3996 Chuck_String * the_str = GET_NEXT_STRING(ARGS);1453 Chuck_Array8 * arr8 = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
3997 t_CKINT start = GET_NEXT_INT(ARGS);1454 // release it
3998 1455 arr8->release();
3999 if(start < 0 || start >= str->str().length())1456 OBJ_MEMBER_INT(SELF, uanablob_offset_fvals) = 0;
4000 {
4001 throw_exception(SHRED, "IndexOutOfBoundsException", start);
4002 RETURN->v_int = -1;
4003 return;
4004 }
4005 1457
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;
4007 1463
4008 if(index == string::npos)1464 OBJ_MEMBER_TIME(SELF, uanablob_offset_when) = 0;
4009 RETURN->v_int = -1;
4010 else
4011 RETURN->v_int = index;
4012}1465}
4013 1466
4014CK_DLL_MFUN(string_erase)1467CK_DLL_MFUN( uanablob_when )
4015{1468{
4016 Chuck_String * str = (Chuck_String *) SELF;1469 // set return
4017 t_CKINT start = GET_NEXT_INT(ARGS);1470 RETURN->v_time = OBJ_MEMBER_TIME(SELF, uanablob_offset_when);
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 );
4036}1471}
4037 1472
4038CK_DLL_MFUN( string_toInt )1473CK_DLL_MFUN( uanablob_fvals )
4039{1474{
4040 // get pointer to self1475 // set return
4041 Chuck_String * str = (Chuck_String *)SELF;1476 RETURN->v_object = (Chuck_Array8 *)OBJ_MEMBER_INT(SELF, uanablob_offset_fvals);
4042 // convert to int
4043 RETURN->v_int = ::atoi( str->str().c_str() );
4044}1477}
4045 1478
4046CK_DLL_MFUN( string_toFloat )1479CK_DLL_MFUN( uanablob_fval )
4047{1480{
4048 // get pointer to self1481 // get index
4049 Chuck_String * str = (Chuck_String *)SELF;1482 t_CKINT i = GET_NEXT_INT(ARGS);
4050 // convert to int1483 // get the fvals array
4051 RETURN->v_float = (t_CKFLOAT)::atof( str->str().c_str() );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 }
4052}1494}
4053 1495
4054CK_DLL_MFUN( string_parent )1496CK_DLL_MFUN( uanablob_cval )
4055{1497{
4056 Chuck_String * str = (Chuck_String *) SELF;1498 // get index
4057 1499 t_CKINT i = GET_NEXT_INT(ARGS);
4058 string::size_type i = str->str().rfind('/', str->str().length()-2);1500 // get the fvals array
4059#ifdef WIN321501 Chuck_Array16 * cvals = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
4060 // SPENCERTODO: make this legit on windows1502 // check caps
4061 if(i == string::npos)1503 if( i < 0 || cvals->size() <= i ) RETURN->v_complex.re = RETURN->v_complex.im = 0;
4062 i = str->str().rfind('\\', str->str().length()-2);1504 else
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)
4068 {1505 {
4069 if(i == 0)1506 // get
4070 parent->set( "/" );1507 t_CKCOMPLEX val;
4071 else1508 cvals->get( i, &val );
4072 parent->set( str->str().substr(0, i) );1509 RETURN->v_complex = val;
4073 }1510 }
4074
4075 RETURN->v_string = parent;
4076}1511}
4077 1512
4078/*1513CK_DLL_MFUN( uanablob_cvals )
4079CK_DLL_MFUN( string_set_at )
4080{1514{
4081 Chuck_String * s = (Chuck_String *)SELF;1515 // set return
4082 t_CKINT c = GET_CK_INT(1516 RETURN->v_object = (Chuck_Array16 *)OBJ_MEMBER_INT(SELF, uanablob_offset_cvals);
4083 RETURN->v_int = s->str.length();
4084}1517}
4085 1518
4086CK_DLL_MFUN( string_get_at )1519// ctor
1520CK_DLL_CTOR( event_ctor )
4087{1521{
4088 Chuck_String * s = (Chuck_String *)SELF;1522// OBJ_MEMBER_INT(SELF, event_offset_data) = (t_CKUINT)new Data_Event;
4089 RETURN->v_int = s->str.length();1523// Chuck_Event * event = (Chuck_Event *)SELF;
4090}1524}
4091*/
4092 1525
4093 1526
4094// array.size()1527CK_DLL_DTOR( event_dtor )
4095CK_DLL_MFUN( array_get_size )
4096{1528{
4097 Chuck_Array * array = (Chuck_Array *)SELF;1529// delete (Data_Event *)OBJ_MEMBER_INT(SELF, event_offset_data);
4098 RETURN->v_int = array->size();
4099}1530}
4100 1531
4101// array.size()1532CK_DLL_MFUN( event_signal )
4102CK_DLL_MFUN( array_set_size )
4103{1533{
4104 Chuck_Array * array = (Chuck_Array *)SELF;1534 Chuck_Event * d = (Chuck_Event *)SELF;
4105 t_CKINT size = GET_NEXT_INT(ARGS);1535 d->signal();
4106 if( size < 0 )1536 d->signal_global();
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();
4118}1537}
4119 1538
4120// array.clear()1539CK_DLL_MFUN( event_broadcast )
4121CK_DLL_MFUN( array_clear )
4122{1540{
4123 Chuck_Array * array = (Chuck_Array *)SELF;1541 Chuck_Event * d = (Chuck_Event *)SELF;
4124 array->clear();1542 d->broadcast();
1543 d->broadcast_global();
4125}1544}
4126 1545
4127// array.reset()1546CK_DLL_MFUN( event_wait )
4128CK_DLL_MFUN( array_reset )
4129{1547{
4130 Chuck_Array * array = (Chuck_Array *)SELF;1548 // Chuck_Event * d = (Chuck_Event *)SELF;
4131 array->clear();1549 assert( FALSE );
4132 // default capacity
4133 array->set_capacity( 8 );
4134}1550}
4135 1551
4136// array.cap()1552CK_DLL_MFUN( event_can_wait )
4137CK_DLL_MFUN( array_set_capacity )
4138{1553{
4139 Chuck_Array * array = (Chuck_Array *)SELF;1554 RETURN->v_int = TRUE;
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 }
4152}1555}
4153 1556
4154// array.cap()1557
4155CK_DLL_MFUN( array_get_capacity_hack )1558//-----------------------------------------------------------------------------
1559// vec3 API
1560//-----------------------------------------------------------------------------
1561CK_DLL_MFUN( vec3_set )
4156{1562{
4157 Chuck_Array * array = (Chuck_Array *)SELF;1563 // HACK: this is a particularly horrid cast from (Chuck_Object *)
4158 RETURN->v_int = array->size();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);
4159}1570}
4160 1571
4161// array.capacity()1572CK_DLL_MFUN( vec3_setAll )
4162CK_DLL_MFUN( array_get_capacity )
4163{1573{
4164 Chuck_Array * array = (Chuck_Array *)SELF;1574 // get data pointer
4165 RETURN->v_int = array->capacity();1575 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
1576 // get index
1577 vec3->x = vec3->y = vec3->z = GET_NEXT_FLOAT(ARGS);
4166}1578}
4167 1579
4168// array.find()1580CK_DLL_MFUN( vec3_magnitude )
4169CK_DLL_MFUN( array_find )
4170{1581{
4171 Chuck_Array * array = (Chuck_Array *)SELF;1582 // get data pointer
4172 Chuck_String * name = GET_NEXT_STRING( ARGS );1583 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
4173 RETURN->v_int = array->find( name->str() );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;
4174}1588}
4175 1589
4176// array.erase()1590CK_DLL_MFUN( vec3_normalize )
4177CK_DLL_MFUN( array_erase )
4178{1591{
4179 Chuck_Array * array = (Chuck_Array *)SELF;1592 // get data pointer
4180 Chuck_String * name = GET_NEXT_STRING( ARGS );1593 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
4181 RETURN->v_int = array->erase( name->str() );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 }
4182}1603}
4183 1604
4184// array.push_back()1605CK_DLL_MFUN( vec3_interp )
4185CK_DLL_MFUN( array_push_back )
4186{1606{
4187 Chuck_Array * array = (Chuck_Array *)SELF;1607 // get data pointer
4188 // ISSUE: 64-bit (fixed 1.3.1.0 using data kind)1608 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
4189 if( array->data_type_kind() == CHUCK_ARRAY4_DATAKIND )1609 // update value based on goal and slew
4190 RETURN->v_int = ((Chuck_Array4 *)array)->push_back( GET_NEXT_UINT( ARGS ) );1610 vec3->x = (vec3->y - vec3->x) * vec3->z + vec3->x;
4191 else if( array->data_type_kind() == CHUCK_ARRAY8_DATAKIND )1611 // set return to value so it can used right after if desired
4192 RETURN->v_int = ((Chuck_Array8 *)array)->push_back( GET_NEXT_FLOAT( ARGS ) );1612 RETURN->v_float = vec3->x;
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 );
4197}1613}
4198 1614
4199// array.pop_back()1615CK_DLL_MFUN( vec3_interp_delta_float )
4200CK_DLL_MFUN( array_pop_back )
4201{1616{
4202 Chuck_Array * array = (Chuck_Array *)SELF;1617 // get data pointer
4203 // ISSUE: 64-bit (fixed 1.3.1.0 using data kind)1618 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
4204 if( array->data_type_kind() == CHUCK_ARRAY4_DATAKIND )1619 // get index
4205 RETURN->v_int = ((Chuck_Array4 *)array)->pop_back( );1620 t_CKFLOAT delta = GET_NEXT_FLOAT(ARGS);
4206 else if( array->data_type_kind() == CHUCK_ARRAY8_DATAKIND )1621 // update value based on goal and slew
4207 RETURN->v_int = ((Chuck_Array8 *)array)->pop_back( );1622 vec3->x = (vec3->y - vec3->x) * vec3->z * delta + vec3->x;
4208 else if( array->data_type_kind() == CHUCK_ARRAY16_DATAKIND )1623 // set return to value so it can used right after if desired
4209 RETURN->v_int = ((Chuck_Array16 *)array)->pop_back( );1624 RETURN->v_float = vec3->x;
4210 else
4211 assert( FALSE );
4212}1625}
4213 1626
4214 1627CK_DLL_MFUN( vec3_interp_delta_dur )
4215#ifndef __DISABLE_MIDI__
4216
4217//-----------------------------------------------------------------------------
4218// MidiIn API
4219//-----------------------------------------------------------------------------
4220CK_DLL_CTOR( MidiIn_ctor )
4221{1628{
4222 MidiIn * min = new MidiIn;1629 // get data pointer
4223 min->SELF = SELF;1630 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
4224 OBJ_MEMBER_INT(SELF, MidiIn_offset_data) = (t_CKINT)min;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;
4225}1639}
4226 1640
4227CK_DLL_DTOR( MidiIn_dtor )1641CK_DLL_MFUN( vec3_update_goal )
4228{1642{
4229 delete (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1643 // get data pointer
4230 OBJ_MEMBER_INT(SELF, MidiIn_offset_data) = 0;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;
4231}1649}
4232 1650
4233CK_DLL_MFUN( MidiIn_open )1651CK_DLL_MFUN( vec3_update_goal_slew )
4234{1652{
4235 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1653 // get data pointer
4236 t_CKINT port = GET_CK_INT(ARGS);1654 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
4237 RETURN->v_int = min->open( SHRED->vm_ref, port );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;
4238}1663}
4239 1664
4240CK_DLL_MFUN( MidiIn_open_named ) // added 1.3.0.01665CK_DLL_MFUN( vec3_updateSet_goalAndValue )
4241{1666{
4242 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1667 // get data pointer
4243 Chuck_String * name = GET_CK_STRING(ARGS);1668 t_CKVEC3 * vec3 = (t_CKVEC3 *)SELF;
4244 RETURN->v_int = min->open( SHRED->vm_ref, name->str() );1669 // get goal
1670 t_CKDUR goalAndValue = GET_NEXT_DUR(ARGS);
1671 // set goal and value
1672 vec3->y = vec3->x = goalAndValue;
4245}1673}
4246 1674
4247CK_DLL_MFUN( MidiIn_good )1675CK_DLL_MFUN( vec3_updateSet_goalAndValue_slew )
4248{1676{
4249 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1677 // get data pointer
4250 RETURN->v_int = (t_CKINT)min->good();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;
4251}1687}
4252 1688
4253CK_DLL_MFUN( MidiIn_num )1689
1690//-----------------------------------------------------------------------------
1691// vec4 API
1692//-----------------------------------------------------------------------------
1693CK_DLL_MFUN( vec4_set )
4254{1694{
4255 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1695 // HACK: this is a particularly horrid cast from (Chuck_Object *)
4256 RETURN->v_int = min->num();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);
4257}1703}
4258 1704
4259CK_DLL_MFUN( MidiIn_printerr )1705CK_DLL_MFUN( vec4_setAll )
4260{1706{
4261 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1707 // get data pointer
4262 t_CKINT print_or_not = GET_CK_INT(ARGS);1708 t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
4263 min->set_suppress( !print_or_not );1709 // get index
1710 vec4->x = vec4->y = vec4->z = vec4->w = GET_NEXT_FLOAT(ARGS);
4264}1711}
4265 1712
4266CK_DLL_MFUN( MidiIn_name )1713CK_DLL_MFUN( vec4_magnitude )
4267{1714{
4268 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1715 // get data pointer
4269 // TODO: memory leak, please fix, Thanks.1716 t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
4270 Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1717 // compute magnitude
4271 // only if valid1718 t_CKFLOAT mag = ::sqrt( vec4->x*vec4->x + vec4->y*vec4->y
4272 if( min->good() )1719 + vec4->z*vec4->z + vec4->w*vec4->w );
4273 a->set( min->min->getPortName( min->num() ) );1720 // return
4274 RETURN->v_string = a;1721 RETURN->v_float = mag;
4275}1722}
4276 1723
4277CK_DLL_MFUN( MidiIn_recv )1724CK_DLL_MFUN( vec4_normalize )
4278{1725{
4279 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);1726 // get data pointer
4280 Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);1727 t_CKVEC4 * vec4 = (t_CKVEC4 *)SELF;
4281 MidiMsg the_msg;1728 // compute magnitude
4282 RETURN->v_int = min->recv( &the_msg );1729 t_CKFLOAT mag = ::sqrt( vec4->x*vec4->x + vec4->y*vec4->y
4283 if( RETURN->v_int )1730 + vec4->z*vec4->z + vec4->w*vec4->w );
1731 // check for zero
1732 if( mag > 0 )
4284 {1733 {
4285 OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1) = the_msg.data[0];1734 vec4->x /= mag;
4286 OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2) = the_msg.data[1];1735 vec4->y /= mag;
4287 OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3) = the_msg.data[2];1736 vec4->z /= mag;
1737 vec4->w /= mag;
4288 }1738 }
4289}1739}
4290 1740
4291 1741
4292CK_DLL_MFUN( MidiIn_can_wait )
4293{
4294 MidiIn * min = (MidiIn *)OBJ_MEMBER_INT(SELF, MidiIn_offset_data);
4295 RETURN->v_int = min->empty();
4296}
4297 1742
4298 1743
4299//-----------------------------------------------------------------------------1744//-----------------------------------------------------------------------------
4300// MidiOut API1745// Shred API
4301//-----------------------------------------------------------------------------1746//-----------------------------------------------------------------------------
4302CK_DLL_CTOR( MidiOut_ctor )1747
1748//CK_DLL_CTOR( shred_ctor );
1749//CK_DLL_DTOR( shred_dtor );
1750
1751CK_DLL_MFUN( shred_exit )
4303{1752{
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;
4305}1757}
4306 1758
4307CK_DLL_DTOR( MidiOut_dtor )1759CK_DLL_MFUN( shred_running )
4308{1760{
4309 delete (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);1761 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4310 OBJ_MEMBER_INT(SELF, MidiOut_offset_data) = 0;1762 RETURN->v_int = derhs->is_running;
4311}1763}
4312 1764
4313CK_DLL_MFUN( MidiOut_open )1765CK_DLL_MFUN( shred_done )
4314{1766{
4315 MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);1767 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4316 t_CKINT port = GET_CK_INT(ARGS);1768 RETURN->v_int = derhs->is_done;
4317 RETURN->v_int = mout->open( port );
4318}1769}
4319 1770
4320CK_DLL_MFUN( MidiOut_open_named ) // added 1.3.0.01771CK_DLL_MFUN( shred_clone )
4321{1772{
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() );
4325}1773}
4326 1774
4327CK_DLL_MFUN( MidiOut_good )1775CK_DLL_MFUN( shred_id )
4328{1776{
4329 MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);1777 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4330 RETURN->v_int = (t_CKINT)mout->good();1778 // return the id
1779 RETURN->v_int = derhs->xid;
4331}1780}
4332 1781
4333CK_DLL_MFUN( MidiOut_num )1782CK_DLL_MFUN( shred_yield )
4334{1783{
4335 MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);1784 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4336 RETURN->v_int = mout->num();1785 Chuck_VM * vm = derhs->vm_ref;
1786
1787 // suspend
1788 derhs->is_running = FALSE;
1789 // reshredule
1790 vm->shreduler()->shredule( derhs, derhs->now );
4337}1791}
4338 1792
4339CK_DLL_MFUN( MidiOut_name )1793CK_DLL_MFUN( shred_numArgs )
4340{1794{
4341 MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);1795 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4342 // TODO: memory leak, please fix, Thanks.1796
4343 Chuck_String * a = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );1797 // get the number of arguments
4344 // only if valid1798 RETURN->v_int = derhs->args.size();
4345 if( mout->good() )
4346 a->set( mout->mout->getPortName( mout->num() ) );
4347 RETURN->v_string = a;
4348}1799}
4349 1800
4350CK_DLL_MFUN( MidiOut_printerr )1801CK_DLL_MFUN( shred_getArg )
4351{1802{
4352 MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);1803 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4353 t_CKINT print_or_not = GET_CK_INT(ARGS);1804
4354 mout->set_suppress( !print_or_not );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;
4355}1813}
4356 1814
4357CK_DLL_MFUN( MidiOut_send )1815CK_DLL_MFUN( shred_sourcePath ) // added 1.3.0.0
4358{1816{
4359 MidiOut * mout = (MidiOut *)OBJ_MEMBER_INT(SELF, MidiOut_offset_data);1817 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4360 Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);1818
4361 MidiMsg the_msg;1819 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4362 the_msg.data[0] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data1);1820 str->set( derhs->code->filename );
4363 the_msg.data[1] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data2);1821 RETURN->v_string = str;
4364 the_msg.data[2] = (t_CKBYTE)OBJ_MEMBER_INT(fake_msg, MidiMsg_offset_data3);
4365 RETURN->v_int = mout->send( &the_msg );
4366}1822}
4367 1823
4368#endif // __DISABLE_MIDI__1824CK_DLL_MFUN( shred_sourceDir ) // added 1.3.0.0
4369
4370
4371
4372
4373#ifndef __DISABLE_HID__
4374//-----------------------------------------------------------------------------
4375// HidMsg API
4376//-----------------------------------------------------------------------------
4377CK_DLL_MFUN( HidMsg_is_axis_motion )
4378{1825{
4379 RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==1826 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4380 CK_HID_JOYSTICK_AXIS ? 1 : 0 );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;
4381}1833}
4382 1834
4383CK_DLL_MFUN( HidMsg_is_button_down )1835CK_DLL_MFUN( shred_sourceDir2 ) // added 1.3.2.0
4384{1836{
4385 RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==1837 Chuck_VM_Shred * derhs = (Chuck_VM_Shred *)SELF;
4386 CK_HID_BUTTON_DOWN ? 1 : 0 );1838 // get num up
4387}1839 t_CKINT i = GET_NEXT_INT(ARGS);
1840 // abs
1841 if( i < 0 ) i = -i;
4388 1842
4389CK_DLL_MFUN( HidMsg_is_button_up )1843 // new chuck string
4390{1844 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4391 RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==1845 // set the content
4392 CK_HID_BUTTON_UP ? 1 : 0 );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;
4393}1851}
4394 1852
4395CK_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}
4400 1853
4401CK_DLL_MFUN( HidMsg_is_hat_motion )1854CK_DLL_SFUN( shred_fromId ) // added 1.3.2.0
4402{1855{
4403 RETURN->v_int = ( ( t_CKINT ) OBJ_MEMBER_INT( SELF, HidMsg_offset_type ) ==1856 t_CKINT shred_id = GET_NEXT_INT(ARGS);
4404 CK_HID_JOYSTICK_HAT ? 1 : 0 );1857
1858 Chuck_VM_Shred * derhs = SHRED->vm_ref->shreduler()->lookup(shred_id);
1859
1860 RETURN->v_object = derhs;
4405}1861}
4406 1862
4407CK_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}
4412 1863
4413//-----------------------------------------------------------------------------1864//-----------------------------------------------------------------------------
4414// HidIn API1865// string API
4415//-----------------------------------------------------------------------------1866//-----------------------------------------------------------------------------
4416CK_DLL_CTOR( HidIn_ctor )1867CK_DLL_MFUN( string_length )
4417{1868{
4418 HidIn * min = new HidIn;1869 Chuck_String * s = (Chuck_String *)SELF;
4419 min->SELF = SELF;1870 RETURN->v_int = s->str().length();
4420 OBJ_MEMBER_INT(SELF, HidIn_offset_data) = (t_CKINT)min;
4421}1871}
4422 1872
4423CK_DLL_DTOR( HidIn_dtor )1873CK_DLL_MFUN( string_upper )
4424{1874{
4425 delete (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1875 Chuck_String * s = (Chuck_String *)SELF;
4426 OBJ_MEMBER_INT(SELF, HidIn_offset_data) = 0;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;
4427}1879}
4428 1880
4429CK_DLL_MFUN( HidIn_open )1881CK_DLL_MFUN( string_lower )
4430{1882{
4431 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1883 Chuck_String * s = (Chuck_String *)SELF;
4432 t_CKINT type = GET_NEXT_INT(ARGS);1884 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4433 t_CKINT num = GET_NEXT_INT(ARGS);1885 str->set( tolower( s->str() ) );
4434 // CK_FPRINTF_STDERR( "HidIn_open %li %li\n", type, num );1886 RETURN->v_string = str;
4435 RETURN->v_int = min->open( SHRED->vm_ref, type, num );
4436}1887}
4437 1888
4438CK_DLL_MFUN( HidIn_open_named )1889CK_DLL_MFUN( string_ltrim )
4439{1890{
4440 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1891 Chuck_String * s = (Chuck_String *)SELF;
4441 Chuck_String * name = GET_NEXT_STRING(ARGS);1892 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4442 std::string s = name->str();1893 str->set( ltrim( s->str() ) );
4443 RETURN->v_int = min->open( SHRED->vm_ref, s );1894 RETURN->v_string = str;
4444}1895}
4445 1896
4446CK_DLL_MFUN( HidIn_open_joystick )1897CK_DLL_MFUN( string_rtrim )
4447{1898{
4448 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1899 Chuck_String * s = (Chuck_String *)SELF;
4449 t_CKINT num = GET_NEXT_INT(ARGS);1900 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4450 RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_JOYSTICK, num );1901 str->set( rtrim( s->str() ) );
1902 RETURN->v_string = str;
4451}1903}
4452 1904
4453CK_DLL_MFUN( HidIn_open_mouse )1905CK_DLL_MFUN( string_trim )
4454{1906{
4455 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1907 Chuck_String * s = (Chuck_String *)SELF;
4456 t_CKINT num = GET_NEXT_INT(ARGS);1908 Chuck_String * str = (Chuck_String *)instantiate_and_initialize_object( SHRED->vm_ref->env()->t_string, SHRED );
4457 RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_MOUSE, num );1909 str->set( trim( s->str() ) );
1910 RETURN->v_string = str;
4458}1911}
4459 1912
4460CK_DLL_MFUN( HidIn_open_keyboard )1913CK_DLL_MFUN( string_toString )
4461{1914{
4462 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1915 Chuck_String * s = (Chuck_String *)SELF;
4463 t_CKINT num = GET_NEXT_INT(ARGS);1916 RETURN->v_string = s;
4464 RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_KEYBOARD, num );
4465}1917}
4466 1918
4467CK_DLL_MFUN( HidIn_open_tiltsensor )1919CK_DLL_MFUN(string_charAt)
4468{1920{
4469 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1921 Chuck_String * str = (Chuck_String *) SELF;
4470 RETURN->v_int = min->open( SHRED->vm_ref, CK_HID_DEV_TILTSENSOR, 0 );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);
4471}1932}
4472 1933
4473CK_DLL_MFUN( HidIn_good )1934CK_DLL_MFUN(string_setCharAt)
4474{1935{
4475 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1936 Chuck_String * str = (Chuck_String *) SELF;
4476 RETURN->v_int = (t_CKINT)min->good();1937 t_CKINT index = GET_NEXT_INT(ARGS);
4477}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 }
4478 1946
4479CK_DLL_MFUN( HidIn_num )1947 // str->str.at(index) = the_char;
4480{1948 std::string s = str->str();
4481 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1949 s.at(index) = the_char;
4482 RETURN->v_int = min->num();1950 str->set( s );
1951 RETURN->v_int = str->str().at(index);
4483}1952}
4484 1953
4485CK_DLL_MFUN( HidIn_printerr )1954CK_DLL_MFUN(string_substring)
4486{1955{
4487 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1956 Chuck_String * str = (Chuck_String *) SELF;
4488 t_CKINT print_or_not = GET_CK_INT(ARGS);1957 t_CKINT start = GET_NEXT_INT(ARGS);
4489 min->set_suppress( !print_or_not );1958
4490}1959 if(start < 0 || start >= str->str().length())
1960 {
1961 throw_exception(SHRED, "IndexOutOfBoundsException", start);
1962 RETURN->v_string = NULL;
1963 return;
1964 }
4491 1965
4492CK_DLL_MFUN( HidIn_name )1966 Chuck_String * ss = (Chuck_String *) instantiate_and_initialize_object(SHRED->vm_ref->env()->t_string, SHRED);
4493{1967 ss->set( str->str().substr(start) );
4494 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1968
4495 // TODO: memory leak, please fix, Thanks.1969 RETURN->v_string = ss;
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() );
4503}1970}
4504 1971
4505CK_DLL_MFUN( HidIn_recv )1972CK_DLL_MFUN(string_substringN)
4506{1973{
4507 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);1974 Chuck_String * str = (Chuck_String *) SELF;
4508 Chuck_Object * fake_msg = GET_CK_OBJECT(ARGS);1975 t_CKINT start = GET_NEXT_INT(ARGS);
4509 HidMsg the_msg;1976 t_CKINT length = GET_NEXT_INT(ARGS);
4510 RETURN->v_int = min->recv( &the_msg );1977
4511 if( RETURN->v_int )1978 if(start < 0 || start >= str->str().length())
4512 {1979 {
4513 OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_type) = the_msg.device_type;1980 throw_exception(SHRED, "IndexOutOfBoundsException", start);
4514 OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_num) = the_msg.device_num;1981 RETURN->v_string = NULL;
4515 OBJ_MEMBER_INT(fake_msg, HidMsg_offset_type) = the_msg.type;1982 return;
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];
4549 }1983 }
4550}
4551
4552CK_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;
4560 1984
4561 RETURN->v_int = min->read( type, num, &the_msg );1985 if(length < 0 || start+length > str->str().length())
4562
4563 if( RETURN->v_int )
4564 {1986 {
4565 OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_type) = the_msg.device_type;1987 throw_exception(SHRED, "IndexOutOfBoundsException", length);
4566 OBJ_MEMBER_INT(fake_msg, HidMsg_offset_device_num) = the_msg.device_num;1988 RETURN->v_string = NULL;
4567 OBJ_MEMBER_INT(fake_msg, HidMsg_offset_type) = the_msg.type;1989 return;
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];
4597 }1990 }
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;
4598}1996}
4599 1997
4600CK_DLL_MFUN( HidIn_send )1998CK_DLL_MFUN(string_insert)
4601{1999{
4602 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);2000 Chuck_String * str = (Chuck_String *) SELF;
4603 Chuck_Object * fake_msg = GET_NEXT_OBJECT(ARGS);2001 t_CKINT position = GET_NEXT_INT(ARGS);
4604 2002 Chuck_String * str2 = GET_NEXT_STRING(ARGS);
4605 HidMsg the_msg;2003
4606 the_msg.device_type = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_device_type );2004 if(position < 0 || position >= str->str().length())
4607 the_msg.device_num = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_device_num );2005 {
4608 the_msg.type = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_type );2006 throw_exception(SHRED, "IndexOutOfBoundsException", position);
4609 the_msg.eid = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_which );2007 return;
4610 the_msg.idata[0] = OBJ_MEMBER_INT( fake_msg, HidMsg_offset_idata );2008 }
2009 if(str2 == NULL)
2010 {
2011 throw_exception(SHRED, "NullPointerException");
2012 return;
2013 }
4611 2014
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 );
4613}2019}
4614 2020
4615CK_DLL_MFUN( HidIn_can_wait )2021CK_DLL_MFUN(string_replace)
4616{2022{
4617 HidIn * min = (HidIn *)OBJ_MEMBER_INT(SELF, HidIn_offset_data);2023 Chuck_String * str = (Chuck_String *) SELF;
4618 RETURN->v_int = min->empty();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 );
4619}2048}
4620 2049
4621CK_DLL_SFUN( HidIn_read_tilt_sensor )2050CK_DLL_MFUN(string_replaceN)
4622{2051{
4623 static HidIn * hi;2052 Chuck_String * str = (Chuck_String *) SELF;
4624 static t_CKBOOL hi_good = TRUE;2053 t_CKINT position = GET_NEXT_INT(ARGS);
4625 2054 t_CKINT length = GET_NEXT_INT(ARGS);
4626 Chuck_Array4 * array = new Chuck_Array4( FALSE, 3 );2055 Chuck_String * str2 = GET_NEXT_STRING(ARGS);
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;
4634 2056
4635 if( hi_good == FALSE )2057 if(position < 0 || position >= str->str().length())
2058 {
2059 throw_exception(SHRED, "IndexOutOfBoundsException", position);
4636 return;2060 return;
2061 }
4637 2062
4638 if( !hi )2063 if(length < 0 || position+length > str->str().length())
4639 {2064 {
4640 hi = new HidIn;2065 throw_exception(SHRED, "IndexOutOfBoundsException", length);
4641 if( !hi->open( SHRED->vm_ref, CK_HID_DEV_TILTSENSOR, 0 ) )2066 return;
4642 {
4643 hi_good = FALSE;
4644 return;
4645 }
4646 }2067 }
4647 2068
4648 HidMsg msg;2069 if(str2 == NULL)
4649
4650 if( !hi->read( CK_HID_ACCELEROMETER, 0, &msg ) )
4651 {2070 {
2071 throw_exception(SHRED, "NullPointerException");
4652 return;2072 return;
4653 }2073 }
4654 2074
4655 array->set( 0, msg.idata[0] );2075 // str->str.replace(position, length, str2->str);
4656 array->set( 1, msg.idata[1] );2076 std::string s = str->str();
4657 array->set( 2, msg.idata[2] );2077 s.replace( position, length, str2->str() );
2078 str->set( s );
4658}2079}
4659 2080
4660CK_DLL_SFUN( HidIn_ctrl_tiltPollRate )2081CK_DLL_MFUN(string_find)
4661{2082{
4662 // get srate2083 Chuck_String * str = (Chuck_String *) SELF;
4663 if( !SHRED || !SHRED->vm_ref )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
2094CK_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())
4664 {2101 {
4665 // problem2102 throw_exception(SHRED, "IndexOutOfBoundsException", start);
4666 CK_FPRINTF_STDERR( "[chuck](via HID): can't set tiltPollRate on NULL shred/VM...\n" );2103 RETURN->v_int = -1;
4667 RETURN->v_dur = 0;
4668 return;2104 return;
4669 }2105 }
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 );
4677 2106
4678 // make sure it's nonnegative2107 string::size_type index = str->str().find(the_char, start);
4679 if( usec < 0 ) usec = 0;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
59t_CKBOOL init_class_vec3( Chuck_Env * env, Chuck_Type * type ); // 1.3.5.359t_CKBOOL init_class_vec3( Chuck_Env * env, Chuck_Type * type ); // 1.3.5.3
60t_CKBOOL init_class_vec4( Chuck_Env * env, Chuck_Type * type ); // 1.3.5.360t_CKBOOL init_class_vec4( Chuck_Env * env, Chuck_Type * type ); // 1.3.5.3
61 61
62t_CKBOOL init_class_Midi( Chuck_Env * env );
63t_CKBOOL init_class_MidiRW( Chuck_Env * env );
64t_CKBOOL init_class_HID( Chuck_Env * env );
65t_CKBOOL init_class_io( Chuck_Env * env, Chuck_Type * type );
66#ifndef __DISABLE_FILEIO__
67t_CKBOOL init_class_fileio( Chuck_Env * env, Chuck_Type * type );
68#endif
69// added 1.3.0.0 -- moved to be full-fledged class
70t_CKBOOL init_class_chout( Chuck_Env * env, Chuck_Type * type );
71// added 1.3.0.0 -- moved to be full-fledged class
72t_CKBOOL init_class_cherr( Chuck_Env * env, Chuck_Type * type );
73 62
74 63
75 64
@@ -208,86 +197,6 @@ CK_DLL_MFUN( event_wait ); · 132 unmodified lines
208CK_DLL_MFUN( event_can_wait );197CK_DLL_MFUN( event_can_wait );
209 198
210 199
211//-----------------------------------------------------------------------------
212// io API
213//-----------------------------------------------------------------------------
214CK_DLL_MFUN( io_dummy );
215CK_DLL_SFUN( io_newline );
216CK_DLL_SFUN( io_openfile );
217
218
219#ifndef __DISABLE_FILEIO__
220//-----------------------------------------------------------------------------
221// fileio API
222//-----------------------------------------------------------------------------
223CK_DLL_CTOR( fileio_ctor );
224CK_DLL_DTOR( fileio_dtor );
225CK_DLL_MFUN( fileio_open );
226CK_DLL_MFUN( fileio_openflags );
227CK_DLL_MFUN( fileio_good );
228CK_DLL_MFUN( fileio_close );
229CK_DLL_MFUN( fileio_flush );
230CK_DLL_MFUN( fileio_getmode );
231CK_DLL_MFUN( fileio_setmode );
232CK_DLL_MFUN( fileio_size );
233CK_DLL_MFUN( fileio_seek );
234CK_DLL_MFUN( fileio_tell );
235CK_DLL_MFUN( fileio_isdir );
236CK_DLL_MFUN( fileio_dirlist );
237CK_DLL_MFUN( fileio_read );
238CK_DLL_MFUN( fileio_readline );
239CK_DLL_MFUN( fileio_readint );
240CK_DLL_MFUN( fileio_readintflags );
241CK_DLL_MFUN( fileio_readfloat );
242CK_DLL_MFUN( fileio_eof );
243CK_DLL_MFUN( fileio_more );
244CK_DLL_MFUN( fileio_writestring );
245CK_DLL_MFUN( fileio_writeint );
246CK_DLL_MFUN( fileio_writeintflags );
247CK_DLL_MFUN( fileio_writefloat );
248#endif
249
250
251//-----------------------------------------------------------------------------
252// chout API -- added 1.3.0.0 as full class
253//-----------------------------------------------------------------------------
254CK_DLL_MFUN( chout_good );
255CK_DLL_MFUN( chout_close );
256CK_DLL_MFUN( chout_flush );
257CK_DLL_MFUN( chout_getmode );
258CK_DLL_MFUN( chout_setmode );
259CK_DLL_MFUN( chout_read );
260CK_DLL_MFUN( chout_readline );
261CK_DLL_MFUN( chout_readint );
262CK_DLL_MFUN( chout_readintflags );
263CK_DLL_MFUN( chout_readfloat );
264CK_DLL_MFUN( chout_eof );
265CK_DLL_MFUN( chout_more );
266CK_DLL_MFUN( chout_writestring );
267CK_DLL_MFUN( chout_writeint );
268CK_DLL_MFUN( chout_writefloat );
269
270
271//-----------------------------------------------------------------------------
272// cherr API -- added 1.3.0.0 as full class
273//-----------------------------------------------------------------------------
274CK_DLL_MFUN( cherr_good );
275CK_DLL_MFUN( cherr_close );
276CK_DLL_MFUN( cherr_flush );
277CK_DLL_MFUN( cherr_getmode );
278CK_DLL_MFUN( cherr_setmode );
279CK_DLL_MFUN( cherr_read );
280CK_DLL_MFUN( cherr_readline );
281CK_DLL_MFUN( cherr_readint );
282CK_DLL_MFUN( cherr_readintflags );
283CK_DLL_MFUN( cherr_readfloat );
284CK_DLL_MFUN( cherr_eof );
285CK_DLL_MFUN( cherr_more );
286CK_DLL_MFUN( cherr_writestring );
287CK_DLL_MFUN( cherr_writeint );
288CK_DLL_MFUN( cherr_writefloat );
289
290
291//-----------------------------------------------------------------------------200//-----------------------------------------------------------------------------
292// string API201// string API
293//-----------------------------------------------------------------------------202//-----------------------------------------------------------------------------
@@ -360,129 +269,6 @@ public: · 66 unmodified lines
360//-----------------------------------------------------------------------------269//-----------------------------------------------------------------------------
361 270
362 271
363//-----------------------------------------------------------------------------
364// MidiMsg API
365//-----------------------------------------------------------------------------
366CK_DLL_CTOR( MidiMsg_ctor );
367
368extern t_CKUINT MidiMsg_offset_data1;
369extern t_CKUINT MidiMsg_offset_data2;
370extern t_CKUINT MidiMsg_offset_data3;
371extern t_CKUINT MidiMsg_offset_when;
372
373//-----------------------------------------------------------------------------
374// MidiRW API
375//-----------------------------------------------------------------------------
376CK_DLL_CTOR( MidiRW_ctor );
377CK_DLL_DTOR( MidiRW_dtor );
378CK_DLL_MFUN( MidiRW_open );
379CK_DLL_MFUN( MidiRW_close );
380CK_DLL_MFUN( MidiRW_read );
381CK_DLL_MFUN( MidiRW_write );
382
383
384//-----------------------------------------------------------------------------
385// MidiMsgOut API
386//-----------------------------------------------------------------------------
387CK_DLL_CTOR( MidiMsgOut_ctor );
388CK_DLL_DTOR( MidiMsgOut_dtor );
389CK_DLL_MFUN( MidiMsgOut_open );
390CK_DLL_MFUN( MidiMsgOut_close );
391CK_DLL_MFUN( MidiMsgOut_write );
392
393
394//-----------------------------------------------------------------------------
395// MidiMsgIn API
396//-----------------------------------------------------------------------------
397CK_DLL_CTOR( MidiMsgIn_ctor );
398CK_DLL_DTOR( MidiMsgIn_dtor );
399CK_DLL_MFUN( MidiMsgIn_open );
400CK_DLL_MFUN( MidiMsgIn_close );
401CK_DLL_MFUN( MidiMsgIn_read );
402
403
404//-----------------------------------------------------------------------------
405// MidiIn API
406//-----------------------------------------------------------------------------
407CK_DLL_CTOR( MidiIn_ctor );
408CK_DLL_DTOR( MidiIn_dtor );
409CK_DLL_MFUN( MidiIn_open );
410CK_DLL_MFUN( MidiIn_open_named ); // added 1.3.0.0
411CK_DLL_MFUN( MidiIn_open_named_i ); // added 1.3.0.0
412CK_DLL_MFUN( MidiIn_good );
413CK_DLL_MFUN( MidiIn_num );
414CK_DLL_MFUN( MidiIn_name );
415CK_DLL_MFUN( MidiIn_printerr );
416CK_DLL_MFUN( MidiIn_recv );
417CK_DLL_MFUN( MidiIn_can_wait );
418
419
420//-----------------------------------------------------------------------------
421// MidiOut API
422//-----------------------------------------------------------------------------
423CK_DLL_CTOR( MidiOut_ctor );
424CK_DLL_DTOR( MidiOut_dtor );
425CK_DLL_MFUN( MidiOut_open );
426CK_DLL_MFUN( MidiOut_open_named ); // added 1.3.0.0
427CK_DLL_MFUN( MidiOut_open_named_i); // added 1.3.0.0
428CK_DLL_MFUN( MidiOut_good );
429CK_DLL_MFUN( MidiOut_num );
430CK_DLL_MFUN( MidiOut_name );
431CK_DLL_MFUN( MidiOut_printerr );
432CK_DLL_MFUN( MidiOut_send );
433
434
435#ifndef __DISABLE_HID__
436//-----------------------------------------------------------------------------
437// HidMsg API
438//-----------------------------------------------------------------------------
439CK_DLL_MFUN( HidMsg_is_axis_motion );
440CK_DLL_MFUN( HidMsg_is_button_down );
441CK_DLL_MFUN( HidMsg_is_button_up );
442CK_DLL_MFUN( HidMsg_is_mouse_motion );
443CK_DLL_MFUN( HidMsg_is_hat_motion );
444CK_DLL_MFUN( HidMsg_is_wheel_motion );
445
446//-----------------------------------------------------------------------------
447// HidIn API
448//-----------------------------------------------------------------------------
449CK_DLL_CTOR( HidIn_ctor );
450CK_DLL_DTOR( HidIn_dtor );
451CK_DLL_MFUN( HidIn_open );
452CK_DLL_MFUN( HidIn_open_named );
453CK_DLL_MFUN( HidIn_open_named_i ); // added 1.3.0.0
454CK_DLL_MFUN( HidIn_open_joystick );
455CK_DLL_MFUN( HidIn_open_mouse );
456CK_DLL_MFUN( HidIn_open_keyboard );
457CK_DLL_MFUN( HidIn_open_tiltsensor );
458CK_DLL_MFUN( HidIn_good );
459CK_DLL_MFUN( HidIn_num );
460CK_DLL_MFUN( HidIn_name );
461CK_DLL_MFUN( HidIn_printerr );
462CK_DLL_MFUN( HidIn_recv );
463CK_DLL_MFUN( HidIn_read );
464CK_DLL_MFUN( HidIn_send );
465CK_DLL_MFUN( HidIn_can_wait );
466CK_DLL_SFUN( HidIn_read_tilt_sensor );
467CK_DLL_SFUN( HidIn_ctrl_tiltPollRate );
468CK_DLL_SFUN( HidIn_cget_tiltPollRate );
469CK_DLL_SFUN( HidIn_start_cursor_track );
470CK_DLL_SFUN( HidIn_stop_cursor_track );
471
472
473//-----------------------------------------------------------------------------
474// HidOut API
475//-----------------------------------------------------------------------------
476CK_DLL_CTOR( HidOut_ctor );
477CK_DLL_DTOR( HidOut_dtor );
478CK_DLL_MFUN( HidOut_open );
479CK_DLL_MFUN( HidOut_good );
480CK_DLL_MFUN( HidOut_num );
481CK_DLL_MFUN( HidOut_name );
482CK_DLL_MFUN( HidOut_printerr );
483CK_DLL_MFUN( HidOut_send );
484#endif
485
486 272
487 273
488 274
src/core/chuck_otf.cpp+10−5
@@ -642,12 +642,17 @@ void * otf_cb( void * p ) · 641 unmodified lines
642 {642 {
643 // REFACTOR-2017: change g_sock to per-VM socket643 // REFACTOR-2017: change g_sock to per-VM socket
644 client = ck_accept( carrier->otf_socket );644 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
645 if( !client )650 if( !client )
646 {651 {
647 if( carrier->vm )652 if( carrier->vm )
648 EM_log( CK_LOG_INFO, "[chuck]: socket error during accept()...\n" );653 EM_log( CK_LOG_INFO, "[chuck]: socket error during accept()...\n" );
649 usleep( 40000 );654 usleep( 40000 );
650 ck_close( client );655 // ck_close( client ); don't close NULL client
651 continue;656 continue;
652 }657 }
653 msg.clear();658 msg.clear();
@@ -720,9 +725,9 @@ const char * poop[] = { · 66 unmodified lines
720 "[chuck]: lack of destructors have led to the unrecoverable mass build-up of trash\n"725 "[chuck]: lack of destructors have led to the unrecoverable mass build-up of trash\n"
721 " the chuck garbage collector will now run, deleting all files (bye.)",726 " the chuck garbage collector will now run, deleting all files (bye.)",
722 "[chuck]: calling machine.crash()...",727 "[chuck]: calling machine.crash()...",
723 "[chuck]: an unknown fatal error has occured. please restart your computer...",728 "[chuck]: an unknown fatal error has occurred. please restart your computer...",
724 "[chuck]: an unknown fatal error has occured. please reinstall your OS...",729 "[chuck]: an unknown fatal error has occurred. please reinstall your OS...",
725 "[chuck]: an unknown fatal error has occured. please update to chuck-3.0",730 "[chuck]: an unknown fatal error has occurred. please update to chuck-3.0",
726 "[chuck]: internal error: unknown error",731 "[chuck]: internal error: unknown error",
727 "[chuck]: page fault!!!",732 "[chuck]: page fault!!!",
728 "[chuck]: error printing error message. cannot continue 2#%%HGAFf9a0x"733 "[chuck]: error printing error message. cannot continue 2#%%HGAFf9a0x"
@@ -744,6 +749,6 @@ void uh( ) · 15 unmodified lines
744 {749 {
745 int n = (int)(rand() / (float)RAND_MAX * poop_size);750 int n = (int)(rand() / (float)RAND_MAX * poop_size);
746 printf( "%s\n", poop[n] );751 printf( "%s\n", poop[n] );
747 usleep( (unsigned long)(rand() / (float)RAND_MAX * 2000000) );752 usleep( (unsigned long)(rand() / (float)RAND_MAX * 2000000) / 10 );
748 }753 }
749}754}
src/core/chuck_type.cpp+3−2
@@ -36,6 +36,7 @@ · 35 unmodified lines
36#include "chuck_vm.h"36#include "chuck_vm.h"
37#include "chuck_errmsg.h"37#include "chuck_errmsg.h"
38#include "chuck_lang.h"38#include "chuck_lang.h"
39#include "chuck_io.h"
39#include "util_string.h"40#include "util_string.h"
40#include "ugen_xxx.h"41#include "ugen_xxx.h"
41 42
@@ -6160,8 +6161,8 @@ t_CKBOOL type_engine_add_dll( Chuck_Env * env, Chuck_DLL * dll, const string & d · 6118 unmodified lines
6160 a_Exp exp_decl = new_exp_decl( type_decl, var_decl_list, TRUE, 0 );6161 a_Exp exp_decl = new_exp_decl( type_decl, var_decl_list, TRUE, 0 );
6161 // add addr6162 // add addr
6162 var_decl->addr = (void *)cl->svars[j]->static_addr;6163 var_decl->addr = (void *)cl->svars[j]->static_addr;
6163 // prepend exp stmt to stmt list6164 // append exp stmt to stmt list
6164 svar_decls = prepend_stmt_list( new_stmt_from_expression( exp_decl, 0 ), svar_decls, 0 );6165 svar_decls = append_stmt_list( svar_decls, new_stmt_from_expression( exp_decl, 0 ), 0 );
6165 }6166 }
6166 6167
6167 // if there are any declarations, prepend them to body6168 // 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. */
2 2
3/* Bison implementation for Yacc-like parsers in C3/* Skeleton implementation for Bison's Yacc-like parsers in C
4 4
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.
6 7
7 This program is free software: you can redistribute it and/or modify8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by9 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or10 the Free Software Foundation; either version 2, or (at your option)
10 (at your option) any later version.11 any later version.
11 12
12 This program is distributed in the hope that it will be useful,13 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of14 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +16,9 @@ · 1 unmodified line
15 GNU General Public License for more details.16 GNU General Public License for more details.
16 17
17 You should have received a copy of the GNU General Public License18 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. */
19 22
20/* As a special exception, you may create a larger work that contains23/* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work24 part or all of the Bison parser skeleton and distribute that work
@@ -44,7 +47,7 @@ · 22 unmodified lines
44#define YYBISON 147#define YYBISON 1
45 48
46/* Bison version. */49/* Bison version. */
47#define YYBISON_VERSION "3.1"50#define YYBISON_VERSION "2.3"
48 51
49/* Skeleton name. */52/* Skeleton name. */
50#define YYSKELETON_NAME "yacc.c"53#define YYSKELETON_NAME "yacc.c"
@@ -52,17 +55,244 @@ · 1 unmodified line
52/* Pure parsers. */55/* Pure parsers. */
53#define YYPURE 056#define YYPURE 0
54 57
55/* Push parsers. */58/* Using locations. */
56#define YYPUSH 059#define YYLSP_NEEDED 0
57 60
58/* Pull parsers. */61
59#define YYPULL 162
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
60 290
61 291
62 292
63 293
64/* Copy the first part of user declarations. */294/* Copy the first part of user declarations. */
65#line 1 "chuck.y" /* yacc.c:339 */295#line 1 "chuck.y"
66 296
67 297
68/*----------------------------------------------------------------------------298/*----------------------------------------------------------------------------
@@ -103,9 +333,6 @@ · 34 unmodified lines
103#include <stdio.h>333#include <stdio.h>
104#include <string.h>334#include <string.h>
105#include <stdlib.h>335#include <stdlib.h>
106#ifndef __PLATFORM_WIN32__
107#include <unistd.h>
108#endif
109#include "chuck_utils.h"336#include "chuck_utils.h"
110#include "chuck_errmsg.h"337#include "chuck_errmsg.h"
111#include "chuck_absyn.h"338#include "chuck_absyn.h"
@@ -121,15 +348,11 @@ void yyerror( char *s ) · 9 unmodified lines
121a_Program g_program = NULL;348a_Program g_program = NULL;
122 349
123 350
124#line 123 "chuck.tab.c" /* yacc.c:339 */
125 351
126# ifndef YY_NULLPTR352/* Enabling traces. */
127# if defined __cplusplus && 201103L <= __cplusplus353#ifndef YYDEBUG
128# define YY_NULLPTR nullptr354# define YYDEBUG 0
129# else355#endif
130# define YY_NULLPTR 0
131# endif
132# endif
133 356
134/* Enabling verbose error messages. */357/* Enabling verbose error messages. */
135#ifdef YYERROR_VERBOSE358#ifdef YYERROR_VERBOSE
@@ -139,142 +362,15 @@ a_Program g_program = NULL; · 3 unmodified lines
139# define YYERROR_VERBOSE 0362# define YYERROR_VERBOSE 0
140#endif363#endif
141 364
142/* In a future release of Bison, this section will be replaced365/* Enabling the token table. */
143 by #include "chuck.tab.h". */366#ifndef YYTOKEN_TABLE
144#ifndef YY_YY_CHUCK_TAB_H_INCLUDED367# define YYTOKEN_TABLE 0
145# define YY_YY_CHUCK_TAB_H_INCLUDED
146/* Debug traces. */
147#ifndef YYDEBUG
148# define YYDEBUG 0
149#endif
150#if YYDEBUG
151extern int yydebug;
152#endif368#endif
153 369
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. */
272#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED370#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
273 371typedef union YYSTYPE
274union YYSTYPE372#line 59 "chuck.y"
275{373{
276#line 60 "chuck.y" /* yacc.c:355 */
277
278 int pos;374 int pos;
279 int ival;375 int ival;
280 double fval;376 double fval;
@@ -298,25 +394,22 @@ union YYSTYPE · 17 unmodified lines
298 a_Complex complex_exp;394 a_Complex complex_exp;
299 a_Polar polar_exp;395 a_Polar polar_exp;
300 a_Vec vec_exp; // ge: added 1.3.5.3396 a_Vec vec_exp; // ge: added 1.3.5.3
301 397}
302#line 301 "chuck.tab.c" /* yacc.c:355 */398/* Line 193 of yacc.c. */
303};399#line 400 "chuck.tab.c"
304 400 YYSTYPE;
305typedef union YYSTYPE YYSTYPE;401# define yystype YYSTYPE /* obsolescent; will be withdrawn */
306# define YYSTYPE_IS_TRIVIAL 1
307# define YYSTYPE_IS_DECLARED 1402# define YYSTYPE_IS_DECLARED 1
403# define YYSTYPE_IS_TRIVIAL 1
308#endif404#endif
309 405
310 406
311extern YYSTYPE yylval;
312
313int yyparse (void);
314
315#endif /* !YY_YY_CHUCK_TAB_H_INCLUDED */
316 407
317/* Copy the second part of user declarations. */408/* Copy the second part of user declarations. */
318 409
319#line 318 "chuck.tab.c" /* yacc.c:358 */410
411/* Line 216 of yacc.c. */
412#line 413 "chuck.tab.c"
320 413
321#ifdef short414#ifdef short
322# undef short415# undef short
@@ -330,20 +423,23 @@ typedef unsigned char yytype_uint8; · 7 unmodified lines
330 423
331#ifdef YYTYPE_INT8424#ifdef YYTYPE_INT8
332typedef YYTYPE_INT8 yytype_int8;425typedef YYTYPE_INT8 yytype_int8;
333#else426#elif (defined __STDC__ || defined __C99__FUNC__ \
427 || defined __cplusplus || defined _MSC_VER)
334typedef signed char yytype_int8;428typedef signed char yytype_int8;
429#else
430typedef short int yytype_int8;
335#endif431#endif
336 432
337#ifdef YYTYPE_UINT16433#ifdef YYTYPE_UINT16
338typedef YYTYPE_UINT16 yytype_uint16;434typedef YYTYPE_UINT16 yytype_uint16;
339#else435#else
340typedef unsigned short yytype_uint16;436typedef unsigned short int yytype_uint16;
341#endif437#endif
342 438
343#ifdef YYTYPE_INT16439#ifdef YYTYPE_INT16
344typedef YYTYPE_INT16 yytype_int16;440typedef YYTYPE_INT16 yytype_int16;
345#else441#else
346typedef short yytype_int16;442typedef short int yytype_int16;
347#endif443#endif
348 444
349#ifndef YYSIZE_T445#ifndef YYSIZE_T
@@ -351,11 +447,12 @@ typedef short yytype_int16; · 1 unmodified line
351# define YYSIZE_T __SIZE_TYPE__447# define YYSIZE_T __SIZE_TYPE__
352# elif defined size_t448# elif defined size_t
353# define YYSIZE_T size_t449# define YYSIZE_T size_t
354# elif ! defined YYSIZE_T450# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
451 || defined __cplusplus || defined _MSC_VER)
355# include <stddef.h> /* INFRINGES ON USER NAME SPACE */452# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
356# define YYSIZE_T size_t453# define YYSIZE_T size_t
357# else454# else
358# define YYSIZE_T unsigned455# define YYSIZE_T unsigned int
359# endif456# endif
360#endif457#endif
361 458
@@ -365,68 +462,39 @@ typedef short yytype_int16; · 3 unmodified lines
365# if defined YYENABLE_NLS && YYENABLE_NLS462# if defined YYENABLE_NLS && YYENABLE_NLS
366# if ENABLE_NLS463# if ENABLE_NLS
367# include <libintl.h> /* INFRINGES ON USER NAME SPACE */464# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
368# define YY_(Msgid) dgettext ("bison-runtime", Msgid)465# define YY_(msgid) dgettext ("bison-runtime", msgid)
369# endif466# endif
370# endif467# endif
371# ifndef YY_468# ifndef YY_
372# define YY_(Msgid) Msgid469# 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__))
400# endif470# endif
401#endif471#endif
402 472
403/* Suppress unused-variable warnings by "using" E. */473/* Suppress unused-variable warnings by "using" E. */
404#if ! defined lint || defined __GNUC__474#if ! defined lint || defined __GNUC__
405# define YYUSE(E) ((void) (E))475# define YYUSE(e) ((void) (e))
406#else476#else
407# define YYUSE(E) /* empty */477# define YYUSE(e) /* empty */
408#endif478#endif
409 479
410#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__480/* Identity function, used to suppress warnings about constant conditions. */
411/* Suppress an incorrect diagnostic about yylval being uninitialized. */481#ifndef lint
412# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \482# define YYID(n) (n)
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")
418#else483#else
419# define YY_INITIAL_VALUE(Value) Value484#if (defined __STDC__ || defined __C99__FUNC__ \
420#endif485 || defined __cplusplus || defined _MSC_VER)
421#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN486static int
422# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN487YYID (int i)
423# define YY_IGNORE_MAYBE_UNINITIALIZED_END488#else
489static int
490YYID (i)
491 int i;
424#endif492#endif
425#ifndef YY_INITIAL_VALUE493{
426# define YY_INITIAL_VALUE(Value) /* Nothing. */494 return i;
495}
427#endif496#endif
428 497
429
430#if ! defined yyoverflow || YYERROR_VERBOSE498#if ! defined yyoverflow || YYERROR_VERBOSE
431 499
432/* The parser invokes alloca or malloc; define the necessary symbols. */500/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -444,11 +512,11 @@ typedef short yytype_int16; · 11 unmodified lines
444# define alloca _alloca512# define alloca _alloca
445# else513# else
446# define YYSTACK_ALLOC alloca514# define YYSTACK_ALLOC alloca
447# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS515# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
516 || defined __cplusplus || defined _MSC_VER)
448# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */517# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
449 /* Use EXIT_SUCCESS as a witness for stdlib.h. */518# ifndef _STDLIB_H
450# ifndef EXIT_SUCCESS519# define _STDLIB_H 1
451# define EXIT_SUCCESS 0
452# endif520# endif
453# endif521# endif
454# endif522# endif
@@ -456,8 +524,8 @@ typedef short yytype_int16; · 1 unmodified line
456# endif524# endif
457 525
458# ifdef YYSTACK_ALLOC526# ifdef YYSTACK_ALLOC
459 /* Pacify GCC's 'empty if-body' warning. */527 /* Pacify GCC's `empty if-body' warning. */
460# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)528# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
461# ifndef YYSTACK_ALLOC_MAXIMUM529# ifndef YYSTACK_ALLOC_MAXIMUM
462 /* The OS might guarantee only one guard page at the bottom of the stack,530 /* The OS might guarantee only one guard page at the bottom of the stack,
463 and a page size can be as small as 4096 bytes. So we cannot safely531 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
471# ifndef YYSTACK_ALLOC_MAXIMUM539# ifndef YYSTACK_ALLOC_MAXIMUM
472# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM540# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
473# endif541# endif
474# if (defined __cplusplus && ! defined EXIT_SUCCESS \542# if (defined __cplusplus && ! defined _STDLIB_H \
475 && ! ((defined YYMALLOC || defined malloc) \543 && ! ((defined YYMALLOC || defined malloc) \
476 && (defined YYFREE || defined free)))544 && (defined YYFREE || defined free)))
477# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */545# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
478# ifndef EXIT_SUCCESS546# ifndef _STDLIB_H
479# define EXIT_SUCCESS 0547# define _STDLIB_H 1
480# endif548# endif
481# endif549# endif
482# ifndef YYMALLOC550# ifndef YYMALLOC
483# define YYMALLOC malloc551# define YYMALLOC malloc
484# if ! defined malloc && ! defined EXIT_SUCCESS552# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
553 || defined __cplusplus || defined _MSC_VER)
485void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */554void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
486# endif555# endif
487# endif556# endif
488# ifndef YYFREE557# ifndef YYFREE
489# define YYFREE free558# define YYFREE free
490# if ! defined free && ! defined EXIT_SUCCESS559# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
560 || defined __cplusplus || defined _MSC_VER)
491void free (void *); /* INFRINGES ON USER NAME SPACE */561void free (void *); /* INFRINGES ON USER NAME SPACE */
492# endif562# endif
493# endif563# endif
@@ -497,14 +567,14 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ · 3 unmodified lines
497 567
498#if (! defined yyoverflow \568#if (! defined yyoverflow \
499 && (! defined __cplusplus \569 && (! defined __cplusplus \
500 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))570 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
501 571
502/* A type that is properly aligned for any stack member. */572/* A type that is properly aligned for any stack member. */
503union yyalloc573union yyalloc
504{574{
505 yytype_int16 yyss_alloc;575 yytype_int16 yyss;
506 YYSTYPE yyvs_alloc;576 YYSTYPE yyvs;
507};577 };
508 578
509/* The size of the maximum gap between one aligned stack and the next. */579/* The size of the maximum gap between one aligned stack and the next. */
510# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)580# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -515,50 +585,46 @@ union yyalloc · 4 unmodified lines
515 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \585 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
516 + YYSTACK_GAP_MAXIMUM)586 + YYSTACK_GAP_MAXIMUM)
517 587
518# define YYCOPY_NEEDED 1588/* 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
519 605
520/* Relocate STACK from its old location to the new one. The606/* Relocate STACK from its old location to the new one. The
521 local variables YYSIZE and YYSTACKSIZE give the old and new number of607 local variables YYSIZE and YYSTACKSIZE give the old and new number of
522 elements in the stack, and YYPTR gives the new location of the608 elements in the stack, and YYPTR gives the new location of the
523 stack. Advance YYPTR to a properly aligned location for the next609 stack. Advance YYPTR to a properly aligned location for the next
524 stack. */610 stack. */
525# define YYSTACK_RELOCATE(Stack_alloc, Stack) \611# define YYSTACK_RELOCATE(Stack) \
526 do \612 do \
527 { \613 { \
528 YYSIZE_T yynewbytes; \614 YYSIZE_T yynewbytes; \
529 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \615 YYCOPY (&yyptr->Stack, Stack, yysize); \
530 Stack = &yyptr->Stack_alloc; \616 Stack = &yyptr->Stack; \
531 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \617 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
532 yyptr += yynewbytes / sizeof (*yyptr); \618 yyptr += yynewbytes / sizeof (*yyptr); \
533 } \619 } \
534 while (0)620 while (YYID (0))
535 621
536#endif622#endif
537 623
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
558/* YYFINAL -- State number of the termination state. */624/* YYFINAL -- State number of the termination state. */
559#define YYFINAL 122625#define YYFINAL 122
560/* YYLAST -- Last index in YYTABLE. */626/* YYLAST -- Last index in YYTABLE. */
561#define YYLAST 1181627#define YYLAST 1312
562 628
563/* YYNTOKENS -- Number of terminals. */629/* YYNTOKENS -- Number of terminals. */
564#define YYNTOKENS 112630#define YYNTOKENS 112
@@ -566,19 +632,17 @@ union yyalloc · 1 unmodified line
566#define YYNNTS 58632#define YYNNTS 58
567/* YYNRULES -- Number of rules. */633/* YYNRULES -- Number of rules. */
568#define YYNRULES 184634#define YYNRULES 184
569/* YYNSTATES -- Number of states. */635/* YYNRULES -- Number of states. */
570#define YYNSTATES 319636#define YYNSTATES 319
571 637
572/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned638/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
573 by yylex, with out-of-bounds checking. */
574#define YYUNDEFTOK 2639#define YYUNDEFTOK 2
575#define YYMAXUTOK 366640#define YYMAXUTOK 366
576 641
577#define YYTRANSLATE(YYX) \642#define YYTRANSLATE(YYX) \
578 ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)643 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
579 644
580/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM645/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
581 as returned by yylex, without out-of-bounds checking. */
582static const yytype_uint8 yytranslate[] =646static const yytype_uint8 yytranslate[] =
583{647{
584 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,648 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -621,7 +685,97 @@ static const yytype_uint8 yytranslate[] = · 36 unmodified lines
621};685};
622 686
623#if YYDEBUG687#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. */
690static 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. */
714static 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. */
625static const yytype_uint16 yyrline[] =779static const yytype_uint16 yyrline[] =
626{780{
627 0, 184, 184, 185, 189, 190, 191, 195, 197, 199,781 0, 184, 184, 185, 189, 190, 191, 195, 197, 199,
@@ -646,7 +800,7 @@ static const yytype_uint16 yyrline[] = · 18 unmodified lines
646};800};
647#endif801#endif
648 802
649#if YYDEBUG || YYERROR_VERBOSE || 0803#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
650/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.804/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
651 First, the terminals, then, starting at YYNTOKENS, nonterminals. */805 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
652static const char *const yytname[] =806static const char *const yytname[] =
@@ -683,13 +837,13 @@ static const char *const yytname[] = · 30 unmodified lines
683 "equality_expression", "relational_expression", "shift_expression",837 "equality_expression", "relational_expression", "shift_expression",
684 "additive_expression", "multiplicative_expression", "tilda_expression",838 "additive_expression", "multiplicative_expression", "tilda_expression",
685 "cast_expression", "unary_expression", "unary_operator",839 "cast_expression", "unary_expression", "unary_operator",
686 "dur_expression", "postfix_expression", "primary_expression", YY_NULLPTR840 "dur_expression", "postfix_expression", "primary_expression", 0
687};841};
688#endif842#endif
689 843
690# ifdef YYPRINT844# ifdef YYPRINT
691/* YYTOKNUM[NUM] -- (External) token number corresponding to the845/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
692 (internal) symbol number NUM (which must be that of a token). */846 token YYLEX-NUM. */
693static const yytype_uint16 yytoknum[] =847static const yytype_uint16 yytoknum[] =
694{848{
695 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,849 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -707,64 +861,64 @@ static const yytype_uint16 yytoknum[] = · 11 unmodified lines
707};861};
708# endif862# endif
709 863
710#define YYPACT_NINF -246864/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
711 865static const yytype_uint8 yyr1[] =
712#define yypact_value_is_default(Yystate) \866{
713 (!!((Yystate) == (-246)))867 0, 112, 113, 113, 114, 114, 114, 115, 115, 115,
714 868 115, 116, 116, 116, 116, 117, 117, 118, 118, 119,
715#define YYTABLE_NINF -42869 119, 119, 120, 121, 121, 122, 122, 123, 123, 123,
716 870 123, 124, 124, 124, 125, 125, 125, 125, 126, 126,
717#define yytable_value_is_error(Yytable_value) \871 126, 127, 127, 128, 128, 129, 129, 130, 130, 131,
718 0872 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};
719 887
720 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing888/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
721 STATE-NUM. */889static const yytype_uint8 yyr2[] =
722static const yytype_int16 yypact[] =
723{890{
724 419, 15, -246, -246, -246, -246, -246, 639, 1047, 498,891 0, 2, 1, 2, 1, 1, 1, 6, 7, 6,
725 -246, -246, -246, 43, 36, 90, 132, 574, 133, 135,892 7, 2, 4, 2, 4, 1, 0, 1, 2, 1,
726 137, -246, 713, -246, 8, 8, 1047, 1047, 1047, 143,893 1, 1, 2, 1, 3, 1, 3, 8, 7, 8,
727 27, 27, 27, 8, 8, 153, -246, -33, -246, -13,894 7, 1, 1, 0, 1, 1, 1, 1, 1, 1,
728 23, 73, 1047, 164, 147, -246, -246, -2, 9, -246,895 0, 1, 2, 3, 4, 1, 1, 1, 2, 2,
729 -246, 153, -246, 574, -246, -246, -246, -246, -246, 154,896 4, 1, 2, 1, 1, 1, 1, 1, 2, 3,
730 1060, 19, -246, -246, -246, -246, -246, -246, 6, 139,897 2, 2, 5, 7, 5, 7, 6, 7, 5, 7,
731 123, 125, 124, 106, 83, 29, 114, 50, 86, 126,898 5, 2, 3, 1, 2, 1, 3, 1, 3, 1,
732 -246, 8, 88, 38, -246, -246, -246, 168, 162, -246,899 3, 3, 4, 2, 3, 1, 2, 3, 3, 3,
733 165, 171, 166, 1047, 1047, 787, 4, 1047, -246, -246,900 2, 3, 1, 3, 1, 2, 2, 3, 3, 3,
734 -246, 181, -246, -246, -246, 183, 186, 190, 1047, 134,901 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
735 153, 153, 192, -246, -246, 193, -246, 195, 153, 153,902 1, 1, 1, 1, 1, 1, 1, 5, 1, 3,
736 -246, 97, -246, -246, 206, 206, -246, -246, 27, -246,903 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
737 -246, -246, 1047, -246, -246, -246, -246, -246, -246, -246,904 3, 1, 3, 3, 3, 3, 1, 3, 3, 1,
738 -246, -246, -246, -246, -246, -246, -246, 1047, -246, -246,905 3, 3, 1, 3, 3, 3, 1, 3, 1, 3,
739 1047, 8, 1047, 8, 8, 8, 8, 8, 8, 8,906 1, 2, 2, 2, 2, 2, 2, 3, 1, 1,
740 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,907 1, 1, 1, 2, 1, 3, 1, 2, 3, 4,
741 8, 27, -246, 1071, 852, 207, -246, -246, -246, -246,908 3, 2, 2, 1, 1, 1, 1, 1, 1, 1,
742 192, -246, 43, 144, 201, 203, 787, 205, 212, 213,909 1, 1, 3, 3, 2
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
756};910};
757 911
758 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.912/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
759 Performed when YYTABLE does not specify something else to do. Zero913 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
760 means the default is an error. */914 means the default is an error. */
761static const yytype_uint8 yydefact[] =915static const yytype_uint8 yydefact[] =
762{916{
763 33, 173, 176, 177, 174, 175, 73, 0, 0, 0,917 33, 173, 176, 177, 174, 175, 73, 0, 0, 0,
764 158, 159, 162, 0, 0, 0, 0, 0, 0, 0,918 158, 159, 162, 0, 0, 0, 0, 0, 0, 0,
765 0, 34, 0, 161, 0, 0, 0, 0, 0, 0,919 0, 34, 0, 161, 0, 0, 0, 0, 0, 0,
766 0, 0, 0, 0, 0, 0, 160, 35, 36, 37,920 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,
768 46, 0, 4, 51, 56, 55, 54, 57, 53, 0,922 46, 0, 4, 51, 56, 55, 54, 57, 53, 0,
769 75, 77, 178, 79, 179, 180, 181, 85, 116, 118,923 75, 77, 178, 79, 179, 180, 181, 85, 116, 118,
770 120, 122, 124, 126, 128, 131, 136, 139, 142, 146,924 120, 122, 124, 126, 128, 131, 136, 139, 142, 146,
@@ -773,7 +927,7 @@ static const yytype_uint8 yydefact[] = · 2 unmodified lines
773 58, 0, 173, 151, 152, 0, 0, 0, 0, 41,927 58, 0, 173, 151, 152, 0, 0, 0, 0, 41,
774 0, 0, 156, 155, 154, 94, 90, 92, 0, 0,928 0, 0, 156, 155, 154, 94, 90, 92, 0, 0,
775 163, 0, 1, 3, 0, 0, 38, 39, 0, 86,929 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,
777 106, 107, 108, 100, 101, 109, 110, 0, 115, 114,931 106, 107, 108, 100, 101, 109, 110, 0, 115, 114,
778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -794,18 +948,7 @@ static const yytype_uint8 yydefact[] = · 14 unmodified lines
794 10, 30, 28, 49, 0, 0, 29, 27, 50948 10, 30, 28, 49, 0, 0, 29, 27, 50
795};949};
796 950
797 /* YYPGOTO[NTERM-NUM]. */951/* YYDEFGOTO[NTERM-NUM]. */
798static 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]. */
809static const yytype_int16 yydefgoto[] =952static const yytype_int16 yydefgoto[] =
810{953{
811 -1, 43, 44, 274, 255, 275, 276, 277, 258, 206,954 -1, 43, 44, 274, 255, 275, 276, 277, 258, 206,
@@ -816,65 +959,126 @@ static const yytype_int16 yydefgoto[] = · 4 unmodified lines
816 77, 78, 79, 80, 81, 82, 83, 84959 77, 78, 79, 80, 81, 82, 83, 84
817};960};
818 961
819 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If962/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
820 positive, shift that token. If negative, reduce the rule whose963 STATE-NUM. */
821 number is the opposite. If YYTABLE_NINF, syntax error. */964#define YYPACT_NINF -247
965static 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]. */
1002static 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
822static const yytype_int16 yytable[] =1017static const yytype_int16 yytable[] =
823{1018{
824 110, 111, 112, 96, 87, 88, 207, 129, 239, 178,1019 110, 111, 112, 96, 87, 88, 207, 129, 239, 131,
825 119, 102, 2, 3, 4, 5, 186, 252, -41, 101,1020 119, 178, 186, -41, 256, 45, 46, 252, 52, 101,
826 7, 256, 8, 105, 106, 107, 109, 10, 11, 12,1021 103, 104, 109, 105, 106, 107, 174, 90, 8, 113,
827 109, 283, 45, 46, 52, 103, 104, 151, 197, 121,1022 114, 283, 175, 102, 2, 3, 4, 5, 130, 121,
828 187, 199, 311, 90, 113, 114, 91, 9, 93, 13,1023 197, 187, 7, 199, 8, 13, 131, 109, 151, 91,
829 174, 152, 8, 13, 23, 312, 175, 297, 24, 25,1024 311, 316, 180, 93, 312, 9, 9, 297, 45, 46,
830 299, 26, 27, 28, -31, -31, 195, 196, 188, 317,1025 299, 52, 152, 109, 176, 177, 195, 196, 317, 188,
831 109, 167, 168, 169, 202, 203, 45, 46, 52, 280,1026 13, -31, -31, 300, 202, 203, 130, 172, 131, 280,
832 300, 32, 33, 34, -32, -32, 85, 130, 176, 177,1027 94, 85, 179, 26, 27, 28, 13, 95, 131, 131,
833 184, 185, 172, 13, 189, 124, 125, 36, 208, 118,1028 184, 185, 191, 192, 189, 118, 97, 257, 208, 98,
834 253, 254, 94, 316, 257, 194, 238, 243, 9, 159,1029 253, 254, 131, 243, 108, 194, 193, 131, 238, 132,
835 160, 161, 162, 126, 127, 41, 163, 164, 42, 229,1030 99, 204, 133, 134, 135, 136, 137, 138, 139, 140,
836 230, 231, 308, 221, 222, 223, 224, 148, 149, 210,1031 141, 142, 308, 131, 131, 143, 190, 241, 144, 131,
837 157, 158, 273, 165, 166, 281, 219, 220, 284, 225,1032 145, 146, 273, 242, 115, 281, 126, 127, 284, 131,
838 226, 233, 227, 228, 95, 97, 98, -2, 99, 214,1033 42, 233, 131, 246, 131, 120, 247, 122, 263, 214,
839 1, 2, 3, 4, 5, 108, 115, 250, 6, 7,1034 1, 2, 3, 4, 5, -32, -32, 250, 6, 7,
840 178, 8, 120, 9, 122, 131, 10, 11, 12, 153,1035 131, 8, 178, 9, 290, 131, 10, 11, 12, 291,
841 154, 236, 156, 13, 155, 170, 307, 180, 171, 173,1036 131, 236, 154, 13, 292, 153, 307, 155, 124, 125,
842 14, 179, 181, 15, 16, 17, 18, 19, 20, 182,1037 14, 148, 149, 15, 16, 17, 18, 19, 20, 156,
843 21, 22, 190, 23, 183, 88, 191, 24, 25, 192,1038 21, 22, 170, 23, 182, 88, 171, 24, 25, 173,
844 26, 27, 28, 193, 201, 85, 8, 198, 204, 205,1039 26, 27, 28, 159, 160, 161, 162, 221, 222, 223,
845 237, 29, 30, 31, 241, 240, 242, 244, 249, 251,1040 224, 29, 30, 31, 167, 168, 169, 229, 230, 231,
846 32, 33, 34, 35, 245, 259, 246, 264, 265, 247,1041 32, 33, 34, 35, 157, 158, 183, 264, 265, 163,
847 261, 262, 270, 271, 272, 263, 36, 286, 295, 282,1042 164, 85, 270, 271, 165, 166, 36, 131, 262, 8,
848 267, 268, 269, 288, 285, 248, 290, 291, 37, 38,1043 267, 268, 269, 219, 220, 225, 226, 198, 37, 38,
849 39, 40, 289, 292, 41, 293, 301, 42, 296, 298,1044 39, 40, 289, 201, 41, 205, 301, 42, 237, 227,
850 305, 306, 309, 310, 1, 2, 3, 4, 5, 314,1045 228, 240, 244, 245, 261, 130, 251, 249, 259, 288,
851 123, 315, 6, 7, 303, 8, 304, 9, -16, 294,1046 295, 272, 286, 248, 303, 282, 304, 296, 1, 2,
852 10, 11, 12, 318, 260, 301, 212, 13, 211, 313,1047 3, 4, 5, 285, 123, 301, 6, 7, 293, 8,
853 287, 213, 232, 234, 14, 215, 0, 15, 16, 17,1048 298, 9, -16, 305, 10, 11, 12, 306, 309, 315,
854 18, 19, 20, 216, 21, 22, 217, 23, 218, 0,1049 310, 13, 314, 294, 318, 210, 211, 212, 14, 260,
855 0, 24, 25, 0, 26, 27, 28, 0, 0, 0,1050 313, 15, 16, 17, 18, 19, 20, 287, 21, 22,
856 0, 0, 0, 0, 0, 29, 30, 31, 0, 0,1051 213, 23, 216, 218, 215, 24, 25, 217, 26, 27,
857 0, 0, 0, 0, 32, 33, 34, 35, 0, 0,1052 28, 234, 232, 0, 0, 0, 0, 0, 0, 29,
858 0, 0, 0, 1, 2, 3, 4, 5, 0, 0,1053 30, 31, 0, 0, 0, 0, 0, 0, 32, 33,
859 36, 6, 7, 0, 8, 0, 9, -17, 0, 10,1054 34, 35, 0, 0, 0, 0, 0, 1, 2, 3,
860 11, 12, 37, 38, 39, 40, 13, 0, 41, 0,1055 4, 5, 0, 0, 36, 6, 7, 0, 8, 0,
861 0, 42, 0, 14, 0, 0, 15, 16, 17, 18,1056 9, -17, 0, 10, 11, 12, 37, 38, 39, 40,
862 19, 20, 0, 21, 22, 0, 23, 0, 0, 0,1057 13, 0, 41, 0, 0, 42, 0, 14, 0, 0,
863 24, 25, 0, 26, 27, 28, 0, 0, 0, 0,1058 15, 16, 17, 18, 19, 20, 0, 21, 22, 0,
864 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,1059 23, 0, 0, 0, 24, 25, 0, 26, 27, 28,
865 0, 0, 0, 32, 33, 34, 35, 0, 0, 0,1060 0, 0, 0, 0, 0, 0, 0, 0, 29, 30,
866 0, 0, 1, 2, 3, 4, 5, 0, 0, 36,1061 31, 0, 0, 0, 0, 0, 0, 32, 33, 34,
867 6, 7, 0, 8, 0, 9, 0, 0, 10, 11,1062 35, 0, 0, 0, 0, 0, 1, 2, 3, 4,
868 12, 37, 38, 39, 40, 13, 0, 41, 0, 0,1063 5, 0, 0, 36, 6, 7, 0, 8, 0, 9,
869 42, 0, 14, 0, 0, 15, 16, 17, 18, 19,1064 0, 0, 10, 11, 12, 37, 38, 39, 40, 13,
870 20, 0, 21, 22, 0, 23, 0, 0, 0, 24,1065 0, 41, 0, 0, 42, 0, 14, 0, 0, 15,
871 25, 0, 26, 27, 28, 0, 0, 0, 0, 0,1066 16, 17, 18, 19, 20, 0, 21, 22, 0, 23,
872 0, 0, 0, 29, 30, 31, 0, 0, 0, 0,1067 0, 0, 0, 24, 25, 0, 26, 27, 28, 0,
873 0, 0, 32, 33, 34, 35, 0, 0, 0, 0,1068 0, 0, 0, 0, 0, 0, 0, 29, 30, 31,
874 0, 1, 2, 3, 4, 5, 0, 0, 36, 6,1069 0, 0, 0, 0, 0, 0, 32, 33, 34, 35,
875 7, 0, 8, 0, 9, 89, 0, 10, 11, 12,1070 0, 0, 0, 0, 0, 1, 2, 3, 4, 5,
876 37, 38, 39, 40, 13, 0, 41, 0, 0, 42,1071 0, 0, 36, 6, 7, 0, 8, 0, 9, 89,
877 0, 14, 0, 0, 15, 16, 17, 18, 19, 20,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,
878 0, 0, 22, 0, 23, 0, 0, 0, 24, 25,1082 0, 0, 22, 0, 23, 0, 0, 0, 24, 25,
879 0, 26, 27, 28, 0, 0, 0, 0, 0, 0,1083 0, 26, 27, 28, 0, 0, 0, 0, 0, 0,
880 0, 0, 29, 30, 31, 0, 0, 0, 0, 0,1084 0, 0, 29, 30, 31, 0, 0, 0, 0, 0,
@@ -927,77 +1131,90 @@ static const yytype_int16 yytable[] = · 46 unmodified lines
927 0, 0, 24, 25, 0, 26, 27, 28, 0, 0,1131 0, 0, 24, 25, 0, 26, 27, 28, 0, 0,
928 0, 0, 0, 0, 0, 0, 0, 30, 31, 0,1132 0, 0, 0, 0, 0, 0, 0, 30, 31, 0,
929 1, 2, 3, 4, 5, 32, 33, 34, 35, 7,1133 1, 2, 3, 4, 5, 32, 33, 34, 35, 7,
930 0, 8, 0, 0, 0, 0, 10, 11, 12, 132,1134 0, 8, 0, 0, 0, 0, 10, 11, 12, 0,
931 0, 36, 0, 13, 102, 2, 3, 4, 5, 0,1135 0, 36, 0, 13, 0, 0, 0, 0, 0, 0,
932 0, 0, 0, 7, 0, 8, 40, 0, 0, 41,1136 0, 0, 0, 0, 0, 0, 40, 0, 0, 41,
933 0, 0, 42, 23, 0, 0, 0, 24, 25, 0,1137 0, 0, 42, 23, 0, 0, 0, 24, 25, 0,
934 26, 27, 28, 0, 0, 0, 0, 0, 0, 0,1138 26, 27, 28, 0, 0, 0, 0, 0, 0, 0,
935 0, 0, 30, 31, 0, 0, 0, 0, 0, 0,1139 0, 0, 30, 31, 0, 102, 2, 3, 4, 5,
936 32, 33, 34, 35, 26, 27, 28, 0, 0, 0,1140 32, 33, 34, 35, 7, 0, 8, 0, 0, 0,
937 0, 0, 0, 0, 0, 0, 36, 133, 134, 135,1141 0, 10, 11, 12, 0, 0, 36, 0, 0, 0,
938 136, 137, 138, 139, 140, 141, 142, 0, 0, 0,
939 143, 40, 0, 144, 41, 145, 146, 42, 0, 0,
940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1142 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,
941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
942 0, 421146 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
943};1151};
944 1152
945static const yytype_int16 yycheck[] =1153static const yytype_int16 yycheck[] =
946{1154{
947 30, 31, 32, 17, 7, 8, 125, 51, 182, 83,1155 30, 31, 32, 17, 7, 8, 125, 51, 182, 9,
948 40, 3, 4, 5, 6, 7, 95, 16, 3, 22,1156 40, 83, 95, 3, 16, 0, 0, 16, 0, 22,
949 12, 16, 14, 26, 27, 28, 3, 19, 20, 21,1157 24, 25, 3, 26, 27, 28, 12, 9, 14, 33,
950 3, 256, 0, 0, 0, 24, 25, 31, 112, 42,1158 34, 256, 18, 3, 4, 5, 6, 7, 52, 42,
951 36, 115, 11, 9, 33, 34, 3, 16, 12, 26,1159 112, 36, 12, 115, 14, 26, 9, 3, 31, 3,
952 12, 45, 14, 26, 46, 300, 18, 282, 50, 51,1160 11, 11, 15, 12, 300, 16, 16, 282, 43, 43,
953 285, 53, 54, 55, 97, 98, 110, 111, 64, 314,1161 285, 43, 45, 3, 50, 51, 110, 111, 314, 64,
954 3, 21, 22, 23, 118, 119, 44, 44, 44, 253,1162 26, 97, 98, 13, 118, 119, 90, 81, 9, 253,
955 13, 73, 74, 75, 97, 98, 71, 53, 50, 51,1163 12, 71, 13, 53, 54, 55, 26, 12, 9, 9,
956 93, 94, 81, 26, 97, 97, 98, 89, 128, 76,1164 93, 94, 13, 13, 97, 76, 12, 99, 128, 11,
957 99, 100, 12, 11, 99, 108, 180, 186, 16, 26,1165 99, 100, 9, 186, 12, 108, 13, 9, 180, 11,
958 27, 28, 29, 104, 105, 107, 87, 88, 110, 167,1166 11, 111, 77, 78, 79, 80, 81, 82, 83, 84,
959 168, 169, 296, 159, 160, 161, 162, 108, 109, 132,1167 85, 86, 296, 9, 9, 90, 11, 13, 93, 9,
960 24, 25, 251, 19, 20, 254, 157, 158, 257, 163,1168 95, 96, 251, 13, 3, 254, 104, 105, 257, 9,
961 164, 171, 165, 166, 12, 12, 11, 0, 11, 152,1169 110, 171, 9, 13, 9, 89, 13, 0, 13, 152,
962 3, 4, 5, 6, 7, 12, 3, 201, 11, 12,1170 3, 4, 5, 6, 7, 97, 98, 201, 11, 12,
963 234, 14, 89, 16, 0, 11, 19, 20, 21, 30,1171 9, 14, 234, 16, 13, 9, 19, 20, 21, 13,
964 47, 174, 48, 26, 49, 89, 295, 15, 52, 91,1172 9, 174, 47, 26, 13, 30, 295, 49, 97, 98,
965 33, 13, 17, 36, 37, 38, 39, 40, 41, 18,1173 33, 108, 109, 36, 37, 38, 39, 40, 41, 48,
966 43, 44, 11, 46, 28, 198, 13, 50, 51, 13,1174 43, 44, 89, 46, 18, 198, 52, 50, 51, 91,
967 53, 54, 55, 13, 9, 71, 14, 14, 111, 3,1175 53, 54, 55, 26, 27, 28, 29, 159, 160, 161,
968 3, 64, 65, 66, 13, 71, 13, 12, 14, 9,1176 162, 64, 65, 66, 21, 22, 23, 167, 168, 169,
969 73, 74, 75, 76, 12, 14, 13, 241, 242, 13,1177 73, 74, 75, 76, 24, 25, 28, 241, 242, 87,
970 3, 10, 246, 247, 15, 13, 89, 12, 100, 16,1178 88, 71, 246, 247, 19, 20, 89, 9, 10, 14,
971 243, 244, 245, 35, 16, 15, 13, 13, 101, 102,1179 243, 244, 245, 157, 158, 163, 164, 14, 101, 102,
972 103, 104, 266, 13, 107, 17, 286, 110, 99, 17,1180 103, 104, 266, 9, 107, 3, 286, 110, 3, 165,
973 11, 11, 17, 17, 3, 4, 5, 6, 7, 13,1181 166, 71, 12, 12, 3, 279, 9, 14, 14, 35,
974 44, 9, 11, 12, 288, 14, 290, 16, 17, 277,1182 100, 15, 12, 15, 288, 16, 290, 99, 3, 4,
975 19, 20, 21, 315, 208, 315, 150, 26, 147, 301,1183 5, 6, 7, 16, 43, 315, 11, 12, 17, 14,
976 262, 151, 170, 173, 33, 153, -1, 36, 37, 38,1184 17, 16, 17, 11, 19, 20, 21, 11, 17, 9,
977 39, 40, 41, 154, 43, 44, 155, 46, 156, -1,1185 17, 26, 13, 277, 315, 131, 147, 150, 33, 208,
978 -1, 50, 51, -1, 53, 54, 55, -1, -1, -1,1186 301, 36, 37, 38, 39, 40, 41, 262, 43, 44,
979 -1, -1, -1, -1, -1, 64, 65, 66, -1, -1,1187 151, 46, 154, 156, 153, 50, 51, 155, 53, 54,
980 -1, -1, -1, -1, 73, 74, 75, 76, -1, -1,1188 55, 173, 170, -1, -1, -1, -1, -1, -1, 64,
981 -1, -1, -1, 3, 4, 5, 6, 7, -1, -1,1189 65, 66, -1, -1, -1, -1, -1, -1, 73, 74,
982 89, 11, 12, -1, 14, -1, 16, 17, -1, 19,1190 75, 76, -1, -1, -1, -1, -1, 3, 4, 5,
983 20, 21, 101, 102, 103, 104, 26, -1, 107, -1,1191 6, 7, -1, -1, 89, 11, 12, -1, 14, -1,
984 -1, 110, -1, 33, -1, -1, 36, 37, 38, 39,1192 16, 17, -1, 19, 20, 21, 101, 102, 103, 104,
985 40, 41, -1, 43, 44, -1, 46, -1, -1, -1,1193 26, -1, 107, -1, -1, 110, -1, 33, -1, -1,
986 50, 51, -1, 53, 54, 55, -1, -1, -1, -1,1194 36, 37, 38, 39, 40, 41, -1, 43, 44, -1,
987 -1, -1, -1, -1, 64, 65, 66, -1, -1, -1,1195 46, -1, -1, -1, 50, 51, -1, 53, 54, 55,
988 -1, -1, -1, 73, 74, 75, 76, -1, -1, -1,1196 -1, -1, -1, -1, -1, -1, -1, -1, 64, 65,
989 -1, -1, 3, 4, 5, 6, 7, -1, -1, 89,1197 66, -1, -1, -1, -1, -1, -1, 73, 74, 75,
990 11, 12, -1, 14, -1, 16, -1, -1, 19, 20,1198 76, -1, -1, -1, -1, -1, 3, 4, 5, 6,
991 21, 101, 102, 103, 104, 26, -1, 107, -1, -1,1199 7, -1, -1, 89, 11, 12, -1, 14, -1, 16,
992 110, -1, 33, -1, -1, 36, 37, 38, 39, 40,1200 -1, -1, 19, 20, 21, 101, 102, 103, 104, 26,
993 41, -1, 43, 44, -1, 46, -1, -1, -1, 50,1201 -1, 107, -1, -1, 110, -1, 33, -1, -1, 36,
994 51, -1, 53, 54, 55, -1, -1, -1, -1, -1,1202 37, 38, 39, 40, 41, -1, 43, 44, -1, 46,
995 -1, -1, -1, 64, 65, 66, -1, -1, -1, -1,1203 -1, -1, -1, 50, 51, -1, 53, 54, 55, -1,
996 -1, -1, 73, 74, 75, 76, -1, -1, -1, -1,1204 -1, -1, -1, -1, -1, -1, -1, 64, 65, 66,
997 -1, 3, 4, 5, 6, 7, -1, -1, 89, 11,1205 -1, -1, -1, -1, -1, -1, 73, 74, 75, 76,
998 12, -1, 14, -1, 16, 17, -1, 19, 20, 21,1206 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
999 101, 102, 103, 104, 26, -1, 107, -1, -1, 110,1207 -1, -1, 89, 11, 12, -1, 14, -1, 16, 17,
1000 -1, 33, -1, -1, 36, 37, 38, 39, 40, 41,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,
1001 -1, -1, 44, -1, 46, -1, -1, -1, 50, 51,1218 -1, -1, 44, -1, 46, -1, -1, -1, 50, 51,
1002 -1, 53, 54, 55, -1, -1, -1, -1, -1, -1,1219 -1, 53, 54, 55, -1, -1, -1, -1, -1, -1,
1003 -1, -1, 64, 65, 66, -1, -1, -1, -1, -1,1220 -1, -1, 64, 65, 66, -1, -1, -1, -1, -1,
@@ -1050,23 +1267,27 @@ static const yytype_int16 yycheck[] = · 46 unmodified lines
1050 -1, -1, 50, 51, -1, 53, 54, 55, -1, -1,1267 -1, -1, 50, 51, -1, 53, 54, 55, -1, -1,
1051 -1, -1, -1, -1, -1, -1, -1, 65, 66, -1,1268 -1, -1, -1, -1, -1, -1, -1, 65, 66, -1,
1052 3, 4, 5, 6, 7, 73, 74, 75, 76, 12,1269 3, 4, 5, 6, 7, 73, 74, 75, 76, 12,
1053 -1, 14, -1, -1, -1, -1, 19, 20, 21, 9,1270 -1, 14, -1, -1, -1, -1, 19, 20, 21, -1,
1054 -1, 89, -1, 26, 3, 4, 5, 6, 7, -1,1271 -1, 89, -1, 26, -1, -1, -1, -1, -1, -1,
1055 -1, -1, -1, 12, -1, 14, 104, -1, -1, 107,1272 -1, -1, -1, -1, -1, -1, 104, -1, -1, 107,
1056 -1, -1, 110, 46, -1, -1, -1, 50, 51, -1,1273 -1, -1, 110, 46, -1, -1, -1, 50, 51, -1,
1057 53, 54, 55, -1, -1, -1, -1, -1, -1, -1,1274 53, 54, 55, -1, -1, -1, -1, -1, -1, -1,
1058 -1, -1, 65, 66, -1, -1, -1, -1, -1, -1,1275 -1, -1, 65, 66, -1, 3, 4, 5, 6, 7,
1059 73, 74, 75, 76, 53, 54, 55, -1, -1, -1,1276 73, 74, 75, 76, 12, -1, 14, -1, -1, -1,
1060 -1, -1, -1, -1, -1, -1, 89, 77, 78, 79,1277 -1, 19, 20, 21, -1, -1, 89, -1, -1, -1,
1061 80, 81, 82, 83, 84, 85, 86, -1, -1, -1,1278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1062 90, 104, -1, 93, 107, 95, 96, 110, -1, -1,1279 -1, 104, -1, -1, 107, -1, -1, 110, 46, -1,
1280 -1, -1, 50, 51, -1, 53, 54, 55, -1, -1,
1063 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,1281 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1282 -1, -1, -1, -1, -1, 73, 74, 75, -1, -1,
1064 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,1283 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1065 -1, 1101284 -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
1066};1287};
1067 1288
1068 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing1289/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1069 symbol of state STATE-NUM. */1290 symbol of state STATE-NUM. */
1070static const yytype_uint8 yystos[] =1291static const yytype_uint8 yystos[] =
1071{1292{
1072 0, 3, 4, 5, 6, 7, 11, 12, 14, 16,1293 0, 3, 4, 5, 6, 7, 11, 12, 14, 16,
@@ -1081,8 +1302,8 @@ static const yytype_uint8 yystos[] = · 8 unmodified lines
1081 132, 3, 122, 12, 12, 12, 133, 12, 11, 11,1302 132, 3, 122, 12, 12, 12, 133, 12, 11, 11,
1082 11, 139, 3, 165, 165, 139, 139, 139, 12, 3,1303 11, 139, 3, 165, 165, 139, 139, 139, 12, 3,
1083 129, 129, 129, 165, 165, 3, 145, 146, 76, 129,1304 129, 129, 129, 165, 165, 3, 145, 146, 76, 129,
1084 89, 139, 0, 113, 97, 98, 104, 105, 126, 145,1305 89, 139, 0, 114, 97, 98, 104, 105, 126, 145,
1085 132, 11, 9, 77, 78, 79, 80, 81, 82, 83,1306 133, 9, 11, 77, 78, 79, 80, 81, 82, 83,
1086 84, 85, 86, 90, 93, 95, 96, 150, 108, 109,1307 84, 85, 86, 90, 93, 95, 96, 150, 108, 109,
1087 151, 31, 45, 30, 47, 49, 48, 24, 25, 26,1308 151, 31, 45, 30, 47, 49, 48, 24, 25, 26,
1088 27, 28, 29, 87, 88, 19, 20, 21, 22, 23,1309 27, 28, 29, 87, 88, 19, 20, 21, 22, 23,
@@ -1090,7 +1311,7 @@ static const yytype_uint8 yystos[] = · 1 unmodified line
1090 15, 17, 18, 28, 139, 139, 138, 36, 64, 139,1311 15, 17, 18, 28, 139, 139, 138, 36, 64, 139,
1091 11, 13, 13, 13, 139, 145, 145, 142, 14, 142,1312 11, 13, 13, 13, 139, 145, 145, 142, 14, 142,
1092 143, 9, 145, 145, 111, 3, 121, 121, 129, 130,1313 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,
1094 159, 160, 160, 160, 160, 161, 161, 162, 162, 163,1315 159, 160, 160, 160, 160, 161, 161, 162, 162, 163,
1095 163, 163, 164, 129, 168, 13, 139, 3, 142, 122,1316 163, 163, 164, 129, 168, 13, 139, 3, 142, 122,
1096 71, 13, 13, 138, 12, 12, 13, 13, 15, 14,1317 71, 13, 13, 138, 12, 12, 13, 13, 15, 14,
@@ -1103,90 +1324,96 @@ static const yytype_uint8 yystos[] = · 6 unmodified lines
1103 17, 11, 137, 146, 13, 9, 11, 137, 1311324 17, 11, 137, 146, 13, 9, 11, 137, 131
1104};1325};
1105 1326
1106 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */1327#define yyerrok (yyerrstatus = 0)
1107static const yytype_uint8 yyr1[] =1328#define yyclearin (yychar = YYEMPTY)
1108{1329#define YYEMPTY (-2)
1109 0, 112, 113, 113, 114, 114, 114, 115, 115, 115,1330#define YYEOF 0
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};
1129 1331
1130 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */1332#define YYACCEPT goto yyacceptlab
1131static const yytype_uint8 yyr2[] =1333#define YYABORT goto yyabortlab
1132{1334#define YYERROR goto yyerrorlab
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};
1153 1335
1154 1336
1155#define yyerrok (yyerrstatus = 0)1337/* Like YYERROR except do call yyerror. This remains here temporarily
1156#define yyclearin (yychar = YYEMPTY)1338 to ease the transition to the new meaning of YYERROR, for GCC.
1157#define YYEMPTY (-2)1339 Once GCC version 2 has supplanted version 1, this can go. */
1158#define YYEOF 0
1159
1160#define YYACCEPT goto yyacceptlab
1161#define YYABORT goto yyabortlab
1162#define YYERROR goto yyerrorlab
1163 1340
1341#define YYFAIL goto yyerrlab
1164 1342
1165#define YYRECOVERING() (!!yyerrstatus)1343#define YYRECOVERING() (!!yyerrstatus)
1166 1344
1167#define YYBACKUP(Token, Value) \1345#define YYBACKUP(Token, Value) \
1168do \1346do \
1169 if (yychar == YYEMPTY) \1347 if (yychar == YYEMPTY && yylen == 1) \
1170 { \1348 { \
1171 yychar = (Token); \1349 yychar = (Token); \
1172 yylval = (Value); \1350 yylval = (Value); \
1173 YYPOPSTACK (yylen); \1351 yytoken = YYTRANSLATE (yychar); \
1174 yystate = *yyssp; \1352 YYPOPSTACK (1); \
1175 goto yybackup; \1353 goto yybackup; \
1176 } \1354 } \
1177 else \1355 else \
1178 { \1356 { \
1179 yyerror (YY_("syntax error: cannot back up")); \1357 yyerror (YY_("syntax error: cannot back up")); \
1180 YYERROR; \1358 YYERROR; \
1181 } \1359 } \
1182while (0)1360while (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
1183 1391
1184/* Error token number */
1185#define YYTERROR 1
1186#define YYERRCODE 256
1187 1392
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
1188 1407
1189 1408
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
1190/* Enable debugging if requested. */1417/* Enable debugging if requested. */
1191#if YYDEBUG1418#if YYDEBUG
1192 1419
@@ -1195,46 +1422,54 @@ while (0) · 2 unmodified lines
1195# define YYFPRINTF fprintf1422# define YYFPRINTF fprintf
1196# endif1423# endif
1197 1424
1198# define YYDPRINTF(Args) \1425# define YYDPRINTF(Args) \
1199do { \1426do { \
1200 if (yydebug) \1427 if (yydebug) \
1201 YYFPRINTF Args; \1428 YYFPRINTF Args; \
1202} while (0)1429} while (YYID (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
1209 1430
1210# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \1431# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1211do { \1432do { \
1212 if (yydebug) \1433 if (yydebug) \
1213 { \1434 { \
1214 YYFPRINTF (stderr, "%s ", Title); \1435 YYFPRINTF (stderr, "%s ", Title); \
1215 yy_symbol_print (stderr, \1436 yy_symbol_print (stderr, \
1216 Type, Value); \1437 Type, Value); \
1217 YYFPRINTF (stderr, "\n"); \1438 YYFPRINTF (stderr, "\n"); \
1218 } \1439 } \
1219} while (0)1440} while (YYID (0))
1220 1441
1221 1442
1222/*----------------------------------------.1443/*--------------------------------.
1223| Print this symbol's value on YYOUTPUT. |1444| Print this symbol on YYOUTPUT. |
1224`----------------------------------------*/1445`--------------------------------*/
1225 1446
1447/*ARGSUSED*/
1448#if (defined __STDC__ || defined __C99__FUNC__ \
1449 || defined __cplusplus || defined _MSC_VER)
1226static void1450static void
1227yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)1451yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1452#else
1453static void
1454yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1455 FILE *yyoutput;
1456 int yytype;
1457 YYSTYPE const * const yyvaluep;
1458#endif
1228{1459{
1229 FILE *yyo = yyoutput;
1230 YYUSE (yyo);
1231 if (!yyvaluep)1460 if (!yyvaluep)
1232 return;1461 return;
1233# ifdef YYPRINT1462# ifdef YYPRINT
1234 if (yytype < YYNTOKENS)1463 if (yytype < YYNTOKENS)
1235 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);1464 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1465# else
1466 YYUSE (yyoutput);
1236# endif1467# endif
1237 YYUSE (yytype);1468 switch (yytype)
1469 {
1470 default:
1471 break;
1472 }
1238}1473}
1239 1474
1240 1475
@@ -1242,11 +1477,22 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue · 1 unmodified line
1242| Print this symbol on YYOUTPUT. |1477| Print this symbol on YYOUTPUT. |
1243`--------------------------------*/1478`--------------------------------*/
1244 1479
1480#if (defined __STDC__ || defined __C99__FUNC__ \
1481 || defined __cplusplus || defined _MSC_VER)
1245static void1482static void
1246yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)1483yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1484#else
1485static void
1486yy_symbol_print (yyoutput, yytype, yyvaluep)
1487 FILE *yyoutput;
1488 int yytype;
1489 YYSTYPE const * const yyvaluep;
1490#endif
1247{1491{
1248 YYFPRINTF (yyoutput, "%s %s (",1492 if (yytype < YYNTOKENS)
1249 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);1493 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1494 else
1495 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1250 1496
1251 yy_symbol_value_print (yyoutput, yytype, yyvaluep);1497 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1252 YYFPRINTF (yyoutput, ")");1498 YYFPRINTF (yyoutput, ")");
@@ -1257,54 +1503,66 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) · 4 unmodified lines
1257| TOP (included). |1503| TOP (included). |
1258`------------------------------------------------------------------*/1504`------------------------------------------------------------------*/
1259 1505
1506#if (defined __STDC__ || defined __C99__FUNC__ \
1507 || defined __cplusplus || defined _MSC_VER)
1260static void1508static void
1261yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)1509yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1510#else
1511static void
1512yy_stack_print (bottom, top)
1513 yytype_int16 *bottom;
1514 yytype_int16 *top;
1515#endif
1262{1516{
1263 YYFPRINTF (stderr, "Stack now");1517 YYFPRINTF (stderr, "Stack now");
1264 for (; yybottom <= yytop; yybottom++)1518 for (; bottom <= top; ++bottom)
1265 {1519 YYFPRINTF (stderr, " %d", *bottom);
1266 int yybot = *yybottom;
1267 YYFPRINTF (stderr, " %d", yybot);
1268 }
1269 YYFPRINTF (stderr, "\n");1520 YYFPRINTF (stderr, "\n");
1270}1521}
1271 1522
1272# define YY_STACK_PRINT(Bottom, Top) \1523# define YY_STACK_PRINT(Bottom, Top) \
1273do { \1524do { \
1274 if (yydebug) \1525 if (yydebug) \
1275 yy_stack_print ((Bottom), (Top)); \1526 yy_stack_print ((Bottom), (Top)); \
1276} while (0)1527} while (YYID (0))
1277 1528
1278 1529
1279/*------------------------------------------------.1530/*------------------------------------------------.
1280| Report that the YYRULE is going to be reduced. |1531| Report that the YYRULE is going to be reduced. |
1281`------------------------------------------------*/1532`------------------------------------------------*/
1282 1533
1534#if (defined __STDC__ || defined __C99__FUNC__ \
1535 || defined __cplusplus || defined _MSC_VER)
1536static void
1537yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1538#else
1283static void1539static void
1284yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)1540yy_reduce_print (yyvsp, yyrule)
1541 YYSTYPE *yyvsp;
1542 int yyrule;
1543#endif
1285{1544{
1286 unsigned long yylno = yyrline[yyrule];
1287 int yynrhs = yyr2[yyrule];1545 int yynrhs = yyr2[yyrule];
1288 int yyi;1546 int yyi;
1547 unsigned long int yylno = yyrline[yyrule];
1289 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",1548 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1290 yyrule - 1, yylno);1549 yyrule - 1, yylno);
1291 /* The symbols being reduced. */1550 /* The symbols being reduced. */
1292 for (yyi = 0; yyi < yynrhs; yyi++)1551 for (yyi = 0; yyi < yynrhs; yyi++)
1293 {1552 {
1294 YYFPRINTF (stderr, " $%d = ", yyi + 1);1553 fprintf (stderr, " $%d = ", yyi + 1);
1295 yy_symbol_print (stderr,1554 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1296 yystos[yyssp[yyi + 1 - yynrhs]],1555 &(yyvsp[(yyi + 1) - (yynrhs)])
1297 &(yyvsp[(yyi + 1) - (yynrhs)])1556 );
1298 );1557 fprintf (stderr, "\n");
1299 YYFPRINTF (stderr, "\n");
1300 }1558 }
1301}1559}
1302 1560
1303# define YY_REDUCE_PRINT(Rule) \1561# define YY_REDUCE_PRINT(Rule) \
1304do { \1562do { \
1305 if (yydebug) \1563 if (yydebug) \
1306 yy_reduce_print (yyssp, yyvsp, Rule); \1564 yy_reduce_print (yyvsp, Rule); \
1307} while (0)1565} while (YYID (0))
1308 1566
1309/* Nonzero means print parse trace. It is left uninitialized so that1567/* Nonzero means print parse trace. It is left uninitialized so that
1310 multiple parsers can coexist. */1568 multiple parsers can coexist. */
@@ -1318,7 +1576,7 @@ int yydebug; · 7 unmodified lines
1318 1576
1319 1577
1320/* YYINITDEPTH -- initial size of the parser's stacks. */1578/* YYINITDEPTH -- initial size of the parser's stacks. */
1321#ifndef YYINITDEPTH1579#ifndef YYINITDEPTH
1322# define YYINITDEPTH 2001580# define YYINITDEPTH 200
1323#endif1581#endif
1324 1582
@@ -1333,6 +1591,7 @@ int yydebug; · 8 unmodified lines
1333# define YYMAXDEPTH 100001591# define YYMAXDEPTH 10000
1334#endif1592#endif
1335 1593
1594
1336 1595
1337#if YYERROR_VERBOSE1596#if YYERROR_VERBOSE
1338 1597
@@ -1341,8 +1600,15 @@ int yydebug; · 2 unmodified lines
1341# define yystrlen strlen1600# define yystrlen strlen
1342# else1601# else
1343/* Return the length of YYSTR. */1602/* Return the length of YYSTR. */
1603#if (defined __STDC__ || defined __C99__FUNC__ \
1604 || defined __cplusplus || defined _MSC_VER)
1344static YYSIZE_T1605static YYSIZE_T
1345yystrlen (const char *yystr)1606yystrlen (const char *yystr)
1607#else
1608static YYSIZE_T
1609yystrlen (yystr)
1610 const char *yystr;
1611#endif
1346{1612{
1347 YYSIZE_T yylen;1613 YYSIZE_T yylen;
1348 for (yylen = 0; yystr[yylen]; yylen++)1614 for (yylen = 0; yystr[yylen]; yylen++)
@@ -1358,8 +1624,16 @@ yystrlen (const char *yystr) · 9 unmodified lines
1358# else1624# else
1359/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in1625/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1360 YYDEST. */1626 YYDEST. */
1627#if (defined __STDC__ || defined __C99__FUNC__ \
1628 || defined __cplusplus || defined _MSC_VER)
1361static char *1629static char *
1362yystpcpy (char *yydest, const char *yysrc)1630yystpcpy (char *yydest, const char *yysrc)
1631#else
1632static char *
1633yystpcpy (yydest, yysrc)
1634 char *yydest;
1635 const char *yysrc;
1636#endif
1363{1637{
1364 char *yyd = yydest;1638 char *yyd = yydest;
1365 const char *yys = yysrc;1639 const char *yys = yysrc;
@@ -1389,27 +1663,27 @@ yytnamerr (char *yyres, const char *yystr) · 23 unmodified lines
1389 char const *yyp = yystr;1663 char const *yyp = yystr;
1390 1664
1391 for (;;)1665 for (;;)
1392 switch (*++yyp)1666 switch (*++yyp)
1393 {1667 {
1394 case '\'':1668 case '\'':
1395 case ',':1669 case ',':
1396 goto do_not_strip_quotes;1670 goto do_not_strip_quotes;
1397 1671
1398 case '\\':1672 case '\\':
1399 if (*++yyp != '\\')1673 if (*++yyp != '\\')
1400 goto do_not_strip_quotes;1674 goto do_not_strip_quotes;
1401 /* Fall through. */1675 /* Fall through. */
1402 default:1676 default:
1403 if (yyres)1677 if (yyres)
1404 yyres[yyn] = *yyp;1678 yyres[yyn] = *yyp;
1405 yyn++;1679 yyn++;
1406 break;1680 break;
1407 1681
1408 case '"':1682 case '"':
1409 if (yyres)1683 if (yyres)
1410 yyres[yyn] = '\0';1684 yyres[yyn] = '\0';
1411 return yyn;1685 return yyn;
1412 }1686 }
1413 do_not_strip_quotes: ;1687 do_not_strip_quotes: ;
1414 }1688 }
1415 1689
@@ -1420,210 +1694,211 @@ yytnamerr (char *yyres, const char *yystr) · 4 unmodified lines
1420}1694}
1421# endif1695# endif
1422 1696
1423/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message1697/* Copy into YYRESULT an error message about the unexpected token
1424 about the unexpected token YYTOKEN for the state stack whose top is1698 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1425 YYSSP.1699 including the terminating null byte. If YYRESULT is null, do not
1426 1700 copy anything; just return the number of bytes that would be
1427 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is1701 copied. As a special case, return 0 if an ordinary "syntax error"
1428 not large enough to hold the message. In that case, also set1702 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1429 *YYMSG_ALLOC to the required number of bytes. Return 2 if the1703 size calculation. */
1430 required number of bytes is too large to store. */1704static YYSIZE_T
1431static int1705yysyntax_error (char *yyresult, int yystate, int yychar)
1432yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1433 yytype_int16 *yyssp, int yytoken)
1434{1706{
1435 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);1707 int yyn = yypact[yystate];
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 }
1521 1708
1522 {1709 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1523 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);1710 return 0;
1524 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))1711 else
1525 return 2;
1526 yysize = yysize1;
1527 }
1528
1529 if (*yymsg_alloc < yysize)
1530 {1712 {
1531 *yymsg_alloc = 2 * yysize;1713 int yytype = YYTRANSLATE (yychar);
1532 if (! (yysize <= *yymsg_alloc1714 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1533 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))1715 YYSIZE_T yysize = yysize0;
1534 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;1716 YYSIZE_T yysize1;
1535 return 1;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;
1536 }1802 }
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;
1557}1803}
1558#endif /* YYERROR_VERBOSE */1804#endif /* YYERROR_VERBOSE */
1805
1559 1806
1560/*-----------------------------------------------.1807/*-----------------------------------------------.
1561| Release the memory associated to this symbol. |1808| Release the memory associated to this symbol. |
1562`-----------------------------------------------*/1809`-----------------------------------------------*/
1563 1810
1811/*ARGSUSED*/
1812#if (defined __STDC__ || defined __C99__FUNC__ \
1813 || defined __cplusplus || defined _MSC_VER)
1564static void1814static void
1565yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)1815yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1816#else
1817static void
1818yydestruct (yymsg, yytype, yyvaluep)
1819 const char *yymsg;
1820 int yytype;
1821 YYSTYPE *yyvaluep;
1822#endif
1566{1823{
1567 YYUSE (yyvaluep);1824 YYUSE (yyvaluep);
1825
1568 if (!yymsg)1826 if (!yymsg)
1569 yymsg = "Deleting";1827 yymsg = "Deleting";
1570 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);1828 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1571 1829
1572 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN1830 switch (yytype)
1573 YYUSE (yytype);1831 {
1574 YY_IGNORE_MAYBE_UNINITIALIZED_END1832
1833 default:
1834 break;
1835 }
1575}1836}
1837
1576 1838
1839/* Prevent warnings from -Wmissing-prototypes. */
1840
1841#ifdef YYPARSE_PARAM
1842#if defined __STDC__ || defined __cplusplus
1843int yyparse (void *YYPARSE_PARAM);
1844#else
1845int yyparse ();
1846#endif
1847#else /* ! YYPARSE_PARAM */
1848#if defined __STDC__ || defined __cplusplus
1849int yyparse (void);
1850#else
1851int yyparse ();
1852#endif
1853#endif /* ! YYPARSE_PARAM */
1577 1854
1578 1855
1579 1856
1580/* The lookahead symbol. */1857/* The look-ahead symbol. */
1581int yychar;1858int yychar;
1582 1859
1583/* The semantic value of the lookahead symbol. */1860/* The semantic value of the look-ahead symbol. */
1584YYSTYPE yylval;1861YYSTYPE yylval;
1862
1585/* Number of syntax errors so far. */1863/* Number of syntax errors so far. */
1586int yynerrs;1864int yynerrs;
1587 1865
1588 1866
1867
1589/*----------.1868/*----------.
1590| yyparse. |1869| yyparse. |
1591`----------*/1870`----------*/
1592 1871
1872#ifdef YYPARSE_PARAM
1873#if (defined __STDC__ || defined __C99__FUNC__ \
1874 || defined __cplusplus || defined _MSC_VER)
1875int
1876yyparse (void *YYPARSE_PARAM)
1877#else
1878int
1879yyparse (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)
1593int1885int
1594yyparse (void)1886yyparse (void)
1595{1887#else
1596 int yystate;1888int
1597 /* Number of tokens to shift before error messages enabled. */1889yyparse ()
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;
1618 1890
1891#endif
1892#endif
1893{
1894
1895 int yystate;
1619 int yyn;1896 int yyn;
1620 int yyresult;1897 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. */
1622 int yytoken = 0;1901 int yytoken = 0;
1623 /* The variables used to return semantic value and location from the
1624 action routines. */
1625 YYSTYPE yyval;
1626
1627#if YYERROR_VERBOSE1902#if YYERROR_VERBOSE
1628 /* Buffer for error messages, and its allocated size. */1903 /* Buffer for error messages, and its allocated size. */
1629 char yymsgbuf[128];1904 char yymsgbuf[128];
@@ -1631,22 +1906,54 @@ yyparse (void) · 1 unmodified line
1631 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;1906 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1632#endif1907#endif
1633 1908
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
1634#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))1929#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1635 1930
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
1636 /* The number of symbols on the RHS of the reduced rule.1938 /* The number of symbols on the RHS of the reduced rule.
1637 Keep to zero when no symbol should be popped. */1939 Keep to zero when no symbol should be popped. */
1638 int yylen = 0;1940 int yylen = 0;
1639 1941
1640 yyssp = yyss = yyssa;
1641 yyvsp = yyvs = yyvsa;
1642 yystacksize = YYINITDEPTH;
1643
1644 YYDPRINTF ((stderr, "Starting parse\n"));1942 YYDPRINTF ((stderr, "Starting parse\n"));
1645 1943
1646 yystate = 0;1944 yystate = 0;
1647 yyerrstatus = 0;1945 yyerrstatus = 0;
1648 yynerrs = 0;1946 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
1650 goto yysetstate;1957 goto yysetstate;
1651 1958
1652/*------------------------------------------------------------.1959/*------------------------------------------------------------.
@@ -1667,23 +1974,25 @@ yyparse (void) · 14 unmodified lines
1667 1974
1668#ifdef yyoverflow1975#ifdef yyoverflow
1669 {1976 {
1670 /* Give user a chance to reallocate the stack. Use copies of1977 /* Give user a chance to reallocate the stack. Use copies of
1671 these so that the &'s don't force the real ones into1978 these so that the &'s don't force the real ones into
1672 memory. */1979 memory. */
1673 YYSTYPE *yyvs1 = yyvs;1980 YYSTYPE *yyvs1 = yyvs;
1674 yytype_int16 *yyss1 = yyss;1981 yytype_int16 *yyss1 = yyss;
1675 1982
1676 /* Each stack pointer address is followed by the size of the1983
1677 data in use in that stack, in bytes. This used to be a1984 /* Each stack pointer address is followed by the size of the
1678 conditional around just the two extra args, but that might1985 data in use in that stack, in bytes. This used to be a
1679 be undefined if yyoverflow is a macro. */1986 conditional around just the two extra args, but that might
1680 yyoverflow (YY_("memory exhausted"),1987 be undefined if yyoverflow is a macro. */
1681 &yyss1, yysize * sizeof (*yyssp),1988 yyoverflow (YY_("memory exhausted"),
1682 &yyvs1, yysize * sizeof (*yyvsp),1989 &yyss1, yysize * sizeof (*yyssp),
1683 &yystacksize);1990 &yyvs1, yysize * sizeof (*yyvsp),
1684 1991
1685 yyss = yyss1;1992 &yystacksize);
1686 yyvs = yyvs1;1993
1994 yyss = yyss1;
1995 yyvs = yyvs1;
1687 }1996 }
1688#else /* no yyoverflow */1997#else /* no yyoverflow */
1689# ifndef YYSTACK_RELOCATE1998# ifndef YYSTACK_RELOCATE
@@ -1691,22 +2000,23 @@ yyparse (void) · 1 unmodified line
1691# else2000# else
1692 /* Extend the stack our own way. */2001 /* Extend the stack our own way. */
1693 if (YYMAXDEPTH <= yystacksize)2002 if (YYMAXDEPTH <= yystacksize)
1694 goto yyexhaustedlab;2003 goto yyexhaustedlab;
1695 yystacksize *= 2;2004 yystacksize *= 2;
1696 if (YYMAXDEPTH < yystacksize)2005 if (YYMAXDEPTH < yystacksize)
1697 yystacksize = YYMAXDEPTH;2006 yystacksize = YYMAXDEPTH;
1698 2007
1699 {2008 {
1700 yytype_int16 *yyss1 = yyss;2009 yytype_int16 *yyss1 = yyss;
1701 union yyalloc *yyptr =2010 union yyalloc *yyptr =
1702 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));2011 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1703 if (! yyptr)2012 if (! yyptr)
1704 goto yyexhaustedlab;2013 goto yyexhaustedlab;
1705 YYSTACK_RELOCATE (yyss_alloc, yyss);2014 YYSTACK_RELOCATE (yyss);
1706 YYSTACK_RELOCATE (yyvs_alloc, yyvs);2015 YYSTACK_RELOCATE (yyvs);
2016
1707# undef YYSTACK_RELOCATE2017# undef YYSTACK_RELOCATE
1708 if (yyss1 != yyssa)2018 if (yyss1 != yyssa)
1709 YYSTACK_FREE (yyss1);2019 YYSTACK_FREE (yyss1);
1710 }2020 }
1711# endif2021# endif
1712#endif /* no yyoverflow */2022#endif /* no yyoverflow */
@@ -1714,18 +2024,16 @@ yyparse (void) · 1 unmodified line
1714 yyssp = yyss + yysize - 1;2024 yyssp = yyss + yysize - 1;
1715 yyvsp = yyvs + yysize - 1;2025 yyvsp = yyvs + yysize - 1;
1716 2026
2027
1717 YYDPRINTF ((stderr, "Stack size increased to %lu\n",2028 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1718 (unsigned long) yystacksize));2029 (unsigned long int) yystacksize));
1719 2030
1720 if (yyss + yystacksize - 1 <= yyssp)2031 if (yyss + yystacksize - 1 <= yyssp)
1721 YYABORT;2032 YYABORT;
1722 }2033 }
1723 2034
1724 YYDPRINTF ((stderr, "Entering state %d\n", yystate));2035 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1725 2036
1726 if (yystate == YYFINAL)
1727 YYACCEPT;
1728
1729 goto yybackup;2037 goto yybackup;
1730 2038
1731/*-----------.2039/*-----------.
@@ -1734,20 +2042,20 @@ yyparse (void) · 2 unmodified lines
1734yybackup:2042yybackup:
1735 2043
1736 /* Do appropriate processing given the current state. Read a2044 /* 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. */
1738 2046
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. */
1740 yyn = yypact[yystate];2048 yyn = yypact[yystate];
1741 if (yypact_value_is_default (yyn))2049 if (yyn == YYPACT_NINF)
1742 goto yydefault;2050 goto yydefault;
1743 2051
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. */
1745 2053
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. */
1747 if (yychar == YYEMPTY)2055 if (yychar == YYEMPTY)
1748 {2056 {
1749 YYDPRINTF ((stderr, "Reading a token: "));2057 YYDPRINTF ((stderr, "Reading a token: "));
1750 yychar = yylex ();2058 yychar = YYLEX;
1751 }2059 }
1752 2060
1753 if (yychar <= YYEOF)2061 if (yychar <= YYEOF)
@@ -1769,27 +2077,29 @@ yybackup: · 15 unmodified lines
1769 yyn = yytable[yyn];2077 yyn = yytable[yyn];
1770 if (yyn <= 0)2078 if (yyn <= 0)
1771 {2079 {
1772 if (yytable_value_is_error (yyn))2080 if (yyn == 0 || yyn == YYTABLE_NINF)
1773 goto yyerrlab;2081 goto yyerrlab;
1774 yyn = -yyn;2082 yyn = -yyn;
1775 goto yyreduce;2083 goto yyreduce;
1776 }2084 }
1777 2085
2086 if (yyn == YYFINAL)
2087 YYACCEPT;
2088
1778 /* Count tokens shifted since error; after three, turn off error2089 /* Count tokens shifted since error; after three, turn off error
1779 status. */2090 status. */
1780 if (yyerrstatus)2091 if (yyerrstatus)
1781 yyerrstatus--;2092 yyerrstatus--;
1782 2093
1783 /* Shift the lookahead token. */2094 /* Shift the look-ahead token. */
1784 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);2095 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1785 2096
1786 /* Discard the shifted token. */2097 /* Discard the shifted token unless it is eof. */
1787 yychar = YYEMPTY;2098 if (yychar != YYEOF)
2099 yychar = YYEMPTY;
1788 2100
1789 yystate = yyn;2101 yystate = yyn;
1790 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1791 *++yyvsp = yylval;2102 *++yyvsp = yylval;
1792 YY_IGNORE_MAYBE_UNINITIALIZED_END
1793 2103
1794 goto yynewstate;2104 goto yynewstate;
1795 2105
@@ -1812,7 +2122,7 @@ yyreduce: · 16 unmodified lines
1812 yylen = yyr2[yyn];2122 yylen = yyr2[yyn];
1813 2123
1814 /* If YYLEN is nonzero, implement the default value of the action:2124 /* If YYLEN is nonzero, implement the default value of the action:
1815 '$$ = $1'.2125 `$$ = $1'.
1816 2126
1817 Otherwise, the following line sets YYVAL to garbage.2127 Otherwise, the following line sets YYVAL to garbage.
1818 This behavior is undocumented and Bison2128 This behavior is undocumented and Bison
@@ -1826,1112 +2136,920 @@ yyreduce: · 7 unmodified lines
1826 switch (yyn)2136 switch (yyn)
1827 {2137 {
1828 case 2:2138 case 2:
1829#line 184 "chuck.y" /* yacc.c:1651 */2139#line 184 "chuck.y"
1830 { (yyval.program) = g_program = new_program( (yyvsp[0].program_section), EM_lineNum ); }2140 { (yyval.program) = g_program = new_program( (yyvsp[(1) - (1)].program_section), EM_lineNum ); ;}
1831#line 1830 "chuck.tab.c" /* yacc.c:1651 */
1832 break;2141 break;
1833 2142
1834 case 3:2143 case 3:
1835#line 185 "chuck.y" /* yacc.c:1651 */2144#line 185 "chuck.y"
1836 { (yyval.program) = g_program = prepend_program( (yyvsp[-1].program_section), (yyvsp[0].program), EM_lineNum ); }2145 { (yyval.program) = g_program = append_program( (yyvsp[(1) - (2)].program), (yyvsp[(2) - (2)].program_section), EM_lineNum ); ;}
1837#line 1836 "chuck.tab.c" /* yacc.c:1651 */
1838 break;2146 break;
1839 2147
1840 case 4:2148 case 4:
1841#line 189 "chuck.y" /* yacc.c:1651 */2149#line 189 "chuck.y"
1842 { (yyval.program_section) = new_section_stmt( (yyvsp[0].stmt_list), EM_lineNum ); }2150 { (yyval.program_section) = new_section_stmt( (yyvsp[(1) - (1)].stmt_list), EM_lineNum ); ;}
1843#line 1842 "chuck.tab.c" /* yacc.c:1651 */
1844 break;2151 break;
1845 2152
1846 case 5:2153 case 5:
1847#line 190 "chuck.y" /* yacc.c:1651 */2154#line 190 "chuck.y"
1848 { (yyval.program_section) = new_section_func_def( (yyvsp[0].func_def), EM_lineNum ); }2155 { (yyval.program_section) = new_section_func_def( (yyvsp[(1) - (1)].func_def), EM_lineNum ); ;}
1849#line 1848 "chuck.tab.c" /* yacc.c:1651 */
1850 break;2156 break;
1851 2157
1852 case 6:2158 case 6:
1853#line 191 "chuck.y" /* yacc.c:1651 */2159#line 191 "chuck.y"
1854 { (yyval.program_section) = new_section_class_def( (yyvsp[0].class_def), EM_lineNum ); }2160 { (yyval.program_section) = new_section_class_def( (yyvsp[(1) - (1)].class_def), EM_lineNum ); ;}
1855#line 1854 "chuck.tab.c" /* yacc.c:1651 */
1856 break;2161 break;
1857 2162
1858 case 7:2163 case 7:
1859#line 196 "chuck.y" /* yacc.c:1651 */2164#line 196 "chuck.y"
1860 { (yyval.class_def) = new_class_def( (yyvsp[-5].ival), (yyvsp[-3].id_list), NULL, (yyvsp[-1].class_body), EM_lineNum ); }2165 { (yyval.class_def) = new_class_def( (yyvsp[(1) - (6)].ival), (yyvsp[(3) - (6)].id_list), NULL, (yyvsp[(5) - (6)].class_body), EM_lineNum ); ;}
1861#line 1860 "chuck.tab.c" /* yacc.c:1651 */
1862 break;2166 break;
1863 2167
1864 case 8:2168 case 8:
1865#line 198 "chuck.y" /* yacc.c:1651 */2169#line 198 "chuck.y"
1866 { (yyval.class_def) = new_class_def( (yyvsp[-6].ival), (yyvsp[-4].id_list), (yyvsp[-3].class_ext), (yyvsp[-1].class_body), EM_lineNum ); }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 ); ;}
1867#line 1866 "chuck.tab.c" /* yacc.c:1651 */
1868 break;2171 break;
1869 2172
1870 case 9:2173 case 9:
1871#line 200 "chuck.y" /* yacc.c:1651 */2174#line 200 "chuck.y"
1872 { (yyval.class_def) = new_iface_def( (yyvsp[-5].ival), (yyvsp[-3].id_list), NULL, (yyvsp[-1].class_body), EM_lineNum ); }2175 { (yyval.class_def) = new_iface_def( (yyvsp[(1) - (6)].ival), (yyvsp[(3) - (6)].id_list), NULL, (yyvsp[(5) - (6)].class_body), EM_lineNum ); ;}
1873#line 1872 "chuck.tab.c" /* yacc.c:1651 */
1874 break;2176 break;
1875 2177
1876 case 10:2178 case 10:
1877#line 202 "chuck.y" /* yacc.c:1651 */2179#line 202 "chuck.y"
1878 { (yyval.class_def) = new_iface_def( (yyvsp[-6].ival), (yyvsp[-4].id_list), (yyvsp[-3].class_ext), (yyvsp[-1].class_body), EM_lineNum ); }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 ); ;}
1879#line 1878 "chuck.tab.c" /* yacc.c:1651 */
1880 break;2181 break;
1881 2182
1882 case 11:2183 case 11:
1883#line 206 "chuck.y" /* yacc.c:1651 */2184#line 206 "chuck.y"
1884 { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[0].id_list), EM_lineNum ); }2185 { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[(2) - (2)].id_list), EM_lineNum ); ;}
1885#line 1884 "chuck.tab.c" /* yacc.c:1651 */
1886 break;2186 break;
1887 2187
1888 case 12:2188 case 12:
1889#line 207 "chuck.y" /* yacc.c:1651 */2189#line 207 "chuck.y"
1890 { (yyval.class_ext) = new_class_ext( (yyvsp[0].id_list), (yyvsp[-2].id_list), EM_lineNum ); }2190 { (yyval.class_ext) = new_class_ext( (yyvsp[(4) - (4)].id_list), (yyvsp[(2) - (4)].id_list), EM_lineNum ); ;}
1891#line 1890 "chuck.tab.c" /* yacc.c:1651 */
1892 break;2191 break;
1893 2192
1894 case 13:2193 case 13:
1895#line 208 "chuck.y" /* yacc.c:1651 */2194#line 208 "chuck.y"
1896 { (yyval.class_ext) = new_class_ext( (yyvsp[0].id_list), NULL, EM_lineNum ); }2195 { (yyval.class_ext) = new_class_ext( (yyvsp[(2) - (2)].id_list), NULL, EM_lineNum ); ;}
1897#line 1896 "chuck.tab.c" /* yacc.c:1651 */
1898 break;2196 break;
1899 2197
1900 case 14:2198 case 14:
1901#line 209 "chuck.y" /* yacc.c:1651 */2199#line 209 "chuck.y"
1902 { (yyval.class_ext) = new_class_ext( (yyvsp[-2].id_list), (yyvsp[0].id_list), EM_lineNum ); }2200 { (yyval.class_ext) = new_class_ext( (yyvsp[(2) - (4)].id_list), (yyvsp[(4) - (4)].id_list), EM_lineNum ); ;}
1903#line 1902 "chuck.tab.c" /* yacc.c:1651 */
1904 break;2201 break;
1905 2202
1906 case 15:2203 case 15:
1907#line 213 "chuck.y" /* yacc.c:1651 */2204#line 213 "chuck.y"
1908 { (yyval.class_body) = (yyvsp[0].class_body); }2205 { (yyval.class_body) = (yyvsp[(1) - (1)].class_body); ;}
1909#line 1908 "chuck.tab.c" /* yacc.c:1651 */
1910 break;2206 break;
1911 2207
1912 case 16:2208 case 16:
1913#line 214 "chuck.y" /* yacc.c:1651 */2209#line 214 "chuck.y"
1914 { (yyval.class_body) = NULL; }2210 { (yyval.class_body) = NULL; ;}
1915#line 1914 "chuck.tab.c" /* yacc.c:1651 */
1916 break;2211 break;
1917 2212
1918 case 17:2213 case 17:
1919#line 218 "chuck.y" /* yacc.c:1651 */2214#line 218 "chuck.y"
1920 { (yyval.class_body) = new_class_body( (yyvsp[0].program_section), EM_lineNum ); }2215 { (yyval.class_body) = new_class_body( (yyvsp[(1) - (1)].program_section), EM_lineNum ); ;}
1921#line 1920 "chuck.tab.c" /* yacc.c:1651 */
1922 break;2216 break;
1923 2217
1924 case 18:2218 case 18:
1925#line 219 "chuck.y" /* yacc.c:1651 */2219#line 219 "chuck.y"
1926 { (yyval.class_body) = prepend_class_body( (yyvsp[-1].program_section), (yyvsp[0].class_body), EM_lineNum ); }2220 { (yyval.class_body) = prepend_class_body( (yyvsp[(1) - (2)].program_section), (yyvsp[(2) - (2)].class_body), EM_lineNum ); ;}
1927#line 1926 "chuck.tab.c" /* yacc.c:1651 */
1928 break;2221 break;
1929 2222
1930 case 19:2223 case 19:
1931#line 224 "chuck.y" /* yacc.c:1651 */2224#line 224 "chuck.y"
1932 { (yyval.program_section) = new_section_stmt( (yyvsp[0].stmt_list), EM_lineNum ); }2225 { (yyval.program_section) = new_section_stmt( (yyvsp[(1) - (1)].stmt_list), EM_lineNum ); ;}
1933#line 1932 "chuck.tab.c" /* yacc.c:1651 */
1934 break;2226 break;
1935 2227
1936 case 20:2228 case 20:
1937#line 225 "chuck.y" /* yacc.c:1651 */2229#line 225 "chuck.y"
1938 { (yyval.program_section) = new_section_func_def( (yyvsp[0].func_def), EM_lineNum ); }2230 { (yyval.program_section) = new_section_func_def( (yyvsp[(1) - (1)].func_def), EM_lineNum ); ;}
1939#line 1938 "chuck.tab.c" /* yacc.c:1651 */
1940 break;2231 break;
1941 2232
1942 case 21:2233 case 21:
1943#line 226 "chuck.y" /* yacc.c:1651 */2234#line 226 "chuck.y"
1944 { (yyval.program_section) = new_section_class_def( (yyvsp[0].class_def), EM_lineNum ); }2235 { (yyval.program_section) = new_section_class_def( (yyvsp[(1) - (1)].class_def), EM_lineNum ); ;}
1945#line 1944 "chuck.tab.c" /* yacc.c:1651 */
1946 break;2236 break;
1947 2237
1948 case 22:2238 case 22:
1949#line 230 "chuck.y" /* yacc.c:1651 */2239#line 230 "chuck.y"
1950 { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[0].id_list), EM_lineNum ); }2240 { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[(2) - (2)].id_list), EM_lineNum ); ;}
1951#line 1950 "chuck.tab.c" /* yacc.c:1651 */
1952 break;2241 break;
1953 2242
1954 case 23:2243 case 23:
1955#line 234 "chuck.y" /* yacc.c:1651 */2244#line 234 "chuck.y"
1956 { (yyval.id_list) = new_id_list( (yyvsp[0].sval), EM_lineNum ); }2245 { (yyval.id_list) = new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
1957#line 1956 "chuck.tab.c" /* yacc.c:1651 */
1958 break;2246 break;
1959 2247
1960 case 24:2248 case 24:
1961#line 235 "chuck.y" /* yacc.c:1651 */2249#line 235 "chuck.y"
1962 { (yyval.id_list) = prepend_id_list( (yyvsp[-2].sval), (yyvsp[0].id_list), EM_lineNum ); }2250 { (yyval.id_list) = prepend_id_list( (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].id_list), EM_lineNum ); ;}
1963#line 1962 "chuck.tab.c" /* yacc.c:1651 */
1964 break;2251 break;
1965 2252
1966 case 25:2253 case 25:
1967#line 239 "chuck.y" /* yacc.c:1651 */2254#line 239 "chuck.y"
1968 { (yyval.id_list) = new_id_list( (yyvsp[0].sval), EM_lineNum ); }2255 { (yyval.id_list) = new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
1969#line 1968 "chuck.tab.c" /* yacc.c:1651 */
1970 break;2256 break;
1971 2257
1972 case 26:2258 case 26:
1973#line 240 "chuck.y" /* yacc.c:1651 */2259#line 240 "chuck.y"
1974 { (yyval.id_list) = prepend_id_list( (yyvsp[-2].sval), (yyvsp[0].id_list), EM_lineNum ); }2260 { (yyval.id_list) = prepend_id_list( (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].id_list), EM_lineNum ); ;}
1975#line 1974 "chuck.tab.c" /* yacc.c:1651 */
1976 break;2261 break;
1977 2262
1978 case 27:2263 case 27:
1979#line 245 "chuck.y" /* yacc.c:1651 */2264#line 245 "chuck.y"
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 ); }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 ); ;}
1981#line 1980 "chuck.tab.c" /* yacc.c:1651 */
1982 break;2266 break;
1983 2267
1984 case 28:2268 case 28:
1985#line 247 "chuck.y" /* yacc.c:1651 */2269#line 247 "chuck.y"
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 ); }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 ); ;}
1987#line 1986 "chuck.tab.c" /* yacc.c:1651 */
1988 break;2271 break;
1989 2272
1990 case 29:2273 case 29:
1991#line 249 "chuck.y" /* yacc.c:1651 */2274#line 249 "chuck.y"
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 ); }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 ); ;}
1993#line 1992 "chuck.tab.c" /* yacc.c:1651 */
1994 break;2276 break;
1995 2277
1996 case 30:2278 case 30:
1997#line 251 "chuck.y" /* yacc.c:1651 */2279#line 251 "chuck.y"
1998 { (yyval.func_def) = new_func_def( (yyvsp[-6].ival), (yyvsp[-5].ival), (yyvsp[-4].type_decl), (yyvsp[-3].sval), NULL, NULL, EM_lineNum ); }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 ); ;}
1999#line 1998 "chuck.tab.c" /* yacc.c:1651 */
2000 break;2281 break;
2001 2282
2002 case 31:2283 case 31:
2003#line 255 "chuck.y" /* yacc.c:1651 */2284#line 255 "chuck.y"
2004 { (yyval.ival) = ae_key_public; }2285 { (yyval.ival) = ae_key_public; ;}
2005#line 2004 "chuck.tab.c" /* yacc.c:1651 */
2006 break;2286 break;
2007 2287
2008 case 32:2288 case 32:
2009#line 256 "chuck.y" /* yacc.c:1651 */2289#line 256 "chuck.y"
2010 { (yyval.ival) = ae_key_private; }2290 { (yyval.ival) = ae_key_private; ;}
2011#line 2010 "chuck.tab.c" /* yacc.c:1651 */
2012 break;2291 break;
2013 2292
2014 case 33:2293 case 33:
2015#line 257 "chuck.y" /* yacc.c:1651 */2294#line 257 "chuck.y"
2016 { (yyval.ival) = ae_key_private; }2295 { (yyval.ival) = ae_key_private; ;}
2017#line 2016 "chuck.tab.c" /* yacc.c:1651 */
2018 break;2296 break;
2019 2297
2020 case 34:2298 case 34:
2021#line 261 "chuck.y" /* yacc.c:1651 */2299#line 261 "chuck.y"
2022 { (yyval.ival) = ae_key_func; }2300 { (yyval.ival) = ae_key_func; ;}
2023#line 2022 "chuck.tab.c" /* yacc.c:1651 */
2024 break;2301 break;
2025 2302
2026 case 35:2303 case 35:
2027#line 262 "chuck.y" /* yacc.c:1651 */2304#line 262 "chuck.y"
2028 { (yyval.ival) = ae_key_public; }2305 { (yyval.ival) = ae_key_public; ;}
2029#line 2028 "chuck.tab.c" /* yacc.c:1651 */
2030 break;2306 break;
2031 2307
2032 case 36:2308 case 36:
2033#line 263 "chuck.y" /* yacc.c:1651 */2309#line 263 "chuck.y"
2034 { (yyval.ival) = ae_key_protected; }2310 { (yyval.ival) = ae_key_protected; ;}
2035#line 2034 "chuck.tab.c" /* yacc.c:1651 */
2036 break;2311 break;
2037 2312
2038 case 37:2313 case 37:
2039#line 264 "chuck.y" /* yacc.c:1651 */2314#line 264 "chuck.y"
2040 { (yyval.ival) = ae_key_private; }2315 { (yyval.ival) = ae_key_private; ;}
2041#line 2040 "chuck.tab.c" /* yacc.c:1651 */
2042 break;2316 break;
2043 2317
2044 case 38:2318 case 38:
2045#line 268 "chuck.y" /* yacc.c:1651 */2319#line 268 "chuck.y"
2046 { (yyval.ival) = ae_key_static; }2320 { (yyval.ival) = ae_key_static; ;}
2047#line 2046 "chuck.tab.c" /* yacc.c:1651 */
2048 break;2321 break;
2049 2322
2050 case 39:2323 case 39:
2051#line 269 "chuck.y" /* yacc.c:1651 */2324#line 269 "chuck.y"
2052 { (yyval.ival) = ae_key_abstract; }2325 { (yyval.ival) = ae_key_abstract; ;}
2053#line 2052 "chuck.tab.c" /* yacc.c:1651 */
2054 break;2326 break;
2055 2327
2056 case 40:2328 case 40:
2057#line 270 "chuck.y" /* yacc.c:1651 */2329#line 270 "chuck.y"
2058 { (yyval.ival) = ae_key_instance; }2330 { (yyval.ival) = ae_key_instance; ;}
2059#line 2058 "chuck.tab.c" /* yacc.c:1651 */
2060 break;2331 break;
2061 2332
2062 case 41:2333 case 41:
2063#line 274 "chuck.y" /* yacc.c:1651 */2334#line 274 "chuck.y"
2064 { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[0].sval), EM_lineNum ), 0, EM_lineNum ); }2335 { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ), 0, EM_lineNum ); ;}
2065#line 2064 "chuck.tab.c" /* yacc.c:1651 */
2066 break;2336 break;
2067 2337
2068 case 42:2338 case 42:
2069#line 275 "chuck.y" /* yacc.c:1651 */2339#line 275 "chuck.y"
2070 { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[-1].sval), EM_lineNum ), 1, EM_lineNum ); }2340 { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[(1) - (2)].sval), EM_lineNum ), 1, EM_lineNum ); ;}
2071#line 2070 "chuck.tab.c" /* yacc.c:1651 */
2072 break;2341 break;
2073 2342
2074 case 43:2343 case 43:
2075#line 279 "chuck.y" /* yacc.c:1651 */2344#line 279 "chuck.y"
2076 { (yyval.type_decl) = new_type_decl( (yyvsp[-1].id_list), 0, EM_lineNum ); }2345 { (yyval.type_decl) = new_type_decl( (yyvsp[(2) - (3)].id_list), 0, EM_lineNum ); ;}
2077#line 2076 "chuck.tab.c" /* yacc.c:1651 */
2078 break;2346 break;
2079 2347
2080 case 44:2348 case 44:
2081#line 280 "chuck.y" /* yacc.c:1651 */2349#line 280 "chuck.y"
2082 { (yyval.type_decl) = new_type_decl( (yyvsp[-2].id_list), 1, EM_lineNum ); }2350 { (yyval.type_decl) = new_type_decl( (yyvsp[(2) - (4)].id_list), 1, EM_lineNum ); ;}
2083#line 2082 "chuck.tab.c" /* yacc.c:1651 */
2084 break;2351 break;
2085 2352
2086 case 45:2353 case 45:
2087#line 289 "chuck.y" /* yacc.c:1651 */2354#line 289 "chuck.y"
2088 { (yyval.type_decl) = (yyvsp[0].type_decl); }2355 { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
2089#line 2088 "chuck.tab.c" /* yacc.c:1651 */
2090 break;2356 break;
2091 2357
2092 case 46:2358 case 46:
2093#line 290 "chuck.y" /* yacc.c:1651 */2359#line 290 "chuck.y"
2094 { (yyval.type_decl) = (yyvsp[0].type_decl); }2360 { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
2095#line 2094 "chuck.tab.c" /* yacc.c:1651 */
2096 break;2361 break;
2097 2362
2098 case 47:2363 case 47:
2099#line 295 "chuck.y" /* yacc.c:1651 */2364#line 295 "chuck.y"
2100 { (yyval.type_decl) = (yyvsp[0].type_decl); }2365 { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
2101#line 2100 "chuck.tab.c" /* yacc.c:1651 */
2102 break;2366 break;
2103 2367
2104 case 48:2368 case 48:
2105#line 296 "chuck.y" /* yacc.c:1651 */2369#line 296 "chuck.y"
2106 { (yyval.type_decl) = add_type_decl_array( (yyvsp[-1].type_decl), (yyvsp[0].array_sub), EM_lineNum ); }2370 { (yyval.type_decl) = add_type_decl_array( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2107#line 2106 "chuck.tab.c" /* yacc.c:1651 */
2108 break;2371 break;
2109 2372
2110 case 49:2373 case 49:
2111#line 300 "chuck.y" /* yacc.c:1651 */2374#line 300 "chuck.y"
2112 { (yyval.arg_list) = new_arg_list( (yyvsp[-1].type_decl), (yyvsp[0].var_decl), EM_lineNum ); }2375 { (yyval.arg_list) = new_arg_list( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].var_decl), EM_lineNum ); ;}
2113#line 2112 "chuck.tab.c" /* yacc.c:1651 */
2114 break;2376 break;
2115 2377
2116 case 50:2378 case 50:
2117#line 301 "chuck.y" /* yacc.c:1651 */2379#line 301 "chuck.y"
2118 { (yyval.arg_list) = prepend_arg_list( (yyvsp[-3].type_decl), (yyvsp[-2].var_decl), (yyvsp[0].arg_list), EM_lineNum ); }2380 { (yyval.arg_list) = prepend_arg_list( (yyvsp[(1) - (4)].type_decl), (yyvsp[(2) - (4)].var_decl), (yyvsp[(4) - (4)].arg_list), EM_lineNum ); ;}
2119#line 2118 "chuck.tab.c" /* yacc.c:1651 */
2120 break;2381 break;
2121 2382
2122 case 51:2383 case 51:
2123#line 305 "chuck.y" /* yacc.c:1651 */2384#line 305 "chuck.y"
2124 { (yyval.stmt_list) = new_stmt_list( (yyvsp[0].stmt), EM_lineNum ); }2385 { (yyval.stmt_list) = new_stmt_list( (yyvsp[(1) - (1)].stmt), EM_lineNum ); ;}
2125#line 2124 "chuck.tab.c" /* yacc.c:1651 */
2126 break;2386 break;
2127 2387
2128 case 52:2388 case 52:
2129#line 306 "chuck.y" /* yacc.c:1651 */2389#line 306 "chuck.y"
2130 { (yyval.stmt_list) = prepend_stmt_list( (yyvsp[-1].stmt), (yyvsp[0].stmt_list), EM_lineNum ); }2390 { (yyval.stmt_list) = append_stmt_list( (yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].stmt), EM_lineNum ); ;}
2131#line 2130 "chuck.tab.c" /* yacc.c:1651 */
2132 break;2391 break;
2133 2392
2134 case 53:2393 case 53:
2135#line 310 "chuck.y" /* yacc.c:1651 */2394#line 310 "chuck.y"
2136 { (yyval.stmt) = (yyvsp[0].stmt); }2395 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2137#line 2136 "chuck.tab.c" /* yacc.c:1651 */
2138 break;2396 break;
2139 2397
2140 case 54:2398 case 54:
2141#line 311 "chuck.y" /* yacc.c:1651 */2399#line 311 "chuck.y"
2142 { (yyval.stmt) = (yyvsp[0].stmt); }2400 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2143#line 2142 "chuck.tab.c" /* yacc.c:1651 */
2144 break;2401 break;
2145 2402
2146 case 55:2403 case 55:
2147#line 312 "chuck.y" /* yacc.c:1651 */2404#line 312 "chuck.y"
2148 { (yyval.stmt) = (yyvsp[0].stmt); }2405 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2149#line 2148 "chuck.tab.c" /* yacc.c:1651 */
2150 break;2406 break;
2151 2407
2152 case 56:2408 case 56:
2153#line 313 "chuck.y" /* yacc.c:1651 */2409#line 313 "chuck.y"
2154 { (yyval.stmt) = (yyvsp[0].stmt); }2410 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2155#line 2154 "chuck.tab.c" /* yacc.c:1651 */
2156 break;2411 break;
2157 2412
2158 case 57:2413 case 57:
2159#line 315 "chuck.y" /* yacc.c:1651 */2414#line 315 "chuck.y"
2160 { (yyval.stmt) = (yyvsp[0].stmt); }2415 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2161#line 2160 "chuck.tab.c" /* yacc.c:1651 */
2162 break;2416 break;
2163 2417
2164 case 58:2418 case 58:
2165#line 319 "chuck.y" /* yacc.c:1651 */2419#line 319 "chuck.y"
2166 { (yyval.stmt) = new_stmt_from_return( NULL, EM_lineNum ); }2420 { (yyval.stmt) = new_stmt_from_return( NULL, EM_lineNum ); ;}
2167#line 2166 "chuck.tab.c" /* yacc.c:1651 */
2168 break;2421 break;
2169 2422
2170 case 59:2423 case 59:
2171#line 320 "chuck.y" /* yacc.c:1651 */2424#line 320 "chuck.y"
2172 { (yyval.stmt) = new_stmt_from_return( (yyvsp[-1].exp), EM_lineNum ); }2425 { (yyval.stmt) = new_stmt_from_return( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2173#line 2172 "chuck.tab.c" /* yacc.c:1651 */
2174 break;2426 break;
2175 2427
2176 case 60:2428 case 60:
2177#line 321 "chuck.y" /* yacc.c:1651 */2429#line 321 "chuck.y"
2178 { (yyval.stmt) = new_stmt_from_break( EM_lineNum ); }2430 { (yyval.stmt) = new_stmt_from_break( EM_lineNum ); ;}
2179#line 2178 "chuck.tab.c" /* yacc.c:1651 */
2180 break;2431 break;
2181 2432
2182 case 61:2433 case 61:
2183#line 322 "chuck.y" /* yacc.c:1651 */2434#line 322 "chuck.y"
2184 { (yyval.stmt) = new_stmt_from_continue( EM_lineNum ); }2435 { (yyval.stmt) = new_stmt_from_continue( EM_lineNum ); ;}
2185#line 2184 "chuck.tab.c" /* yacc.c:1651 */
2186 break;2436 break;
2187 2437
2188 case 62:2438 case 62:
2189#line 327 "chuck.y" /* yacc.c:1651 */2439#line 327 "chuck.y"
2190 { (yyval.stmt) = new_stmt_from_if( (yyvsp[-2].exp), (yyvsp[0].stmt), NULL, EM_lineNum ); }2440 { (yyval.stmt) = new_stmt_from_if( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), NULL, EM_lineNum ); ;}
2191#line 2190 "chuck.tab.c" /* yacc.c:1651 */
2192 break;2441 break;
2193 2442
2194 case 63:2443 case 63:
2195#line 329 "chuck.y" /* yacc.c:1651 */2444#line 329 "chuck.y"
2196 { (yyval.stmt) = new_stmt_from_if( (yyvsp[-4].exp), (yyvsp[-2].stmt), (yyvsp[0].stmt), EM_lineNum ); }2445 { (yyval.stmt) = new_stmt_from_if( (yyvsp[(3) - (7)].exp), (yyvsp[(5) - (7)].stmt), (yyvsp[(7) - (7)].stmt), EM_lineNum ); ;}
2197#line 2196 "chuck.tab.c" /* yacc.c:1651 */
2198 break;2446 break;
2199 2447
2200 case 64:2448 case 64:
2201#line 334 "chuck.y" /* yacc.c:1651 */2449#line 334 "chuck.y"
2202 { (yyval.stmt) = new_stmt_from_while( (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }2450 { (yyval.stmt) = new_stmt_from_while( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
2203#line 2202 "chuck.tab.c" /* yacc.c:1651 */
2204 break;2451 break;
2205 2452
2206 case 65:2453 case 65:
2207#line 336 "chuck.y" /* yacc.c:1651 */2454#line 336 "chuck.y"
2208 { (yyval.stmt) = new_stmt_from_do_while( (yyvsp[-2].exp), (yyvsp[-5].stmt), EM_lineNum ); }2455 { (yyval.stmt) = new_stmt_from_do_while( (yyvsp[(5) - (7)].exp), (yyvsp[(2) - (7)].stmt), EM_lineNum ); ;}
2209#line 2208 "chuck.tab.c" /* yacc.c:1651 */
2210 break;2456 break;
2211 2457
2212 case 66:2458 case 66:
2213#line 338 "chuck.y" /* yacc.c:1651 */2459#line 338 "chuck.y"
2214 { (yyval.stmt) = new_stmt_from_for( (yyvsp[-3].stmt), (yyvsp[-2].stmt), NULL, (yyvsp[0].stmt), EM_lineNum ); }2460 { (yyval.stmt) = new_stmt_from_for( (yyvsp[(3) - (6)].stmt), (yyvsp[(4) - (6)].stmt), NULL, (yyvsp[(6) - (6)].stmt), EM_lineNum ); ;}
2215#line 2214 "chuck.tab.c" /* yacc.c:1651 */
2216 break;2461 break;
2217 2462
2218 case 67:2463 case 67:
2219#line 340 "chuck.y" /* yacc.c:1651 */2464#line 340 "chuck.y"
2220 { (yyval.stmt) = new_stmt_from_for( (yyvsp[-4].stmt), (yyvsp[-3].stmt), (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }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 ); ;}
2221#line 2220 "chuck.tab.c" /* yacc.c:1651 */
2222 break;2466 break;
2223 2467
2224 case 68:2468 case 68:
2225#line 342 "chuck.y" /* yacc.c:1651 */2469#line 342 "chuck.y"
2226 { (yyval.stmt) = new_stmt_from_until( (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }2470 { (yyval.stmt) = new_stmt_from_until( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
2227#line 2226 "chuck.tab.c" /* yacc.c:1651 */
2228 break;2471 break;
2229 2472
2230 case 69:2473 case 69:
2231#line 344 "chuck.y" /* yacc.c:1651 */2474#line 344 "chuck.y"
2232 { (yyval.stmt) = new_stmt_from_do_until( (yyvsp[-2].exp), (yyvsp[-5].stmt), EM_lineNum ); }2475 { (yyval.stmt) = new_stmt_from_do_until( (yyvsp[(5) - (7)].exp), (yyvsp[(2) - (7)].stmt), EM_lineNum ); ;}
2233#line 2232 "chuck.tab.c" /* yacc.c:1651 */
2234 break;2476 break;
2235 2477
2236 case 70:2478 case 70:
2237#line 346 "chuck.y" /* yacc.c:1651 */2479#line 346 "chuck.y"
2238 { (yyval.stmt) = new_stmt_from_loop( (yyvsp[-2].exp), (yyvsp[0].stmt), EM_lineNum ); }2480 { (yyval.stmt) = new_stmt_from_loop( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
2239#line 2238 "chuck.tab.c" /* yacc.c:1651 */
2240 break;2481 break;
2241 2482
2242 case 71:2483 case 71:
2243#line 350 "chuck.y" /* yacc.c:1651 */2484#line 350 "chuck.y"
2244 { (yyval.stmt) = new_stmt_from_code( NULL, EM_lineNum ); }2485 { (yyval.stmt) = new_stmt_from_code( NULL, EM_lineNum ); ;}
2245#line 2244 "chuck.tab.c" /* yacc.c:1651 */
2246 break;2486 break;
2247 2487
2248 case 72:2488 case 72:
2249#line 351 "chuck.y" /* yacc.c:1651 */2489#line 351 "chuck.y"
2250 { (yyval.stmt) = new_stmt_from_code( (yyvsp[-1].stmt_list), EM_lineNum ); }2490 { (yyval.stmt) = new_stmt_from_code( (yyvsp[(2) - (3)].stmt_list), EM_lineNum ); ;}
2251#line 2250 "chuck.tab.c" /* yacc.c:1651 */
2252 break;2491 break;
2253 2492
2254 case 73:2493 case 73:
2255#line 355 "chuck.y" /* yacc.c:1651 */2494#line 355 "chuck.y"
2256 { (yyval.stmt) = NULL; }2495 { (yyval.stmt) = NULL; ;}
2257#line 2256 "chuck.tab.c" /* yacc.c:1651 */
2258 break;2496 break;
2259 2497
2260 case 74:2498 case 74:
2261#line 356 "chuck.y" /* yacc.c:1651 */2499#line 356 "chuck.y"
2262 { (yyval.stmt) = new_stmt_from_expression( (yyvsp[-1].exp), EM_lineNum ); }2500 { (yyval.stmt) = new_stmt_from_expression( (yyvsp[(1) - (2)].exp), EM_lineNum ); ;}
2263#line 2262 "chuck.tab.c" /* yacc.c:1651 */
2264 break;2501 break;
2265 2502
2266 case 75:2503 case 75:
2267#line 360 "chuck.y" /* yacc.c:1651 */2504#line 360 "chuck.y"
2268 { (yyval.exp) = (yyvsp[0].exp); }2505 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2269#line 2268 "chuck.tab.c" /* yacc.c:1651 */
2270 break;2506 break;
2271 2507
2272 case 76:2508 case 76:
2273#line 361 "chuck.y" /* yacc.c:1651 */2509#line 361 "chuck.y"
2274 { (yyval.exp) = prepend_expression( (yyvsp[-2].exp), (yyvsp[0].exp), EM_lineNum ); }2510 { (yyval.exp) = append_expression( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2275#line 2274 "chuck.tab.c" /* yacc.c:1651 */
2276 break;2511 break;
2277 2512
2278 case 77:2513 case 77:
2279#line 365 "chuck.y" /* yacc.c:1651 */2514#line 365 "chuck.y"
2280 { (yyval.exp) = (yyvsp[0].exp); }2515 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2281#line 2280 "chuck.tab.c" /* yacc.c:1651 */
2282 break;2516 break;
2283 2517
2284 case 78:2518 case 78:
2285#line 367 "chuck.y" /* yacc.c:1651 */2519#line 367 "chuck.y"
2286 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), (yyvsp[-1].ival), (yyvsp[0].exp), EM_lineNum ); }2520 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2287#line 2286 "chuck.tab.c" /* yacc.c:1651 */
2288 break;2521 break;
2289 2522
2290 case 79:2523 case 79:
2291#line 371 "chuck.y" /* yacc.c:1651 */2524#line 371 "chuck.y"
2292 { (yyval.exp) = (yyvsp[0].exp); }2525 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2293#line 2292 "chuck.tab.c" /* yacc.c:1651 */
2294 break;2526 break;
2295 2527
2296 case 80:2528 case 80:
2297#line 373 "chuck.y" /* yacc.c:1651 */2529#line 373 "chuck.y"
2298 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), (yyvsp[-1].ival), (yyvsp[0].exp), EM_lineNum ); }2530 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2299#line 2298 "chuck.tab.c" /* yacc.c:1651 */
2300 break;2531 break;
2301 2532
2302 case 81:2533 case 81:
2303#line 377 "chuck.y" /* yacc.c:1651 */2534#line 377 "chuck.y"
2304 { (yyval.array_sub) = new_array_sub( (yyvsp[-1].exp), EM_lineNum ); }2535 { (yyval.array_sub) = new_array_sub( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2305#line 2304 "chuck.tab.c" /* yacc.c:1651 */
2306 break;2536 break;
2307 2537
2308 case 82:2538 case 82:
2309#line 379 "chuck.y" /* yacc.c:1651 */2539#line 379 "chuck.y"
2310 { (yyval.array_sub) = prepend_array_sub( (yyvsp[0].array_sub), (yyvsp[-2].exp), EM_lineNum ); }2540 { (yyval.array_sub) = prepend_array_sub( (yyvsp[(4) - (4)].array_sub), (yyvsp[(2) - (4)].exp), EM_lineNum ); ;}
2311#line 2310 "chuck.tab.c" /* yacc.c:1651 */
2312 break;2541 break;
2313 2542
2314 case 83:2543 case 83:
2315#line 383 "chuck.y" /* yacc.c:1651 */2544#line 383 "chuck.y"
2316 { (yyval.array_sub) = new_array_sub( NULL, EM_lineNum ); }2545 { (yyval.array_sub) = new_array_sub( NULL, EM_lineNum ); ;}
2317#line 2316 "chuck.tab.c" /* yacc.c:1651 */
2318 break;2546 break;
2319 2547
2320 case 84:2548 case 84:
2321#line 384 "chuck.y" /* yacc.c:1651 */2549#line 384 "chuck.y"
2322 { (yyval.array_sub) = prepend_array_sub( (yyvsp[-2].array_sub), NULL, EM_lineNum ); }2550 { (yyval.array_sub) = prepend_array_sub( (yyvsp[(1) - (3)].array_sub), NULL, EM_lineNum ); ;}
2323#line 2322 "chuck.tab.c" /* yacc.c:1651 */
2324 break;2551 break;
2325 2552
2326 case 85:2553 case 85:
2327#line 388 "chuck.y" /* yacc.c:1651 */2554#line 388 "chuck.y"
2328 { (yyval.exp) = (yyvsp[0].exp); }2555 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2329#line 2328 "chuck.tab.c" /* yacc.c:1651 */
2330 break;2556 break;
2331 2557
2332 case 86:2558 case 86:
2333#line 389 "chuck.y" /* yacc.c:1651 */2559#line 389 "chuck.y"
2334 { (yyval.exp) = new_exp_decl( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 0, EM_lineNum ); }2560 { (yyval.exp) = new_exp_decl( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].var_decl_list), 0, EM_lineNum ); ;}
2335#line 2334 "chuck.tab.c" /* yacc.c:1651 */
2336 break;2561 break;
2337 2562
2338 case 87:2563 case 87:
2339#line 390 "chuck.y" /* yacc.c:1651 */2564#line 390 "chuck.y"
2340 { (yyval.exp) = new_exp_decl_external( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 0, EM_lineNum ); }2565 { (yyval.exp) = new_exp_decl_external( (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].var_decl_list), 0, EM_lineNum ); ;}
2341#line 2340 "chuck.tab.c" /* yacc.c:1651 */
2342 break;2566 break;
2343 2567
2344 case 88:2568 case 88:
2345#line 391 "chuck.y" /* yacc.c:1651 */2569#line 391 "chuck.y"
2346 { (yyval.exp) = new_exp_decl_global( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 0, EM_lineNum ); }2570 { (yyval.exp) = new_exp_decl_global( (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].var_decl_list), 0, EM_lineNum ); ;}
2347#line 2346 "chuck.tab.c" /* yacc.c:1651 */
2348 break;2571 break;
2349 2572
2350 case 89:2573 case 89:
2351#line 392 "chuck.y" /* yacc.c:1651 */2574#line 392 "chuck.y"
2352 { (yyval.exp) = new_exp_decl( (yyvsp[-1].type_decl), (yyvsp[0].var_decl_list), 1, EM_lineNum ); }2575 { (yyval.exp) = new_exp_decl( (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].var_decl_list), 1, EM_lineNum ); ;}
2353#line 2352 "chuck.tab.c" /* yacc.c:1651 */
2354 break;2576 break;
2355 2577
2356 case 90:2578 case 90:
2357#line 393 "chuck.y" /* yacc.c:1651 */2579#line 393 "chuck.y"
2358 { (yyval.exp) = new_exp_decl( NULL, (yyvsp[0].var_decl_list), 0, EM_lineNum ); }2580 { (yyval.exp) = new_exp_decl( NULL, (yyvsp[(2) - (2)].var_decl_list), 0, EM_lineNum ); ;}
2359#line 2358 "chuck.tab.c" /* yacc.c:1651 */
2360 break;2581 break;
2361 2582
2362 case 91:2583 case 91:
2363#line 394 "chuck.y" /* yacc.c:1651 */2584#line 394 "chuck.y"
2364 { (yyval.exp) = new_exp_decl( NULL, (yyvsp[0].var_decl_list), 1, EM_lineNum ); }2585 { (yyval.exp) = new_exp_decl( NULL, (yyvsp[(3) - (3)].var_decl_list), 1, EM_lineNum ); ;}
2365#line 2364 "chuck.tab.c" /* yacc.c:1651 */
2366 break;2586 break;
2367 2587
2368 case 92:2588 case 92:
2369#line 398 "chuck.y" /* yacc.c:1651 */2589#line 398 "chuck.y"
2370 { (yyval.var_decl_list) = new_var_decl_list( (yyvsp[0].var_decl), EM_lineNum ); }2590 { (yyval.var_decl_list) = new_var_decl_list( (yyvsp[(1) - (1)].var_decl), EM_lineNum ); ;}
2371#line 2370 "chuck.tab.c" /* yacc.c:1651 */
2372 break;2591 break;
2373 2592
2374 case 93:2593 case 93:
2375#line 399 "chuck.y" /* yacc.c:1651 */2594#line 399 "chuck.y"
2376 { (yyval.var_decl_list) = prepend_var_decl_list( (yyvsp[-2].var_decl), (yyvsp[0].var_decl_list), EM_lineNum ); }2595 { (yyval.var_decl_list) = prepend_var_decl_list( (yyvsp[(1) - (3)].var_decl), (yyvsp[(3) - (3)].var_decl_list), EM_lineNum ); ;}
2377#line 2376 "chuck.tab.c" /* yacc.c:1651 */
2378 break;2596 break;
2379 2597
2380 case 94:2598 case 94:
2381#line 403 "chuck.y" /* yacc.c:1651 */2599#line 403 "chuck.y"
2382 { (yyval.var_decl) = new_var_decl( (yyvsp[0].sval), NULL, EM_lineNum ); }2600 { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (1)].sval), NULL, EM_lineNum ); ;}
2383#line 2382 "chuck.tab.c" /* yacc.c:1651 */
2384 break;2601 break;
2385 2602
2386 case 95:2603 case 95:
2387#line 404 "chuck.y" /* yacc.c:1651 */2604#line 404 "chuck.y"
2388 { (yyval.var_decl) = new_var_decl( (yyvsp[-1].sval), (yyvsp[0].array_sub), EM_lineNum ); }2605 { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2389#line 2388 "chuck.tab.c" /* yacc.c:1651 */
2390 break;2606 break;
2391 2607
2392 case 96:2608 case 96:
2393#line 405 "chuck.y" /* yacc.c:1651 */2609#line 405 "chuck.y"
2394 { (yyval.var_decl) = new_var_decl( (yyvsp[-1].sval), (yyvsp[0].array_sub), EM_lineNum ); }2610 { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2395#line 2394 "chuck.tab.c" /* yacc.c:1651 */
2396 break;2611 break;
2397 2612
2398 case 97:2613 case 97:
2399#line 410 "chuck.y" /* yacc.c:1651 */2614#line 410 "chuck.y"
2400 { (yyval.complex_exp) = new_complex( (yyvsp[-1].exp), EM_lineNum ); }2615 { (yyval.complex_exp) = new_complex( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2401#line 2400 "chuck.tab.c" /* yacc.c:1651 */
2402 break;2616 break;
2403 2617
2404 case 98:2618 case 98:
2405#line 415 "chuck.y" /* yacc.c:1651 */2619#line 415 "chuck.y"
2406 { (yyval.polar_exp) = new_polar( (yyvsp[-1].exp), EM_lineNum ); }2620 { (yyval.polar_exp) = new_polar( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2407#line 2406 "chuck.tab.c" /* yacc.c:1651 */
2408 break;2621 break;
2409 2622
2410 case 99:2623 case 99:
2411#line 420 "chuck.y" /* yacc.c:1651 */2624#line 420 "chuck.y"
2412 { (yyval.vec_exp) = new_vec( (yyvsp[-1].exp), EM_lineNum ); }2625 { (yyval.vec_exp) = new_vec( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2413#line 2412 "chuck.tab.c" /* yacc.c:1651 */
2414 break;2626 break;
2415 2627
2416 case 100:2628 case 100:
2417#line 424 "chuck.y" /* yacc.c:1651 */2629#line 424 "chuck.y"
2418 { (yyval.ival) = ae_op_chuck; }2630 { (yyval.ival) = ae_op_chuck; ;}
2419#line 2418 "chuck.tab.c" /* yacc.c:1651 */
2420 break;2631 break;
2421 2632
2422 case 101:2633 case 101:
2423#line 425 "chuck.y" /* yacc.c:1651 */2634#line 425 "chuck.y"
2424 { (yyval.ival) = ae_op_at_chuck; }2635 { (yyval.ival) = ae_op_at_chuck; ;}
2425#line 2424 "chuck.tab.c" /* yacc.c:1651 */
2426 break;2636 break;
2427 2637
2428 case 102:2638 case 102:
2429#line 426 "chuck.y" /* yacc.c:1651 */2639#line 426 "chuck.y"
2430 { (yyval.ival) = ae_op_plus_chuck; }2640 { (yyval.ival) = ae_op_plus_chuck; ;}
2431#line 2430 "chuck.tab.c" /* yacc.c:1651 */
2432 break;2641 break;
2433 2642
2434 case 103:2643 case 103:
2435#line 427 "chuck.y" /* yacc.c:1651 */2644#line 427 "chuck.y"
2436 { (yyval.ival) = ae_op_minus_chuck; }2645 { (yyval.ival) = ae_op_minus_chuck; ;}
2437#line 2436 "chuck.tab.c" /* yacc.c:1651 */
2438 break;2646 break;
2439 2647
2440 case 104:2648 case 104:
2441#line 428 "chuck.y" /* yacc.c:1651 */2649#line 428 "chuck.y"
2442 { (yyval.ival) = ae_op_times_chuck; }2650 { (yyval.ival) = ae_op_times_chuck; ;}
2443#line 2442 "chuck.tab.c" /* yacc.c:1651 */
2444 break;2651 break;
2445 2652
2446 case 105:2653 case 105:
2447#line 429 "chuck.y" /* yacc.c:1651 */2654#line 429 "chuck.y"
2448 { (yyval.ival) = ae_op_divide_chuck; }2655 { (yyval.ival) = ae_op_divide_chuck; ;}
2449#line 2448 "chuck.tab.c" /* yacc.c:1651 */
2450 break;2656 break;
2451 2657
2452 case 106:2658 case 106:
2453#line 430 "chuck.y" /* yacc.c:1651 */2659#line 430 "chuck.y"
2454 { (yyval.ival) = ae_op_shift_right_chuck; }2660 { (yyval.ival) = ae_op_shift_right_chuck; ;}
2455#line 2454 "chuck.tab.c" /* yacc.c:1651 */
2456 break;2661 break;
2457 2662
2458 case 107:2663 case 107:
2459#line 431 "chuck.y" /* yacc.c:1651 */2664#line 431 "chuck.y"
2460 { (yyval.ival) = ae_op_shift_left_chuck; }2665 { (yyval.ival) = ae_op_shift_left_chuck; ;}
2461#line 2460 "chuck.tab.c" /* yacc.c:1651 */
2462 break;2666 break;
2463 2667
2464 case 108:2668 case 108:
2465#line 432 "chuck.y" /* yacc.c:1651 */2669#line 432 "chuck.y"
2466 { (yyval.ival) = ae_op_percent_chuck; }2670 { (yyval.ival) = ae_op_percent_chuck; ;}
2467#line 2466 "chuck.tab.c" /* yacc.c:1651 */
2468 break;2671 break;
2469 2672
2470 case 109:2673 case 109:
2471#line 433 "chuck.y" /* yacc.c:1651 */2674#line 433 "chuck.y"
2472 { (yyval.ival) = ae_op_unchuck; }2675 { (yyval.ival) = ae_op_unchuck; ;}
2473#line 2472 "chuck.tab.c" /* yacc.c:1651 */
2474 break;2676 break;
2475 2677
2476 case 110:2678 case 110:
2477#line 434 "chuck.y" /* yacc.c:1651 */2679#line 434 "chuck.y"
2478 { (yyval.ival) = ae_op_upchuck; }2680 { (yyval.ival) = ae_op_upchuck; ;}
2479#line 2478 "chuck.tab.c" /* yacc.c:1651 */
2480 break;2681 break;
2481 2682
2482 case 111:2683 case 111:
2483#line 435 "chuck.y" /* yacc.c:1651 */2684#line 435 "chuck.y"
2484 { (yyval.ival) = ae_op_s_and_chuck; }2685 { (yyval.ival) = ae_op_s_and_chuck; ;}
2485#line 2484 "chuck.tab.c" /* yacc.c:1651 */
2486 break;2686 break;
2487 2687
2488 case 112:2688 case 112:
2489#line 436 "chuck.y" /* yacc.c:1651 */2689#line 436 "chuck.y"
2490 { (yyval.ival) = ae_op_s_or_chuck; }2690 { (yyval.ival) = ae_op_s_or_chuck; ;}
2491#line 2490 "chuck.tab.c" /* yacc.c:1651 */
2492 break;2691 break;
2493 2692
2494 case 113:2693 case 113:
2495#line 437 "chuck.y" /* yacc.c:1651 */2694#line 437 "chuck.y"
2496 { (yyval.ival) = ae_op_s_xor_chuck; }2695 { (yyval.ival) = ae_op_s_xor_chuck; ;}
2497#line 2496 "chuck.tab.c" /* yacc.c:1651 */
2498 break;2696 break;
2499 2697
2500 case 114:2698 case 114:
2501#line 441 "chuck.y" /* yacc.c:1651 */2699#line 441 "chuck.y"
2502 { (yyval.ival) = ae_op_arrow_left; }2700 { (yyval.ival) = ae_op_arrow_left; ;}
2503#line 2502 "chuck.tab.c" /* yacc.c:1651 */
2504 break;2701 break;
2505 2702
2506 case 115:2703 case 115:
2507#line 442 "chuck.y" /* yacc.c:1651 */2704#line 442 "chuck.y"
2508 { (yyval.ival) = ae_op_arrow_right; }2705 { (yyval.ival) = ae_op_arrow_right; ;}
2509#line 2508 "chuck.tab.c" /* yacc.c:1651 */
2510 break;2706 break;
2511 2707
2512 case 116:2708 case 116:
2513#line 446 "chuck.y" /* yacc.c:1651 */2709#line 446 "chuck.y"
2514 { (yyval.exp) = (yyvsp[0].exp); }2710 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2515#line 2514 "chuck.tab.c" /* yacc.c:1651 */
2516 break;2711 break;
2517 2712
2518 case 117:2713 case 117:
2519#line 448 "chuck.y" /* yacc.c:1651 */2714#line 448 "chuck.y"
2520 { (yyval.exp) = new_exp_from_if( (yyvsp[-4].exp), (yyvsp[-2].exp), (yyvsp[0].exp), EM_lineNum ); }2715 { (yyval.exp) = new_exp_from_if( (yyvsp[(1) - (5)].exp), (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].exp), EM_lineNum ); ;}
2521#line 2520 "chuck.tab.c" /* yacc.c:1651 */
2522 break;2716 break;
2523 2717
2524 case 118:2718 case 118:
2525#line 452 "chuck.y" /* yacc.c:1651 */2719#line 452 "chuck.y"
2526 { (yyval.exp) = (yyvsp[0].exp); }2720 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2527#line 2526 "chuck.tab.c" /* yacc.c:1651 */
2528 break;2721 break;
2529 2722
2530 case 119:2723 case 119:
2531#line 454 "chuck.y" /* yacc.c:1651 */2724#line 454 "chuck.y"
2532 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_or, (yyvsp[0].exp), EM_lineNum ); }2725 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_or, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2533#line 2532 "chuck.tab.c" /* yacc.c:1651 */
2534 break;2726 break;
2535 2727
2536 case 120:2728 case 120:
2537#line 458 "chuck.y" /* yacc.c:1651 */2729#line 458 "chuck.y"
2538 { (yyval.exp) = (yyvsp[0].exp); }2730 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2539#line 2538 "chuck.tab.c" /* yacc.c:1651 */
2540 break;2731 break;
2541 2732
2542 case 121:2733 case 121:
2543#line 460 "chuck.y" /* yacc.c:1651 */2734#line 460 "chuck.y"
2544 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_and, (yyvsp[0].exp), EM_lineNum ); }2735 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_and, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2545#line 2544 "chuck.tab.c" /* yacc.c:1651 */
2546 break;2736 break;
2547 2737
2548 case 122:2738 case 122:
2549#line 464 "chuck.y" /* yacc.c:1651 */2739#line 464 "chuck.y"
2550 { (yyval.exp) = (yyvsp[0].exp); }2740 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2551#line 2550 "chuck.tab.c" /* yacc.c:1651 */
2552 break;2741 break;
2553 2742
2554 case 123:2743 case 123:
2555#line 466 "chuck.y" /* yacc.c:1651 */2744#line 466 "chuck.y"
2556 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_s_or, (yyvsp[0].exp), EM_lineNum ); }2745 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_or, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2557#line 2556 "chuck.tab.c" /* yacc.c:1651 */
2558 break;2746 break;
2559 2747
2560 case 124:2748 case 124:
2561#line 470 "chuck.y" /* yacc.c:1651 */2749#line 470 "chuck.y"
2562 { (yyval.exp) = (yyvsp[0].exp); }2750 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2563#line 2562 "chuck.tab.c" /* yacc.c:1651 */
2564 break;2751 break;
2565 2752
2566 case 125:2753 case 125:
2567#line 472 "chuck.y" /* yacc.c:1651 */2754#line 472 "chuck.y"
2568 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_s_xor, (yyvsp[0].exp), EM_lineNum ); }2755 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_xor, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2569#line 2568 "chuck.tab.c" /* yacc.c:1651 */
2570 break;2756 break;
2571 2757
2572 case 126:2758 case 126:
2573#line 476 "chuck.y" /* yacc.c:1651 */2759#line 476 "chuck.y"
2574 { (yyval.exp) = (yyvsp[0].exp); }2760 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2575#line 2574 "chuck.tab.c" /* yacc.c:1651 */
2576 break;2761 break;
2577 2762
2578 case 127:2763 case 127:
2579#line 478 "chuck.y" /* yacc.c:1651 */2764#line 478 "chuck.y"
2580 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_s_and, (yyvsp[0].exp), EM_lineNum ); }2765 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_and, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2581#line 2580 "chuck.tab.c" /* yacc.c:1651 */
2582 break;2766 break;
2583 2767
2584 case 128:2768 case 128:
2585#line 482 "chuck.y" /* yacc.c:1651 */2769#line 482 "chuck.y"
2586 { (yyval.exp) = (yyvsp[0].exp); }2770 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2587#line 2586 "chuck.tab.c" /* yacc.c:1651 */
2588 break;2771 break;
2589 2772
2590 case 129:2773 case 129:
2591#line 484 "chuck.y" /* yacc.c:1651 */2774#line 484 "chuck.y"
2592 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_eq, (yyvsp[0].exp), EM_lineNum ); }2775 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_eq, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2593#line 2592 "chuck.tab.c" /* yacc.c:1651 */
2594 break;2776 break;
2595 2777
2596 case 130:2778 case 130:
2597#line 486 "chuck.y" /* yacc.c:1651 */2779#line 486 "chuck.y"
2598 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_neq, (yyvsp[0].exp), EM_lineNum ); }2780 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_neq, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2599#line 2598 "chuck.tab.c" /* yacc.c:1651 */
2600 break;2781 break;
2601 2782
2602 case 131:2783 case 131:
2603#line 490 "chuck.y" /* yacc.c:1651 */2784#line 490 "chuck.y"
2604 { (yyval.exp) = (yyvsp[0].exp); }2785 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2605#line 2604 "chuck.tab.c" /* yacc.c:1651 */
2606 break;2786 break;
2607 2787
2608 case 132:2788 case 132:
2609#line 492 "chuck.y" /* yacc.c:1651 */2789#line 492 "chuck.y"
2610 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_lt, (yyvsp[0].exp), EM_lineNum ); }2790 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_lt, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2611#line 2610 "chuck.tab.c" /* yacc.c:1651 */
2612 break;2791 break;
2613 2792
2614 case 133:2793 case 133:
2615#line 494 "chuck.y" /* yacc.c:1651 */2794#line 494 "chuck.y"
2616 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_gt, (yyvsp[0].exp), EM_lineNum ); }2795 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_gt, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2617#line 2616 "chuck.tab.c" /* yacc.c:1651 */
2618 break;2796 break;
2619 2797
2620 case 134:2798 case 134:
2621#line 496 "chuck.y" /* yacc.c:1651 */2799#line 496 "chuck.y"
2622 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_le, (yyvsp[0].exp), EM_lineNum ); }2800 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_le, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2623#line 2622 "chuck.tab.c" /* yacc.c:1651 */
2624 break;2801 break;
2625 2802
2626 case 135:2803 case 135:
2627#line 498 "chuck.y" /* yacc.c:1651 */2804#line 498 "chuck.y"
2628 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_ge, (yyvsp[0].exp), EM_lineNum ); }2805 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_ge, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2629#line 2628 "chuck.tab.c" /* yacc.c:1651 */
2630 break;2806 break;
2631 2807
2632 case 136:2808 case 136:
2633#line 502 "chuck.y" /* yacc.c:1651 */2809#line 502 "chuck.y"
2634 { (yyval.exp) = (yyvsp[0].exp); }2810 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2635#line 2634 "chuck.tab.c" /* yacc.c:1651 */
2636 break;2811 break;
2637 2812
2638 case 137:2813 case 137:
2639#line 504 "chuck.y" /* yacc.c:1651 */2814#line 504 "chuck.y"
2640 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_shift_left, (yyvsp[0].exp), EM_lineNum ); }2815 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_shift_left, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2641#line 2640 "chuck.tab.c" /* yacc.c:1651 */
2642 break;2816 break;
2643 2817
2644 case 138:2818 case 138:
2645#line 506 "chuck.y" /* yacc.c:1651 */2819#line 506 "chuck.y"
2646 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_shift_right, (yyvsp[0].exp), EM_lineNum ); }2820 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_shift_right, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2647#line 2646 "chuck.tab.c" /* yacc.c:1651 */
2648 break;2821 break;
2649 2822
2650 case 139:2823 case 139:
2651#line 510 "chuck.y" /* yacc.c:1651 */2824#line 510 "chuck.y"
2652 { (yyval.exp) = (yyvsp[0].exp); }2825 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2653#line 2652 "chuck.tab.c" /* yacc.c:1651 */
2654 break;2826 break;
2655 2827
2656 case 140:2828 case 140:
2657#line 512 "chuck.y" /* yacc.c:1651 */2829#line 512 "chuck.y"
2658 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_plus, (yyvsp[0].exp), EM_lineNum ); }2830 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_plus, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2659#line 2658 "chuck.tab.c" /* yacc.c:1651 */
2660 break;2831 break;
2661 2832
2662 case 141:2833 case 141:
2663#line 514 "chuck.y" /* yacc.c:1651 */2834#line 514 "chuck.y"
2664 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_minus, (yyvsp[0].exp), EM_lineNum ); }2835 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_minus, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2665#line 2664 "chuck.tab.c" /* yacc.c:1651 */
2666 break;2836 break;
2667 2837
2668 case 142:2838 case 142:
2669#line 518 "chuck.y" /* yacc.c:1651 */2839#line 518 "chuck.y"
2670 { (yyval.exp) = (yyvsp[0].exp); }2840 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2671#line 2670 "chuck.tab.c" /* yacc.c:1651 */
2672 break;2841 break;
2673 2842
2674 case 143:2843 case 143:
2675#line 520 "chuck.y" /* yacc.c:1651 */2844#line 520 "chuck.y"
2676 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_times, (yyvsp[0].exp), EM_lineNum ); }2845 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_times, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2677#line 2676 "chuck.tab.c" /* yacc.c:1651 */
2678 break;2846 break;
2679 2847
2680 case 144:2848 case 144:
2681#line 522 "chuck.y" /* yacc.c:1651 */2849#line 522 "chuck.y"
2682 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_divide, (yyvsp[0].exp), EM_lineNum ); }2850 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_divide, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2683#line 2682 "chuck.tab.c" /* yacc.c:1651 */
2684 break;2851 break;
2685 2852
2686 case 145:2853 case 145:
2687#line 524 "chuck.y" /* yacc.c:1651 */2854#line 524 "chuck.y"
2688 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_percent, (yyvsp[0].exp), EM_lineNum ); }2855 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_percent, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2689#line 2688 "chuck.tab.c" /* yacc.c:1651 */
2690 break;2856 break;
2691 2857
2692 case 146:2858 case 146:
2693#line 528 "chuck.y" /* yacc.c:1651 */2859#line 528 "chuck.y"
2694 { (yyval.exp) = (yyvsp[0].exp); }2860 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2695#line 2694 "chuck.tab.c" /* yacc.c:1651 */
2696 break;2861 break;
2697 2862
2698 case 147:2863 case 147:
2699#line 530 "chuck.y" /* yacc.c:1651 */2864#line 530 "chuck.y"
2700 { (yyval.exp) = new_exp_from_binary( (yyvsp[-2].exp), ae_op_tilda, (yyvsp[0].exp), EM_lineNum ); }2865 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_tilda, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2701#line 2700 "chuck.tab.c" /* yacc.c:1651 */
2702 break;2866 break;
2703 2867
2704 case 148:2868 case 148:
2705#line 534 "chuck.y" /* yacc.c:1651 */2869#line 534 "chuck.y"
2706 { (yyval.exp) = (yyvsp[0].exp); }2870 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2707#line 2706 "chuck.tab.c" /* yacc.c:1651 */
2708 break;2871 break;
2709 2872
2710 case 149:2873 case 149:
2711#line 536 "chuck.y" /* yacc.c:1651 */2874#line 536 "chuck.y"
2712 { (yyval.exp) = new_exp_from_cast( (yyvsp[0].type_decl), (yyvsp[-2].exp), EM_lineNum ); }2875 { (yyval.exp) = new_exp_from_cast( (yyvsp[(3) - (3)].type_decl), (yyvsp[(1) - (3)].exp), EM_lineNum ); ;}
2713#line 2712 "chuck.tab.c" /* yacc.c:1651 */
2714 break;2876 break;
2715 2877
2716 case 150:2878 case 150:
2717#line 540 "chuck.y" /* yacc.c:1651 */2879#line 540 "chuck.y"
2718 { (yyval.exp) = (yyvsp[0].exp); }2880 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2719#line 2718 "chuck.tab.c" /* yacc.c:1651 */
2720 break;2881 break;
2721 2882
2722 case 151:2883 case 151:
2723#line 542 "chuck.y" /* yacc.c:1651 */2884#line 542 "chuck.y"
2724 { (yyval.exp) = new_exp_from_unary( ae_op_plusplus, (yyvsp[0].exp), EM_lineNum ); }2885 { (yyval.exp) = new_exp_from_unary( ae_op_plusplus, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2725#line 2724 "chuck.tab.c" /* yacc.c:1651 */
2726 break;2886 break;
2727 2887
2728 case 152:2888 case 152:
2729#line 544 "chuck.y" /* yacc.c:1651 */2889#line 544 "chuck.y"
2730 { (yyval.exp) = new_exp_from_unary( ae_op_minusminus, (yyvsp[0].exp), EM_lineNum ); }2890 { (yyval.exp) = new_exp_from_unary( ae_op_minusminus, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2731#line 2730 "chuck.tab.c" /* yacc.c:1651 */
2732 break;2891 break;
2733 2892
2734 case 153:2893 case 153:
2735#line 546 "chuck.y" /* yacc.c:1651 */2894#line 546 "chuck.y"
2736 { (yyval.exp) = new_exp_from_unary( (yyvsp[-1].ival), (yyvsp[0].exp), EM_lineNum ); }2895 { (yyval.exp) = new_exp_from_unary( (yyvsp[(1) - (2)].ival), (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2737#line 2736 "chuck.tab.c" /* yacc.c:1651 */
2738 break;2896 break;
2739 2897
2740 case 154:2898 case 154:
2741#line 548 "chuck.y" /* yacc.c:1651 */2899#line 548 "chuck.y"
2742 { (yyval.exp) = new_exp_from_unary( ae_op_typeof, (yyvsp[0].exp), EM_lineNum ); }2900 { (yyval.exp) = new_exp_from_unary( ae_op_typeof, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2743#line 2742 "chuck.tab.c" /* yacc.c:1651 */
2744 break;2901 break;
2745 2902
2746 case 155:2903 case 155:
2747#line 550 "chuck.y" /* yacc.c:1651 */2904#line 550 "chuck.y"
2748 { (yyval.exp) = new_exp_from_unary( ae_op_sizeof, (yyvsp[0].exp), EM_lineNum ); }2905 { (yyval.exp) = new_exp_from_unary( ae_op_sizeof, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2749#line 2748 "chuck.tab.c" /* yacc.c:1651 */
2750 break;2906 break;
2751 2907
2752 case 156:2908 case 156:
2753#line 552 "chuck.y" /* yacc.c:1651 */2909#line 552 "chuck.y"
2754 { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[0].type_decl), NULL, EM_lineNum ); }2910 { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[(2) - (2)].type_decl), NULL, EM_lineNum ); ;}
2755#line 2754 "chuck.tab.c" /* yacc.c:1651 */
2756 break;2911 break;
2757 2912
2758 case 157:2913 case 157:
2759#line 554 "chuck.y" /* yacc.c:1651 */2914#line 554 "chuck.y"
2760 { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[-1].type_decl), (yyvsp[0].array_sub), EM_lineNum ); }2915 { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].array_sub), EM_lineNum ); ;}
2761#line 2760 "chuck.tab.c" /* yacc.c:1651 */
2762 break;2916 break;
2763 2917
2764 case 158:2918 case 158:
2765#line 560 "chuck.y" /* yacc.c:1651 */2919#line 560 "chuck.y"
2766 { (yyval.ival) = ae_op_plus; }2920 { (yyval.ival) = ae_op_plus; ;}
2767#line 2766 "chuck.tab.c" /* yacc.c:1651 */
2768 break;2921 break;
2769 2922
2770 case 159:2923 case 159:
2771#line 561 "chuck.y" /* yacc.c:1651 */2924#line 561 "chuck.y"
2772 { (yyval.ival) = ae_op_minus; }2925 { (yyval.ival) = ae_op_minus; ;}
2773#line 2772 "chuck.tab.c" /* yacc.c:1651 */
2774 break;2926 break;
2775 2927
2776 case 160:2928 case 160:
2777#line 562 "chuck.y" /* yacc.c:1651 */2929#line 562 "chuck.y"
2778 { (yyval.ival) = ae_op_tilda; }2930 { (yyval.ival) = ae_op_tilda; ;}
2779#line 2778 "chuck.tab.c" /* yacc.c:1651 */
2780 break;2931 break;
2781 2932
2782 case 161:2933 case 161:
2783#line 563 "chuck.y" /* yacc.c:1651 */2934#line 563 "chuck.y"
2784 { (yyval.ival) = ae_op_exclamation; }2935 { (yyval.ival) = ae_op_exclamation; ;}
2785#line 2784 "chuck.tab.c" /* yacc.c:1651 */
2786 break;2936 break;
2787 2937
2788 case 162:2938 case 162:
2789#line 564 "chuck.y" /* yacc.c:1651 */2939#line 564 "chuck.y"
2790 { (yyval.ival) = ae_op_times; }2940 { (yyval.ival) = ae_op_times; ;}
2791#line 2790 "chuck.tab.c" /* yacc.c:1651 */
2792 break;2941 break;
2793 2942
2794 case 163:2943 case 163:
2795#line 565 "chuck.y" /* yacc.c:1651 */2944#line 565 "chuck.y"
2796 { (yyval.ival) = ae_op_spork; }2945 { (yyval.ival) = ae_op_spork; ;}
2797#line 2796 "chuck.tab.c" /* yacc.c:1651 */
2798 break;2946 break;
2799 2947
2800 case 165:2948 case 165:
2801#line 572 "chuck.y" /* yacc.c:1651 */2949#line 572 "chuck.y"
2802 { (yyval.exp) = new_exp_from_dur( (yyvsp[-2].exp), (yyvsp[0].exp), EM_lineNum ); }2950 { (yyval.exp) = new_exp_from_dur( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2803#line 2802 "chuck.tab.c" /* yacc.c:1651 */
2804 break;2951 break;
2805 2952
2806 case 166:2953 case 166:
2807#line 576 "chuck.y" /* yacc.c:1651 */2954#line 576 "chuck.y"
2808 { (yyval.exp) = (yyvsp[0].exp); }2955 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2809#line 2808 "chuck.tab.c" /* yacc.c:1651 */
2810 break;2956 break;
2811 2957
2812 case 167:2958 case 167:
2813#line 578 "chuck.y" /* yacc.c:1651 */2959#line 578 "chuck.y"
2814 { (yyval.exp) = new_exp_from_array( (yyvsp[-1].exp), (yyvsp[0].array_sub), EM_lineNum ); }2960 { (yyval.exp) = new_exp_from_array( (yyvsp[(1) - (2)].exp), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2815#line 2814 "chuck.tab.c" /* yacc.c:1651 */
2816 break;2961 break;
2817 2962
2818 case 168:2963 case 168:
2819#line 580 "chuck.y" /* yacc.c:1651 */2964#line 580 "chuck.y"
2820 { (yyval.exp) = new_exp_from_func_call( (yyvsp[-2].exp), NULL, EM_lineNum ); }2965 { (yyval.exp) = new_exp_from_func_call( (yyvsp[(1) - (3)].exp), NULL, EM_lineNum ); ;}
2821#line 2820 "chuck.tab.c" /* yacc.c:1651 */
2822 break;2966 break;
2823 2967
2824 case 169:2968 case 169:
2825#line 582 "chuck.y" /* yacc.c:1651 */2969#line 582 "chuck.y"
2826 { (yyval.exp) = new_exp_from_func_call( (yyvsp[-3].exp), (yyvsp[-1].exp), EM_lineNum ); }2970 { (yyval.exp) = new_exp_from_func_call( (yyvsp[(1) - (4)].exp), (yyvsp[(3) - (4)].exp), EM_lineNum ); ;}
2827#line 2826 "chuck.tab.c" /* yacc.c:1651 */
2828 break;2971 break;
2829 2972
2830 case 170:2973 case 170:
2831#line 584 "chuck.y" /* yacc.c:1651 */2974#line 584 "chuck.y"
2832 { (yyval.exp) = new_exp_from_member_dot( (yyvsp[-2].exp), (yyvsp[0].sval), EM_lineNum ); }2975 { (yyval.exp) = new_exp_from_member_dot( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].sval), EM_lineNum ); ;}
2833#line 2832 "chuck.tab.c" /* yacc.c:1651 */
2834 break;2976 break;
2835 2977
2836 case 171:2978 case 171:
2837#line 586 "chuck.y" /* yacc.c:1651 */2979#line 586 "chuck.y"
2838 { (yyval.exp) = new_exp_from_postfix( (yyvsp[-1].exp), ae_op_plusplus, EM_lineNum ); }2980 { (yyval.exp) = new_exp_from_postfix( (yyvsp[(1) - (2)].exp), ae_op_plusplus, EM_lineNum ); ;}
2839#line 2838 "chuck.tab.c" /* yacc.c:1651 */
2840 break;2981 break;
2841 2982
2842 case 172:2983 case 172:
2843#line 588 "chuck.y" /* yacc.c:1651 */2984#line 588 "chuck.y"
2844 { (yyval.exp) = new_exp_from_postfix( (yyvsp[-1].exp), ae_op_minusminus, EM_lineNum ); }2985 { (yyval.exp) = new_exp_from_postfix( (yyvsp[(1) - (2)].exp), ae_op_minusminus, EM_lineNum ); ;}
2845#line 2844 "chuck.tab.c" /* yacc.c:1651 */
2846 break;2986 break;
2847 2987
2848 case 173:2988 case 173:
2849#line 593 "chuck.y" /* yacc.c:1651 */2989#line 593 "chuck.y"
2850 { (yyval.exp) = new_exp_from_id( (yyvsp[0].sval), EM_lineNum ); }2990 { (yyval.exp) = new_exp_from_id( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
2851#line 2850 "chuck.tab.c" /* yacc.c:1651 */
2852 break;2991 break;
2853 2992
2854 case 174:2993 case 174:
2855#line 594 "chuck.y" /* yacc.c:1651 */2994#line 594 "chuck.y"
2856 { (yyval.exp) = new_exp_from_int( (yyvsp[0].ival), EM_lineNum ); }2995 { (yyval.exp) = new_exp_from_int( (yyvsp[(1) - (1)].ival), EM_lineNum ); ;}
2857#line 2856 "chuck.tab.c" /* yacc.c:1651 */
2858 break;2996 break;
2859 2997
2860 case 175:2998 case 175:
2861#line 595 "chuck.y" /* yacc.c:1651 */2999#line 595 "chuck.y"
2862 { (yyval.exp) = new_exp_from_float( (yyvsp[0].fval), EM_lineNum ); }3000 { (yyval.exp) = new_exp_from_float( (yyvsp[(1) - (1)].fval), EM_lineNum ); ;}
2863#line 2862 "chuck.tab.c" /* yacc.c:1651 */
2864 break;3001 break;
2865 3002
2866 case 176:3003 case 176:
2867#line 596 "chuck.y" /* yacc.c:1651 */3004#line 596 "chuck.y"
2868 { (yyval.exp) = new_exp_from_str( (yyvsp[0].sval), EM_lineNum ); }3005 { (yyval.exp) = new_exp_from_str( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
2869#line 2868 "chuck.tab.c" /* yacc.c:1651 */
2870 break;3006 break;
2871 3007
2872 case 177:3008 case 177:
2873#line 597 "chuck.y" /* yacc.c:1651 */3009#line 597 "chuck.y"
2874 { (yyval.exp) = new_exp_from_char( (yyvsp[0].sval), EM_lineNum ); }3010 { (yyval.exp) = new_exp_from_char( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
2875#line 2874 "chuck.tab.c" /* yacc.c:1651 */
2876 break;3011 break;
2877 3012
2878 case 178:3013 case 178:
2879#line 598 "chuck.y" /* yacc.c:1651 */3014#line 598 "chuck.y"
2880 { (yyval.exp) = new_exp_from_array_lit( (yyvsp[0].array_sub), EM_lineNum ); }3015 { (yyval.exp) = new_exp_from_array_lit( (yyvsp[(1) - (1)].array_sub), EM_lineNum ); ;}
2881#line 2880 "chuck.tab.c" /* yacc.c:1651 */
2882 break;3016 break;
2883 3017
2884 case 179:3018 case 179:
2885#line 599 "chuck.y" /* yacc.c:1651 */3019#line 599 "chuck.y"
2886 { (yyval.exp) = new_exp_from_complex( (yyvsp[0].complex_exp), EM_lineNum ); }3020 { (yyval.exp) = new_exp_from_complex( (yyvsp[(1) - (1)].complex_exp), EM_lineNum ); ;}
2887#line 2886 "chuck.tab.c" /* yacc.c:1651 */
2888 break;3021 break;
2889 3022
2890 case 180:3023 case 180:
2891#line 600 "chuck.y" /* yacc.c:1651 */3024#line 600 "chuck.y"
2892 { (yyval.exp) = new_exp_from_polar( (yyvsp[0].polar_exp), EM_lineNum ); }3025 { (yyval.exp) = new_exp_from_polar( (yyvsp[(1) - (1)].polar_exp), EM_lineNum ); ;}
2893#line 2892 "chuck.tab.c" /* yacc.c:1651 */
2894 break;3026 break;
2895 3027
2896 case 181:3028 case 181:
2897#line 601 "chuck.y" /* yacc.c:1651 */3029#line 601 "chuck.y"
2898 { (yyval.exp) = new_exp_from_vec( (yyvsp[0].vec_exp), EM_lineNum ); }3030 { (yyval.exp) = new_exp_from_vec( (yyvsp[(1) - (1)].vec_exp), EM_lineNum ); ;}
2899#line 2898 "chuck.tab.c" /* yacc.c:1651 */
2900 break;3031 break;
2901 3032
2902 case 182:3033 case 182:
2903#line 602 "chuck.y" /* yacc.c:1651 */3034#line 602 "chuck.y"
2904 { (yyval.exp) = new_exp_from_hack( (yyvsp[-1].exp), EM_lineNum ); }3035 { (yyval.exp) = new_exp_from_hack( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2905#line 2904 "chuck.tab.c" /* yacc.c:1651 */
2906 break;3036 break;
2907 3037
2908 case 183:3038 case 183:
2909#line 603 "chuck.y" /* yacc.c:1651 */3039#line 603 "chuck.y"
2910 { (yyval.exp) = (yyvsp[-1].exp); }3040 { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
2911#line 2910 "chuck.tab.c" /* yacc.c:1651 */
2912 break;3041 break;
2913 3042
2914 case 184:3043 case 184:
2915#line 604 "chuck.y" /* yacc.c:1651 */3044#line 604 "chuck.y"
2916 { (yyval.exp) = new_exp_from_nil( EM_lineNum ); }3045 { (yyval.exp) = new_exp_from_nil( EM_lineNum ); ;}
2917#line 2916 "chuck.tab.c" /* yacc.c:1651 */
2918 break;3046 break;
2919 3047
2920 3048
2921#line 2920 "chuck.tab.c" /* yacc.c:1651 */3049/* Line 1267 of yacc.c. */
3050#line 3051 "chuck.tab.c"
2922 default: break;3051 default: break;
2923 }3052 }
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. */
2935 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);3053 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2936 3054
2937 YYPOPSTACK (yylen);3055 YYPOPSTACK (yylen);
@@ -2940,7 +3058,8 @@ yyreduce: · 2 unmodified lines
2940 3058
2941 *++yyvsp = yyval;3059 *++yyvsp = yyval;
2942 3060
2943 /* Now 'shift' the result of the reduction. Determine what state3061
3062 /* Now `shift' the result of the reduction. Determine what state
2944 that goes to, based on the state we popped back to and the rule3063 that goes to, based on the state we popped back to and the rule
2945 number reduced by. */3064 number reduced by. */
2946 3065
@@ -2955,14 +3074,10 @@ yyreduce: · 8 unmodified lines
2955 goto yynewstate;3074 goto yynewstate;
2956 3075
2957 3076
2958/*--------------------------------------.3077/*------------------------------------.
2959| yyerrlab -- here on detecting error. |3078| yyerrlab -- here on detecting error |
2960`--------------------------------------*/3079`------------------------------------*/
2961yyerrlab:3080yyerrlab:
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
2966 /* If not already recovering from an error, report this error. */3081 /* If not already recovering from an error, report this error. */
2967 if (!yyerrstatus)3082 if (!yyerrstatus)
2968 {3083 {
@@ -2970,36 +3085,37 @@ yyerrlab: · 1 unmodified line
2970#if ! YYERROR_VERBOSE3085#if ! YYERROR_VERBOSE
2971 yyerror (YY_("syntax error"));3086 yyerror (YY_("syntax error"));
2972#else3087#else
2973# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2974 yyssp, yytoken)
2975 {3088 {
2976 char const *yymsgp = YY_("syntax error");3089 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2977 int yysyntax_error_status;3090 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2978 yysyntax_error_status = YYSYNTAX_ERROR;3091 {
2979 if (yysyntax_error_status == 0)3092 YYSIZE_T yyalloc = 2 * yysize;
2980 yymsgp = yymsg;3093 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2981 else if (yysyntax_error_status == 1)3094 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2982 {3095 if (yymsg != yymsgbuf)
2983 if (yymsg != yymsgbuf)3096 YYSTACK_FREE (yymsg);
2984 YYSTACK_FREE (yymsg);3097 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2985 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);3098 if (yymsg)
2986 if (!yymsg)3099 yymsg_alloc = yyalloc;
2987 {3100 else
2988 yymsg = yymsgbuf;3101 {
2989 yymsg_alloc = sizeof yymsgbuf;3102 yymsg = yymsgbuf;
2990 yysyntax_error_status = 2;3103 yymsg_alloc = sizeof yymsgbuf;
2991 }3104 }
2992 else3105 }
2993 {3106
2994 yysyntax_error_status = YYSYNTAX_ERROR;3107 if (0 < yysize && yysize <= yymsg_alloc)
2995 yymsgp = yymsg;3108 {
2996 }3109 (void) yysyntax_error (yymsg, yystate, yychar);
2997 }3110 yyerror (yymsg);
2998 yyerror (yymsgp);3111 }
2999 if (yysyntax_error_status == 2)3112 else
3000 goto yyexhaustedlab;3113 {
3114 yyerror (YY_("syntax error"));
3115 if (yysize != 0)
3116 goto yyexhaustedlab;
3117 }
3001 }3118 }
3002# undef YYSYNTAX_ERROR
3003#endif3119#endif
3004 }3120 }
3005 3121
@@ -3007,24 +3123,24 @@ yyerrlab: · 1 unmodified line
3007 3123
3008 if (yyerrstatus == 3)3124 if (yyerrstatus == 3)
3009 {3125 {
3010 /* If just tried and failed to reuse lookahead token after an3126 /* If just tried and failed to reuse look-ahead token after an
3011 error, discard it. */3127 error, discard it. */
3012 3128
3013 if (yychar <= YYEOF)3129 if (yychar <= YYEOF)
3014 {3130 {
3015 /* Return failure if at end of input. */3131 /* Return failure if at end of input. */
3016 if (yychar == YYEOF)3132 if (yychar == YYEOF)
3017 YYABORT;3133 YYABORT;
3018 }3134 }
3019 else3135 else
3020 {3136 {
3021 yydestruct ("Error: discarding",3137 yydestruct ("Error: discarding",
3022 yytoken, &yylval);3138 yytoken, &yylval);
3023 yychar = YYEMPTY;3139 yychar = YYEMPTY;
3024 }3140 }
3025 }3141 }
3026 3142
3027 /* Else will try to reuse lookahead token after shifting the error3143 /* Else will try to reuse look-ahead token after shifting the error
3028 token. */3144 token. */
3029 goto yyerrlab1;3145 goto yyerrlab1;
3030 3146
@@ -3040,7 +3156,7 @@ yyerrorlab: · 9 unmodified lines
3040 if (/*CONSTCOND*/ 0)3156 if (/*CONSTCOND*/ 0)
3041 goto yyerrorlab;3157 goto yyerrorlab;
3042 3158
3043 /* Do not reclaim the symbols of the rule whose action triggered3159 /* Do not reclaim the symbols of the rule which action triggered
3044 this YYERROR. */3160 this YYERROR. */
3045 YYPOPSTACK (yylen);3161 YYPOPSTACK (yylen);
3046 yylen = 0;3162 yylen = 0;
@@ -3053,37 +3169,38 @@ yyerrorlab: · 6 unmodified lines
3053| yyerrlab1 -- common code for both syntax error and YYERROR. |3169| yyerrlab1 -- common code for both syntax error and YYERROR. |
3054`-------------------------------------------------------------*/3170`-------------------------------------------------------------*/
3055yyerrlab1:3171yyerrlab1:
3056 yyerrstatus = 3; /* Each real token shifted decrements this. */3172 yyerrstatus = 3; /* Each real token shifted decrements this. */
3057 3173
3058 for (;;)3174 for (;;)
3059 {3175 {
3060 yyn = yypact[yystate];3176 yyn = yypact[yystate];
3061 if (!yypact_value_is_default (yyn))3177 if (yyn != YYPACT_NINF)
3062 {3178 {
3063 yyn += YYTERROR;3179 yyn += YYTERROR;
3064 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)3180 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3065 {3181 {
3066 yyn = yytable[yyn];3182 yyn = yytable[yyn];
3067 if (0 < yyn)3183 if (0 < yyn)
3068 break;3184 break;
3069 }3185 }
3070 }3186 }
3071 3187
3072 /* Pop the current state because it cannot handle the error token. */3188 /* Pop the current state because it cannot handle the error token. */
3073 if (yyssp == yyss)3189 if (yyssp == yyss)
3074 YYABORT;3190 YYABORT;
3075 3191
3076 3192
3077 yydestruct ("Error: popping",3193 yydestruct ("Error: popping",
3078 yystos[yystate], yyvsp);3194 yystos[yystate], yyvsp);
3079 YYPOPSTACK (1);3195 YYPOPSTACK (1);
3080 yystate = *yyssp;3196 yystate = *yyssp;
3081 YY_STACK_PRINT (yyss, yyssp);3197 YY_STACK_PRINT (yyss, yyssp);
3082 }3198 }
3083 3199
3084 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN3200 if (yyn == YYFINAL)
3201 YYACCEPT;
3202
3085 *++yyvsp = yylval;3203 *++yyvsp = yylval;
3086 YY_IGNORE_MAYBE_UNINITIALIZED_END
3087 3204
3088 3205
3089 /* Shift the error token. */3206 /* Shift the error token. */
@@ -3107,7 +3224,7 @@ yyabortlab: · 17 unmodified lines
3107 yyresult = 1;3224 yyresult = 1;
3108 goto yyreturn;3225 goto yyreturn;
3109 3226
3110#if !defined yyoverflow || YYERROR_VERBOSE3227#ifndef yyoverflow
3111/*-------------------------------------------------.3228/*-------------------------------------------------.
3112| yyexhaustedlab -- memory exhaustion comes here. |3229| yyexhaustedlab -- memory exhaustion comes here. |
3113`-------------------------------------------------*/3230`-------------------------------------------------*/
@@ -3118,22 +3235,17 @@ yyexhaustedlab: · 4 unmodified lines
3118#endif3235#endif
3119 3236
3120yyreturn:3237yyreturn:
3121 if (yychar != YYEMPTY)3238 if (yychar != YYEOF && yychar != YYEMPTY)
3122 {3239 yydestruct ("Cleanup: discarding lookahead",
3123 /* Make sure we have latest lookahead translation. See comments at3240 yytoken, &yylval);
3124 user semantic actions for why this is necessary. */3241 /* Do not reclaim the symbols of the rule which action triggered
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
3130 this YYABORT or YYACCEPT. */3242 this YYABORT or YYACCEPT. */
3131 YYPOPSTACK (yylen);3243 YYPOPSTACK (yylen);
3132 YY_STACK_PRINT (yyss, yyssp);3244 YY_STACK_PRINT (yyss, yyssp);
3133 while (yyssp != yyss)3245 while (yyssp != yyss)
3134 {3246 {
3135 yydestruct ("Cleanup: popping",3247 yydestruct ("Cleanup: popping",
3136 yystos[*yyssp], yyvsp);3248 yystos[*yyssp], yyvsp);
3137 YYPOPSTACK (1);3249 YYPOPSTACK (1);
3138 }3250 }
3139#ifndef yyoverflow3251#ifndef yyoverflow
@@ -3144,11 +3256,15 @@ yyreturn: · 4 unmodified lines
3144 if (yymsg != yymsgbuf)3256 if (yymsg != yymsgbuf)
3145 YYSTACK_FREE (yymsg);3257 YYSTACK_FREE (yymsg);
3146#endif3258#endif
3147 return yyresult;3259 /* Make sure YYID is used. */
3260 return YYID (yyresult);
3148}3261}
3149#line 1 "core/chuck.yy.c"
3150 3262
3151#line 3 "core/chuck.yy.c"3263
3264
3265#line 2 "chuck.yy.c"
3266
3267#line 4 "chuck.yy.c"
3152 3268
3153#define YY_INT_ALIGNED short int3269#define YY_INT_ALIGNED short int
3154 3270
@@ -3156,8 +3272,8 @@ yyreturn: · 1 unmodified line
3156 3272
3157#define FLEX_SCANNER3273#define FLEX_SCANNER
3158#define YY_FLEX_MAJOR_VERSION 23274#define YY_FLEX_MAJOR_VERSION 2
3159#define YY_FLEX_MINOR_VERSION 63275#define YY_FLEX_MINOR_VERSION 5
3160#define YY_FLEX_SUBMINOR_VERSION 43276#define YY_FLEX_SUBMINOR_VERSION 35
3161#if YY_FLEX_SUBMINOR_VERSION > 03277#if YY_FLEX_SUBMINOR_VERSION > 0
3162#define FLEX_BETA3278#define FLEX_BETA
3163#endif3279#endif
@@ -3195,6 +3311,7 @@ typedef int16_t flex_int16_t; · 31 unmodified lines
3195typedef uint16_t flex_uint16_t;3311typedef uint16_t flex_uint16_t;
3196typedef int32_t flex_int32_t;3312typedef int32_t flex_int32_t;
3197typedef uint32_t flex_uint32_t;3313typedef uint32_t flex_uint32_t;
3314typedef uint64_t flex_uint64_t;
3198#else3315#else
3199typedef signed char flex_int8_t;3316typedef signed char flex_int8_t;
3200typedef short int flex_int16_t;3317typedef short int flex_int16_t;
@@ -3202,6 +3319,7 @@ typedef int flex_int32_t; · 1 unmodified line
3202typedef unsigned char flex_uint8_t; 3319typedef unsigned char flex_uint8_t;
3203typedef unsigned short int flex_uint16_t;3320typedef unsigned short int flex_uint16_t;
3204typedef unsigned int flex_uint32_t;3321typedef unsigned int flex_uint32_t;
3322#endif /* ! C99 */
3205 3323
3206/* Limits of integral types. */3324/* Limits of integral types. */
3207#ifndef INT8_MIN3325#ifndef INT8_MIN
@@ -3232,61 +3350,63 @@ typedef unsigned int flex_uint32_t; · 24 unmodified lines
3232#define UINT32_MAX (4294967295U)3350#define UINT32_MAX (4294967295U)
3233#endif3351#endif
3234 3352
3235#ifndef SIZE_MAX3353#endif /* ! FLEXINT_H */
3236#define SIZE_MAX (~(size_t)0)
3237#endif
3238 3354
3239#endif /* ! C99 */3355#ifdef __cplusplus
3240 3356
3241#endif /* ! FLEXINT_H */3357/* The "const" storage-class-modifier is valid. */
3358#define YY_USE_CONST
3242 3359
3243/* begin standard C++ headers. */3360#else /* ! __cplusplus */
3244 3361
3245/* TODO: this is always defined, so inline it */3362/* C99 requires __STDC__ to be defined as 1. */
3246#define yyconst const3363#if defined (__STDC__)
3364
3365#define YY_USE_CONST
3366
3367#endif /* defined (__STDC__) */
3368#endif /* ! __cplusplus */
3247 3369
3248#if defined(__GNUC__) && __GNUC__ >= 33370#ifdef YY_USE_CONST
3249#define yynoreturn __attribute__((__noreturn__))3371#define yyconst const
3250#else3372#else
3251#define yynoreturn3373#define yyconst
3252#endif3374#endif
3253 3375
3254/* Returned upon end-of-file. */3376/* Returned upon end-of-file. */
3255#define YY_NULL 03377#define YY_NULL 0
3256 3378
3257/* Promotes a possibly negative, possibly signed char to an3379/* Promotes a possibly negative, possibly signed char to an unsigned
3258 * integer in range [0..255] for use as an array index.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.
3259 */3383 */
3260#define YY_SC_TO_UI(c) ((YY_CHAR) (c))3384#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
3261 3385
3262/* Enter a start condition. This macro really ought to take a parameter,3386/* Enter a start condition. This macro really ought to take a parameter,
3263 * but we do it the disgusting crufty way forced on us by the ()-less3387 * but we do it the disgusting crufty way forced on us by the ()-less
3264 * definition of BEGIN.3388 * definition of BEGIN.
3265 */3389 */
3266#define BEGIN (yy_start) = 1 + 2 *3390#define BEGIN (yy_start) = 1 + 2 *
3391
3267/* Translate the current start state into a value that can be later handed3392/* Translate the current start state into a value that can be later handed
3268 * to BEGIN to return to the state. The YYSTATE alias is for lex3393 * to BEGIN to return to the state. The YYSTATE alias is for lex
3269 * compatibility.3394 * compatibility.
3270 */3395 */
3271#define YY_START (((yy_start) - 1) / 2)3396#define YY_START (((yy_start) - 1) / 2)
3272#define YYSTATE YY_START3397#define YYSTATE YY_START
3398
3273/* Action number for EOF rule of a given start state. */3399/* Action number for EOF rule of a given start state. */
3274#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)3400#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
3401
3275/* Special action meaning "start processing a new file". */3402/* Special action meaning "start processing a new file". */
3276#define YY_NEW_FILE yyrestart( yyin )3403#define YY_NEW_FILE yyrestart(yyin )
3404
3277#define YY_END_OF_BUFFER_CHAR 03405#define YY_END_OF_BUFFER_CHAR 0
3278 3406
3279/* Size of default input buffer. */3407/* Size of default input buffer. */
3280#ifndef YY_BUF_SIZE3408#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
3288#define YY_BUF_SIZE 163843409#define YY_BUF_SIZE 16384
3289#endif /* __ia64__ */
3290#endif3410#endif
3291 3411
3292/* The state buf must be large enough to hold one state per character in the main buffer.3412/* 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
3303typedef size_t yy_size_t;3423typedef size_t yy_size_t;
3304#endif3424#endif
3305 3425
3306extern int yyleng;3426extern yy_size_t yyleng;
3307 3427
3308extern FILE *yyin, *yyout;3428extern FILE *yyin, *yyout;
3309 3429
3310#define EOB_ACT_CONTINUE_SCAN 03430#define EOB_ACT_CONTINUE_SCAN 0
3311#define EOB_ACT_END_OF_FILE 13431#define EOB_ACT_END_OF_FILE 1
3312#define EOB_ACT_LAST_MATCH 23432#define EOB_ACT_LAST_MATCH 2
3313 3433
3314 #define YY_LESS_LINENO(n)3434 #define YY_LESS_LINENO(n)
3315 #define YY_LINENO_REWIND_TO(ptr)
3316 3435
3317/* Return all but the first "n" matched characters back to the input stream. */3436/* Return all but the first "n" matched characters back to the input stream. */
3318#define yyless(n) \3437#define yyless(n) \
@@ -3327,6 +3446,7 @@ extern FILE *yyin, *yyout; · 8 unmodified lines
3327 YY_DO_BEFORE_ACTION; /* set up yytext again */ \3446 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
3328 } \3447 } \
3329 while ( 0 )3448 while ( 0 )
3449
3330#define unput(c) yyunput( c, (yytext_ptr) )3450#define unput(c) yyunput( c, (yytext_ptr) )
3331 3451
3332#ifndef YY_STRUCT_YY_BUFFER_STATE3452#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -3341,12 +3461,12 @@ struct yy_buffer_state · 8 unmodified lines
3341 /* Size of input buffer in bytes, not including room for EOB3461 /* Size of input buffer in bytes, not including room for EOB
3342 * characters.3462 * characters.
3343 */3463 */
3344 int yy_buf_size;3464 yy_size_t yy_buf_size;
3345 3465
3346 /* Number of characters read into yy_ch_buf, not including EOB3466 /* Number of characters read into yy_ch_buf, not including EOB
3347 * characters.3467 * characters.
3348 */3468 */
3349 int yy_n_chars;3469 yy_size_t yy_n_chars;
3350 3470
3351 /* Whether we "own" the buffer - i.e., we know we created it,3471 /* Whether we "own" the buffer - i.e., we know we created it,
3352 * and can realloc() it to grow it, and should free() it to3472 * and can realloc() it to grow it, and should free() it to
@@ -3369,7 +3489,7 @@ struct yy_buffer_state · 16 unmodified lines
3369 3489
3370 int yy_bs_lineno; /**< The line count. */3490 int yy_bs_lineno; /**< The line count. */
3371 int yy_bs_column; /**< The column count. */3491 int yy_bs_column; /**< The column count. */
3372 3492
3373 /* Whether to try to fill the input buffer when we reach the3493 /* Whether to try to fill the input buffer when we reach the
3374 * end of it.3494 * end of it.
3375 */3495 */
@@ -3397,7 +3517,7 @@ struct yy_buffer_state · 21 unmodified lines
3397/* Stack of input buffers. */3517/* Stack of input buffers. */
3398static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */3518static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
3399static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */3519static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
3400static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */3520static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
3401 3521
3402/* We provide macros for accessing buffer states in case in the3522/* We provide macros for accessing buffer states in case in the
3403 * future we want to put the buffer states in a more general3523 * 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
3408#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \3528#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
3409 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \3529 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
3410 : NULL)3530 : NULL)
3531
3411/* Same as previous macro, but useful when we know that the buffer stack is not3532/* Same as previous macro, but useful when we know that the buffer stack is not
3412 * NULL or when we need an lvalue. For internal use only.3533 * NULL or when we need an lvalue. For internal use only.
3413 */3534 */
@@ -3415,11 +3536,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ · 1 unmodified line
3415 3536
3416/* yy_hold_char holds the character lost when yytext is formed. */3537/* yy_hold_char holds the character lost when yytext is formed. */
3417static char yy_hold_char;3538static char yy_hold_char;
3418static int yy_n_chars; /* number of characters read into yy_ch_buf */3539static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
3419int yyleng;3540yy_size_t yyleng;
3420 3541
3421/* Points to current character in buffer. */3542/* Points to current character in buffer. */
3422static char *yy_c_buf_p = NULL;3543static char *yy_c_buf_p = (char *) 0;
3423static int yy_init = 0; /* whether we need to initialize */3544static int yy_init = 0; /* whether we need to initialize */
3424static int yy_start = 0; /* start state number */3545static int yy_start = 0; /* start state number */
3425 3546
@@ -3428,78 +3549,82 @@ static int yy_start = 0; /* start state number */ · 2 unmodified lines
3428 */3549 */
3429static int yy_did_buffer_switch_on_eof;3550static int yy_did_buffer_switch_on_eof;
3430 3551
3431void yyrestart ( FILE *input_file );3552void yyrestart (FILE *input_file );
3432void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );3553void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
3433YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );3554YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
3434void yy_delete_buffer ( YY_BUFFER_STATE b );3555void yy_delete_buffer (YY_BUFFER_STATE b );
3435void yy_flush_buffer ( YY_BUFFER_STATE b );3556void yy_flush_buffer (YY_BUFFER_STATE b );
3436void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );3557void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
3437void yypop_buffer_state ( void );3558void yypop_buffer_state (void );
3438 3559
3439static void yyensure_buffer_stack ( void );3560static void yyensure_buffer_stack (void );
3440static void yy_load_buffer_state ( void );3561static void yy_load_buffer_state (void );
3441static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );3562static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
3442#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
3443 3563
3444YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );3564#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
3445YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
3446YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
3447 3565
3448void *yyalloc ( yy_size_t );3566YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
3449void *yyrealloc ( void *, yy_size_t );3567YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
3450void yyfree ( void * );3568YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
3569
3570void *yyalloc (yy_size_t );
3571void *yyrealloc (void *,yy_size_t );
3572void yyfree (void * );
3451 3573
3452#define yy_new_buffer yy_create_buffer3574#define yy_new_buffer yy_create_buffer
3575
3453#define yy_set_interactive(is_interactive) \3576#define yy_set_interactive(is_interactive) \
3454 { \3577 { \
3455 if ( ! YY_CURRENT_BUFFER ){ \3578 if ( ! YY_CURRENT_BUFFER ){ \
3456 yyensure_buffer_stack (); \3579 yyensure_buffer_stack (); \
3457 YY_CURRENT_BUFFER_LVALUE = \3580 YY_CURRENT_BUFFER_LVALUE = \
3458 yy_create_buffer( yyin, YY_BUF_SIZE ); \3581 yy_create_buffer(yyin,YY_BUF_SIZE ); \
3459 } \3582 } \
3460 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \3583 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
3461 }3584 }
3585
3462#define yy_set_bol(at_bol) \3586#define yy_set_bol(at_bol) \
3463 { \3587 { \
3464 if ( ! YY_CURRENT_BUFFER ){\3588 if ( ! YY_CURRENT_BUFFER ){\
3465 yyensure_buffer_stack (); \3589 yyensure_buffer_stack (); \
3466 YY_CURRENT_BUFFER_LVALUE = \3590 YY_CURRENT_BUFFER_LVALUE = \
3467 yy_create_buffer( yyin, YY_BUF_SIZE ); \3591 yy_create_buffer(yyin,YY_BUF_SIZE ); \
3468 } \3592 } \
3469 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \3593 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
3470 }3594 }
3595
3471#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)3596#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
3472 3597
3473/* Begin user sect3 */3598/* Begin user sect3 */
3474typedef flex_uint8_t YY_CHAR;
3475 3599
3476FILE *yyin = NULL, *yyout = NULL;3600typedef unsigned char YY_CHAR;
3601
3602FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
3477 3603
3478typedef int yy_state_type;3604typedef int yy_state_type;
3479 3605
3480extern int yylineno;3606extern int yylineno;
3607
3481int yylineno = 1;3608int yylineno = 1;
3482 3609
3483extern char *yytext;3610extern char *yytext;
3484#ifdef yytext_ptr
3485#undef yytext_ptr
3486#endif
3487#define yytext_ptr yytext3611#define yytext_ptr yytext
3488 3612
3489static yy_state_type yy_get_previous_state ( void );3613static yy_state_type yy_get_previous_state (void );
3490static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );3614static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
3491static int yy_get_next_buffer ( void );3615static int yy_get_next_buffer (void );
3492static void yynoreturn yy_fatal_error ( const char* msg );3616static void yy_fatal_error (yyconst char msg[] );
3493 3617
3494/* Done after the current pattern has been matched and before the3618/* Done after the current pattern has been matched and before the
3495 * corresponding action - sets up yytext.3619 * corresponding action - sets up yytext.
3496 */3620 */
3497#define YY_DO_BEFORE_ACTION \3621#define YY_DO_BEFORE_ACTION \
3498 (yytext_ptr) = yy_bp; \3622 (yytext_ptr) = yy_bp; \
3499 yyleng = (int) (yy_cp - yy_bp); \3623 yyleng = (yy_size_t) (yy_cp - yy_bp); \
3500 (yy_hold_char) = *yy_cp; \3624 (yy_hold_char) = *yy_cp; \
3501 *yy_cp = '\0'; \3625 *yy_cp = '\0'; \
3502 (yy_c_buf_p) = yy_cp;3626 (yy_c_buf_p) = yy_cp;
3627
3503#define YY_NUM_RULES 1053628#define YY_NUM_RULES 105
3504#define YY_END_OF_BUFFER 1063629#define YY_END_OF_BUFFER 106
3505/* This struct is not used in this scanner,3630/* This struct is not used in this scanner,
@@ -3509,7 +3634,7 @@ struct yy_trans_info · 3 unmodified lines
3509 flex_int32_t yy_verify;3634 flex_int32_t yy_verify;
3510 flex_int32_t yy_nxt;3635 flex_int32_t yy_nxt;
3511 };3636 };
3512static const flex_int16_t yy_accept[243] =3637static yyconst flex_int16_t yy_accept[243] =
3513 { 0,3638 { 0,
3514 0, 0, 106, 104, 5, 7, 104, 4, 46, 104,3639 0, 0, 106, 104, 5, 7, 104, 4, 46, 104,
3515 21, 22, 20, 32, 104, 38, 39, 18, 16, 13,3640 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
3540 66, 03665 66, 0
3541 } ;3666 } ;
3542 3667
3543static const YY_CHAR yy_ec[256] =3668static yyconst flex_int32_t yy_ec[256] =
3544 { 0,3669 { 0,
3545 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,3670 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
3546 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,3671 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
@@ -3572,7 +3697,7 @@ static const YY_CHAR yy_ec[256] = · 25 unmodified lines
3572 1, 1, 1, 1, 13697 1, 1, 1, 1, 1
3573 } ;3698 } ;
3574 3699
3575static const YY_CHAR yy_meta[69] =3700static yyconst flex_int32_t yy_meta[69] =
3576 { 0,3701 { 0,
3577 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,3702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3578 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,3703 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -3583,7 +3708,7 @@ static const YY_CHAR yy_meta[69] = · 4 unmodified lines
3583 4, 4, 4, 4, 1, 1, 1, 13708 4, 4, 4, 4, 1, 1, 1, 1
3584 } ;3709 } ;
3585 3710
3586static const flex_int16_t yy_base[248] =3711static yyconst flex_int16_t yy_base[248] =
3587 { 0,3712 { 0,
3588 0, 0, 326, 327, 327, 327, 322, 327, 297, 62,3713 0, 0, 326, 327, 327, 327, 322, 327, 297, 62,
3589 310, 327, 57, 60, 284, 327, 327, 294, 56, 327,3714 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
3614 0, 327, 218, 222, 224, 228, 783739 0, 327, 218, 222, 224, 228, 78
3615 } ;3740 } ;
3616 3741
3617static const flex_int16_t yy_def[248] =3742static yyconst flex_int16_t yy_def[248] =
3618 { 0,3743 { 0,
3619 242, 1, 242, 242, 242, 242, 242, 242, 242, 243,3744 242, 1, 242, 242, 242, 242, 242, 242, 242, 243,
3620 242, 242, 242, 242, 244, 242, 242, 242, 242, 242,3745 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
3645 245, 0, 242, 242, 242, 242, 2423770 245, 0, 242, 242, 242, 242, 242
3646 } ;3771 } ;
3647 3772
3648static const flex_int16_t yy_nxt[396] =3773static yyconst flex_int16_t yy_nxt[396] =
3649 { 0,3774 { 0,
3650 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,3775 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
3651 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,3776 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
3693 3818
3694 } ;3819 } ;
3695 3820
3696static const flex_int16_t yy_chk[396] =3821static yyconst flex_int16_t yy_chk[396] =
3697 { 0,3822 { 0,
3698 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,3823 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3699 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,3824 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -3755,8 +3880,8 @@ int yy_flex_debug = 0; · 55 unmodified lines
3755#define YY_MORE_ADJ 03880#define YY_MORE_ADJ 0
3756#define YY_RESTORE_YY_MORE_OFFSET3881#define YY_RESTORE_YY_MORE_OFFSET
3757char *yytext;3882char *yytext;
3758#line 1 "core/chuck.lex"3883#line 1 "chuck.lex"
3759#line 11 "core/chuck.lex"3884#line 11 "chuck.lex"
3760/*----------------------------------------------------------------------------3885/*----------------------------------------------------------------------------
3761 ChucK Concurrent, On-the-fly Audio Programming Language3886 ChucK Concurrent, On-the-fly Audio Programming Language
3762 Compiler and Virtual Machine3887 Compiler and Virtual Machine
@@ -3795,9 +3920,6 @@ char *yytext; · 32 unmodified lines
3795 3920
3796#include <stdlib.h>3921#include <stdlib.h>
3797#include <string.h>3922#include <string.h>
3798#ifndef __PLATFORM_WIN32__
3799#include <unistd.h>
3800#endif
3801#include "chuck_utils.h"3923#include "chuck_utils.h"
3802#include "chuck_absyn.h"3924#include "chuck_absyn.h"
3803#include "chuck_errmsg.h"3925#include "chuck_errmsg.h"
@@ -3834,7 +3956,7 @@ extern "C" { · 30 unmodified lines
3834#endif3956#endif
3835 3957
3836// yywrap()3958// yywrap()
3837int yywrap( void )3959int yywrap(void )
3838{3960{
3839 char_pos = 1;3961 char_pos = 1;
3840 return 1;3962 return 1;
@@ -3919,45 +4041,52 @@ long htol( c_str str ) · 78 unmodified lines
3919 4041
3920// .*\-\-> { adjust(); continue; }4042// .*\-\-> { adjust(); continue; }
3921 4043
3922#line 772 "core/chuck.yy.c"4044#line 781 "chuck.yy.c"
3923#line 773 "core/chuck.yy.c"
3924 4045
3925#define INITIAL 04046#define INITIAL 0
3926 4047
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
3927#ifndef YY_EXTRA_TYPE4056#ifndef YY_EXTRA_TYPE
3928#define YY_EXTRA_TYPE void *4057#define YY_EXTRA_TYPE void *
3929#endif4058#endif
3930 4059
3931static int yy_init_globals ( void );4060static int yy_init_globals (void );
3932 4061
3933/* Accessor methods to globals.4062/* Accessor methods to globals.
3934 These are made visible to non-reentrant scanners for convenience. */4063 These are made visible to non-reentrant scanners for convenience. */
3935 4064
3936int yylex_destroy ( void );4065int yylex_destroy (void );
3937 4066
3938int yyget_debug ( void );4067int yyget_debug (void );
3939 4068
3940void yyset_debug ( int debug_flag );4069void yyset_debug (int debug_flag );
3941 4070
3942YY_EXTRA_TYPE yyget_extra ( void );4071YY_EXTRA_TYPE yyget_extra (void );
3943 4072
3944void yyset_extra ( YY_EXTRA_TYPE user_defined );4073void yyset_extra (YY_EXTRA_TYPE user_defined );
3945 4074
3946FILE *yyget_in ( void );4075FILE *yyget_in (void );
3947 4076
3948void yyset_in ( FILE * _in_str );4077void yyset_in (FILE * in_str );
3949 4078
3950FILE *yyget_out ( void );4079FILE *yyget_out (void );
3951 4080
3952void yyset_out ( FILE * _out_str );4081void yyset_out (FILE * out_str );
3953 4082
3954 int yyget_leng ( void );4083yy_size_t yyget_leng (void );
3955 4084
3956char *yyget_text ( void );4085char *yyget_text (void );
3957 4086
3958int yyget_lineno ( void );4087int yyget_lineno (void );
3959 4088
3960void yyset_lineno ( int _line_number );4089void yyset_lineno (int line_number );
3961 4090
3962/* Macros after this point can all be overridden by user definitions in4091/* Macros after this point can all be overridden by user definitions in
3963 * section 1.4092 * section 1.
@@ -3965,43 +4094,35 @@ void yyset_lineno ( int _line_number ); · 1 unmodified line
3965 4094
3966#ifndef YY_SKIP_YYWRAP4095#ifndef YY_SKIP_YYWRAP
3967#ifdef __cplusplus4096#ifdef __cplusplus
3968extern "C" int yywrap ( void );4097extern "C" int yywrap (void );
3969#else4098#else
3970extern int yywrap ( void );4099extern int yywrap (void );
3971#endif4100#endif
3972#endif4101#endif
3973 4102
3974#ifndef YY_NO_UNPUT4103 static void yyunput (int c,char *buf_ptr );
3975 4104
3976 static void yyunput ( int c, char *buf_ptr );
3977
3978#endif
3979
3980#ifndef yytext_ptr4105#ifndef yytext_ptr
3981static void yy_flex_strncpy ( char *, const char *, int );4106static void yy_flex_strncpy (char *,yyconst char *,int );
3982#endif4107#endif
3983 4108
3984#ifdef YY_NEED_STRLEN4109#ifdef YY_NEED_STRLEN
3985static int yy_flex_strlen ( const char * );4110static int yy_flex_strlen (yyconst char * );
3986#endif4111#endif
3987 4112
3988#ifndef YY_NO_INPUT4113#ifndef YY_NO_INPUT
4114
3989#ifdef __cplusplus4115#ifdef __cplusplus
3990static int yyinput ( void );4116static int yyinput (void );
3991#else4117#else
3992static int input ( void );4118static int input (void );
3993#endif4119#endif
3994 4120
3995#endif4121#endif
3996 4122
3997/* Amount of stuff to slurp up with each read. */4123/* Amount of stuff to slurp up with each read. */
3998#ifndef YY_READ_BUF_SIZE4124#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
4003#define YY_READ_BUF_SIZE 81924125#define YY_READ_BUF_SIZE 8192
4004#endif /* __ia64__ */
4005#endif4126#endif
4006 4127
4007/* Copy whatever the last rule matched to the standard output. */4128/* Copy whatever the last rule matched to the standard output. */
@@ -4009,7 +4130,7 @@ static int input ( void ); · 1 unmodified line
4009/* This used to be an fputs(), but since the string might contain NUL's,4130/* This used to be an fputs(), but since the string might contain NUL's,
4010 * we now use fwrite().4131 * we now use fwrite().
4011 */4132 */
4012#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)4133#define ECHO fwrite( yytext, yyleng, 1, yyout )
4013#endif4134#endif
4014 4135
4015/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,4136/* 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
4020 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \4141 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
4021 { \4142 { \
4022 int c = '*'; \4143 int c = '*'; \
4023 int n; \4144 yy_size_t n; \
4024 for ( n = 0; n < max_size && \4145 for ( n = 0; n < max_size && \
4025 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \4146 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
4026 buf[n] = (char) c; \4147 buf[n] = (char) c; \
@@ -4033,7 +4154,7 @@ static int input ( void ); · 6 unmodified lines
4033 else \4154 else \
4034 { \4155 { \
4035 errno=0; \4156 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)) \
4037 { \4158 { \
4038 if( errno != EINTR) \4159 if( errno != EINTR) \
4039 { \4160 { \
@@ -4088,7 +4209,7 @@ extern int yylex (void); · 48 unmodified lines
4088 4209
4089/* Code executed at the end of each rule. */4210/* Code executed at the end of each rule. */
4090#ifndef YY_BREAK4211#ifndef YY_BREAK
4091#define YY_BREAK /*LINTED*/break;4212#define YY_BREAK break;
4092#endif4213#endif
4093 4214
4094#define YY_RULE_SETUP \4215#define YY_RULE_SETUP \
@@ -4098,10 +4219,15 @@ extern int yylex (void); · 3 unmodified lines
4098 */4219 */
4099YY_DECL4220YY_DECL
4100{4221{
4101 yy_state_type yy_current_state;4222 register yy_state_type yy_current_state;
4102 char *yy_cp, *yy_bp;4223 register char *yy_cp, *yy_bp;
4103 int yy_act;4224 register int yy_act;
4104 4225
4226#line 172 "chuck.lex"
4227
4228
4229#line 966 "chuck.yy.c"
4230
4105 if ( !(yy_init) )4231 if ( !(yy_init) )
4106 {4232 {
4107 (yy_init) = 1;4233 (yy_init) = 1;
@@ -4122,19 +4248,13 @@ YY_DECL · 14 unmodified lines
4122 if ( ! YY_CURRENT_BUFFER ) {4248 if ( ! YY_CURRENT_BUFFER ) {
4123 yyensure_buffer_stack ();4249 yyensure_buffer_stack ();
4124 YY_CURRENT_BUFFER_LVALUE =4250 YY_CURRENT_BUFFER_LVALUE =
4125 yy_create_buffer( yyin, YY_BUF_SIZE );4251 yy_create_buffer(yyin,YY_BUF_SIZE );
4126 }4252 }
4127 4253
4128 yy_load_buffer_state( );4254 yy_load_buffer_state( );
4129 }4255 }
4130 4256
4131 {4257 while ( 1 ) /* loops until end-of-file is reached */
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 */
4138 {4258 {
4139 yy_cp = (yy_c_buf_p);4259 yy_cp = (yy_c_buf_p);
4140 4260
@@ -4150,7 +4270,7 @@ YY_DECL · 9 unmodified lines
4150yy_match:4270yy_match:
4151 do4271 do
4152 {4272 {
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)];
4154 if ( yy_accept[yy_current_state] )4274 if ( yy_accept[yy_current_state] )
4155 {4275 {
4156 (yy_last_accepting_state) = yy_current_state;4276 (yy_last_accepting_state) = yy_current_state;
@@ -4160,9 +4280,9 @@ yy_match: · 3 unmodified lines
4160 {4280 {
4161 yy_current_state = (int) yy_def[yy_current_state];4281 yy_current_state = (int) yy_def[yy_current_state];
4162 if ( yy_current_state >= 243 )4282 if ( yy_current_state >= 243 )
4163 yy_c = yy_meta[yy_c];4283 yy_c = yy_meta[(unsigned int) yy_c];
4164 }4284 }
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];
4166 ++yy_cp;4286 ++yy_cp;
4167 }4287 }
4168 while ( yy_base[yy_current_state] != 327 );4288 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
4191 4311
4192case 1:4312case 1:
4193YY_RULE_SETUP4313YY_RULE_SETUP
4194#line 175 "core/chuck.lex"4314#line 174 "chuck.lex"
4195{ char c; adjust(); comment_hack; continue; }4315{ char c; adjust(); comment_hack; continue; }
4196 YY_BREAK4316 YY_BREAK
4197case 2:4317case 2:
4198YY_RULE_SETUP4318YY_RULE_SETUP
4199#line 176 "core/chuck.lex"4319#line 175 "chuck.lex"
4200{ char c; adjust(); comment_hack; continue; }4320{ char c; adjust(); comment_hack; continue; }
4201 YY_BREAK4321 YY_BREAK
4202case 3:4322case 3:
4203YY_RULE_SETUP4323YY_RULE_SETUP
4204#line 177 "core/chuck.lex"4324#line 176 "chuck.lex"
4205{ char c, c1; adjust(); block_comment_hack; continue; }4325{ char c, c1; adjust(); block_comment_hack; continue; }
4206 YY_BREAK4326 YY_BREAK
4207case 4:4327case 4:
4208YY_RULE_SETUP4328YY_RULE_SETUP
4209#line 178 "core/chuck.lex"4329#line 177 "chuck.lex"
4210{ adjust(); continue; }4330{ adjust(); continue; }
4211 YY_BREAK4331 YY_BREAK
4212case 5:4332case 5:
4213YY_RULE_SETUP4333YY_RULE_SETUP
4214#line 179 "core/chuck.lex"4334#line 178 "chuck.lex"
4215{ adjust(); continue; }4335{ adjust(); continue; }
4216 YY_BREAK4336 YY_BREAK
4217case 6:4337case 6:
4218/* rule 6 can match eol */4338/* rule 6 can match eol */
4219YY_RULE_SETUP4339YY_RULE_SETUP
4220#line 180 "core/chuck.lex"4340#line 179 "chuck.lex"
4221{ adjust(); EM_newline(); continue; }4341{ adjust(); EM_newline(); continue; }
4222 YY_BREAK4342 YY_BREAK
4223case 7:4343case 7:
4224/* rule 7 can match eol */4344/* rule 7 can match eol */
4225YY_RULE_SETUP4345YY_RULE_SETUP
4226#line 181 "core/chuck.lex"4346#line 180 "chuck.lex"
4227{ adjust(); EM_newline(); continue; }4347{ adjust(); EM_newline(); continue; }
4228 YY_BREAK4348 YY_BREAK
4229case 8:4349case 8:
4230YY_RULE_SETUP4350YY_RULE_SETUP
4231#line 183 "core/chuck.lex"4351#line 182 "chuck.lex"
4232{ adjust(); return PLUSPLUS; }4352{ adjust(); return PLUSPLUS; }
4233 YY_BREAK4353 YY_BREAK
4234case 9:4354case 9:
4235YY_RULE_SETUP4355YY_RULE_SETUP
4236#line 184 "core/chuck.lex"4356#line 183 "chuck.lex"
4237{ adjust(); return MINUSMINUS; }4357{ adjust(); return MINUSMINUS; }
4238 YY_BREAK4358 YY_BREAK
4239case 10:4359case 10:
4240YY_RULE_SETUP4360YY_RULE_SETUP
4241#line 185 "core/chuck.lex"4361#line 184 "chuck.lex"
4242{ adjust(); return POUNDPAREN; }4362{ adjust(); return POUNDPAREN; }
4243 YY_BREAK4363 YY_BREAK
4244case 11:4364case 11:
4245YY_RULE_SETUP4365YY_RULE_SETUP
4246#line 186 "core/chuck.lex"4366#line 185 "chuck.lex"
4247{ adjust(); return PERCENTPAREN; }4367{ adjust(); return PERCENTPAREN; }
4248 YY_BREAK4368 YY_BREAK
4249case 12:4369case 12:
4250YY_RULE_SETUP4370YY_RULE_SETUP
4251#line 187 "core/chuck.lex"4371#line 186 "chuck.lex"
4252{ adjust(); return ATPAREN; }4372{ adjust(); return ATPAREN; }
4253 YY_BREAK4373 YY_BREAK
4254case 13:4374case 13:
4255YY_RULE_SETUP4375YY_RULE_SETUP
4256#line 189 "core/chuck.lex"4376#line 188 "chuck.lex"
4257{ adjust(); return COMMA; }4377{ adjust(); return COMMA; }
4258 YY_BREAK4378 YY_BREAK
4259case 14:4379case 14:
4260YY_RULE_SETUP4380YY_RULE_SETUP
4261#line 190 "core/chuck.lex"4381#line 189 "chuck.lex"
4262{ adjust(); return COLON; }4382{ adjust(); return COLON; }
4263 YY_BREAK4383 YY_BREAK
4264case 15:4384case 15:
4265YY_RULE_SETUP4385YY_RULE_SETUP
4266#line 191 "core/chuck.lex"4386#line 190 "chuck.lex"
4267{ adjust(); return DOT; }4387{ adjust(); return DOT; }
4268 YY_BREAK4388 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. */
2 2
3/* Bison interface for Yacc-like parsers in C3/* Skeleton interface for Bison's Yacc-like parsers in C
4 4
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.
6 7
7 This program is free software: you can redistribute it and/or modify8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by9 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or10 the Free Software Foundation; either version 2, or (at your option)
10 (at your option) any later version.11 any later version.
11 12
12 This program is distributed in the hope that it will be useful,13 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of14 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +16,9 @@ · 1 unmodified line
15 GNU General Public License for more details.16 GNU General Public License for more details.
16 17
17 You should have received a copy of the GNU General Public License18 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. */
19 22
20/* As a special exception, you may create a larger work that contains23/* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work24 part or all of the Bison parser skeleton and distribute that work
@@ -30,140 +33,241 @@ · 8 unmodified lines
30 This special exception was added by the Free Software Foundation in33 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */34 version 2.2 of Bison. */
32 35
33#ifndef YY_YY_CHUCK_TAB_H_INCLUDED36/* Tokens. */
34# define YY_YY_CHUCK_TAB_H_INCLUDED
35/* Debug traces. */
36#ifndef YYDEBUG
37# define YYDEBUG 0
38#endif
39#if YYDEBUG
40extern int yydebug;
41#endif
42
43/* Token type. */
44#ifndef YYTOKENTYPE37#ifndef YYTOKENTYPE
45# define YYTOKENTYPE38# define YYTOKENTYPE
46 enum yytokentype39 /* Put the tokens into the symbol table, so that GDB and other debuggers
47 {40 know about them. */
48 ID = 258,41 enum yytokentype {
49 STRING_LIT = 259,42 ID = 258,
50 CHAR_LIT = 260,43 STRING_LIT = 259,
51 NUM = 261,44 CHAR_LIT = 260,
52 FLOAT = 262,45 NUM = 261,
53 POUND = 263,46 FLOAT = 262,
54 COMMA = 264,47 POUND = 263,
55 COLON = 265,48 COMMA = 264,
56 SEMICOLON = 266,49 COLON = 265,
57 LPAREN = 267,50 SEMICOLON = 266,
58 RPAREN = 268,51 LPAREN = 267,
59 LBRACK = 269,52 RPAREN = 268,
60 RBRACK = 270,53 LBRACK = 269,
61 LBRACE = 271,54 RBRACK = 270,
62 RBRACE = 272,55 LBRACE = 271,
63 DOT = 273,56 RBRACE = 272,
64 PLUS = 274,57 DOT = 273,
65 MINUS = 275,58 PLUS = 274,
66 TIMES = 276,59 MINUS = 275,
67 DIVIDE = 277,60 TIMES = 276,
68 PERCENT = 278,61 DIVIDE = 277,
69 EQ = 279,62 PERCENT = 278,
70 NEQ = 280,63 EQ = 279,
71 LT = 281,64 NEQ = 280,
72 LE = 282,65 LT = 281,
73 GT = 283,66 LE = 282,
74 GE = 284,67 GT = 283,
75 AND = 285,68 GE = 284,
76 OR = 286,69 AND = 285,
77 ASSIGN = 287,70 OR = 286,
78 IF = 288,71 ASSIGN = 287,
79 THEN = 289,72 IF = 288,
80 ELSE = 290,73 THEN = 289,
81 WHILE = 291,74 ELSE = 290,
82 FOR = 292,75 WHILE = 291,
83 DO = 293,76 FOR = 292,
84 LOOP = 294,77 DO = 293,
85 BREAK = 295,78 LOOP = 294,
86 CONTINUE = 296,79 BREAK = 295,
87 NULL_TOK = 297,80 CONTINUE = 296,
88 FUNCTION = 298,81 NULL_TOK = 297,
89 RETURN = 299,82 FUNCTION = 298,
90 QUESTION = 300,83 RETURN = 299,
91 EXCLAMATION = 301,84 QUESTION = 300,
92 S_OR = 302,85 EXCLAMATION = 301,
93 S_AND = 303,86 S_OR = 302,
94 S_XOR = 304,87 S_AND = 303,
95 PLUSPLUS = 305,88 S_XOR = 304,
96 MINUSMINUS = 306,89 PLUSPLUS = 305,
97 DOLLAR = 307,90 MINUSMINUS = 306,
98 POUNDPAREN = 308,91 DOLLAR = 307,
99 PERCENTPAREN = 309,92 POUNDPAREN = 308,
100 ATPAREN = 310,93 PERCENTPAREN = 309,
101 SIMULT = 311,94 ATPAREN = 310,
102 PATTERN = 312,95 SIMULT = 311,
103 CODE = 313,96 PATTERN = 312,
104 TRANSPORT = 314,97 CODE = 313,
105 HOST = 315,98 TRANSPORT = 314,
106 TIME = 316,99 HOST = 315,
107 WHENEVER = 317,100 TIME = 316,
108 NEXT = 318,101 WHENEVER = 317,
109 UNTIL = 319,102 NEXT = 318,
110 EXTERNAL = 320,103 UNTIL = 319,
111 GLOBAL = 321,104 EXTERNAL = 320,
112 EVERY = 322,105 GLOBAL = 321,
113 BEFORE = 323,106 EVERY = 322,
114 AFTER = 324,107 BEFORE = 323,
115 AT = 325,108 AFTER = 324,
116 AT_SYM = 326,109 AT = 325,
117 ATAT_SYM = 327,110 AT_SYM = 326,
118 NEW = 328,111 ATAT_SYM = 327,
119 SIZEOF = 329,112 NEW = 328,
120 TYPEOF = 330,113 SIZEOF = 329,
121 SAME = 331,114 TYPEOF = 330,
122 PLUS_CHUCK = 332,115 SAME = 331,
123 MINUS_CHUCK = 333,116 PLUS_CHUCK = 332,
124 TIMES_CHUCK = 334,117 MINUS_CHUCK = 333,
125 DIVIDE_CHUCK = 335,118 TIMES_CHUCK = 334,
126 S_AND_CHUCK = 336,119 DIVIDE_CHUCK = 335,
127 S_OR_CHUCK = 337,120 S_AND_CHUCK = 336,
128 S_XOR_CHUCK = 338,121 S_OR_CHUCK = 337,
129 SHIFT_RIGHT_CHUCK = 339,122 S_XOR_CHUCK = 338,
130 SHIFT_LEFT_CHUCK = 340,123 SHIFT_RIGHT_CHUCK = 339,
131 PERCENT_CHUCK = 341,124 SHIFT_LEFT_CHUCK = 340,
132 SHIFT_RIGHT = 342,125 PERCENT_CHUCK = 341,
133 SHIFT_LEFT = 343,126 SHIFT_RIGHT = 342,
134 TILDA = 344,127 SHIFT_LEFT = 343,
135 CHUCK = 345,128 TILDA = 344,
136 COLONCOLON = 346,129 CHUCK = 345,
137 S_CHUCK = 347,130 COLONCOLON = 346,
138 AT_CHUCK = 348,131 S_CHUCK = 347,
139 LEFT_S_CHUCK = 349,132 AT_CHUCK = 348,
140 UNCHUCK = 350,133 LEFT_S_CHUCK = 349,
141 UPCHUCK = 351,134 UNCHUCK = 350,
142 CLASS = 352,135 UPCHUCK = 351,
143 INTERFACE = 353,136 CLASS = 352,
144 EXTENDS = 354,137 INTERFACE = 353,
145 IMPLEMENTS = 355,138 EXTENDS = 354,
146 PUBLIC = 356,139 IMPLEMENTS = 355,
147 PROTECTED = 357,140 PUBLIC = 356,
148 PRIVATE = 358,141 PROTECTED = 357,
149 STATIC = 359,142 PRIVATE = 358,
150 ABSTRACT = 360,143 STATIC = 359,
151 CONST = 361,144 ABSTRACT = 360,
152 SPORK = 362,145 CONST = 361,
153 ARROW_RIGHT = 363,146 SPORK = 362,
154 ARROW_LEFT = 364,147 ARROW_RIGHT = 363,
155 L_HACK = 365,148 ARROW_LEFT = 364,
156 R_HACK = 366149 L_HACK = 365,
157 };150 R_HACK = 366
151 };
158#endif152#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
159 264
160/* Value type. */
161#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
162 265
163union YYSTYPE
164{
165#line 59 "chuck.y" /* yacc.c:1909 */
166 266
267#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
268typedef union YYSTYPE
269#line 59 "chuck.y"
270{
167 int pos;271 int pos;
168 int ival;272 int ival;
169 double fval;273 double fval;
@@ -187,18 +291,14 @@ union YYSTYPE · 17 unmodified lines
187 a_Complex complex_exp;291 a_Complex complex_exp;
188 a_Polar polar_exp;292 a_Polar polar_exp;
189 a_Vec vec_exp; // ge: added 1.3.5.3293 a_Vec vec_exp; // ge: added 1.3.5.3
190 294}
191#line 192 "chuck.tab.h" /* yacc.c:1909 */295/* Line 1529 of yacc.c. */
192};296#line 297 "chuck.tab.h"
193 297 YYSTYPE;
194typedef union YYSTYPE YYSTYPE;298# define yystype YYSTYPE /* obsolescent; will be withdrawn */
195# define YYSTYPE_IS_TRIVIAL 1
196# define YYSTYPE_IS_DECLARED 1299# define YYSTYPE_IS_DECLARED 1
300# define YYSTYPE_IS_TRIVIAL 1
197#endif301#endif
198 302
199
200extern YYSTYPE yylval;303extern YYSTYPE yylval;
201 304
202int 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.
1 13
2MSBUILD=msbuild.exe14MSBUILD=msbuild.exe
3 15
src/core/midiio_rtmidi.cpp+1071−2
@@ -46,7 +46,7 @@ · 45 unmodified lines
46//-----------------------------------------------------------------------------46//-----------------------------------------------------------------------------
47// global variables47// global variables
48//-----------------------------------------------------------------------------48//-----------------------------------------------------------------------------
49#define BUFFER_SIZE 819249#define MIDI_BUFFER_SIZE 8192
50 50
51std::vector<RtMidiIn *> MidiInManager::the_mins;51std::vector<RtMidiIn *> MidiInManager::the_mins;
52std::vector< std::map< Chuck_VM *, CBufferAdvance * > > MidiInManager::the_bufs;52std::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
519 519
520 // allocate the buffer520 // allocate the buffer
521 CBufferAdvance * cbuf = new CBufferAdvance;521 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] ) )
523 {523 {
524 if( !suppress_output )524 if( !suppress_output )
525 EM_error2( 0, "MidiIn: couldn't allocate CBuffer for port %i...", device_num );525 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
1069}1069}
1070 1070
1071#endif // __DISABLE_MIDI__1071#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
1085using namespace stk;
1086using namespace std;
1087
1088
1089
1090
1091#pragma mark - MIDI helpers
1092
1093
1094//-----------------------------------------------------------------------------
1095// name: isNoteOff()
1096// desc: ...
1097//-----------------------------------------------------------------------------
1098static 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//-----------------------------------------------------------------------------
1116static 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//-----------------------------------------------------------------------------
1131static 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//-----------------------------------------------------------------------------
1146static 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//-----------------------------------------------------------------------------
1161MidiScoreReader::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//-----------------------------------------------------------------------------
1173MidiScoreReader::~MidiScoreReader()
1174{
1175 // clean up
1176 cleanup();
1177}
1178
1179
1180
1181
1182//-----------------------------------------------------------------------------
1183// name: cleanup()
1184// desc: reclaim
1185//-----------------------------------------------------------------------------
1186void 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//-----------------------------------------------------------------------------
1241bool 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//-----------------------------------------------------------------------------
1312long 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//-----------------------------------------------------------------------------
1325long 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//-----------------------------------------------------------------------------
1338const 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//-----------------------------------------------------------------------------
1350double 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//-----------------------------------------------------------------------------
1363long 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//-----------------------------------------------------------------------------
1399long 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//-----------------------------------------------------------------------------
1435const 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//-----------------------------------------------------------------------------
1459const 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//-----------------------------------------------------------------------------
1492bool 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//-----------------------------------------------------------------------------
1521bool 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//-----------------------------------------------------------------------------
1561void 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//-----------------------------------------------------------------------------
1582void 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//-----------------------------------------------------------------------------
1652bool 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//-----------------------------------------------------------------------------
1674bool 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//-----------------------------------------------------------------------------
1713bool 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//-----------------------------------------------------------------------------
1897void 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//-----------------------------------------------------------------------------
1914const 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//-----------------------------------------------------------------------------
1927void 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//-----------------------------------------------------------------------------
1940void 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//-----------------------------------------------------------------------------
1952long 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//-----------------------------------------------------------------------------
1969static vector<MidiNoteEvent *> s_nullNoteVector;
1970const 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//-----------------------------------------------------------------------------
1986static vector<MidiLyricEvent *> s_nullLyricVector;
1987const 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//-----------------------------------------------------------------------------
2003long 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//-----------------------------------------------------------------------------
2022void 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//-----------------------------------------------------------------------------
2049void 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//-----------------------------------------------------------------------------
2073void 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//-----------------------------------------------------------------------------
2095void 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//-----------------------------------------------------------------------------
2109string 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//-----------------------------------------------------------------------------
2126long 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
168void probeMidiOut();168void probeMidiOut();
169 169
170 170
171
172
173//-----------------------------------------------------------------------------
174// name: class MidiInManager
175// desc: singleton manager
176//-----------------------------------------------------------------------------
171class MidiInManager177class MidiInManager
172{178{
173public:179public:
@@ -192,6 +198,12 @@ public: · 18 unmodified lines
192};198};
193 199
194 200
201
202
203//-----------------------------------------------------------------------------
204// name: class MidiOutManager
205// desc: singleton manager
206//-----------------------------------------------------------------------------
195class MidiOutManager207class MidiOutManager
196{208{
197public:209public:
@@ -207,6 +219,8 @@ protected: · 9 unmodified lines
207};219};
208 220
209 221
222
223
210//-----------------------------------------------------------------------------224//-----------------------------------------------------------------------------
211// name: class MidiRW225// name: class MidiRW
212// desc: reads and writes midi messages from file226// desc: reads and writes midi messages from file
@@ -233,6 +247,8 @@ protected: · 20 unmodified lines
233t_CKBOOL midirw_detach( );247t_CKBOOL midirw_detach( );
234 248
235 249
250
251
236//-----------------------------------------------------------------------------252//-----------------------------------------------------------------------------
237// name: class MidiMsgOut253// name: class MidiMsgOut
238// desc: reads midi messages from file254// desc: reads midi messages from file
@@ -255,6 +271,8 @@ protected: · 16 unmodified lines
255};271};
256 272
257 273
274
275
258//-----------------------------------------------------------------------------276//-----------------------------------------------------------------------------
259// name: class MidiMsgIn277// name: class MidiMsgIn
260// desc: reads midi messages from file278// desc: reads midi messages from file
@@ -277,4 +295,208 @@ protected: · 16 unmodified lines
277};295};
278 296
279 297
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//-----------------------------------------------------------------------------
323struct 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//-----------------------------------------------------------------------------
364struct 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
379namespace stk { class MidiFileIn; }
380
381
382
383
384//-----------------------------------------------------------------------------
385// name: class YScoreReader()
386// desc: loads a MIDI score
387//-----------------------------------------------------------------------------
388class MidiScoreReader
389{
390public:
391 MidiScoreReader();
392 ~MidiScoreReader();
393
394public:
395 bool load( const char * filename, float velScale = 0.0f );
396 void cleanup();
397
398public:
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
416public:
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
438public: // 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
448public: // 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
456protected: // 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
467protected:
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
494private: // 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
280#endif502#endif
src/core/uana_extract.cpp+1−1
@@ -1378,7 +1378,7 @@ CK_DLL_SFUN( XCorr_compute ) · 1377 unmodified lines
1378void xcorr_fft( SAMPLE * f, t_CKINT fsize, SAMPLE * g, t_CKINT gsize, SAMPLE * buffy, t_CKINT size )1378void xcorr_fft( SAMPLE * f, t_CKINT fsize, SAMPLE * g, t_CKINT gsize, SAMPLE * buffy, t_CKINT size )
1379{1379{
1380 // sanity check1380 // sanity check
1381 assert( fsize == gsize == size );1381 assert( fsize == gsize && gsize == size );
1382 1382
1383 // take fft1383 // take fft
1384 rfft( f, size/2, FFT_FORWARD );1384 rfft( f, size/2, FFT_FORWARD );
src/core/ugen_filter.cpp+118−1
@@ -34,6 +34,7 @@ · 33 unmodified lines
34#include "ugen_filter.h"34#include "ugen_filter.h"
35#include "chuck_type.h"35#include "chuck_type.h"
36#include "chuck_compile.h"36#include "chuck_compile.h"
37#include "chuck_instr.h"
37#include <math.h>38#include <math.h>
38#include <stdlib.h>39#include <stdlib.h>
39 40
@@ -1271,6 +1272,12 @@ CK_DLL_CTRL( BPF_ctrl_freq ) · 1231 unmodified lines
1271 // implementation: adapted from SC3's BPF1272 // implementation: adapted from SC3's BPF
1272 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1273 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1273 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1274 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 }
1274 1281
1275 // set1282 // set
1276 d->set_bpf( freq, d->m_Q );1283 d->set_bpf( freq, d->m_Q );
@@ -1303,6 +1310,12 @@ CK_DLL_CTRL( BPF_ctrl_Q ) · 26 unmodified lines
1303 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1310 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1304 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1311 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1305 1312
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
1306 // set1319 // set
1307 d->set_bpf( d->m_freq, Q );1320 d->set_bpf( d->m_freq, Q );
1308 1321
@@ -1335,6 +1348,16 @@ CK_DLL_CTRL( BPF_ctrl_set ) · 26 unmodified lines
1335 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1348 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1336 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1349 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1337 1350
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
1338 // set1361 // set
1339 d->set_bpf( freq, Q );1362 d->set_bpf( freq, Q );
1340}1363}
@@ -1386,6 +1409,12 @@ CK_DLL_CTRL( BRF_ctrl_freq ) · 45 unmodified lines
1386 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1409 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1387 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1410 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1388 1411
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
1389 // set1418 // set
1390 d->set_brf( freq, d->m_Q );1419 d->set_brf( freq, d->m_Q );
1391 1420
@@ -1417,6 +1446,12 @@ CK_DLL_CTRL( BRF_ctrl_Q ) · 25 unmodified lines
1417 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1446 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1418 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1447 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1419 1448
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
1420 // set1455 // set
1421 d->set_brf( d->m_freq, Q );1456 d->set_brf( d->m_freq, Q );
1422 1457
@@ -1449,6 +1484,16 @@ CK_DLL_CTRL( BRF_ctrl_set ) · 26 unmodified lines
1449 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1484 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1450 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1485 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1451 1486
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
1452 // set1497 // set
1453 d->set_brf( freq, Q );1498 d->set_brf( freq, Q );
1454}1499}
@@ -1501,6 +1546,12 @@ CK_DLL_CTRL( RLPF_ctrl_freq ) · 46 unmodified lines
1501 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1546 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1502 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1547 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1503 1548
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
1504 // set1555 // set
1505 d->set_rlpf( freq, d->m_Q );1556 d->set_rlpf( freq, d->m_Q );
1506 1557
@@ -1531,6 +1582,12 @@ CK_DLL_CTRL( RLPF_ctrl_Q ) · 24 unmodified lines
1531 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1582 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1532 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1583 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1533 1584
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
1534 // set1591 // set
1535 d->set_rlpf( d->m_freq, Q );1592 d->set_rlpf( d->m_freq, Q );
1536 1593
@@ -1563,6 +1620,16 @@ CK_DLL_CTRL( RLPF_ctrl_set ) · 26 unmodified lines
1563 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1620 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1564 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1621 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1565 1622
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
1566 // set1633 // set
1567 d->set_rlpf( freq, Q );1634 d->set_rlpf( freq, Q );
1568 1635
@@ -1617,6 +1684,14 @@ CK_DLL_CTRL( ResonZ_ctrl_freq ) · 48 unmodified lines
1617 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1684 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1618 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1685 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1619 1686
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
1620 // set1695 // set
1621 d->set_resonz( freq, d->m_Q );1696 d->set_resonz( freq, d->m_Q );
1622 1697
@@ -1647,6 +1722,14 @@ CK_DLL_CTRL( ResonZ_ctrl_Q ) · 24 unmodified lines
1647 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1722 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1648 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1723 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1649 1724
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
1650 // set1733 // set
1651 d->set_resonz( d->m_freq, Q );1734 d->set_resonz( d->m_freq, Q );
1652 1735
@@ -1679,6 +1762,18 @@ CK_DLL_CTRL( ResonZ_ctrl_set ) · 26 unmodified lines
1679 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1762 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1680 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1763 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1681 1764
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
1682 // set1777 // set
1683 d->set_resonz( freq, Q );1778 d->set_resonz( freq, Q );
1684 1779
@@ -1733,6 +1828,12 @@ CK_DLL_CTRL( RHPF_ctrl_freq ) · 48 unmodified lines
1733 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1828 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1734 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1829 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1735 1830
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
1736 // set1837 // set
1737 d->set_rhpf( freq, d->m_Q );1838 d->set_rhpf( freq, d->m_Q );
1738 1839
@@ -1763,6 +1864,12 @@ CK_DLL_CTRL( RHPF_ctrl_Q ) · 24 unmodified lines
1763 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);1864 FilterBasic_data * d = (FilterBasic_data *)OBJ_MEMBER_UINT(SELF, FilterBasic_offset_data);
1764 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1865 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1765 1866
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
1766 // set1873 // set
1767 d->set_rhpf( d->m_freq, Q );1874 d->set_rhpf( d->m_freq, Q );
1768 1875
@@ -1795,8 +1902,18 @@ CK_DLL_CTRL( RHPF_ctrl_set ) · 26 unmodified lines
1795 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);1902 t_CKFLOAT freq = GET_NEXT_FLOAT(ARGS);
1796 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);1903 t_CKFLOAT Q = GET_NEXT_FLOAT(ARGS);
1797 1904
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
1798 // set1915 // set
1799 d->set_rlpf( freq, Q );1916 d->set_rhpf( freq, Q );
1800}1917}
1801 1918
1802 1919
src/core/ugen_stk.cpp+32−1
@@ -41,6 +41,7 @@ · 40 unmodified lines
41#include "chuck_vm.h"41#include "chuck_vm.h"
42#include "chuck_compile.h"42#include "chuck_compile.h"
43#include "chuck_lang.h"43#include "chuck_lang.h"
44#include "chuck_io.h"
44#include "chuck_carrier.h"45#include "chuck_carrier.h"
45#include <stdlib.h>46#include <stdlib.h>
46#include <string.h>47#include <string.h>
@@ -18685,6 +18686,9 @@ namespace stk { · 18638 unmodified lines
18685 18686
18686MidiFileIn :: MidiFileIn( std::string fileName )18687MidiFileIn :: MidiFileIn( std::string fileName )
18687{18688{
18689 // ge: initialize
18690 bpm_ = 0;
18691
18688 // Attempt to open the file.18692 // Attempt to open the file.
18689 file_.open( fileName.c_str(), std::ios::in | std::ios::binary );18693 file_.open( fileName.c_str(), std::ios::in | std::ios::binary );
18690 if ( !file_ ) {18694 if ( !file_ ) {
@@ -18796,6 +18800,10 @@ MidiFileIn :: MidiFileIn( std::string fileName ) · 105 unmodified lines
18796 tempoEvent.count = count;18800 tempoEvent.count = count;
18797 value = ( event[3] << 16 ) + ( event[4] << 8 ) + event[5];18801 value = ( event[3] << 16 ) + ( event[4] << 8 ) + event[5];
18798 tempoEvent.tickSeconds = (double) (0.000001 * value / tickrate);18802 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;
18799 if ( count > tempoEvents_.back().count )18807 if ( count > tempoEvents_.back().count )
18800 tempoEvents_.push_back( tempoEvent );18808 tempoEvents_.push_back( tempoEvent );
18801 else18809 else
@@ -18826,6 +18834,21 @@ MidiFileIn :: ~MidiFileIn() · 24 unmodified lines
18826 file_.close();18834 file_.close();
18827}18835}
18828 18836
18837int MidiFileIn :: getFileFormat() const
18838{
18839 return format_;
18840}
18841
18842unsigned int MidiFileIn :: getNumberOfTracks() const
18843{
18844 return nTracks_;
18845}
18846
18847int MidiFileIn :: getDivision() const
18848{
18849 return division_;
18850}
18851
18829void MidiFileIn :: rewindTrack( unsigned int track )18852void MidiFileIn :: rewindTrack( unsigned int track )
18830{18853{
18831 if ( track >= nTracks_ ) {18854 if ( track >= nTracks_ ) {
@@ -18849,6 +18872,12 @@ double MidiFileIn :: getTickSeconds( unsigned int track ) · 17 unmodified lines
18849 return tickSeconds_[track];18872 return tickSeconds_[track];
18850}18873}
18851 18874
18875// ge: implemented
18876double MidiFileIn :: getBPM()
18877{
18878 return bpm_;
18879}
18880
18852unsigned long MidiFileIn :: getNextEvent( std::vector<unsigned char> *event, unsigned int track )18881unsigned long MidiFileIn :: getNextEvent( std::vector<unsigned char> *event, unsigned int track )
18853{18882{
18854 // Fill the user-provided vector with the next event in the18883 // 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
18942 double tickrate = (double) (division_ & 0x7FFF);18971 double tickrate = (double) (division_ & 0x7FFF);
18943 unsigned long value = ( event->at(3) << 16 ) + ( event->at(4) << 8 ) + event->at(5);18972 unsigned long value = ( event->at(3) << 16 ) + ( event->at(4) << 8 ) + event->at(5);
18944 tickSeconds_[track] = (double) (0.000001 * value / tickrate);18973 tickSeconds_[track] = (double) (0.000001 * value / tickrate);
18974
18975 // ge: set BPM
18976 bpm_ = 60000000.0 / value;
18945 }18977 }
18946 18978
18947 if ( format_ == 1 ) {18979 if ( format_ == 1 ) {
@@ -19013,7 +19045,6 @@ bool MidiFileIn :: readVariableLength( unsigned long *value ) · 65 unmodified lines
19013 19045
19014} // stk namespace19046} // stk namespace
19015 19047
19016
19017// chuck - import19048// chuck - import
19018// wrapper functions19049// wrapper functions
19019 19050
src/core/ugen_stk.h+12−3
@@ -6402,10 +6402,10 @@ public: · 6401 unmodified lines
6402 ~MidiFileIn();6402 ~MidiFileIn();
6403 6403
6404 //! Return the MIDI file format (0, 1, or 2).6404 //! Return the MIDI file format (0, 1, or 2).
6405 int getFileFormat() const { return format_; };6405 int getFileFormat() const;
6406 6406
6407 //! Return the number of tracks in the MIDI file.6407 //! Return the number of tracks in the MIDI file.
6408 unsigned int getNumberOfTracks() const { return nTracks_; };6408 unsigned int getNumberOfTracks() const;
6409 6409
6410 //! Return the MIDI file division value from the file header.6410 //! Return the MIDI file division value from the file header.
6411 /*!6411 /*!
@@ -6413,7 +6413,7 @@ public: · 1 unmodified line
6413 MIDI File Specification. In particular, if the MSB is set, the6413 MIDI File Specification. In particular, if the MSB is set, the
6414 file uses time-code representations for delta-time values.6414 file uses time-code representations for delta-time values.
6415 */6415 */
6416 int getDivision() const { return division_; };6416 int getDivision() const;
6417 6417
6418 //! Move the specified track event reader to the beginning of its track.6418 //! Move the specified track event reader to the beginning of its track.
6419 /*!6419 /*!
@@ -6460,6 +6460,13 @@ public: · 40 unmodified lines
6460 */6460 */
6461 unsigned long getNextMidiEvent( std::vector<unsigned char> *midiEvent, unsigned int track = 0 );6461 unsigned long getNextMidiEvent( std::vector<unsigned char> *midiEvent, unsigned int track = 0 );
6462 6462
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
6463protected:6470protected:
6464 6471
6465 // This protected class function is used for reading variable-length6472 // This protected class function is used for reading variable-length
@@ -6479,6 +6486,8 @@ protected: · 13 unmodified lines
6479 std::vector<long> trackOffsets_;6486 std::vector<long> trackOffsets_;
6480 std::vector<long> trackLengths_;6487 std::vector<long> trackLengths_;
6481 std::vector<char> trackStatus_;6488 std::vector<char> trackStatus_;
6489 // ge:
6490 double bpm_;
6482 6491
6483 // This structure and the following variables are used to save and6492 // This structure and the following variables are used to save and
6484 // keep track of a format 1 tempo map (and the initial tickSeconds6493 // 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
121 type_engine_register_deprecate( env, "zerox", "ZeroX" );121 type_engine_register_deprecate( env, "zerox", "ZeroX" );
122 type_engine_register_deprecate( env, "delayp", "DelayP" );122 type_engine_register_deprecate( env, "delayp", "DelayP" );
123 type_engine_register_deprecate( env, "sndbuf", "SndBuf" );123 type_engine_register_deprecate( env, "sndbuf", "SndBuf" );
124 type_engine_register_deprecate( env, "Chubgraph", "Chugraph" );
124 125
125 //! \section audio output126 //! \section audio output
126 127
@@ -128,7 +129,7 @@ DLL_QUERY xxx_query( Chuck_DL_Query * QUERY ) · 1 unmodified line
128 // init as base class: Subgraph129 // init as base class: Subgraph
129 //-------------------------------------------------------------------------130 //-------------------------------------------------------------------------
130 doc = "Base class for chubgraph-based user unit generators. ";131 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(),
132 subgraph_ctor, NULL, NULL, NULL, 1, 1, doc.c_str() ) )133 subgraph_ctor, NULL, NULL, NULL, 1, 1, doc.c_str() ) )
133 return FALSE;134 return FALSE;
134 135
@@ -3787,7 +3788,7 @@ struct LiSaMulti_data · 3652 unmodified lines
3787 3788
3788 if(record) {3789 if(record) {
3789 if(looprec) {3790 if(looprec) {
3790 if(rindex >= loop_end_rec) rindex = 0;3791 if(rindex >= loop_end_rec) rindex = loop_start[0];
3791 tempsample = coeff * mdata[rindex] + insample;3792 tempsample = coeff * mdata[rindex] + insample;
3792 //mdata[rindex] = coeff * mdata[rindex] + insample;3793 //mdata[rindex] = coeff * mdata[rindex] + insample;
3793 //rindex++;3794 //rindex++;
src/core/util_thread.cpp+9−1
@@ -67,7 +67,15 @@ XThread::XThread( ) · 66 unmodified lines
67//-----------------------------------------------------------------------------67//-----------------------------------------------------------------------------
68XThread::~XThread( )68XThread::~XThread( )
69{69{
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)
71 {79 {
72#if defined(__PLATFORM_MACOSX__) || defined(__PLATFORM_LINUX__) || defined(__WINDOWS_PTHREAD__)80#if defined(__PLATFORM_MACOSX__) || defined(__PLATFORM_LINUX__) || defined(__WINDOWS_PTHREAD__)
73 pthread_cancel(thread);81 pthread_cancel(thread);
src/host/chuck_audio.cpp+80−15
@@ -81,8 +81,10 @@ t_CKBOOL ChuckAudio::m_init = FALSE; · 80 unmodified lines
81t_CKBOOL ChuckAudio::m_start = FALSE;81t_CKBOOL ChuckAudio::m_start = FALSE;
82t_CKBOOL ChuckAudio::m_go = FALSE;82t_CKBOOL ChuckAudio::m_go = FALSE;
83t_CKBOOL ChuckAudio::m_silent = FALSE;83t_CKBOOL ChuckAudio::m_silent = FALSE;
84t_CKBOOL ChuckAudio::m_expand_in_mono2stereo= FALSE;
84t_CKUINT ChuckAudio::m_num_channels_out = NUM_CHANNELS_DEFAULT;85t_CKUINT ChuckAudio::m_num_channels_out = NUM_CHANNELS_DEFAULT;
85t_CKUINT ChuckAudio::m_num_channels_in = NUM_CHANNELS_DEFAULT;86t_CKUINT ChuckAudio::m_num_channels_in = NUM_CHANNELS_DEFAULT;
87t_CKUINT ChuckAudio::m_num_channels_max = NUM_CHANNELS_DEFAULT;
86t_CKUINT ChuckAudio::m_sample_rate = SAMPLE_RATE_DEFAULT;88t_CKUINT ChuckAudio::m_sample_rate = SAMPLE_RATE_DEFAULT;
87t_CKUINT ChuckAudio::m_buffer_size = BUFFER_SIZE_DEFAULT;89t_CKUINT ChuckAudio::m_buffer_size = BUFFER_SIZE_DEFAULT;
88t_CKUINT ChuckAudio::m_num_buffers = NUM_BUFFERS_DEFAULT;90t_CKUINT ChuckAudio::m_num_buffers = NUM_BUFFERS_DEFAULT;
@@ -465,8 +467,6 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 376 unmodified lines
465 // remember user data to pass to callback467 // remember user data to pass to callback
466 m_cb_user_data = data;468 m_cb_user_data = data;
467 469
468 // # of channels
469 t_CKUINT num_channels = 0;
470 // variable to pass by reference into RtAudio470 // variable to pass by reference into RtAudio
471 unsigned int bufsize = m_buffer_size;471 unsigned int bufsize = m_buffer_size;
472 472
@@ -604,8 +604,10 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 131 unmodified lines
604 // convert 1-based ordinal to 0-based ordinal604 // convert 1-based ordinal to 0-based ordinal
605 if( m_num_channels_in > 0 )605 if( m_num_channels_in > 0 )
606 {606 {
607 // if we are requesting the default input device
607 if( m_adc_n == 0 )608 if( m_adc_n == 0 )
608 {609 {
610 // get default input device
609 m_adc_n = m_rtaudio->getDefaultInputDevice();611 m_adc_n = m_rtaudio->getDefaultInputDevice();
610 612
611 // ensure correct channel count if default device is requested613 // 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
617 // find first device with at least the requested channel count619 // find first device with at least the requested channel count
618 m_adc_n = -1;620 m_adc_n = -1;
619 int num_devices = m_rtaudio->getDeviceCount();621 int num_devices = m_rtaudio->getDeviceCount();
620 for(int i = 0; i < num_devices; i++)622 for( int i = 0; i < num_devices; i++ )
621 {623 {
622 device_info = m_rtaudio->getDeviceInfo(i);624 device_info = m_rtaudio->getDeviceInfo(i);
623 if(device_info.inputChannels >= m_num_channels_in)625 if( device_info.inputChannels >= m_num_channels_in )
624 {626 {
625 m_adc_n = i;627 // added 1.4.0.1 -- check if the sample rate is supported
626 break;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;
627 }679 }
628 }680 }
629 681
@@ -641,6 +693,7 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 11 unmodified lines
641 }693 }
642 else694 else
643 {695 {
696 // offset to 0-index device number
644 m_adc_n -= 1;697 m_adc_n -= 1;
645 }698 }
646 }699 }
@@ -658,7 +711,7 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 11 unmodified lines
658 711
659 RtAudio::StreamParameters input_parameters;712 RtAudio::StreamParameters input_parameters;
660 input_parameters.deviceId = m_adc_n;713 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;
662 input_parameters.firstChannel = 0;715 input_parameters.firstChannel = 0;
663 716
664 RtAudio::StreamOptions stream_options;717 RtAudio::StreamOptions stream_options;
@@ -693,17 +746,17 @@ t_CKBOOL ChuckAudio::initialize( t_CKUINT num_dac_channels, · 28 unmodified lines
693 EM_poplog();746 EM_poplog();
694 747
695 // greater of dac/adc channels748 // greater of dac/adc channels
696 num_channels = num_dac_channels > num_adc_channels ?749 m_num_channels_max = num_dac_channels > num_adc_channels ?
697 num_dac_channels : num_adc_channels;750 num_dac_channels : num_adc_channels;
698 // log751 // log
699 EM_log( CK_LOG_SEVERE, "allocating buffers for %d x %d samples...",752 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 );
701 754
702 // allocate buffers755 // allocate buffers
703 m_buffer_in = new SAMPLE[m_buffer_size * num_channels];756 m_buffer_in = new SAMPLE[m_buffer_size * m_num_channels_max];
704 m_buffer_out = new SAMPLE[m_buffer_size * num_channels];757 m_buffer_out = new SAMPLE[m_buffer_size * m_num_channels_max];
705 memset( m_buffer_in, 0, m_buffer_size * sizeof(SAMPLE) * num_channels );758 memset( m_buffer_in, 0, m_buffer_size * sizeof(SAMPLE) * m_num_channels_max );
706 memset( m_buffer_out, 0, m_buffer_size * sizeof(SAMPLE) * num_channels );759 memset( m_buffer_out, 0, m_buffer_size * sizeof(SAMPLE) * m_num_channels_max );
707 760
708 return m_init = TRUE;761 return m_init = TRUE;
709}762}
@@ -761,7 +814,19 @@ int ChuckAudio::cb( void * output_buffer, void * input_buffer, unsigned int buff · 51 unmodified lines
761 // copy input to local buffer814 // copy input to local buffer
762 if( m_num_channels_in )815 if( m_num_channels_in )
763 {816 {
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 }
765 // copy to extern830 // copy to extern
766 if( m_extern_in ) memcpy( m_extern_in, input_buffer, len );831 if( m_extern_in ) memcpy( m_extern_in, input_buffer, len );
767 }832 }
src/host/chuck_audio.h+2−0
@@ -135,8 +135,10 @@ public: // data · 134 unmodified lines
135 static t_CKBOOL m_start;135 static t_CKBOOL m_start;
136 static t_CKBOOL m_go; // counter of # of times callback called136 static t_CKBOOL m_go; // counter of # of times callback called
137 static t_CKBOOL m_silent; // if true, will output silence137 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
138 static t_CKUINT m_num_channels_out;139 static t_CKUINT m_num_channels_out;
139 static t_CKUINT m_num_channels_in;140 static t_CKUINT m_num_channels_in;
141 static t_CKUINT m_num_channels_max; // the max of out/in
140 static t_CKUINT m_sample_rate;142 static t_CKUINT m_sample_rate;
141 static t_CKUINT m_bps;143 static t_CKUINT m_bps;
142 static t_CKUINT m_buffer_size;144 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
408 t_CKBOOL auto_depend = FALSE;408 t_CKBOOL auto_depend = FALSE;
409 t_CKBOOL block = FALSE;409 t_CKBOOL block = FALSE;
410 // t_CKBOOL enable_shell = FALSE;410 // t_CKBOOL enable_shell = FALSE;
411 t_CKBOOL syntax_check_only = FALSE;
411 t_CKBOOL no_vm = FALSE;412 t_CKBOOL no_vm = FALSE;
412 t_CKBOOL load_hid = FALSE;413 t_CKBOOL load_hid = FALSE;
413 t_CKBOOL enable_server = TRUE;414 t_CKBOOL enable_server = TRUE;
@@ -492,6 +493,10 @@ bool go( int argc, const char ** argv ) · 78 unmodified lines
492 // blocking removed, ge: 1.3.5.3493 // blocking removed, ge: 1.3.5.3
493 // else if( !strcmp(argv[i], "--blocking") )494 // else if( !strcmp(argv[i], "--blocking") )
494 // block = TRUE;495 // block = TRUE;
496 else if( !strcmp(argv[i], "--syntax") ) {
497 syntax_check_only = TRUE;
498 g_enable_realtime_audio = FALSE;
499 }
495 else if( !strcmp(argv[i], "--hid") )500 else if( !strcmp(argv[i], "--hid") )
496 load_hid = TRUE;501 load_hid = TRUE;
497 else if( !strcmp(argv[i], "--shell") || !strcmp( argv[i], "-e" ) )502 else if( !strcmp(argv[i], "--shell") || !strcmp( argv[i], "-e" ) )
@@ -881,7 +886,7 @@ bool go( int argc, const char ** argv ) · 383 unmodified lines
881 // TODO: refactor initialize() to take in the dac and adc nums886 // TODO: refactor initialize() to take in the dac and adc nums
882 ChuckAudio::m_adc_n = adc;887 ChuckAudio::m_adc_n = adc;
883 ChuckAudio::m_dac_n = dac;888 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,
885 srate, buffer_size, num_buffers, cb, (void *)the_chuck, force_srate );890 srate, buffer_size, num_buffers, cb, (void *)the_chuck, force_srate );
886 // check891 // check
887 if( !retval )892 if( !retval )
@@ -970,6 +975,9 @@ bool go( int argc, const char ** argv ) · 82 unmodified lines
970 // pop indent975 // pop indent
971 EM_poplog();976 EM_poplog();
972 977
978 if( syntax_check_only )
979 return TRUE;
980
973 // boost priority981 // boost priority
974 if( XThreadUtil::our_priority != 0x7fffffff )982 if( XThreadUtil::our_priority != 0x7fffffff )
975 {983 {
@@ -1029,7 +1037,11 @@ bool go( int argc, const char ** argv ) · 53 unmodified lines
1029 // real-time audio1037 // real-time audio
1030 if( g_enable_realtime_audio )1038 if( g_enable_realtime_audio )
1031 {1039 {
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 );
1033 }1045 }
1034 else // silent mode1046 else // silent mode
1035 {1047 {
@@ -1038,6 +1050,10 @@ bool go( int argc, const char ** argv ) · 2 unmodified lines
1038 }1050 }
1039 }1051 }
1040 1052
1053 Chuck_DL_MainThreadHook * hook = the_chuck->getMainThreadHook();
1054 if (hook)
1055 hook->m_quit(hook->m_bindle);
1056
1041 return TRUE;1057 return TRUE;
1042}1058}
1043 1059
src/makefile+1−1
@@ -71,7 +71,7 @@ osx linux-pulse linux-jack linux-alsa cygwin osx-rl: chuck · 70 unmodified lines
71win32:71win32:
72 make -f $(COREDIR)/makefile.x/makefile.win3272 make -f $(COREDIR)/makefile.x/makefile.win32
73 73
74CK_VERSION=1.4.0.074CK_VERSION=1.4.0.1
75 75
76 76
77########################### COMPILATION TOOLS ##################################77########################### 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
6SqrOsc c => dac;
7.5 => c.gain;
80 => c.freq;
960.0 / 1000 => float beat;
10beat::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