diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-17 17:05:57 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-17 17:05:57 +0000 |
commit | c09389519e3b83e995e8ea30e1bc424e55c437ba (patch) | |
tree | ceadd73b0818fe3273b9daa4a92dbd95d20183b1 /linein.c | |
parent | fix indent (diff) | |
download | w3m-c09389519e3b83e995e8ea30e1bc424e55c437ba.tar.gz w3m-c09389519e3b83e995e8ea30e1bc424e55c437ba.zip |
[w3m-dev 03647] expandName() and expandPath()
* etc.c (openSecretFile): use expandPath
(expandName): rewrite
(file_to_url): use expandPath
* file.c (_doFileCopy): use expandPath
(doFileSave): use expandPath
* indep.c (expandPath): rewrite
* linein.c (inputLineHistSearch): use expandPath
(next_dcompl): use expandPath
(doComplete): use expandPath
* local.c (set_cgi_environ): rewrite
* mailcap.c (loadMailcap): use expandPath
* main.c (svBuf): use expandPath
(addDownloadList): use expandPath
* rc.c (init_rc): use expandPath
(rcFile): rewrite
(auxbinFile): use expandPath
(libFile): use expandPath
(etcFile): use expandPath
(helpFile): use expandPath
* url.c (loadMimeTypes): use expandPath
(loadURIMethods): use expandPath
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | linein.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: linein.c,v 1.25 2002/11/15 15:36:48 ukai Exp $ */ +/* $Id: linein.c,v 1.26 2003/01/17 17:06:03 ukai Exp $ */ #include "fm.h" #include "local.h" #include "myctype.h" @@ -309,7 +309,7 @@ inputLineHistSearch(char *prompt, char *def_str, int flag, Hist *hist, pushHist(hist, p); } if (flag & IN_FILENAME) - return expandName(p); + return expandPath(p); else return allocStr(p, -1); } @@ -853,7 +853,7 @@ next_dcompl(int next) f = Strdup(d); Strcat_charp(f, CFileBuf[n]); addstr(conv_from_system(CFileBuf[n])); - if (stat(expandName(f->ptr), &st) != -1 && S_ISDIR(st.st_mode)) + if (stat(expandPath(f->ptr), &st) != -1 && S_ISDIR(st.st_mode)) addstr("/"); } y++; @@ -957,7 +957,7 @@ doComplete(Str ifn, int *status, int next) if (Strlastchar(CompleteBuf) == '/' && CompleteBuf->length > 1) { Strshrink(CompleteBuf, 1); } - if ((d = opendir(expandName(CompleteBuf->ptr))) == NULL) { + if ((d = opendir(expandPath(CompleteBuf->ptr))) == NULL) { CompleteBuf = Strdup(ifn); *status = CPL_FAIL; if (cm_mode & CPL_ON) @@ -1031,7 +1031,7 @@ doComplete(Str ifn, int *status, int next) else if (strncmp(p, "file:/", 6) == 0 && p[6] != '/') p = &p[5]; } - if (stat(expandName(p), &st) != -1 && S_ISDIR(st.st_mode)) + if (stat(expandPath(p), &st) != -1 && S_ISDIR(st.st_mode)) Strcat_char(CompleteBuf, '/'); } if (cm_mode & CPL_ON) |