5 int main(int argc
, char *argv
[])
10 fprintf(stderr
, "usage: %s <varname>\n", argv
[0]);
14 if (GetVar(argv
[1], &c
, 1, GVF_BINARY_VAR
) == 0)
17 char *buf
= malloc(len
+ 1);
20 PrintFault(ERROR_NO_FREE_STORE
, argv
[0]);
24 printf("IoErr() says the len of the value of the var '%s' is: %ld\n", argv
[1], (long)len
);
27 len
= GetVar(argv
[1], buf
, len
+1, GVF_BINARY_VAR
);
29 printf("GetVar() says the len of the value of the var '%s' is: %ld - its value is '%s'\n",
30 argv
[1], (long)len
, buf
);
37 PrintFault(IoErr(), argv
[1]);