Cull the examples folder

This commit is contained in:
Justine Tunney 2023-10-11 21:38:27 -07:00
parent 3a1f887928
commit f7343319cc
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
44 changed files with 47 additions and 1963 deletions

View file

@ -17,23 +17,22 @@
int main(int argc, char *argv[]) {
long a, b, i;
char buf[21], *p;
char ibuf[21];
switch (argc) {
case 2:
a = 1;
b = strtol(argv[1], NULL, 0);
b = strtol(argv[1], 0, 0);
break;
case 3:
a = strtol(argv[1], NULL, 0);
b = strtol(argv[2], NULL, 0);
a = strtol(argv[1], 0, 0);
b = strtol(argv[2], 0, 0);
break;
default:
tinyprint(2, argv[0] ? argv[0] : "seq", ": missing operand\n", NULL);
return 1;
}
for (i = a; i <= b; ++i) {
p = buf;
p = FormatInt64(p, i);
*p++ = '\n';
write(1, buf, p - buf);
FormatInt64(ibuf, i);
tinyprint(1, ibuf, "\n", NULL);
}
}