amagnasco / xwpe

Upload of an abandoned ncurses-based programming environment
http://www.identicalsoftware.com/xwpe/
GNU General Public License v2.0
29 stars 6 forks source link

Creating options to replace program name dependency #74

Open gbonnema opened 7 years ago

gbonnema commented 7 years ago

See #73 (replace does not work as expected) which leads me to create this issue.

The program we_unix.c contains specific testing of argv[0] which is the program name. It tests for the occurrence of the character x, and for the string wpe.

  1. This makes our program very dependent on it's name. So we are not free to change the name.
  2. The actual 2 options are whether or not to use X11 (if available) and whether to use the program editor (the p in wpe) or the non-program text-editor.
  3. It is impossible to have 2 incarnations of xwpe installed, because they need the same name. Even if we would install with a different prefix (like /home/myname/bin it would cause problems in loading the right library (libxwpe).

My proposition is to alter the program to not test the program name (argv[0]) but add options like -nox and -nop. That would decrease dependency on the name, and maybe enable testing of 2 versions on the same machine.

Please let me know what you think.