From 08b85109d91ace8a695c02860e22c781feda43c3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 11 Oct 2012 12:24:00 +0000 Subject: [PATCH] 2012-10-11 14:13 UTC+0200 Viktor Szakats (harbour syenar.net) * tests/tstchbx.prg * extras/httpsrv/modules/showcounter.prg * lessen references and references to Windows * contrib/hbfbird/tests/stress.prg * use UTF8 instead of Windows specific CP * formatting * contrib/hbhttpd/widgets.prg * use UTF8 instead of Windows specific CP * contrib/hbcairo/tests/fancytxt.prg * contrib/hbcairo/tests/glyphdbg.prg * contrib/hbcairo/tests/hellow.prg * contrib/hbcairo/tests/lightning.prg * contrib/hbcairo/tests/table.prg * contrib/hbxpp/tests/opover.prg * contrib/hbxpp/tests/testdll.prg + added #require "" so these can now be run as scripts. * contrib/hbgd/gdimage.prg % no longer needed manual image destroy methods converted to empty stubs * contrib/hbgd/gdwrp.c ! GDIMAGEDESTROY() to act as true dummy wrapper. Before it was still checking parameter and RTE-ing as a result. * contrib/hbgd/gdbarcod.prg ! fixed RTEs caused by using [] operator on strings * contrib/hbgd/tests/animgif.prg * contrib/hbgd/tests/antialia.prg * contrib/hbgd/tests/barms.prg * contrib/hbgd/tests/bartest.prg * contrib/hbgd/tests/counter.prg * contrib/hbgd/tests/gdtest.prg * contrib/hbgd/tests/gdtestcl.prg * contrib/hbgd/tests/test_out.prg * contrib/hbgd/tests/test.prg * contrib/hbgd/tests/testdpi.prg * contrib/hbgd/tests/tostring.prg * contrib/hbgd/tests/tpoly.prg + added #require "hbgd" so they can be run as scripts * deleted platform specific stuff + added TOFIXes for non-working font settings (not even before above modifications) ! fixed some examples to save output to file * some mods to make code portable * some formatting * contrib/hbmisc/tests/readfile.prg * contrib/hbmisc/tests/rtfclass.prg * contrib/hbmisc/tests/testbbab.prg * contrib/hbmisc/tests/testcall.prg * contrib/hbmisc/tests/testhbf.prg * contrib/hbmisc/tests/tsstrfmt.prg * contrib/hbmisc/tests/twirl.prg * contrib/hbmisc/tests/udpdstst.prg + added #require "hbmisc" so they can be run as scripts ! added one missing platform guard * minor cleanups in SVN header and Windows references --- harbour/ChangeLog | 66 +++++++++++ harbour/contrib/hbcairo/tests/fancytxt.prg | 4 +- harbour/contrib/hbcairo/tests/glyphdbg.prg | 3 +- harbour/contrib/hbcairo/tests/hellow.prg | 4 +- harbour/contrib/hbcairo/tests/lightning.prg | 9 +- harbour/contrib/hbcairo/tests/table.prg | 3 +- harbour/contrib/hbfbird/tests/stress.prg | 30 ++--- harbour/contrib/hbgd/gdbarcod.prg | 14 +-- harbour/contrib/hbgd/gdimage.prg | 11 +- harbour/contrib/hbgd/gdwrp.c | 25 ----- harbour/contrib/hbgd/tests/animgif.prg | 4 +- harbour/contrib/hbgd/tests/antialia.prg | 4 +- harbour/contrib/hbgd/tests/barms.prg | 10 +- harbour/contrib/hbgd/tests/bartest.prg | 10 +- harbour/contrib/hbgd/tests/counter.prg | 16 +-- harbour/contrib/hbgd/tests/gdtest.prg | 22 +--- harbour/contrib/hbgd/tests/gdtestcl.prg | 18 +-- harbour/contrib/hbgd/tests/test.prg | 2 + harbour/contrib/hbgd/tests/test_out.prg | 106 ++++++++---------- harbour/contrib/hbgd/tests/testdpi.prg | 6 +- harbour/contrib/hbgd/tests/tostring.prg | 4 +- harbour/contrib/hbgd/tests/tpoly.prg | 2 + harbour/contrib/hbhttpd/widgets.prg | 4 +- harbour/contrib/hbmisc/tests/readfile.prg | 2 + harbour/contrib/hbmisc/tests/rtfclass.prg | 3 +- harbour/contrib/hbmisc/tests/testbbab.prg | 2 + harbour/contrib/hbmisc/tests/testcall.prg | 4 + harbour/contrib/hbmisc/tests/testhbf.prg | 2 + harbour/contrib/hbmisc/tests/tsstrfmt.prg | 2 + harbour/contrib/hbmisc/tests/twirl.prg | 8 +- harbour/contrib/hbmisc/tests/udpdstst.prg | 2 + harbour/contrib/hbxpp/tests/opover.prg | 2 + harbour/contrib/hbxpp/tests/testdll.prg | 2 + .../extras/httpsrv/modules/showcounter.prg | 12 -- harbour/tests/tstchbx.prg | 21 ++-- 35 files changed, 233 insertions(+), 206 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index abdd21bb10..a8cec9183e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,72 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-11 14:13 UTC+0200 Viktor Szakats (harbour syenar.net) + * tests/tstchbx.prg + * extras/httpsrv/modules/showcounter.prg + * lessen references and references to Windows + + * contrib/hbfbird/tests/stress.prg + * use UTF8 instead of Windows specific CP + * formatting + + * contrib/hbhttpd/widgets.prg + * use UTF8 instead of Windows specific CP + + * contrib/hbcairo/tests/fancytxt.prg + * contrib/hbcairo/tests/glyphdbg.prg + * contrib/hbcairo/tests/hellow.prg + * contrib/hbcairo/tests/lightning.prg + * contrib/hbcairo/tests/table.prg + * contrib/hbxpp/tests/opover.prg + * contrib/hbxpp/tests/testdll.prg + + added #require "" so these can now be run as + scripts. + + * contrib/hbgd/gdimage.prg + % no longer needed manual image destroy methods + converted to empty stubs + + * contrib/hbgd/gdwrp.c + ! GDIMAGEDESTROY() to act as true dummy wrapper. + Before it was still checking parameter and RTE-ing + as a result. + + * contrib/hbgd/gdbarcod.prg + ! fixed RTEs caused by using [] operator on strings + + * contrib/hbgd/tests/animgif.prg + * contrib/hbgd/tests/antialia.prg + * contrib/hbgd/tests/barms.prg + * contrib/hbgd/tests/bartest.prg + * contrib/hbgd/tests/counter.prg + * contrib/hbgd/tests/gdtest.prg + * contrib/hbgd/tests/gdtestcl.prg + * contrib/hbgd/tests/test_out.prg + * contrib/hbgd/tests/test.prg + * contrib/hbgd/tests/testdpi.prg + * contrib/hbgd/tests/tostring.prg + * contrib/hbgd/tests/tpoly.prg + + added #require "hbgd" so they can be run as scripts + * deleted platform specific stuff + + added TOFIXes for non-working font settings (not even + before above modifications) + ! fixed some examples to save output to file + * some mods to make code portable + * some formatting + + * contrib/hbmisc/tests/readfile.prg + * contrib/hbmisc/tests/rtfclass.prg + * contrib/hbmisc/tests/testbbab.prg + * contrib/hbmisc/tests/testcall.prg + * contrib/hbmisc/tests/testhbf.prg + * contrib/hbmisc/tests/tsstrfmt.prg + * contrib/hbmisc/tests/twirl.prg + * contrib/hbmisc/tests/udpdstst.prg + + added #require "hbmisc" so they can be run as scripts + ! added one missing platform guard + * minor cleanups in SVN header and Windows references + 2012-10-11 12:55 UTC+0200 Viktor Szakats (harbour syenar.net) * tests/gtwin.prg * tests/wvt_fs.prg diff --git a/harbour/contrib/hbcairo/tests/fancytxt.prg b/harbour/contrib/hbcairo/tests/fancytxt.prg index 0874881115..2dcac9a108 100644 --- a/harbour/contrib/hbcairo/tests/fancytxt.prg +++ b/harbour/contrib/hbcairo/tests/fancytxt.prg @@ -2,10 +2,12 @@ * $Id$ */ +#require "hbcairo" + #include "hbcairo.ch" -PROC main() +PROCEDURE Main() LOCAL hSurface hSurface := cairo_pdf_surface_create( "fancytxt.pdf", 566.9, 793.7 ) // 200x280 mm in pt diff --git a/harbour/contrib/hbcairo/tests/glyphdbg.prg b/harbour/contrib/hbcairo/tests/glyphdbg.prg index d6bd1d1c40..bc9f8a560b 100644 --- a/harbour/contrib/hbcairo/tests/glyphdbg.prg +++ b/harbour/contrib/hbcairo/tests/glyphdbg.prg @@ -2,10 +2,11 @@ * $Id$ */ +#require "hbcairo" #include "hbcairo.ch" -PROC main() +PROCEDURE Main() LOCAL hSurface, hCairo hSurface := cairo_pdf_surface_create( "glyphdbg.pdf", 566.9, 793.7 ) // 200x280 mm in pt diff --git a/harbour/contrib/hbcairo/tests/hellow.prg b/harbour/contrib/hbcairo/tests/hellow.prg index c05a28f124..c587af2cfd 100644 --- a/harbour/contrib/hbcairo/tests/hellow.prg +++ b/harbour/contrib/hbcairo/tests/hellow.prg @@ -4,11 +4,13 @@ /* UTF-8 */ +#require "hbcairo" + #include "hbcairo.ch" REQUEST HB_CODEPAGE_LTWIN -PROC main() +PROCEDURE Main() LOCAL hSurface, hCairo, nI HB_CDPSELECT("LTWIN") diff --git a/harbour/contrib/hbcairo/tests/lightning.prg b/harbour/contrib/hbcairo/tests/lightning.prg index 48f99b4231..bb32c614e0 100644 --- a/harbour/contrib/hbcairo/tests/lightning.prg +++ b/harbour/contrib/hbcairo/tests/lightning.prg @@ -2,11 +2,12 @@ * $Id$ */ +#require "hbcairo" #include "hbcairo.ch" -PROC main() +PROCEDURE Main() LOCAL hSurface, hCairo, nI hSurface := cairo_pdf_surface_create( "lightning.pdf", 566.9, 793.7 ) // 200x280 mm in pt @@ -14,9 +15,9 @@ PROC main() // 20 pages FOR nI := 1 TO 20 - cairo_set_source_rgb( hCairo, 0, 0, 0 ) + cairo_set_source_rgb( hCairo, 0, 0, 0 ) cairo_paint( hCairo ) - cairo_set_source_rgb( hCairo, 1, 0.7, 1 ) + cairo_set_source_rgb( hCairo, 1, 0.7, 1 ) DrawLightning( hCairo, 250, 50, 700, 3 ) cairo_show_page( hCairo ) NEXT @@ -38,7 +39,7 @@ PROC DrawLightning( hCairo, nX, nY, nLen, nW, nInit ) // AR(1) process nInit := nInit * 0.9 + (hb_random() - 0.5) // ARIMA(1, 1, 0) process - nK += nInit + nK += nInit // ARIMA(1, 1, 0) + white noise nX2 := nX + nK + hb_random() cairo_line_to( hCairo, nX2, nI + nY ) diff --git a/harbour/contrib/hbcairo/tests/table.prg b/harbour/contrib/hbcairo/tests/table.prg index 2dc39f1e4b..8dc3a66038 100644 --- a/harbour/contrib/hbcairo/tests/table.prg +++ b/harbour/contrib/hbcairo/tests/table.prg @@ -2,11 +2,12 @@ * $Id$ */ +#require "hbcairo" #include "hbcairo.ch" -PROC main() +PROCEDURE Main() LOCAL hSurface, hCairo FIELD CODE, NAME, RESIDENTS diff --git a/harbour/contrib/hbfbird/tests/stress.prg b/harbour/contrib/hbfbird/tests/stress.prg index 827e5bc97f..eaac5ca158 100644 --- a/harbour/contrib/hbfbird/tests/stress.prg +++ b/harbour/contrib/hbfbird/tests/stress.prg @@ -15,7 +15,7 @@ PROCEDURE Main() LOCAL cUser := "SYSDBA" LOCAL cPass := "masterkey" LOCAL nPageSize := 1024 - LOCAL cCharSet := "WIN1251" + LOCAL cCharSet := "UTF8" LOCAL nDialect := 1 LOCAL cQuery, cName @@ -66,16 +66,16 @@ PROCEDURE Main() oServer:StartTransaction() FOR i := 1 TO 10000 - @ 15, 0 say "Inserting values...." + hb_ntos( i ) + @ 15, 0 SAY "Inserting values...." + hb_ntos( i ) oRow := oQuery:Blank() - oRow:Fieldput(1, i) - oRow:Fieldput(2, i+1) - oRow:Fieldput(3, "DEPARTMENT NAME " + strzero( i ) ) - oRow:Fieldput(4, (i % 10) == 0) - oRow:Fieldput(5, 3000 + i ) - oRow:fieldput(6, Date() ) + oRow:Fieldput( 1, i ) + oRow:Fieldput( 2, i + 1 ) + oRow:Fieldput( 3, "DEPARTMENT NAME " + strzero( i ) ) + oRow:Fieldput( 4, ( i % 10 ) == 0 ) + oRow:Fieldput( 5, 3000 + i ) + oRow:fieldput( 6, Date() ) oServer:Append( oRow ) @@ -86,10 +86,10 @@ PROCEDURE Main() NEXT FOR i := 5000 TO 7000 - @ 16,0 say "Deleting values...." + str( i ) + @ 16, 0 SAY "Deleting values...." + Str( i ) oRow := oQuery:Blank() - oServer:Delete( oRow, "code = " + str( i ) ) + oServer:Delete( oRow, "code = " + Str( i ) ) IF i % 100 == 0 oServer:Commit() @@ -98,11 +98,11 @@ PROCEDURE Main() NEXT FOR i := 2000 TO 3000 - @ 17,0 say "Updating values...." + str( i ) + @ 17, 0 SAY "Updating values...." + Str( i ) oRow := oQuery:Blank() oRow:Fieldput( 5, 4000 + i ) - oServer:update( oRow, "code = " + str( i ) ) + oServer:update( oRow, "code = " + Str( i ) ) IF i % 100 == 0 oServer:Commit() @@ -114,13 +114,13 @@ PROCEDURE Main() IF ! oQuery:Neterr() oQuery:Fetch() - @ 18,0 say "Sum values...." + Str( oQuery:Fieldget( 1 ) ) + @ 18, 0 SAY "Sum values...." + Str( oQuery:Fieldget( 1 ) ) oQuery:Destroy() ENDIF x := 0 FOR i := 1 TO 4000 - oQuery := oServer:Query( "SELECT * FROM test WHERE code = " + str( i ) ) + oQuery := oServer:Query( "SELECT * FROM test WHERE code = " + Str( i ) ) IF ! oQuery:Neterr() oQuery:Fetch() @@ -129,7 +129,7 @@ PROCEDURE Main() oQuery:destroy() x += oRow:fieldget( oRow:fieldpos( "salary" ) ) - @ 19,0 say "Sum values...." + str( x ) + @ 19, 0 SAY "Sum values...." + Str( x ) ENDIF NEXT diff --git a/harbour/contrib/hbgd/gdbarcod.prg b/harbour/contrib/hbgd/gdbarcod.prg index 02419f128f..02fb4bf173 100644 --- a/harbour/contrib/hbgd/gdbarcod.prg +++ b/harbour/contrib/hbgd/gdbarcod.prg @@ -612,7 +612,7 @@ METHOD GenCodei25() CLASS TCode LOCAL lError := .F. LOCAL bc_string // := ::text - //LOCAL new_string := "" +// LOCAL new_string := "" IF ( Len( ::text ) % 2 ) != 0 ::DrawError( "Invalid barcode lenght" ) @@ -623,11 +623,11 @@ METHOD GenCodei25() CLASS TCode bc_string := Upper( ::text ) - // encode itemId to I25 barcode standard. ////////////////////////////////////// + // encode itemId to I25 barcode standard. bc_string := ::MixCode( bc_string ) - /////////////////////////////////////////////////////////////////////////////////////////////// + /////////////////////////////// //Adding Start and Stop Pattern ::DrawSingleI25( ::acode[ 11 ] + bc_string + ::acode[ 12 ] ) @@ -666,14 +666,14 @@ METHOD MixCode( value ) CLASS TCode DO WHILE i < l - cFirst := ::Findcode( value[ i ] ) - cnext := ::Findcode( value[ i + 1 ] ) + cFirst := ::Findcode( SubStr( value, i, 1 ) ) + cnext := ::Findcode( SubStr( value, i + 1, 1 ) ) // Mix of the codes // NNNNWNNWWW // N N N W W FOR k := 1 TO 5 - s += cFirst[ k ] + cnext[ k ] + s += SubStr( cFirst, k, 1 ) + SubStr( cnext, k, 1 ) NEXT i += 2 @@ -691,7 +691,7 @@ METHOD Findcode( uval ) CLASS TCode LOCAL npos LOCAL cretc - npos := AScan( ::keys, {| x | x[ 1 ] == uval } ) + npos := AScan( ::keys, {| x | Left( x, 1 ) == uval } ) cretc := ::acode[ npos ] RETURN cretc diff --git a/harbour/contrib/hbgd/gdimage.prg b/harbour/contrib/hbgd/gdimage.prg index 406653d747..2edbfd4fc0 100644 --- a/harbour/contrib/hbgd/gdimage.prg +++ b/harbour/contrib/hbgd/gdimage.prg @@ -134,7 +134,7 @@ CREATE CLASS GDImage METHOD ToString() INLINE gdImageToString( Self ) // Destructor - METHOD Destroy() INLINE gdImageDestroy( ::pImage ) + METHOD Destroy() DESTRUCTOR Destruct() @@ -298,11 +298,6 @@ METHOD New( sx, sy ) CLASS GDImage RETURN Self METHOD PROCEDURE Destruct() CLASS GDImage - - IF ::lDestroy - ::Destroy() - ENDIF - RETURN METHOD Polygon( aPoints, lFilled, color ) CLASS GDImage @@ -385,6 +380,10 @@ METHOD LoadFromFile( cFile ) CLASS GDImage RETURN Self +/* dummy. no longer needed */ +METHOD Destroy() CLASS GDImage + RETURN Self + METHOD Copy( nSrcX, nSrcY, nWidth, nHeight, nDstX, nDstY, oDestImage ) CLASS GDImage hb_default( @nSrcX , 0 ) diff --git a/harbour/contrib/hbgd/gdwrp.c b/harbour/contrib/hbgd/gdwrp.c index 15095df6da..d0685392ca 100644 --- a/harbour/contrib/hbgd/gdwrp.c +++ b/harbour/contrib/hbgd/gdwrp.c @@ -743,31 +743,6 @@ HB_FUNC( GDIMAGEGD ) /* original: void gdImageGD(gdImagePtr im, FILE *out) */ */ HB_FUNC( GDIMAGEDESTROY ) /* gdImageDestroy(gdImagePtr im) */ { - if( hb_pcount() == 1 && - HB_ISPOINTER( 1 ) ) - { - /* - gdImagePtr im; - */ - - /* Retrieve image pointer */ - /* - im = (gdImagePtr)hb_parptr( 1 ); - */ - - /* Destroy the image */ - /* - gdImageDestroy( im ); - */ - - } - else - { - hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, - HB_ERR_FUNCNAME, 1, - hb_paramError( 1 ) ); - } - } /* - */ diff --git a/harbour/contrib/hbgd/tests/animgif.prg b/harbour/contrib/hbgd/tests/animgif.prg index becec3fbb8..04c758a6bd 100644 --- a/harbour/contrib/hbgd/tests/animgif.prg +++ b/harbour/contrib/hbgd/tests/animgif.prg @@ -10,6 +10,8 @@ * This test shows how handle either file handle than file name */ +#require "hbgd" + #include "gd.ch" #include "simpleio.ch" @@ -24,7 +26,7 @@ PROCEDURE Main() /* // Check output directory - IF !hb_DirExists( IMAGES_OUT ) + IF ! hb_DirExists( IMAGES_OUT ) DirMake( IMAGES_OUT ) ENDIF */ diff --git a/harbour/contrib/hbgd/tests/antialia.prg b/harbour/contrib/hbgd/tests/antialia.prg index 5553770ae3..9d4f21f916 100644 --- a/harbour/contrib/hbgd/tests/antialia.prg +++ b/harbour/contrib/hbgd/tests/antialia.prg @@ -8,6 +8,8 @@ * GD API test file */ +#require "hbgd" + #include "gd.ch" #include "simpleio.ch" @@ -21,7 +23,7 @@ PROCEDURE Main() /* // Check output directory - IF !hb_DirExists( IMAGES_OUT ) + IF ! hb_DirExists( IMAGES_OUT ) DirMake( IMAGES_OUT ) ENDIF */ diff --git a/harbour/contrib/hbgd/tests/barms.prg b/harbour/contrib/hbgd/tests/barms.prg index 2b9d8d518f..50114b466c 100644 --- a/harbour/contrib/hbgd/tests/barms.prg +++ b/harbour/contrib/hbgd/tests/barms.prg @@ -2,6 +2,8 @@ * $Id$ */ +#require "hbgd" + #define IMAGES_OUT "imgs_out" + hb_ps() PROCEDURE Main() @@ -43,7 +45,7 @@ PROCEDURE Main() 2 - Height 3 - Filename (empty : display on screen) 4 - Background color */ - bar:CreateBar( 205, 105,, white ) + bar:CreateBar( 205, 105, IMAGES_OUT + "bar13.jpg", white ) // 1 - code bar bar:Draw13( ccode13 ) @@ -56,7 +58,7 @@ PROCEDURE Main() bar:Configure( 70, black, white, 2, 1 ) - bar:CreateBar( 154, 100,, white ) + bar:CreateBar( 154, 100, IMAGES_OUT + "bar8.gif", white ) bar:Draw8( ccode8 ) @@ -72,7 +74,7 @@ PROCEDURE Main() // output image //bar:out_img := "image_out/" - bar:CreateBar( 559, 88, IMAGES_OUT + "Bar128", white ) + bar:CreateBar( 559, 88, IMAGES_OUT + "bar128.gif", white ) // 1- code bar // 2- barcode types A/B/C @@ -90,7 +92,7 @@ PROCEDURE Main() // output image //bar:out_img := "febraban/" - bar:CreateBar( 560, 60, IMAGES_OUT + "febraban", white ) + bar:CreateBar( 560, 60, IMAGES_OUT + "febraban.gif", white ) bar:DrawI25( "P48WBQ7BX3M73X8V3WRT7F9JW" ) bar:Finish( 8 ) diff --git a/harbour/contrib/hbgd/tests/bartest.prg b/harbour/contrib/hbgd/tests/bartest.prg index 8bb12f73df..34f275b9a3 100644 --- a/harbour/contrib/hbgd/tests/bartest.prg +++ b/harbour/contrib/hbgd/tests/bartest.prg @@ -2,6 +2,8 @@ * $Id$ */ +#require "hbgd" + #define IMAGES_OUT "imgs_out" + hb_ps() PROCEDURE Main() @@ -44,7 +46,7 @@ PROCEDURE Main() 2 - Height 3 - Filename (empty : display on screen) 4 - Background color */ - bar:CreateBar( 205, 105,, white ) + bar:CreateBar( 205, 105, IMAGES_OUT + "bar13.jpg", white ) // 1 - code bar bar:Draw13( ccode13 ) @@ -57,7 +59,7 @@ PROCEDURE Main() bar:Configure( 70, black, white, 2, 1 ) - bar:CreateBar( 154, 100,, white ) + bar:CreateBar( 154, 100, IMAGES_OUT + "bar8.gif", white ) bar:Draw8( ccode8 ) @@ -70,7 +72,7 @@ PROCEDURE Main() bar:Configure( 50, black, white, 2, 1 ) - bar:CreateBar( 300, 400, IMAGES_OUT + "Bar128", white ) + bar:CreateBar( 300, 400, IMAGES_OUT + "bar128.gif", white ) // 1- code bar // 2- barcode types A/B/C @@ -86,7 +88,7 @@ PROCEDURE Main() bar:Configure( 25, black, white, 1, 1,, .T. ) - bar:CreateBar( 560, 60, IMAGES_OUT + "febraban", white ) + bar:CreateBar( 560, 60, IMAGES_OUT + "febraban.gif", white ) bar:DrawI25( "104995628545723070285700000008218000" ) bar:Finish( 8 ) diff --git a/harbour/contrib/hbgd/tests/counter.prg b/harbour/contrib/hbgd/tests/counter.prg index e6929d783c..3364590578 100644 --- a/harbour/contrib/hbgd/tests/counter.prg +++ b/harbour/contrib/hbgd/tests/counter.prg @@ -11,6 +11,8 @@ * i.e.: counter 34524 */ +#require "hbgd" + #include "gd.ch" #include "simpleio.ch" @@ -50,21 +52,9 @@ PROCEDURE Main( cValue, cBaseImage ) ? "Value = ", cValue - // To set fonts run this command: - // for Windows: SET GDFONTPATH=%WINDIR%\fonts - // per Linux : export GDFONTPATH=/usr/share/fonts/default/TrueType - -// SET GDFONTPATH=%WINDIR%\fonts -// IF GetEnv( "GDFONTPATH" ) == "" -// ? "Please set GDFONTPATH" -// ? "On Windows: SET GDFONTPATH=%WINDIR%\fonts" -// ? "On Linux : export GDFONTPATH=/usr/share/fonts/default/TrueType" -// ? -// ENDIF - // Check output directory /* - IF !hb_DirExists( IMAGES_OUT ) + IF ! hb_DirExists( IMAGES_OUT ) DirMake( IMAGES_OUT ) ENDIF */ diff --git a/harbour/contrib/hbgd/tests/gdtest.prg b/harbour/contrib/hbgd/tests/gdtest.prg index e551ebd4d6..ee9723ffb9 100644 --- a/harbour/contrib/hbgd/tests/gdtest.prg +++ b/harbour/contrib/hbgd/tests/gdtest.prg @@ -8,6 +8,8 @@ * GD API test file */ +#require "hbgd" + #include "gd.ch" #include "simpleio.ch" @@ -20,18 +22,9 @@ PROCEDURE Main() LOCAL black, blue, red, green, cyan LOCAL color, font - // LOCAL aClip - - // SET GDFONTPATH=%WINDIR%\fonts - IF GetEnv( "GDFONTPATH" ) == "" - ? "Please set GDFONTPATH" - ? "On Windows: SET GDFONTPATH=%WINDIR%\fonts" - ? "On Linux : export GDFONTPATH=/usr/share/fonts/default/TrueType" - ? - ENDIF /* // Check output directory - IF !hb_DirExists( IMAGES_OUT ) + IF ! hb_DirExists( IMAGES_OUT ) DirMake( IMAGES_OUT ) ENDIF */ @@ -87,18 +80,11 @@ PROCEDURE Main() gdImageStringFt( im, blue, "arial", 20, 30, 20, 90, "Test" ) - ? gdImageStringFTCircle( im, 120, 120, 50, 25, 0.8, "arial", 24, "Up", /*"Down"*/ - , red ) + ? gdImageStringFTCircle( im, 120, 120, 50, 25, 0.8, "arial", 24, "Up", /*"Down"*/, red ) /* Set Clip Rectangle */ gdImageSetClip( im, 25, 25, 75, 75 ) - /* Retrieve Clipping rectangle */ - // aClip := gdImageGetClip(im) - - // ? "Clipping rectangle values" - // ? hb_DumpVar( aClip ) - /* Query functions */ color := gdImageGetPixel( im, gdImageSX( im ) / 2, gdImageSY( im ) / 2 ) ? "Pixel Color is: ", color diff --git a/harbour/contrib/hbgd/tests/gdtestcl.prg b/harbour/contrib/hbgd/tests/gdtestcl.prg index 513c90e30b..cad66b47be 100644 --- a/harbour/contrib/hbgd/tests/gdtestcl.prg +++ b/harbour/contrib/hbgd/tests/gdtestcl.prg @@ -8,6 +8,8 @@ * GD Class test file */ +#require "hbgd" + #include "gd.ch" #include "simpleio.ch" @@ -22,18 +24,9 @@ PROCEDURE Main() LOCAL oI5 LOCAL oB - // LOCAL aClip - - // SET GDFONTPATH=%WINDIR%\fonts - IF GetEnv( "GDFONTPATH" ) == "" - ? "Please set GDFONTPATH" - ? "On Windows: SET GDFONTPATH=%WINDIR%\fonts" - ? "On Linux : export GDFONTPATH=/usr/share/fonts/default/TrueType" - ? - ENDIF /* // Check output directory - IF !hb_DirExists( IMAGES_OUT ) + IF ! hb_DirExists( IMAGES_OUT ) DirMake( IMAGES_OUT ) ENDIF */ @@ -123,11 +116,6 @@ PROCEDURE Main() /* Set Clip Rectangle */ oI:SetClippingArea( 25, 25, 75, 75 ) - /* Retrieve Clipping rectangle */ - // aClip := oI:GetClippingArea() - ? "Clipping rectangle values" - // ? hb_DumpVar( aClip ) - /* Query functions */ color := oI:GetPixel( oI:Width() / 2, oI:Height() / 2 ) diff --git a/harbour/contrib/hbgd/tests/test.prg b/harbour/contrib/hbgd/tests/test.prg index b580e47e14..a99be20207 100644 --- a/harbour/contrib/hbgd/tests/test.prg +++ b/harbour/contrib/hbgd/tests/test.prg @@ -2,6 +2,8 @@ * $Id$ */ +#require "hbgd" + #define IMAGES_OUT "imgs_out" + hb_ps() PROCEDURE Main() diff --git a/harbour/contrib/hbgd/tests/test_out.prg b/harbour/contrib/hbgd/tests/test_out.prg index 2ca4387d8c..6cce42dec0 100644 --- a/harbour/contrib/hbgd/tests/test_out.prg +++ b/harbour/contrib/hbgd/tests/test_out.prg @@ -5,26 +5,26 @@ /* * Copyright 2004-2005 Francesco Saverio Giudice * - * Windows CGI test application + * CGI test application */ +#require "hbgd" + #include "gd.ch" -#define CRLF ( Chr( 13 ) + Chr( 10 ) ) - -#command WRITE => FWrite( 1, + CRLF ) +#command WRITE => FWrite( 1, + hb_eol() ) #command OutHTML => WRITE PROCEDURE Main( ... ) LOCAL cPar - LOCAL aParams := hb_aParams() + LOCAL aParams := hb_AParams() LOCAL cQuery := GetEnv( "QUERY_STRING" ) LOCAL hParams := { => } LOCAL cImg, nPt, nWidth, nHeight, cPhoto - // LOCAL cText +// LOCAL cText IF Empty( aParams ) IF ! Empty( cQuery ) @@ -34,7 +34,7 @@ PROCEDURE Main( ... ) hParams := GetParams( aParams ) ENDIF - // +// // Gestione parametri IF ! Empty( hParams ) @@ -42,44 +42,42 @@ PROCEDURE Main( ... ) DO CASE CASE cPar == "txt" - // cText := hb_hGet( hParams, cPar ) + // cText := hb_HGet( hParams, cPar ) CASE cPar == "img" - cImg := hb_hGet( hParams, cPar ) + cImg := hb_HGet( hParams, cPar ) CASE cPar == "photo" - cPhoto := hb_hGet( hParams, cPar ) + cPhoto := hb_HGet( hParams, cPar ) CASE cPar == "width" - nWidth := Val( hb_hGet( hParams, cPar ) ) + nWidth := Val( hb_HGet( hParams, cPar ) ) CASE cPar == "height" - nHeight := Val( hb_hGet( hParams, cPar ) ) + nHeight := Val( hb_HGet( hParams, cPar ) ) CASE cPar == "pt" - nPt := Val( hb_hGet( hParams, cPar ) ) + nPt := Val( hb_HGet( hParams, cPar ) ) ENDCASE NEXT ENDIF - //__OutDebug( cQuery, ValToPrg( hParams ) ) +// __OutDebug( cQuery, ValToPrg( hParams ) ) - // - - //hb_default( @cText, "Testo di Prova" ) +// hb_default( @cText, "Testo di Prova" ) hb_default( @nPt, 30 ) IF cImg != NIL - //OutJpg( cImg, nPt ) + //OutJpg( cImg, nPt ) OutPhoto( cImg, nWidth, nHeight ) ELSEIF cPhoto != NIL StartHTML() - //OutHTML ValToPrg( hParams ) + "
" - //OutHTML ValToPrg( cParams ) + "
" - //OutHTML ValToPrg( cQuery ) + "
" - //OutHTML "" + "
" + //OutHTML ValToPrg( hParams ) + "
" + //OutHTML ValToPrg( cParams ) + "
" + //OutHTML ValToPrg( cQuery ) + "
" + //OutHTML "" + "
" OutHTML "" OutHTML "" OutHTML "
" OutHTML "" + "
" @@ -95,9 +93,8 @@ PROCEDURE Main( ... ) OutHTML "
" OutHTML "
" - //OutHTML "" + "
" - //OutHTML OS() + "
" - //OutHTML iif( OS_ISWINNT(), "WIN NT", "NON WIN NT" ) + "
" + //OutHTML "" + "
" + //OutHTML OS() + "
" EndHTML() ELSE StartHTML() @@ -112,7 +109,7 @@ PROCEDURE StartHTML( cTitle ) WRITE 'content-type: text/html' WRITE 'Pragma: no-cache' - WRITE CRLF + WRITE hb_eol() WRITE "" WRITE "" WRITE "" + cTitle + "" @@ -128,9 +125,6 @@ PROCEDURE EndHTML() RETURN -// per windows: SET GDFONTPATH=%WINDIR%\fonts -// per linux : export GDFONTPATH=/usr/share/fonts/default/TrueType - PROCEDURE OutPhoto( cPhoto, nWidth, nHeight ) LOCAL cType @@ -147,9 +141,9 @@ PROCEDURE OutPhoto( cPhoto, nWidth, nHeight ) oImage:Resize( nWidth, nHeight ) ENDIF - //__OutDebug( hb_dumpvar( oImage ) ) +// __OutDebug( hb_dumpvar( oImage ) ) - WRITE 'content-type: ' + oImage:cMime + CRLF + WRITE 'content-type: ' + oImage:cMime + hb_eol() cType := oImage:cType DO CASE @@ -165,13 +159,11 @@ PROCEDURE OutPhoto( cPhoto, nWidth, nHeight ) PROCEDURE OutJpg( cText, nPitch ) - LOCAL cPath := GetEnv( "WINDIR" ) + "\fonts\" LOCAL oI - // LOCAL cyan +// LOCAL cyan LOCAL blue LOCAL aSize, nWidth, nHeight, nX, nY - LOCAL cFont := cPath + "verdana.ttf" hb_default( @cText , "Sample TEXT" ) hb_default( @nPitch, 30 ) @@ -185,10 +177,10 @@ PROCEDURE OutJpg( cText, nPitch ) /* Allocate drawing color */ // blue := oI:SetColor( 0, 0, 200 ) - //oI:SetTransparent( blue ) - oI:SetFontName( cFont ) +// oI:SetTransparent( blue ) + oI:SetFontName( "Verdana" ) // TOFIX oI:SetFontPitch( nPitch ) - //__OutDebug( oI:GetFTFontHeight() ) +// __OutDebug( oI:GetFTFontHeight() ) aSize := oI:GetFTStringSize( cText ) nWidth := aSize[ 1 ] nHeight := aSize[ 2 ] @@ -199,21 +191,21 @@ PROCEDURE OutJpg( cText, nPitch ) /* Allocate drawing color */ blue := oI:SetColor( 0, 0, 200 ) - oI:SetFontName( cPath + "verdana.ttf" ) + oI:SetFontName( "Verdana" ) // TOFIX oI:SetFontPitch( nPitch ) oI:SayFreeType( 0 - nX, 0 + nHeight - nY, cText, , , 0, blue ) - //oI:SayFreeType( 0, 0, cText, , , 0, blue ) +// oI:SayFreeType( 0, 0, cText, , , 0, blue ) - //oI:Resize( nWidth, nHeight ) - //__OutDebug( "prima", oI:Width(), oI:Height() ) - //oI:Resize( 60, 40 ) - //__OutDebug( "dopo", oI:Width(), oI:Height() ) +// oI:Resize( nWidth, nHeight ) +// __OutDebug( "prima", oI:Width(), oI:Height() ) +// oI:Resize( 60, 40 ) +// __OutDebug( "dopo", oI:Width(), oI:Height() ) - //oI:SetFontLarge() - //oI:SetColor( blue ) - //oI:Say( 0, 0, cText ) +// oI:SetFontLarge() +// oI:SetColor( blue ) +// oI:Say( 0, 0, cText ) - WRITE 'content-type: image/jpeg' + CRLF + WRITE 'content-type: image/jpeg' + hb_eol() oI:OutputJpeg() @@ -227,10 +219,10 @@ FUNCTION GetVars( cFields, cSeparator ) hb_default( @cSeparator, "&" ) - aFields := HB_RegExSplit( cSeparator, cFields ) + aFields := hb_regexSplit( cSeparator, cFields ) FOR EACH cField in aFields - aField := HB_RegexSplit( "=", cField, 2 ) + aField := hb_regexSplit( "=", cField, 2 ) IF Len( aField ) != 2 LOOP ENDIF @@ -253,7 +245,7 @@ FUNCTION GetVars( cFields, cSeparator ) ENDIF //Tracelog( "hHashVars, cName, xValue", DumpValue( hHashVars ), cName, xValue ) NEXT - //__OutDebug( hHashVars ) +// __OutDebug( hHashVars ) RETURN hHashVars @@ -266,7 +258,7 @@ FUNCTION GetParams( aParams ) aFields := aParams FOR EACH cField in aFields - aField := HB_RegexSplit( "=", cField, 2 ) + aField := hb_regexSplit( "=", cField, 2 ) IF Len( aField ) != 2 LOOP ENDIF @@ -289,7 +281,7 @@ FUNCTION GetParams( aParams ) ENDIF //Tracelog( "hHashVars, cName, xValue", DumpValue( hHashVars ), cName, xValue ) NEXT - //__OutDebug( hHashVars ) +// __OutDebug( hHashVars ) RETURN hHashVars @@ -302,7 +294,7 @@ FUNCTION URLDecode( cStr ) LOCAL cRet := "", i, cCar - // LOCAL lNumeric := .T. +// LOCAL lNumeric := .T. FOR i := 1 TO Len( cStr ) cCar := cStr[ i ] @@ -316,7 +308,7 @@ FUNCTION URLDecode( cStr ) cRet += Chr( hb_HexToNum( SubStr( cStr, i, 2 ) ) ) i++ - OTHERWISE + OTHERWISE cRet += cCar ENDCASE @@ -326,9 +318,9 @@ FUNCTION URLDecode( cStr ) // ENDIF NEXT - // IF lNumeric - // cRet := Val( cRet ) - // ENDIF +// IF lNumeric +// cRet := Val( cRet ) +// ENDIF RETURN cRet diff --git a/harbour/contrib/hbgd/tests/testdpi.prg b/harbour/contrib/hbgd/tests/testdpi.prg index 62b566b98d..939d930466 100644 --- a/harbour/contrib/hbgd/tests/testdpi.prg +++ b/harbour/contrib/hbgd/tests/testdpi.prg @@ -9,6 +9,8 @@ * Copyright 2005 Francesco Saverio Giudice */ +#require "hbgd" + #include "gd.ch" #define IMAGES_IN "imgs_in" + hb_ps() @@ -18,10 +20,10 @@ PROCEDURE Main() LOCAL oI := GDImage():Create( 600, 300 ) - LOCAL black := oI:SetColor( 0, 0, 0 ) + LOCAL black := oI:SetColor( 50, 0, 0 ) oI:SetColor( black ) - oI:SetFontName( GetEnv( "WINDIR" ) + "\fonts\arial.ttf" ) + oI:SetFontName( "Arial" ) // TOFIX oI:SetFontPitch( 10 ) // Resolution = 96 dpi, default diff --git a/harbour/contrib/hbgd/tests/tostring.prg b/harbour/contrib/hbgd/tests/tostring.prg index 90fb280c68..cc61947867 100644 --- a/harbour/contrib/hbgd/tests/tostring.prg +++ b/harbour/contrib/hbgd/tests/tostring.prg @@ -8,6 +8,8 @@ * GD Class test file: tostring() demo */ +#require "hbgd" + #include "gd.ch" #include "simpleio.ch" @@ -20,7 +22,7 @@ PROCEDURE Main() /* // Check output directory - IF !hb_DirExists( IMAGES_OUT ) + IF ! hb_DirExists( IMAGES_OUT ) DirMake( IMAGES_OUT ) ENDIF */ diff --git a/harbour/contrib/hbgd/tests/tpoly.prg b/harbour/contrib/hbgd/tests/tpoly.prg index 2053fa6716..bd82c994d1 100644 --- a/harbour/contrib/hbgd/tests/tpoly.prg +++ b/harbour/contrib/hbgd/tests/tpoly.prg @@ -6,6 +6,8 @@ * Koch Flake -- for testing gdImage*Polygon() */ +#require "hbgd" + #include "gd.ch" #include "simpleio.ch" diff --git a/harbour/contrib/hbhttpd/widgets.prg b/harbour/contrib/hbhttpd/widgets.prg index 6ed3d0b48d..9019a87532 100644 --- a/harbour/contrib/hbhttpd/widgets.prg +++ b/harbour/contrib/hbhttpd/widgets.prg @@ -30,7 +30,7 @@ FUNCTION UWMainNew() METHOD Paint() CLASS UWMain UWrite( '' ) - UWrite( '' ) + UWrite( '' ) UWrite( '' ) UWrite( '' ) AEval( Self:aChilds, {| x | x:Paint() } ) @@ -545,7 +545,7 @@ PROCEDURE UWDefaultHandler( cMethod ) session[ "_uthis", "main" ]:Paint() ELSE IF ( oW := UGetWidgetById( cID ) ) != NIL - UAddHeader( "Content-type", "text/html; charset=windows-1257" ) + UAddHeader( "Content-type", "text/html; charset=UTF-8" ) oW:Ajax( hb_HGetDef( get, "action" ) ) ENDIF ENDIF diff --git a/harbour/contrib/hbmisc/tests/readfile.prg b/harbour/contrib/hbmisc/tests/readfile.prg index 1a00a5ff56..34fddc8323 100644 --- a/harbour/contrib/hbmisc/tests/readfile.prg +++ b/harbour/contrib/hbmisc/tests/readfile.prg @@ -9,6 +9,8 @@ Donated to the public domain on 2001-03-08 by David G. Holm */ +#require "hbmisc" + PROCEDURE Main( cFile ) LOCAL oFile := TFileRead():New( cFile ) diff --git a/harbour/contrib/hbmisc/tests/rtfclass.prg b/harbour/contrib/hbmisc/tests/rtfclass.prg index 5d720f8eb2..cb1c9436c0 100644 --- a/harbour/contrib/hbmisc/tests/rtfclass.prg +++ b/harbour/contrib/hbmisc/tests/rtfclass.prg @@ -8,11 +8,12 @@ - using hb_f*() - some compilers are not friendly with this :( - rtf is assumed to have association * initial release : 23 June 1999 Andi Jahja - * tested under Windows 98 only with RTF associated to WinWord * works with printable ascii only * placed in the public domain */ +#require "hbmisc" + PROCEDURE Main() LOCAL ortf := trtf():new( "test.rtf" ) diff --git a/harbour/contrib/hbmisc/tests/testbbab.prg b/harbour/contrib/hbmisc/tests/testbbab.prg index 658f6adc5b..b15644675a 100644 --- a/harbour/contrib/hbmisc/tests/testbbab.prg +++ b/harbour/contrib/hbmisc/tests/testbbab.prg @@ -10,6 +10,8 @@ * */ +#require "hbmisc" + PROCEDURE Main() ? BubbleBabbleEncode_prg( "" ) diff --git a/harbour/contrib/hbmisc/tests/testcall.prg b/harbour/contrib/hbmisc/tests/testcall.prg index 9419a953a0..b5755d242a 100644 --- a/harbour/contrib/hbmisc/tests/testcall.prg +++ b/harbour/contrib/hbmisc/tests/testcall.prg @@ -10,11 +10,15 @@ * */ +#require "hbmisc" + PROCEDURE Main() +#if defined( __PLATFORM__WINDOWS ) LOCAL nFlags nFlags := -1 ? CALLDLL32( "InternetGetConnectedState", "wininet.dll", @nFlags, 0 ) ? nFlags +#endif RETURN diff --git a/harbour/contrib/hbmisc/tests/testhbf.prg b/harbour/contrib/hbmisc/tests/testhbf.prg index df15c10683..015d4cdee2 100644 --- a/harbour/contrib/hbmisc/tests/testhbf.prg +++ b/harbour/contrib/hbmisc/tests/testhbf.prg @@ -17,6 +17,8 @@ inplementation of : * hb_fgobottom() */ +#require "hbmisc" + PROCEDURE Main() // open a text file here diff --git a/harbour/contrib/hbmisc/tests/tsstrfmt.prg b/harbour/contrib/hbmisc/tests/tsstrfmt.prg index 54f5ef0fdf..61319f13fd 100644 --- a/harbour/contrib/hbmisc/tests/tsstrfmt.prg +++ b/harbour/contrib/hbmisc/tests/tsstrfmt.prg @@ -2,6 +2,8 @@ * $Id$ */ +#require "hbmisc" + PROCEDURE Main() ? StrFormat( "%1 thing %2", "a", "b" ) diff --git a/harbour/contrib/hbmisc/tests/twirl.prg b/harbour/contrib/hbmisc/tests/twirl.prg index 81e2c6c146..280fb3c47f 100644 --- a/harbour/contrib/hbmisc/tests/twirl.prg +++ b/harbour/contrib/hbmisc/tests/twirl.prg @@ -1,6 +1,6 @@ -// -// $Id$ -// +/* + * $Id$ + */ // Test program for new libmisc twirler class /* Harbour Project source code @@ -8,6 +8,8 @@ Donated to the public domain on 2001-03-15 by David G. Holm */ +#require "hbmisc" + PROCEDURE Main() LOCAL counter := 0, start_time, stop_time diff --git a/harbour/contrib/hbmisc/tests/udpdstst.prg b/harbour/contrib/hbmisc/tests/udpdstst.prg index 2d46461ed9..d7b2311db7 100644 --- a/harbour/contrib/hbmisc/tests/udpdstst.prg +++ b/harbour/contrib/hbmisc/tests/udpdstst.prg @@ -6,6 +6,8 @@ * This module demonstrates a simple UDP Discovery Server */ +#require "hbmisc" + PROCEDURE main( cParam ) LOCAL h diff --git a/harbour/contrib/hbxpp/tests/opover.prg b/harbour/contrib/hbxpp/tests/opover.prg index 2b52c92d79..5f1ed4eee5 100644 --- a/harbour/contrib/hbxpp/tests/opover.prg +++ b/harbour/contrib/hbxpp/tests/opover.prg @@ -2,6 +2,8 @@ * $Id$ */ +#require "hbxpp" + #include "hbxpp.ch" PROCEDURE Main() diff --git a/harbour/contrib/hbxpp/tests/testdll.prg b/harbour/contrib/hbxpp/tests/testdll.prg index da47db61bc..cb67b8dd38 100644 --- a/harbour/contrib/hbxpp/tests/testdll.prg +++ b/harbour/contrib/hbxpp/tests/testdll.prg @@ -11,6 +11,8 @@ * */ +#require "hbxpp" + #include "simpleio.ch" #include "dll.ch" diff --git a/harbour/extras/httpsrv/modules/showcounter.prg b/harbour/extras/httpsrv/modules/showcounter.prg index cf662c683a..0a9d58f39e 100644 --- a/harbour/extras/httpsrv/modules/showcounter.prg +++ b/harbour/extras/httpsrv/modules/showcounter.prg @@ -122,18 +122,6 @@ STATIC FUNCTION CreateCounter( cValue, cBaseImage ) // ? "Value = ", cValue - // To set fonts run this command: - // for windows: SET GDFONTPATH=%WINDIR%\fonts - // per linux : export GDFONTPATH=/usr/share/fonts/default/TrueType - - // SET GDFONTPATH=%WINDIR%\fonts -// IF GetEnv( "GDFONTPATH" ) == "" -// ? "Please set GDFONTPATH" -// ? "On Windows: SET GDFONTPATH=%WINDIR%\fonts" -// ? "On Linux : export GDFONTPATH=/usr/share/fonts/default/TrueType" -// ? -// ENDIF - // Check output directory /* IF ! hb_DirExists( IMAGES_OUT ) diff --git a/harbour/tests/tstchbx.prg b/harbour/tests/tstchbx.prg index 851065473e..a1dc4d4e8e 100644 --- a/harbour/tests/tstchbx.prg +++ b/harbour/tests/tstchbx.prg @@ -6,26 +6,25 @@ PROCEDURE Main() LOCAL GetList := {} + LOCAL cItem := "Windows" LOCAL lx := .F. LOCAL ly := .F. - LOCAL cItem := "Windows NT/2000" - LOCAL aItems[ 4 ] + LOCAL aItems[ 3 ] - aItems[ 1 ] := RADIOBUTTO( 3, 3, "&Windows NT/2000" ) - aItems[ 2 ] := RADIOBUTTO( 4, 3, "W&indows 9x" ) - aItems[ 3 ] := RADIOBUTTO( 5, 3, "&Linux" ) - aItems[ 4 ] := RADIOBUTTO( 6, 3, "&OS X" ) + aItems[ 1 ] := RadioButto( 3, 3, "&Windows" ) + aItems[ 2 ] := RadioButto( 4, 3, "&Linux" ) + aItems[ 3 ] := RadioButto( 5, 3, "&OS X" ) CLS SetColor( "W/B+,R/B,G+/R,B+/R+,BG/N+,W/BG,RB/BG" ) - @ 2, 2, 7,40 GET cItem RADIOGROUP aItems COLOR "W/B+,R/B,G/B+" MESSAGE "Select your OS" + @ 2, 2, 6, 40 GET cItem RADIOGROUP aItems COLOR "W/B+,R/B,G/B+" MESSAGE "Select your OS" - @ 8, 3 SAY "Married" - @ 8,12 GET lx CHECKBOX COLOR "W/B+,W/B,W+/R,W/G+" MESSAGE "Is you married?" - @ 9, 3 SAY "Singer" - @ 9,12 GET ly CHECKBOX COLOR "W/B+,W/B,W+/R,W/G+" MESSAGE "Are you a singer?" + @ 8, 3 SAY "Married" + @ 8, 12 GET lx CHECKBOX COLOR "W/B+,W/B,W+/R,W/G+" MESSAGE "Are you married?" + @ 9, 3 SAY "Singer" + @ 9, 12 GET ly CHECKBOX COLOR "W/B+,W/B,W+/R,W/G+" MESSAGE "Are you a singer?" READ MSG AT MaxRow(), 0, MaxCol() MSG COLOR "W/B+"