version 1.9, 2003/06/03 02:56:20 |
version 1.10, 2003/06/10 22:20:53 |
|
|
void usage(void); |
void usage(void); |
|
|
int |
int |
main(argc, argv) |
main(int argc, char *argv[]) |
int argc; |
|
char *argv[]; |
|
{ |
{ |
struct stat sb; |
struct stat sb; |
struct timeval tv[2]; |
struct timeval tv[2]; |
|
|
#define ATOI2(s) ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0')) |
#define ATOI2(s) ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0')) |
|
|
void |
void |
stime_arg1(arg, tvp) |
stime_arg1(char *arg, struct timeval *tvp) |
char *arg; |
|
struct timeval *tvp; |
|
{ |
{ |
struct tm *t; |
struct tm *t; |
time_t tmptime; |
time_t tmptime; |
|
|
} |
} |
|
|
void |
void |
stime_arg2(arg, year, tvp) |
stime_arg2(char *arg, int year, struct timeval *tvp) |
char *arg; |
|
int year; |
|
struct timeval *tvp; |
|
{ |
{ |
struct tm *t; |
struct tm *t; |
time_t tmptime; |
time_t tmptime; |
|
|
} |
} |
|
|
void |
void |
stime_file(fname, tvp) |
stime_file(char *fname, struct timeval *tvp) |
char *fname; |
|
struct timeval *tvp; |
|
{ |
{ |
struct stat sb; |
struct stat sb; |
|
|
|
|
} |
} |
|
|
int |
int |
rw(fname, sbp, force) |
rw(char *fname, struct stat *sbp, int force) |
char *fname; |
|
struct stat *sbp; |
|
int force; |
|
{ |
{ |
int fd, needed_chmod, rval; |
int fd, needed_chmod, rval; |
u_char byte; |
u_char byte; |
|
|
} |
} |
|
|
__dead void |
__dead void |
usage() |
usage(void) |
{ |
{ |
(void)fprintf(stderr, |
(void)fprintf(stderr, |
"usage: touch [-acfm] [-r file] [-t time] file ...\n"); |
"usage: touch [-acfm] [-r file] [-t time] file ...\n"); |