mm(1): revert changes to program_name

This commit is contained in:
Emma Tebibyte 2024-07-25 21:28:42 -06:00
parent 0641a487d7
commit c0a5e11eef
Signed by: emma
GPG Key ID: 06FA419A1698C270

View File

@ -125,7 +125,6 @@ int main(int argc, char *argv[]) {
size_t j; size_t j;
size_t k; /* loop index but also unbuffer status */ size_t k; /* loop index but also unbuffer status */
int retval; int retval;
program_name = (argv[0] == NULL ? program_name : argv[0]);
/* Initializes the files structs with their default values, standard /* Initializes the files structs with their default values, standard
* input and standard output. If an input or an output is specified * input and standard output. If an input or an output is specified
@ -150,6 +149,8 @@ int main(int argc, char *argv[]) {
k = 0; k = 0;
if (argc > 0) { program_name = argv[0]; }
if (argc > 1) { if (argc > 1) {
while ((c = getopt(argc, argv, "aehi:no:u")) != -1) { while ((c = getopt(argc, argv, "aehi:no:u")) != -1) {
switch (c){ switch (c){