fix remapping behavior. Remapping is only necessary if we are rendering on the workbe...
[AROS-Contrib.git] / bgui / Tap.c
bloba1c84fa5d1c248a5100b3eeaa42d6f2c8729e581
1 /*
2 * @(#) $Header$
4 * BGUI library debugging utility
5 * Tap.c
6 * Monitor broadcasts, and print to a dos window.
8 * (C) Copyright 1998 Manuel Lemos.
9 * (C) Copyright 1996-1997 Ian J. Einman.
10 * All Rights Reserved.
12 * $Log$
13 * Revision 42.1 2001/06/18 18:23:44 hkiel
14 * Added missing newline at end of file.
16 * Revision 42.0 2000/05/09 22:08:09 mlemos
17 * Bumped to revision 42.0 before handing BGUI to AROS team
19 * Revision 41.11 2000/05/09 20:21:30 mlemos
20 * Bumped to revision 41.11
22 * Revision 41.1 2000/05/09 19:53:40 mlemos
23 * Merged with the branch Manuel_Lemos_fixes.
25 * Revision 1.1.2.1 1998/09/20 17:31:19 mlemos
26 * Ian sources
31 #include <proto/exec.h>
32 #include <proto/dos.h>
34 void main(void)
36 struct MsgPort *tap;
37 BOOL go = TRUE;
38 ULONG sig, tsig;
39 struct Message *msg;
41 if (tap = CreateMsgPort())
43 ((struct Node *)tap)->ln_Name = "Tap";
44 ((struct Node *)tap)->ln_Pri = 120;
46 AddPort(tap);
47 tsig = 1 << tap->mp_SigBit;
49 while (go)
51 sig = Wait(SIGBREAKF_CTRL_C|tsig);
52 if (sig & tsig)
54 while (msg = GetMsg(tap))
56 PutStr((UBYTE *)msg + sizeof(struct Message));
57 FreeVec(msg);
60 if (sig & SIGBREAKF_CTRL_C)
62 go = FALSE;
65 PutStr("--------\nTap off.\n");
66 RemPort(tap);
67 DeleteMsgPort(tap);