editing bzip2 source code to add flags

MrDudeMan

Lifer
Jan 15, 2001
15,069
94
91
has anyone ever added flags to *nix source code? i am having a hard time finding out how to do this within bzip2.c

there is a switch statement on the arg list, and i added in a case 'p': newfunction(); break;

and then made the newfunction as follows:

void newfunction()
{
printf("new function was called");
}

and it wont work. it keeps saying bad flag and i have looked through ALL of the code, both with grep and searching manually, and i cant find another damn thing in any of it to add the arg to a valid list.

help?
 

MrDudeMan

Lifer
Jan 15, 2001
15,069
94
91
nevermind! i figured it out.

i was just doing this:

%bzip2 -p

when i should have been doing this:

%./bzip2 -p

i am relatively new to *nix so i forgot there was already a copy of the program installed somewhere else. rookie mistake.