forked from bonsai/harakit
npc(1): improves program_name resolution
This commit is contained in:
parent
8bb57bf2e4
commit
361b34c50f
@ -36,9 +36,10 @@ int main(int argc, char *argv[]) {
|
||||
int c;
|
||||
char showend = 0; /* print a dollar sign before each newline */
|
||||
char showtab = 0; /* prints tab characters in caret notation */
|
||||
program_name = (argv[0] == NULL ? program_name : argv[0]);
|
||||
|
||||
if (argc > 0) {
|
||||
program_name = argv[0];
|
||||
|
||||
while ((c = getopt(argc, argv, "et")) != -1) {
|
||||
switch (c){
|
||||
case 'e': showend = 1; break;
|
||||
|
Loading…
Reference in New Issue
Block a user