Improve getprogname/setprogname #1

Open
opened 2026-01-09 06:31:33 +01:00 by xdelatour · 2 comments
Owner

Currently, setprogname do nothing and getprogname returns a litteral string (name of the binary)

Todo:

  • char *progname;
  • setprogname(n) if(!progname) progname=n
  • getprogname() return progname
Currently, setprogname do nothing and getprogname returns a litteral string (name of the binary) Todo: - char *progname; - setprogname(n) if(!progname) progname=n - getprogname() return progname
xdelatour added this to the util-mint project 2026-01-09 06:31:47 +01:00
Author
Owner

The pointer progname must point inside argv[0] to skip the path. So, getprogname return the basename

The pointer progname must point inside argv[0] to skip the path. So, getprogname return the basename
Author
Owner

Check if setprogname is called at beginning of main() (because it's automatically done on NetBSD and programs may call getprogname without setprogname)

Check if setprogname is called at beginning of main() (because it's automatically done on NetBSD and programs may call getprogname without setprogname)
Sign in to join this conversation.
No description provided.