[Info-vax] callable BACKUP example
Arne Vajhøj
arne at vajhoej.dk
Thu Jul 8 18:53:29 EDT 2021
On 7/8/2021 5:42 PM, Chris Townley wrote:
> On 08/07/2021 18:49, Arne Vajhøj wrote:
>> On 7/8/2021 12:22 PM, VAXman- at SendSpamHere.ORG wrote:
>>> Does anybody have the callable BACKUP example in compilable format?
>>>
>>> Trying to select and copy it from the PDF manual gives me garbage.
>>>
>>> FWIW, that's the ugliest bit of VMS documentation I have read in a
>>> very long while.
>>
>> I rewrote the example in the manual and ended up with:
>> BACKUP/LIST look OK on the result.
>>
> Always beware of copying/pasting from Word or PDF - it usually does
> strange things - especially with quotes!
It was more than copy/paste problems.
The example in the manual declared a function:
unsigned int subtest(void *);
without using it.
It did:
static char input_str[] = "[.wrk]";
...
input_dsc.dsc$w_length = sizeof(input_str);
which I believe must be off by 1.
It did not declare return type of main and it made all variables
global instead of local in main, which is valid C but not very
good C.
Arne
More information about the Info-vax
mailing list