Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / util / edit_file.h
blob97464397efd5d222e451c957bce9a6c6b8c099ac
1 /* $NetBSD$ */
3 #ifndef _EDIT_FILE_H_INCLUDED_
4 #define _EDIT_FILE_H_INCLUDED_
6 /*++
7 /* NAME
8 /* edit_file 3h
9 /* SUMMARY
10 /* simple cooperative file updating protocol
11 /* SYNOPSIS
12 /* #include <edit_file.h>
13 /* DESCRIPTION
14 /* .nf
17 * Utility library.
19 #include <vstream.h>
22 * External interface.
24 typedef struct {
25 /* Private. */
26 char *final_path;
27 mode_t final_mode;
28 /* Public. */
29 char *tmp_path;
30 VSTREAM *tmp_fp;
31 } EDIT_FILE;
33 #define EDIT_FILE_SUFFIX ".tmp"
35 extern EDIT_FILE *edit_file_open(const char *, int, mode_t);
36 extern int edit_file_close(EDIT_FILE *);
37 extern void edit_file_cleanup(EDIT_FILE *);
39 /* LICENSE
40 /* .ad
41 /* .fi
42 /* The Secure Mailer license must be distributed with this software.
43 /* AUTHOR(S)
44 /* Wietse Venema
45 /* IBM T.J. Watson Research
46 /* P.O. Box 704
47 /* Yorktown Heights, NY 10598, USA
48 /*--*/
50 #endif