6 #define FILE_NAME_LEN 256
9 int main(int argc, char **argv)
11 char ar_file_name[FILE_NAME_LEN], obj_file_name[FILE_NAME_LEN];
13 struct stat ar_file_stat, obj_file_stat;
15 struct utimbuf obj_file_utb;
19 printf("\nUsage: adj_time archive_file obj_file\n");
23 strcpy(ar_file_name, argv[1]);
24 strcpy(obj_file_name, argv[2]);
26 stat(ar_file_name, &ar_file_stat);
27 stat(obj_file_name, &obj_file_stat);
29 if (ar_file_stat.st_mtime == obj_file_stat.st_mtime)
31 obj_file_utb.actime = obj_file_stat.st_atime;
32 obj_file_utb.modtime = obj_file_stat.st_mtime + 1;
34 utime(obj_file_name, &obj_file_utb);