added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / dos / setcomment.c
blob06aaef46dd306c7ae2cb67f4b201a47340c2ff3e
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Set a filecomment.
6 Lang: english
7 */
8 #include <proto/exec.h>
9 #include <dos/dosextens.h>
10 #include <dos/filesystem.h>
11 #include <proto/dos.h>
12 #include "dos_intern.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/dos.h>
19 AROS_LH2(BOOL, SetComment,
21 /* SYNOPSIS */
22 AROS_LHA(STRPTR, name, D1),
23 AROS_LHA(STRPTR, comment, D2),
25 /* LOCATION */
26 struct DosLibrary *, DOSBase, 30, Dos)
28 /* FUNCTION
29 Change the comment on a file or directory.
30 The comment may be any NUL terminated string. The supported
31 size varies from filesystem to filesystem.
33 INPUTS
34 name - name of the file
35 comment - new comment for the file or NULL.
37 RESULT
38 !=0 if all went well, 0 else. IoErr() gives additional
39 information in that case.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 /* Get pointer to I/O request. Use stackspace for now. */
56 struct IOFileSys iofs;
58 /* Prepare I/O request. */
59 InitIOFS(&iofs, FSA_SET_COMMENT, DOSBase);
61 if(comment == NULL)
62 comment = "";
63 iofs.io_Union.io_SET_COMMENT.io_Comment = comment;
65 return DoIOFS(&iofs, NULL, name, DOSBase) == 0;
67 AROS_LIBFUNC_EXIT
68 } /* SetComment */