SCCS-vsn: usr.bin/mail/def.h 2.12
SCCS-vsn: usr.bin/mail/lex.c 2.13
- * Sccs Id = "@(#)def.h 2.11 %G%";
+ * Sccs Id = "@(#)def.h 2.12 %G%";
#define sigsys(s, a) signal(s, a)
#endif
#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.
*/
* Lexical processing of commands.
*/
* Lexical processing of commands.
*/
-static char *SccsId = "@(#)lex.c 2.12 %G%";
+static char *SccsId = "@(#)lex.c 2.13 %G%";
eofloop = 0;
top:
if (shudprompt) {
eofloop = 0;
top:
if (shudprompt) {
+ printf(prompt);
+ flush();
# ifdef VMUNIX
sigset(SIGCONT, contin);
# endif VMUNIX
# ifdef VMUNIX
sigset(SIGCONT, contin);
# endif VMUNIX
- printf(prompt);
- }
- flush();