muimaster.library: update minor version
[AROS.git] / test / icon / writetooltypes.c
blob38f222656b181f8ab222b438dacda1aceabe9ff1
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <workbench/workbench.h>
7 #include <workbench/icon.h>
9 #include <proto/icon.h>
11 #include <stdio.h>
13 int main(int argc, char **argv)
15 STRPTR newToolTypes[] =
17 "AROS=RULES",
18 "Tooltypes are actually free-form text",
19 "Ain't that neat?",
20 NULL
23 struct DiskObject *icon = GetIconTags
25 "writetooltypes", ICONGETA_FailIfUnavailable, FALSE, TAG_DONE
28 if (icon != NULL)
30 STRPTR *oldToolTypes = icon->do_ToolTypes;
32 icon->do_ToolTypes = newToolTypes;
33 if (!PutIconTags("writetooltypes", icon, TAG_DONE))
35 printf("ERROR: Failed to write icon.\n");
37 icon->do_ToolTypes = oldToolTypes;
39 FreeDiskObject(icon);
41 else
43 printf("ERROR: Failed to open icon for file\n");
44 return 20;
48 return 0;