[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev [PATCH][dev17] Print current dir in download page
From: |
John Bley |
Subject: |
lynx-dev [PATCH][dev17] Print current dir in download page |
Date: |
Wed, 24 Feb 1999 13:26:06 -0500 (EST) |
Sometimes after starting lynx and browsing for a while, I go to download
something and forget where I was when I started. It'd be handy if lynx
told me where I was so that I could save some typing.
--
John Bley - address@hidden
Duke '99 - English/Computer Science
Since English is a mess, it maps well onto the problem space,
which is also a mess, which we call reality. - Larry Wall
diff -Burp lynx2-8-2/src/LYDownload.c lynx2-8-2-patched/src/LYDownload.c
--- lynx2-8-2/src/LYDownload.c Thu Jan 28 11:31:29 1999
+++ lynx2-8-2-patched/src/LYDownload.c Wed Feb 24 13:19:23 1999
@@ -473,6 +473,7 @@ PUBLIC int LYdownload_options ARGS2(
char *, data_file)
{
static char tempfile[LY_MAXPATH];
+ static char curdir[LY_MAXPATH];
char *downloaded_url = NULL;
char *sug_filename = NULL;
FILE *fp0;
@@ -506,7 +507,14 @@ PUBLIC int LYdownload_options ARGS2(
gettext("Downloaded link:"),
downloaded_url);
FREE(downloaded_url);
-
+#if HAVE_GETCWD
+ getcwd (curdir, sizeof(curdir));
+#else
+ getwd (curdir);
+#endif /* NO_GETCWD */
+ fprintf(fp0, "<em>%s</em> %s\n",
+ gettext("Current directory:"),
+ curdir);
fprintf(fp0, "<em>%s</em> %s\n",
gettext("Suggested file name:"),
sug_filename);
- lynx-dev [PATCH][dev17] Print current dir in download page,
John Bley <=