Index: src/LYLocal.c =================================================================== RCS file: /cvs/src/gnu/usr.bin/lynx/src/LYLocal.c,v retrieving revision 1.9 diff -u -p -r1.9 LYLocal.c --- src/LYLocal.c 18 May 2013 14:59:46 -0000 1.9 +++ src/LYLocal.c 4 Jan 2015 22:41:28 -0000 @@ -80,7 +80,7 @@ #endif /* OK_INSTALL */ static int get_filename(const char *prompt, - bstring *buf); + bstring **bufp); #ifdef OK_PERMIT static int permit_location(char *destpath, @@ -910,7 +910,7 @@ static int modify_name(char *testpath) } BStrCopy0(tmpbuf, LYPathLeaf(testpath)); - if (get_filename(cp, tmpbuf)) { + if (get_filename(cp, &tmpbuf)) { /* * Do not allow the user to also change the location at this time. @@ -975,7 +975,7 @@ static int modify_location(char *testpat BStrCopy0(tmpbuf, testpath); *LYPathLeaf(tmpbuf->str) = '\0'; - if (get_filename(cp, tmpbuf)) { + if (get_filename(cp, &tmpbuf)) { if (strlen(tmpbuf->str)) { StrAllocCopy(savepath, testpath); StrAllocCopy(newpath, testpath); @@ -1109,7 +1109,7 @@ static int create_file(char *current_loc char *testpath = NULL; BStrCopy0(tmpbuf, ""); - if (get_filename(gettext("Enter name of file to create: "), tmpbuf)) { + if (get_filename(gettext("Enter name of file to create: "), &tmpbuf)) { if (strstr(tmpbuf->str, "//") != NULL) { HTAlert(gettext("Illegal redirection \"//\" found! Request ignored.")); @@ -1146,7 +1146,7 @@ static int create_directory(char *curren char *testpath = NULL; BStrCopy0(tmpbuf, ""); - if (get_filename(gettext("Enter name for new directory: "), tmpbuf)) { + if (get_filename(gettext("Enter name for new directory: "), &tmpbuf)) { if (strstr(tmpbuf->str, "//") != NULL) { HTAlert(gettext("Illegal redirection \"//\" found! Request ignored.")); @@ -2204,28 +2204,28 @@ int dired_options(DocInfo *doc, char **n * Check DIRED filename, return true on success */ static int get_filename(const char *prompt, - bstring *buf) + bstring **bufp) { char *cp; _statusline(prompt); - (void) LYgetBString(&buf, VISIBLE, 0, NORECALL); - if (strstr(buf->str, "../") != NULL) { + (void) LYgetBString(bufp, VISIBLE, 0, NORECALL); + if (strstr((*bufp)->str, "../") != NULL) { HTAlert(gettext("Illegal filename; request ignored.")); return FALSE; } else if (no_dotfiles || !show_dotfiles) { - cp = LYLastPathSep(buf->str); /* find last slash */ + cp = LYLastPathSep((*bufp)->str); /* find last slash */ if (cp) cp += 1; else - cp = buf->str; + cp = (*bufp)->str; if (*cp == '.') { HTAlert(gettext("Illegal filename; request ignored.")); return FALSE; } } - return !isBEmpty(buf); + return !isBEmpty((*bufp)); } #ifdef OK_INSTALL