Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!ssc-vax!uvicctr!tholm
From: tholm@uvicctr.UUCP (Terrence W. Holm)
Newsgroups: comp.os.minix
Subject: POSIX utime(2)
Message-ID: <446@uvicctr.UUCP>
Date: 7 Jul 88 23:53:23 GMT
Reply-To: tholm@uvicctr.UUCP (Terrence W. Holm)
Organization: University of Victoria, Victoria B.C. Canada
Lines: 39

EFTH Minix report #24  - July 1988 -  POSIX utime(2)


This is POSIX compatible implementation of utime(2).

A "man" page is included in EFTH report #25.


--------------------------------------------------------------------
#include "lib.h"

#define NULL  (long *) 0

extern long time();


PUBLIC int utime(name, timp)
char *name;
long timp[2];
{
  if ( timp == NULL ) {
      long current_time = time( NULL );
      M.m2_l1 = current_time;
      M.m2_l2 = current_time;
  } else {
      M.m2_l1 = timp[0];
      M.m2_l2 = timp[1];
  }

  M.m2_i1 = len(name);
  M.m2_p1 = name;
  return callx(FS, UTIME);
}
--------------------------------------------------------------------
               Edwin L. Froese
                  uw-beaver!ubc-cs!mprg!handel!froese

               Terrence W. Holm
                  uw-beaver!ubc-cs!uvicctr!sirius!tholm