Previous attempt to remove some compiler warnings was
[AROS-Contrib.git] / regina / isreginamsg.c
blob9cdaf5bc4504d2b96fc919ca1d3887b2d2cf4f33
1 /*
2 Copyright © 2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/types.h>
7 #include <rexx/storage.h>
8 #include <proto/rexxsyslib.h>
10 #include "rexx.h"
12 /*****************************************************************************
14 NAME */
16 BOOL IsReginaMsg (struct RexxMsg *msg)
18 /* FUNCTION
19 Check to see if message was generated from the regina interpreter.
20 This function will look at the rm_Private1 and rm_Private2 fields
21 to see if they are valid.
23 INPUTS
25 RESULT
27 NOTES
29 EXAMPLE
31 BUGS
33 SEE ALSO
35 INTERNALS
37 *****************************************************************************/
39 tsd_node_t *node;
40 BOOL ok;
41 struct Library *RexxSysBase;
43 RexxSysBase = OpenLibrary("rexxsyslib.library", 0);
44 if (RexxSysBase == NULL) return FALSE;
45 ok = IsRexxMsg(msg);
46 CloseLibrary(RexxSysBase);
47 if (!ok) return FALSE;
49 ok = FALSE;
50 ForeachNode(__regina_tsdlist, node)
52 if (node->TSD == (tsd_t *)msg->rm_Private2)
54 ok = TRUE;
55 break;
59 return ok;