2 Copyright © 1995-2014, 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", argv
[1], (long)len
);
32 len
= GetVar(argv
[1], buf
, len
+1, GVF_BINARY_VAR
);
34 printf("GetVar() says the len of the value of the var '%s' is: %ld - its value is '%s'\n",
35 argv
[1], (long)len
, buf
);
42 PrintFault(IoErr(), argv
[1]);