date and time created 81/02/10 13:55:31 by dlw
authorDavid Wasley <dlw@ucbvax.Berkeley.EDU>
Wed, 11 Feb 1981 05:55:31 +0000 (21:55 -0800)
committerDavid Wasley <dlw@ucbvax.Berkeley.EDU>
Wed, 11 Feb 1981 05:55:31 +0000 (21:55 -0800)
SCCS-vsn: usr.bin/f77/libU77/idate_.c 1.1

usr/src/usr.bin/f77/libU77/idate_.c [new file with mode: 0644]

diff --git a/usr/src/usr.bin/f77/libU77/idate_.c b/usr/src/usr.bin/f77/libU77/idate_.c
new file mode 100644 (file)
index 0000000..237e89e
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+char id_idate[] = "@(#)idate_.c        1.1";
+ *
+ * return date in numerical form
+ *
+ * calling sequence:
+ *     integer iarray(3)
+ *     call idate(iarray)
+ * where:
+ *     iarray will receive the current date; day, mon, year.
+ */
+
+#include <sys/types.h>
+#include <time.h>
+
+idate_(iar)
+struct { long iday; long imon; long iyer; } *iar;
+{
+       struct tm *localtime(), *lclt;
+       long int time(), t;
+
+       t = time(0);
+       lclt = localtime(&t);
+       iar->iday = lclt->tm_mday;
+       iar->imon = lclt->tm_mon + 1;
+       iar->iyer = lclt->tm_year + 1900;
+}