2
bin_to_5cstring(file f)
4
bool was_escape = false;
6
while (!File::end(f)) {
7
int c = File::getc (f);
9
if (Ctype::isprint (c) && c != '"' && (!Ctype::isdigit(c) || !was_escape)) {
33
public string filename(string path)
35
* Return the file portion of 'path'
38
int n = String::rindex(path, "/");
41
int len = String::length(path);
42
return String::substr(path, n+1, len-(n+1));
48
printf("extend namespace Client {\n public namespace SVG {\n");
49
for (int i = 1; i < dim(argv); i++) {
50
twixt (file f = File::open(argv[i], "r"); File::close(f)) {
51
string base = filename(argv[i]);
52
string name = String::split(base, ".")[0];
53
printf ("\tpublic string %s = ", name);