BSD 4_2 development
[unix-history] / usr / src / ucb / Mail / def.h
index f3ca989..d3b1e04 100644 (file)
@@ -1,4 +1,4 @@
-#
+/*     def.h   2.13    83/08/11        */
 
 #include <sys/types.h>
 #include <signal.h>
 
 #include <sys/types.h>
 #include <signal.h>
@@ -9,10 +9,6 @@
 #undef isalpha
 #undef isdigit
 
 #undef isalpha
 #undef isdigit
 
-/*
- * Sccs Id = "@(#)def.h        2.10 1/29/83";
- */
-
 /*
  * Mail -- a mail program
  *
 /*
  * Mail -- a mail program
  *
@@ -247,6 +243,22 @@ struct ignore {
 #define        sigchild()
 #endif
 
 #define        sigchild()
 #endif
 
+/*
+ * 4.2bsd signal interface help...
+ */
+#ifdef VMUNIX
+#define        sigset(s, a)    signal(s, a)
+#define        mask(s)         (1 << ((s) - 1))
+#define        sigsys(s, a)    signal(s, a)
+#endif
+
+/*
+ * Truncate a file to the last character written. This is
+ * useful just before closing an old file that was opened
+ * for read/write.
+ */
+#define trunc(stream)  ftruncate(fileno(stream), (long) ftell(stream))
+
 /*
  * Forward declarations of routine types to keep lint and cc happy.
  */
 /*
  * Forward declarations of routine types to keep lint and cc happy.
  */
@@ -293,7 +305,9 @@ char        *value();
 char   *vcopy();
 char   *yankword();
 off_t  fsize();
 char   *vcopy();
 char   *yankword();
 off_t  fsize();
+#ifndef VMUNIX
 int    (*sigset())();
 int    (*sigset())();
+#endif
 struct cmd     *lex();
 struct grouphead       *findgroup();
 struct name    *cat();
 struct cmd     *lex();
 struct grouphead       *findgroup();
 struct name    *cat();