[Info-vax] Hard links on VMS ODS5 disks

Arne Vajhøj arne at vajhoej.dk
Mon Jul 17 11:35:15 EDT 2023


On 7/17/2023 12:37 AM, gah4 wrote:
> On Sunday, July 16, 2023 at 11:30:26 AM UTC-7, Arne Vajhøj wrote:
>> #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.

Neither am I.

It just worked for my case.

I will certainly not work on other OS.

But that is the point. It is a complication.

Arne






More information about the Info-vax mailing list