Thread (4 messages) 4 messages, 4 authors, 2016-06-15

Re: [RFC] Cleaning up die() error messages

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:08

Alex Riesen wrote:
On 10/10/05, Elfyn McBratney [off-list ref] wrote:
quoted
       int main (int argc, char **argv)
       {
               set_prog_name(argv[0]);

I'd also use readlink on /proc/self/exe by default (if set_prog_name
_not_ called).
It simplifies the code at least on linux, and makes possible very slow
transition for other platforms. So you don't have to update each and
every .c file containing "main[[:space:]]*(" ;)
It's really better just to put the stuff at the beginning of each main. 
  If that's too annoying, librarize main and rename your mains "git_main".

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help