Files
harbour-core/harbour/tests/gtchars.prg
Przemyslaw Czerpak b6112676bc 2007-11-23 05:09 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/gtwvt/gtwvt.h
  * harbour/source/rtl/gtwvt/gtwvt.c
    * removed foreground and background from GLOBAL_DATA
      - they are not necessary
    + added support for gfxPrimitive() - fixed xHarbour code

  * harbour/contrib/gtwvg/gtwvt.c
    + added support for gfxPrimitive() - fixed xHarbour code
    * removed some methods which can be safely replaced by
      default ones

  * harbour/tests/gfx.prg
  * harbour/tests/wcecon.prg
  * harbour/tests/gtchars.prg
    * updated the order of changed font parameters

  * harbour/contrib/xhb/hbcompat.ch
    ! added missing closing square bracket
2007-11-23 04:09:55 +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( GTI_FONTNAME, "fixed" )
HB_GTINFO( GTI_FONTWIDTH, 9 )
HB_GTINFO( 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(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(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