File: boxdraw.inc

package info (click to toggle)
gearhead 1.310-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 10,028 kB
  • sloc: pascal: 36,375; makefile: 78
file content (42 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download | duplicates (5)
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
{
   This file, included from congfx.pp, enables use of the Code Page #437 box
   drawing characters in the MSDOS and Win32-console platforms.

   It is seperated so that it can be easily replaced by a patch to enable
   boxdrawing on other platforms.

   If a flag NEEDSHIFTS is defined here, congfx.pp will bracket usage of
   the boxdrawing characters with calls to procedures ShiftAltCharset and
   ShiftNormalCharset.  Those procedures don't exist in vanilla gearhead
   or the FPC libraries, but the calls provide a hook useful in
   implementing boxdrawing on VT110-like terminals. (eg: Linux console and
   Xterm)
}

Const

{$IFDEF go32v2}
{$DEFINE use_cp437}
{$ELSE}
{$IFDEF win32}
{$DEFINE use_cp437}
{$ENDIF}
{$ENDIF}

{$IFDEF use_cp437}
	BoxUpperLeft = #218;
	BoxUpperRight = #191;
	BoxLowerLeft = #192;
	BoxLowerRight = #217;
	BoxHorizontal = #196;
	BoxVertical = #179;
	BoxSeperator = #196;
{$ELSE}
	BoxUpperLeft = '+';
	BoxUpperRight = '+';
	BoxLowerLeft = '+';
	BoxLowerRight = '+';
	BoxHorizontal = '-';
	BoxVertical = '|';
	BoxSeperator = '~';
{$ENDIF}