mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Remove some dead code
This commit is contained in:
parent
168d1c157e
commit
73c0faa1b5
66 changed files with 324 additions and 7705 deletions
|
@ -17,31 +17,31 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
|
||||
/**
|
||||
* @fileoverview Command for updating timestamps on files.
|
||||
* @fileoverview file timestamp update command
|
||||
*/
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int i;
|
||||
const char *s, *prog;
|
||||
prog = argc > 0 ? argv[0] : "touch.com";
|
||||
const char *prog;
|
||||
|
||||
prog = argv[0];
|
||||
if (!prog) prog = "touch";
|
||||
|
||||
if (argc < 2) {
|
||||
tinyprint(2, prog, ": missing operand\n", NULL);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; ++i) {
|
||||
if (touch(argv[i], 0666) == -1) {
|
||||
s = _strerdoc(errno);
|
||||
fputs(prog, stderr);
|
||||
fputs(": cannot touch '", stderr);
|
||||
fputs(argv[i], stderr);
|
||||
fputs("': ", stderr);
|
||||
fputs(s, stderr);
|
||||
fputs("\n", stderr);
|
||||
perror(argv[i]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue