Author: Stan Eisenstat
Subject: Re: [Cs323] Invoking under Encode/Decode
Date: Tuesday, 27 Oct 2020, 07:36:37
> Message Posted By: Unknown
>
> If encode and decode are a single c file called lzw.c, and the 0th command
> line argument is the name of the file, how do we invoke lzw.c under the
> names encode/decode and how do we check for this in our code?
You create an executable named encode from your source
file named lzw.c, and then create a hard link named
decode to that executable.
When you run the executable, argv[0] will specify the
name you used to run it.
--Stan-
PREV
INDEX
NEXT