Artifact 629b8685e796746dff6885a2ae2bc901fec884d3:
- File tests/langbench/sort.l — part of check-in [69b737f5a1] at 2016-04-19 20:35:49 on branch little — Fork of Tcl used in the "Little" project. http://www.mcvoy.com/lm/little/index.html (user: dgp, size: 297) [annotate] [blame] [check-ins using]
void main(int ac, string av[]) { int i; FILE f; string buf; string l[]; fconfigure("stdout", buffering: "full", translation: "binary"); for (i = 1; i < ac; ++i) { f = open(av[i], "rb"); while (gets(f, &buf) >= 0) { push(&l, buf); } } foreach (buf in sort(l)) { puts(buf); } }