Files
harbour-core/harbour/tests/gtchars.prg
Viktor Szakats a92f87015d 2008-01-26 06:27 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* tests/gfx.prg
   * tests/wcecon.prg
   * tests/gtchars.prg
   * tests/gtkeys.prg
   * include/hbgtinfo.ch
   * source/rtl/hbgtcore.c
   * source/rtl/gtkbstat.c
   * source/rtl/gtdos/gtdos.c
   * source/rtl/gtwin/gtwin.c
   * source/rtl/gtxwc/gtxwc.c
   * source/rtl/gtos2/gtos2.c
   * source/rtl/gtcrs/gtcrs.c
   * source/rtl/gtalleg/gtalleg.c
   * source/rtl/gtstd/gtstd.c
   * source/rtl/gtsln/gtsln.c
   * source/rtl/gttrm/gttrm.c
   * source/rtl/gtpca/gtpca.c
   * source/rtl/gtgui/gtgui.c
   * source/rtl/gtcgi/gtcgi.c
   * source/rtl/gtwvt/gtwvt.c
   * contrib/hbgtwvg/gtwvg.c
     ! Some minor formatting to the .ch file. Removed 
       reference to non-existing doc/gtinfo.txt.
     * Using HB_GTI_* instead of GTI_* in Harbour files.
2008-01-26 05:29:20 +00:00

87 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* $Id$
*/
/*
* Harbour Project source code:
* demonstration/test code for terminal character output and codepage
* translations
*
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
*
*/
#include "hbgtinfo.ch"
#define POL_MAZ "<22><EFBFBD>œ¥£˜ ¡†<C2A1>¤¢ž¦§"
#define POL_ISO "¡ÆÊ£ÑÓ¦¬¯±æê³ñ󶼿"
#define POL_852 "¤<>¨<EFBFBD>ãà—<C3A0>½¥†©ˆä¢˜«¾"
#define POL_WIN "¥ÆÊ£ÑÓŒ<C393>¯¹æê³ñ󜟿"
REQUEST HB_CODEPAGE_PLMAZ
REQUEST HB_CODEPAGE_PLISO
REQUEST HB_CODEPAGE_PL852
REQUEST HB_CODEPAGE_PLWIN
function main( cTermCP, cHostCP, lBoxChar )
local i, j, x
if empty( cTermCP )
cTermCP := "PLISO"
else
cTermCP := upper( cTermCP )
endif
if empty( cHostCP )
cHostCP := "PLMAZ"
else
cHostCP := upper( cHostCP )
endif
lBoxChar := !empty( lBoxChar )
HB_GTINFO( HB_GTI_FONTNAME, "fixed" )
HB_GTINFO( HB_GTI_FONTWIDTH, 9 )
HB_GTINFO( HB_GTI_FONTSIZE, 20 )
HB_SETTERMCP( cTermCP, cHostCP, lBoxChar )
? OS(), VERSION(), DATE(), TIME()
? HB_GTVERSION(), HB_GTVERSION(1)
? "Host codpage: " + cHostCP + ", terminal codepage: " + cTermCP
?
//HB_GTINFO(HB_GTI_COMPATBUFFER,.f.)
?
for i := 0 to 15
for j := 0 to 15
x := i * 16 + j
dispout( " " + chr( x ) )
next
?
next
inkey(0)
?; dspboxch( "ÚÄÂÄ¿ ÉÍËÍ» ÕÍÑ͸ ÖÄÒÄ· ÜÜÜ °±²Û ° ± ² Û" )
?; dspboxch( "³ ³ ³ º º º ÃÄÅÄ´ ÇÄ×Ķ ÝþÞ" )
?; dspboxch( "ÃÄÅÄ´ ÌÍÎ͹ ³ ³ ³ º º º ÝÛÞ ÛþÛ" )
?; dspboxch( "³ ³ ³ º º º ÆÍØÍµ ÌÍÎ͹ ÝþÞ" )
?; dspboxch( "ÀÄÁÄÙ ÈÍÊͼ ÔÍÏ; ÓÄÐĽ ßßß û ® ¯" )
?
? "ISO-8859-2: say[ " + POL_ISO + " ]"; dspboxch( ", box[ " + POL_ISO + " ]" )
? " Mazovia: say[ " + POL_MAZ + " ]"; dspboxch( ", box[ " + POL_MAZ + " ]" )
? " CP-1250: say[ " + POL_WIN + " ]"; dspboxch( ", box[ " + POL_WIN + " ]" )
? " CP-852: say[ " + POL_852 + " ]"; dspboxch( ", box[ " + POL_852 + " ]" )
? chr(4)+chr(16)+chr(17)+chr(24)+chr(25)+chr(26)+chr(27)+chr(30)+chr(31)
HB_GTINFO(HB_GTI_ESCDELAY,5)
inkey(0)
alert("ALERT BOX")
return nil
function dspboxch( cStr )
local i, r, c
for i := 1 to len( cStr )
r:=row(); c:=col()
dispbox( r, c, r, c, substr( cStr, i, 1 ) )
setpos(r,c+1)
next
return nil