[Info-vax] Hard links on VMS ODS5 disks
gah4
gah4 at u.washington.edu
Mon Jul 17 00:37:57 EDT 2023
On Sunday, July 16, 2023 at 11:30:26 AM UTC-7, Arne Vajhøj wrote:
(snip)
> #include <stdio.h>
> #include <string.h>
>
> int main(int argc, char *argv[])
> {
> if(strstr(argv[0], "]a.exe;") != NULL)
> {
> printf("I am A\n");
> }
> if(strstr(argv[0], "]b.exe;") != NULL)
> {
> printf("I am B\n");
> }
> return 0;
> }
I suspect you need a slightly better way to recognize the program name.
I am not so sure what VMS passes for argv[0] in all cases.
For extra fun, you can use the Command Definition Utility.
I remember TeX does fun things with the command name and arguments.
You need CDU to make them work right.
More information about the Info-vax
mailing list