2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
10 int main(int argc
, char *argv
[])
15 fprintf(stderr
, "usage: %s <varname>\n", argv
[0]);
19 if (GetVar(argv
[1], &c
, 1, GVF_BINARY_VAR
) == 0)
22 char *buf
= malloc(len
+ 1);
25 PrintFault(ERROR_NO_FREE_STORE
, argv
[0]);
29 printf("IoErr() says the len of the value of the var '%s' is: %ld\n",
33 len
= GetVar(argv
[1], buf
, len
+ 1, GVF_BINARY_VAR
);
35 printf("GetVar() says the len of the value of the var '%s' is:"
36 " %ld - its value is '%s'\n", argv
[1], (long)len
, buf
);
43 PrintFault(IoErr(), argv
[1]);