mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Cull the examples folder
This commit is contained in:
parent
3a1f887928
commit
f7343319cc
44 changed files with 47 additions and 1963 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue