X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=6830bfb3d7457a3ef8c9c2336cac869a13740074;hb=3bebe0e894828d80183926d4fc19fc01cd3c274e;hp=d23d141d88f967a722a06284023ab68558127268;hpb=a66c30d557c09799db7cd166ba5fa2a97dbafbb3;p=mmh diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index d23d141..6830bfb 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -249,7 +249,11 @@ WhatNow (int argc, char **argv) snprintf (prompt, sizeof(prompt), myprompt, invo_name); for (;;) { +#ifdef READLINE_SUPPORT + if (!(argp = getans_via_readline (prompt, aleqs))) { +#else /* ! READLINE_SUPPORT */ if (!(argp = getans (prompt, aleqs))) { +#endif /* READLINE_SUPPORT */ unlink (LINK); done (1); } @@ -642,9 +646,6 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, #ifdef HAVE_LSTAT int slinked = 0; -#if 0 - int oumask; /* PJS: for setting permissions on symlinks. */ -#endif #endif /* HAVE_LSTAT */ /* Was there a previous edit session? */ @@ -674,20 +675,11 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, strncpy (linkpath, LINK, sizeof(linkpath)); else snprintf (linkpath, sizeof(linkpath), "%s/%s", cwd, LINK); - } - if (altmsg) { unlink (linkpath); #ifdef HAVE_LSTAT if (link (altpath, linkpath) == NOTOK) { -#if 0 - /* I don't think permission on symlinks matters /JLR */ - oumask = umask(0044); /* PJS: else symlinks are world 'r' */ -#endif symlink (altpath, linkpath); -#if 0 - umask(oumask); /* PJS: else symlinks are world 'r' */ -#endif slinked = 1; } else { slinked = 0;