summaryrefslogtreecommitdiff
path: root/tvision/examples/porting.txt
blob: 2ee66fd47d2dda7186c53e6eaac6b1be527a7e8c (plain)
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
Hints to port TVision programs to the RH port:

1) ushort dataSize()
This is unsigned dataSize().
* Reported by the compiler as wrong return value (gcc 2.8.0)

2) TListBox::getText(...
The second parameter was short now is ccIndex.
* The text doesn't show in the object because the code uses the not-overrided
  version.

3) TPalette isn't defined by default.
So you must add a #define Uses_TPalette.
* The compiler informs TPalette is incomplete.

4) const TRect& r
Most of the Borland code doesn't declare the TRect references as constants.
* The compiler barfs about a non-const reference.

5) event.mouse.eventFlags & meDoubleClick
This doesn't exist, use event.mouse.doubleClick instead
* Compiler says that eventFlags isn't a member of the structure.

6) #include <tvision/tv.h>
The files in this port are just included with #include <tv.h>
* The compiler says the header can't be located.

7) Standard headers and DJGPP v2.01
Put all the standard (stdio, stdlib, string, unistd, time, mem, etc.) headers
before the #include <tv.h>. Isn't supposed to be needed with djgpp v2.02.
* Compiler complains about redefinitions of NULL.

8) kbXXXX constants
The keyboard constants are different in this port. You should ever use the
constants and never suppose the value they contain is fixed. So if your code
assumes a fixed value you'll need to fix it. Some code in the original TV had
this error.
* The program doesn't respond to some key.

9) Direct manipulation of TInputLine::data member
This is no longer valid, use getData and setDataFromStr members. This is
because now the class keeps the length of the data member and doesn't compute
it all the time. It also helps to the Unicode experimental code.
* The compiler informs the data member is protected.

Salvador Eduardo Tropea (salvador@inti.gov.ar)