aboutsummaryrefslogtreecommitdiff
path: root/sys/fio/futime.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/fio/futime.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fio/futime.x')
-rw-r--r--sys/fio/futime.x34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys/fio/futime.x b/sys/fio/futime.x
new file mode 100644
index 00000000..72ef268b
--- /dev/null
+++ b/sys/fio/futime.x
@@ -0,0 +1,34 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <knet.h>
+include <config.h>
+
+
+.help futime
+.nf ___________________________________________________________________________
+FUTIME -- Set the file access/modify times of a file. Time arguments are
+assumed to be in units of seconds from midnight on Jan 1, 1980, local standard
+time. A file may be "touched" to update it's modify time to the current
+clock time using the CLKTIME function with a call such as
+
+ stat = futime (fname, NULL, clktime(0))
+
+Remote files are handled via the KI interface automatically.
+.endhelp ______________________________________________________________________
+
+int procedure futime (fname, atime, mtime)
+
+char fname[ARB]
+long atime, mtime
+int status
+include <fio.com>
+
+begin
+ iferr (call fmapfn (fname, pathname, SZ_PATHNAME))
+ return (ERR)
+
+ # Update the time, let the HSI routine handle NULL values.
+ call zfutim (pathname, atime, mtime, status)
+
+ return (status)
+end