unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Trivial ebrowse.c fix
@ 2005-07-09 11:54 Jhair Tocancipa Triana
  2005-07-16 11:11 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Jhair Tocancipa Triana @ 2005-07-09 11:54 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

Hi,

Could someone please commit the attached change? Thanks!

-- 
--Jhair

PGP key available from public servers - ID: 0xBAA600D0

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ebrowse_filename.patch --]
[-- Type: text/x-patch, Size: 745 bytes --]

2005-07-09  Jhair Tocancipa Triana  <jhair_tocancipa@gmx.net>

	* ebrowse.c (main): Don't hardcode executable name.

--- ebrowse.c	08 Jul 2005 22:54:32 +0200	1.38
+++ ebrowse.c	09 Jul 2005 13:36:33 +0200	
@@ -1,7 +1,7 @@
 /* ebrowse.c --- parsing files for the ebrowse C++ browser
 
    Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99,
-                 2000, 2001, 2002   Free Software Foundation Inc.
+                 2000, 2001, 2002, 2005   Free Software Foundation Inc.
 
    This file is part of GNU Emacs.
 
@@ -3800,7 +3800,7 @@
   static int input_filenames_size = 0;
   static int n_input_files;
 
-  filename = "command line";
+  filename = argv [0];
   yyout = stdout;
 
   while ((i = getopt_long (argc, argv, "af:I:m:M:no:p:svVx",

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Trivial ebrowse.c fix
  2005-07-09 11:54 Trivial ebrowse.c fix Jhair Tocancipa Triana
@ 2005-07-16 11:11 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2005-07-16 11:11 UTC (permalink / raw)
  Cc: rms, emacs-devel

> From: Jhair Tocancipa Triana <jhair_tocancipa@gmx.net>
> Date: Sat, 09 Jul 2005 13:54:04 +0200
> 
> 2005-07-09  Jhair Tocancipa Triana  <jhair_tocancipa@gmx.net>
> 
> 	* ebrowse.c (main): Don't hardcode executable name.
> 
> --- ebrowse.c	08 Jul 2005 22:54:32 +0200	1.38
> +++ ebrowse.c	09 Jul 2005 13:36:33 +0200	
> @@ -1,7 +1,7 @@
>  /* ebrowse.c --- parsing files for the ebrowse C++ browser
>  
>     Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99,
> -                 2000, 2001, 2002   Free Software Foundation Inc.
> +                 2000, 2001, 2002, 2005   Free Software Foundation Inc.
>  
>     This file is part of GNU Emacs.
>  
> @@ -3800,7 +3800,7 @@
>    static int input_filenames_size = 0;
>    static int n_input_files;
>  
> -  filename = "command line";
> +  filename = argv [0];
>    yyout = stdout;
>  
>    while ((i = getopt_long (argc, argv, "af:I:m:M:no:p:svVx",

Thank you for your report.

However, this change looks wrong to me: `filename' is a global
variable used throughout the rest of the program to report error
messages.  So I think it is okay to put "command line" into it while
the command line arguments are processed, otherwise the error messages
will pinpoint a wrong location.

Later, inside process_file and elsewhere, the current file's name is
stored in this variable.

Could you please explain what caused you to submit this change, and
why you think it's better to store argv[0] there?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-16 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-09 11:54 Trivial ebrowse.c fix Jhair Tocancipa Triana
2005-07-16 11:11 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).