forked from paule32/TurboVison_4_Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmisc.cc
55 lines (46 loc) · 941 Bytes
/
misc.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Turbo Vision - Version 2.0
*
* Copyright (c) 1994 by Borland International
* All Rights Reserved.
*
Modified by Robert H”hne to be used for RHIDE.
*
*
*/
#define Uses_string
#define Uses_ctype
#define Uses_TView
#define Uses_TEvent
#define Uses_TObject
#include <tv.h>
void *message( TView *receiver, ushort what, ushort command, void *infoPtr)
{
if( receiver == 0 )
return 0;
TEvent event;
event.what = what;
event.message.command = command;
event.message.infoPtr = infoPtr;
receiver->handleEvent( event );
if( event.what == evNothing )
return event.message.infoPtr;
else
return 0;
}
Boolean lowMemory()
{
#if 0
return Boolean(TVMemMgr::safetyPoolExhausted());
#else
return False;
#endif
}
char hotKey( const char *s )
{
const char *p;
if( (p = strchr( s, '~' )) != 0 )
return uctoupper(p[1]);
else
return 0;
}