New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / dos / endnotify.c
blobabdc18e971a86af95b29025371124619399fac76
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include "dos_intern.h"
10 #include <exec/lists.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
17 #include <dos/notify.h>
18 #include <proto/dos.h>
20 #include <string.h>
22 AROS_LH1(void, EndNotify,
24 /* SYNOPSIS */
25 AROS_LHA(struct NotifyRequest *, notify, D1),
27 /* LOCATION */
28 struct DosLibrary *, DOSBase, 149, Dos)
30 /* FUNCTION
32 End a notification (quit notifying for a request previously sent with
33 StartNotify()).
35 INPUTS
37 notify -- NotifyRequest used with StartNotify()
39 RESULT
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 StartNotify()
51 INTERNALS
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
56 AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
58 struct IOFileSys iofs;
60 /* Prepare I/O request. */
61 InitIOFS(&iofs, FSA_REMOVE_NOTIFY, DOSBase);
63 iofs.io_Union.io_NOTIFY.io_NotificationRequest = notify;
65 if (strchr(notify->nr_Name, ':'))
67 DoName(&iofs, notify->nr_Name, DOSBase);
69 else
71 iofs.IOFS.io_Device = (struct Device *)notify->nr_Device;
73 if (iofs.IOFS.io_Device == NULL)
75 return;
78 DosDoIO(&iofs.IOFS);
81 if (notify->nr_Flags & NRF_SEND_MESSAGE)
83 struct Node *tempNode;
84 struct NotifyMessage *nm;
86 Disable();
88 ForeachNodeSafe(&notify->nr_stuff.nr_Msg.nr_Port->mp_MsgList,
89 nm, tempNode)
91 if (notify->nr_MsgCount == 0)
93 break;
96 if (nm->nm_NReq == notify)
98 notify->nr_MsgCount--;
99 Remove((struct Node *)nm);
100 ReplyMsg((struct Message *)nm);
104 Enable();
107 SetIoErr(iofs.io_DosError);
109 AROS_LIBFUNC_EXIT
110 } /* EndNotify */