Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / icon / deletediskobject.c
blob2aa251f31ca6fb1559bf767f5f5614c692bb7fa1
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <proto/dos.h>
9 #include "icon_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/icon.h>
16 AROS_LH1(BOOL, DeleteDiskObject,
18 /* SYNOPSIS */
19 AROS_LHA(UBYTE *, name, A0),
21 /* LOCATION */
22 struct Library *, IconBase, 23, Icon)
24 /* FUNCTION
25 Deletes an icon description file.
27 INPUTS
28 name - name of the icon file without the ".info".
30 RESULT
32 NOTES
34 EXAMPLE
36 BUGS
37 Does not yet notify workbench about the deletion.
39 SEE ALSO
41 INTERNALS
43 HISTORY
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
48 UBYTE * infofilename;
49 BOOL success;
51 if (!(infofilename = (UBYTE*)AllocVec (strlen(name) + 6,
52 MEMF_ANY | MEMF_CLEAR)
53 ) )
54 return (FALSE);
56 /* Construct the icon's name */
57 strcpy (infofilename, name);
58 strcat (infofilename, ".info");
60 success = DeleteFile (infofilename);
62 FreeVec (infofilename);
64 return success;
65 AROS_LIBFUNC_EXIT
66 } /* DeleteDiskObject */