bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems


From: Steven M. Schweda
Subject: Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems
Date: Fri, 30 Sep 2011 00:47:04 -0500 (CDT)

>    And there's still that error message in "src/init.c" which uses
> SYSTEM_WGETRC, whether or not SYSTEM_WGETRC is defined.

   One possible solution:

--- src/init.c_orig     2011-08-19 05:06:20 -0500
+++ src/init.c  2011-09-30 00:44:16 -0500
@@ -597,21 +597,34 @@
      variable has been set. For internal testing purposes only!  */
   env_sysrc = getenv ("SYSTEM_WGETRC");
   if (env_sysrc && file_exists_p (env_sysrc))
-    ok &= run_wgetrc (env_sysrc);
+    {
+      ok &= run_wgetrc (env_sysrc);
+      /* If there are any problems parsing the system wgetrc file, tell
+         the user and exit */
+      if (! ok)
+        {
+          fprintf (stderr, _("\
+Parsing system wgetrc file (env SYSTEM_WGETRC) failed.  Please check\n\
+'%s',\n\
+or specify a different file using --config.\n"), env_sysrc);
+          exit (2);
+        }
+    }
   /* Otherwise, if SYSTEM_WGETRC is defined, use it.  */
 #ifdef SYSTEM_WGETRC
   else if (file_exists_p (SYSTEM_WGETRC))
     ok &= run_wgetrc (SYSTEM_WGETRC);
-#endif
   /* If there are any problems parsing the system wgetrc file, tell
      the user and exit */
   if (! ok)
     {
       fprintf (stderr, _("\
-Parsing system wgetrc file failed, please check '%s'.           \
-Or specify a different file using --config\n"), SYSTEM_WGETRC);
+Parsing system wgetrc file failed.  Please check\n\
+'%s',\n\
+or specify a different file using --config.\n"), SYSTEM_WGETRC);
       exit (2);
     }
+#endif
   /* Override it with your own, if one exists.  */
   file = wgetrc_file_name ();
   if (!file)


Aside from working when SYSTEM_WGETRC is not defined, it provides
distinct messages for the two different ways the system wgetrc file
might have been specified.

ALP $ define /user_mode system_wgetrc sys$manager:.wgetrcx
ALP $ wgx  --version
WGET: Syntax error in sys$manager:.wgetrcx at line 1.
Parsing system wgetrc file (env SYSTEM_WGETRC) failed.  Please check
'sys$manager:.wgetrcx',
or specify a different file using --config.

------------------------------------------------------------------------

   Steven M. Schweda               address@hidden
   382 South Warwick Street        (+1) 651-699-9818
   Saint Paul  MN  55105-2547



reply via email to

[Prev in Thread] Current Thread [Next in Thread]