/usr/share/SuperCollider/Extensions/scide_scel/storeLispOn.sc is in supercollider-emacs 1:3.6.3~repack-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | // copyright 2003 stefan kersten <steve@k-hornz.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
// USA
+ Object {
asLispString {
var stream;
stream = CollStream.new;
this.storeLispOn(stream);
^stream.collection
}
asLispExpression {
^this.asLispString
}
storeLispOn { arg stream;
stream << "#<" << this << ">"
}
}
+ Symbol {
storeLispOn { arg stream;
stream.putAll(this.asString)
}
}
+ String {
asLispExpression {
^this
}
storeLispOn { arg stream;
// note, extra space after \\ is for emacs paren matching
// not syntactically significant
stream.put($").putAll(this.escapeChar($\\ ).escapeChar($")).put($")
}
}
+ Char {
storeLispOn { arg stream;
stream.putAll("?"++this)
}
}
+ Color {
storeLispOn { arg stream;
("#"++(red*255).asInteger.asHexString(2)
++(green*255).asInteger.asHexString(2)
++(blue*255).asInteger.asHexString(2)).storeLispOn(stream)
}
}
+ Number {
storeLispOn { arg stream;
stream << this
}
}
+ Nil {
storeLispOn { arg stream;
stream << "nil"
}
}
+ True {
storeLispOn { arg stream;
stream.put($t)
}
}
+ False {
storeLispOn { arg stream;
nil.storeLispOn(stream)
}
}
+ Association {
storeLispOn { arg stream;
stream.put($();
this.key.storeLispOn(stream);
stream.space.put($.).space;
this.value.storeLispOn(stream);
stream.put($));
}
}
+ Collection {
lispDo { arg function;
this.do(function);
}
storeLispOn { arg stream;
stream.put($();
this.lispDo { arg x, i;
if (i != 0) { stream.space };
x.storeLispOn(stream);
};
stream.put($));
}
}
+ Dictionary {
lispDo { arg function;
this.associationsDo(function)
}
}
// EOF
|