Postfix3.3.1
マクロ定義 | 関数
edit_file.c ファイル
#include <sys_defs.h>
#include <sys/stat.h>
#include <stdio.h>
#include <errno.h>
#include <msg.h>
#include <vstream.h>
#include <mymalloc.h>
#include <stringops.h>
#include <myflock.h>
#include <edit_file.h>
#include <warn_stat.h>

[ソースコード]

マクロ定義

#define FILE_PERM_MASK   (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
 
#define EDIT_FILE_REUSE_AFTER_CRASH
 
#define EDIT_FILE_MODE   (S_IRUSR | S_IWUSR) /* temp file mode */
 
#define EDIT_FILE_ALLOC(ep, path, mode)
 
#define EDIT_FILE_FREE(ep)
 

関数

EDIT_FILEedit_file_open (const char *path, int flags, mode_t mode)
 
void edit_file_cleanup (EDIT_FILE *ep)
 
int edit_file_close (EDIT_FILE *ep)
 

マクロ定義詳解

#define EDIT_FILE_ALLOC (   ep,
  path,
  mode 
)
値:
do { \
(ep) = (EDIT_FILE *) mymalloc(sizeof(EDIT_FILE)); \
(ep)->final_path = mystrdup(path); \
(ep)->final_mode = (mode); \
(ep)->tmp_path = concatenate((path), EDIT_FILE_SUFFIX, (char *) 0); \
(ep)->tmp_fp = 0; \
} while (0)
char * mystrdup(const char *str)
Definition: mymalloc.c:225
char * concatenate(const char *arg0,...)
Definition: concatenate.c:42
void * mymalloc(ssize_t len)
Definition: mymalloc.c:150
#define EDIT_FILE_SUFFIX
Definition: edit_file.h:31

edit_file.c174 行目に定義があります。

#define EDIT_FILE_FREE (   ep)
値:
do { \
myfree((ep)->final_path); \
myfree((ep)->tmp_path); \
myfree((void *) (ep)); \
} while (0)
void myfree(void *ptr)
Definition: mymalloc.c:207

edit_file.c182 行目に定義があります。

#define EDIT_FILE_MODE   (S_IRUSR | S_IWUSR) /* temp file mode */

edit_file.c168 行目に定義があります。

#define EDIT_FILE_REUSE_AFTER_CRASH

edit_file.c163 行目に定義があります。

#define FILE_PERM_MASK   (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)

edit_file.c146 行目に定義があります。

関数詳解

void edit_file_cleanup ( EDIT_FILE ep)

edit_file.c306 行目に定義があります。

int edit_file_close ( EDIT_FILE ep)

edit_file.c320 行目に定義があります。

EDIT_FILE* edit_file_open ( const char *  path,
int  flags,
mode_t  mode 
)

edit_file.c190 行目に定義があります。