From 07fd7151247068ce418d8a4847003369b5dbd1d2 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 2 Jul 2006 12:59:20 +0200 Subject: [PATCH] rename O_DIRECTORY to O_TMP_DIRECTORY to avoid conflict with open option --- common/exf.c | 4 ++-- common/options.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/exf.c b/common/exf.c index 358c4334..195d2c06 100644 --- a/common/exf.c +++ b/common/exf.c @@ -195,10 +195,10 @@ file_init(SCR *sp, FREF *frp, char *rcv_name, int flags) */ oname = frp->name; if (LF_ISSET(FS_OPENERR) || oname == NULL || !exists) { - if (opts_empty(sp, O_DIRECTORY, 0)) + if (opts_empty(sp, O_TMP_DIRECTORY, 0)) goto err; (void)snprintf(tname, sizeof(tname), - "%s/vi.XXXXXX", O_STR(sp, O_DIRECTORY)); + "%s/vi.XXXXXX", O_STR(sp, O_TMP_DIRECTORY)); if ((fd = mkstemp(tname)) == -1) { msgq(sp, M_SYSERR, "237|Unable to create temporary file"); diff --git a/common/options.c b/common/options.c index c8313d91..ed458649 100644 --- a/common/options.c +++ b/common/options.c @@ -72,7 +72,7 @@ OPTLIST const optlist[] = { {L("combined"), NULL, OPT_0BOOL, OPT_NOSET|OPT_WC}, /* O_COMMENT 4.4BSD */ {L("comment"), NULL, OPT_0BOOL, 0}, -/* O_DIRECTORY 4BSD */ +/* O_TMP_DIRECTORY 4BSD */ {L("directory"), NULL, OPT_STR, 0}, /* O_EDCOMPATIBLE 4BSD */ {L("edcompatible"),NULL, OPT_0BOOL, 0}, @@ -252,7 +252,7 @@ static OABBREV const abbrev[] = { {L("aw"), O_AUTOWRITE}, /* 4BSD */ {L("bf"), O_BEAUTIFY}, /* 4BSD */ {L("co"), O_COLUMNS}, /* 4.4BSD */ - {L("dir"), O_DIRECTORY}, /* 4BSD */ + {L("dir"), O_TMP_DIRECTORY}, /* 4BSD */ {L("eb"), O_ERRORBELLS}, /* 4BSD */ {L("ed"), O_EDCOMPATIBLE}, /* 4BSD */ {L("ex"), O_EXRC}, /* System V (undocumented) */ @@ -355,7 +355,7 @@ opts_init(SCR *sp, int *oargs) */ (void)SPRINTF(b2, SIZE(b2), L("directory=%s"), (s = getenv("TMPDIR")) == NULL ? _PATH_TMP : s); - OI(O_DIRECTORY, b2); + OI(O_TMP_DIRECTORY, b2); OI(O_ESCAPETIME, L("escapetime=1")); OI(O_KEYTIME, L("keytime=6")); OI(O_MATCHTIME, L("matchtime=7")); -- 2.11.4.GIT