work/bootstrap/gec17.c
void eif_file_utime(EIF_FILENAME name, time_t stamp, int how) {
	struct utimbuf tp;	/* Time array */
	rt_stat_buf buf;	/* File statistics */
	int status;			/* System call status */

	if (how < 2) {				/* Need to fetch time from inode */
		rt_file_stat(name, &buf);
		switch (how) {
		case 0:					/* Change only access time */
			tp.actime = stamp;
			tp.modtime = buf.st_mtime;
			break;
		case 1:					/* Change only modification time */
			tp.actime = buf.st_atime;
			tp.modtime = stamp;
			break;
		}
	} else
		tp.actime = tp.modtime = stamp;	/* Change both access and modification times */
	errno = 0;

	if (rt_utime(name, &tp) == -1) {
			/* Raise exception */
		esys();
	}
}
/*
 * Modify the modification and/or the access time stored in the file's
 * inode. The 'how' parameter tells which attributes should be set.
 */
Modify the modification and/or the access time stored in the file's
inode. The 'how' parameter tells which attributes should be set.
Modify the modification and / or the access time stored in the file ' s inode . The ' how ' parameter tells which attributes should be set .
void eif_file_utime(EIF_FILENAME name, time_t stamp, int how) {
	struct utimbuf tp;	
	rt_stat_buf buf;	
	int status;			
	if (how < 2) {				
		rt_file_stat(name, &buf);
		switch (how) {
		case 0:					
			tp.actime = stamp;
			tp.modtime = buf.st_mtime;
			break;
		case 1:					
			tp.actime = buf.st_atime;
			tp.modtime = stamp;
			break;
		}
	} else
		tp.actime = tp.modtime = stamp;	
	errno = 0;
	if (rt_utime(name, &tp) == -1) {
		esys();
	}
}
void eif_file_utime ( EIF_FILENAME name , time_t stamp , int how ) { struct utimbuf tp ; rt_stat_buf buf ; int status ; if ( how < 2 ) { rt_file_stat ( name , & buf ) ; switch ( how ) { case 0 : tp . actime = stamp ; tp . modtime = buf . st_mtime ; break ; case 1 : tp . actime = buf . st_atime ; tp . modtime = stamp ; break ; } } else tp . actime = tp . modtime = stamp ; errno = 0 ; if ( rt_utime ( name , & tp ) == -1 ) { esys ( ) ; } }
Modify the modification and/or the access time stored in the file's
 inode.
Modify the modification and / or the access time stored in the file ' s inode .
/* Time array */ /* File statistics */ /* System call status */ /* Need to fetch time from inode */ /* Change only access time */ /* Change only modification time */ /* Change both access and modification times */ /* Raise exception */