2012-10-04 04:56 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/gtwvg/tests/dyndlgs.prg
* contrib/gtwvg/tests/wvtcls.prg
* contrib/hbgd/tests/test_out.prg
* contrib/hbhpdf/tests/harupdf.prg
* contrib/hbhttpd/core.prg
* doc/en/set.txt
* extras/guestbk/guestbk.prg
* extras/guestbk/inifiles.prg
* extras/guestbk/testcgi.prg
* extras/httpsrv/modules/tableservletdb.prg
* formatting and EOL related cleanups
This commit is contained in:
@@ -16,6 +16,19 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-10-04 04:56 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/gtwvg/tests/dyndlgs.prg
|
||||
* contrib/gtwvg/tests/wvtcls.prg
|
||||
* contrib/hbgd/tests/test_out.prg
|
||||
* contrib/hbhpdf/tests/harupdf.prg
|
||||
* contrib/hbhttpd/core.prg
|
||||
* doc/en/set.txt
|
||||
* extras/guestbk/guestbk.prg
|
||||
* extras/guestbk/inifiles.prg
|
||||
* extras/guestbk/testcgi.prg
|
||||
* extras/httpsrv/modules/tableservletdb.prg
|
||||
* formatting and EOL related cleanups
|
||||
|
||||
2012-10-04 04:21 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* extras/httpsrv/home/index.html
|
||||
* updated reference to long deleted batch file to hbmk2 cmdline
|
||||
|
||||
@@ -39,11 +39,7 @@
|
||||
|
||||
//
|
||||
|
||||
#define CRLF chr( 13 )+chr( 10 )
|
||||
|
||||
//
|
||||
|
||||
thread static t_aSlides := {}
|
||||
THREAD STATIC t_aSlides := {}
|
||||
|
||||
//
|
||||
|
||||
@@ -280,7 +276,7 @@ STATIC FUNCTION GetEditText()
|
||||
LOCAL cText := ""
|
||||
|
||||
cText += "Welcome in the Wonderful World of Harbour!"
|
||||
cText += CRLF + CRLF
|
||||
cText += hb_eol() + hb_eol()
|
||||
cText += "When Peter Rees first published GTWVT, a Windows "
|
||||
cText += "Terminal Driver, on 22 Dec 2003, everybody took it "
|
||||
cText += "lightly, except for me, as I was aware that what "
|
||||
@@ -288,11 +284,11 @@ STATIC FUNCTION GetEditText()
|
||||
cText += "what immense possibilities he has opened for Harbour "
|
||||
cText += "developers, what limitations he has cleared for Clipper "
|
||||
cText += "savvy user base."
|
||||
cText += CRLF + CRLF
|
||||
cText += hb_eol() + hb_eol()
|
||||
cText += "With a little effort I could extend GTWVT "
|
||||
cText += "to give it a GUI look. I also tried to give it "
|
||||
cText += "an event driven functionality, and up came Wvt*Classes."
|
||||
cText += CRLF + CRLF
|
||||
cText += hb_eol() + hb_eol()
|
||||
cText += "And yet another feather is added in the cap of GTWVT "
|
||||
cText += "as it is now capable of firing modeless dialogs like the one "
|
||||
cText += "you are viewing. These dialogs can be constructed dynamically ( Courtesy hbwhat32 ) "
|
||||
@@ -300,8 +296,8 @@ STATIC FUNCTION GetEditText()
|
||||
cText += "can be active at any given time. Also note that dialogs created "
|
||||
cText += "dynamically respect Top, Left, Rows, Cols coordinates, which is an "
|
||||
cText += "undisputed productivity boost!"
|
||||
cText += CRLF + CRLF
|
||||
cText += "Enjoy!" + CRLF
|
||||
cText += hb_eol() + hb_eol()
|
||||
cText += "Enjoy!" + hb_eol()
|
||||
cText += "Pritpal Bedi, INDIA"
|
||||
|
||||
RETURN cText
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
|
||||
//
|
||||
|
||||
#define CRLF chr( 13 )+chr( 10 )
|
||||
|
||||
//
|
||||
|
||||
FUNCTION DialogWvgClassesOne( nMode )
|
||||
Local bBlock
|
||||
|
||||
@@ -70,15 +66,15 @@ STATIC FUNCTION MyDialogOne( oCrt )
|
||||
hPopup := Wvt_SetPopupMenu()
|
||||
Popups()
|
||||
|
||||
cTxt := "GtWvt is capable of designing virtually any preceivable control "
|
||||
cTxt := "GTWVG is capable of designing virtually any preceivable control "
|
||||
cTxt := cTxt + "Windows offers."
|
||||
cTxt := cTxt + CRLF + CRLF
|
||||
cTxt := cTxt + hb_eol() + hb_eol()
|
||||
cTxt := cTxt + "This text is placed in a WvtTextBox() control with "
|
||||
cTxt := cTxt + "font and alignment adjustments!"
|
||||
cTxt := cTxt + CRLF + CRLF
|
||||
cTxt := cTxt + hb_eol() + hb_eol()
|
||||
cTxt := cTxt + "Enjoy - Pritpal Bedi, INDIA"
|
||||
|
||||
aImg_:={}
|
||||
aImg_ := {}
|
||||
aadd( aImg_, GetResource( "v_lock.bmp" ) )
|
||||
aadd( aImg_, GetResource( "v_new.bmp" ) )
|
||||
aadd( aImg_, GetResource( "v_clclt.bmp" ) )
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
|
||||
#include "gd.ch"
|
||||
|
||||
#command WRITE <c> => FWrite( 1, <c> + CHR( 13 ) + CHR( 10 ) )
|
||||
#define CRLF ( Chr( 13 ) + Chr( 10 ) )
|
||||
|
||||
#command WRITE <c> => FWrite( 1, <c> + CRLF )
|
||||
#command OutHTML <c> => WRITE <c>
|
||||
|
||||
PROCEDURE Main( ... )
|
||||
@@ -110,7 +112,7 @@ PROCEDURE StartHTML( cTitle )
|
||||
|
||||
WRITE 'content-type: text/html'
|
||||
WRITE 'Pragma: no-cache'
|
||||
WRITE Chr( 13 ) + Chr( 10 )
|
||||
WRITE CRLF
|
||||
WRITE "<html>"
|
||||
WRITE "<head>"
|
||||
WRITE "<title>" + cTitle + "</title>"
|
||||
@@ -147,7 +149,7 @@ PROCEDURE OutPhoto( cPhoto, nWidth, nHeight )
|
||||
|
||||
//__OutDebug( hb_dumpvar( oImage ) )
|
||||
|
||||
WRITE 'content-type: ' + oImage:cMime + Chr( 13 ) + Chr( 10 )
|
||||
WRITE 'content-type: ' + oImage:cMime + CRLF
|
||||
cType := oImage:cType
|
||||
|
||||
DO CASE
|
||||
@@ -211,7 +213,7 @@ PROCEDURE OutJpg( cText, nPitch )
|
||||
//oI:SetColor( blue )
|
||||
//oI:Say( 0, 0, cText )
|
||||
|
||||
WRITE 'content-type: image/jpeg' + Chr( 13 ) + Chr( 10 )
|
||||
WRITE 'content-type: image/jpeg' + CRLF
|
||||
|
||||
oI:OutputJpeg()
|
||||
|
||||
|
||||
@@ -1240,7 +1240,7 @@ STATIC FUNCTION Page_Annotation( pdf )
|
||||
|
||||
|
||||
annot := HPDF_Page_CreateTextAnnot( page, rect1, ;
|
||||
"Annotation with Comment Icons" + Chr( 13 ) + Chr( 10 ) + ;
|
||||
"Annotation with Comment Icons" + hb_eol() + ;
|
||||
"This annotation set to be opened initially.", ;
|
||||
NIL )
|
||||
|
||||
|
||||
@@ -918,7 +918,7 @@ STATIC FUNCTION MakeResponse( hConfig )
|
||||
t_cResult := "<html><body><h1>" + cStatus + "</h1></body></html>"
|
||||
ENDIF
|
||||
UAddHeader( "Content-Length", hb_ntos( Len( t_cResult ) ) )
|
||||
AEval( t_aHeader, {| x | cRet += x[1] + ": " + x[2] + CR_LF } )
|
||||
AEval( t_aHeader, {| x | cRet += x[ 1 ] + ": " + x[ 2 ] + CR_LF } )
|
||||
cRet += CR_LF
|
||||
Eval( hConfig[ "Trace" ], cRet )
|
||||
cRet += t_cResult
|
||||
|
||||
@@ -538,8 +538,8 @@
|
||||
* $EXAMPLES$
|
||||
* // Set F1 with a string
|
||||
* CLS
|
||||
* Set Function 1 to "I Am Lazy" + CHR( 13 )
|
||||
* cTest := SPACE( 20 )
|
||||
* SET FUNCTION 1 TO "I Am Lazy" + Chr( 13 )
|
||||
* cTest := Space( 20 )
|
||||
* @ 10, 0 SAY "type something or F1 for lazy mode " GET cTest
|
||||
* READ
|
||||
* ? cTest
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
|
||||
*/
|
||||
*
|
||||
*/
|
||||
|
||||
FUNCTION Main()
|
||||
|
||||
@@ -72,7 +72,7 @@ FUNCTION Main()
|
||||
|
||||
cField := oIni:ReadString( "Header", "DataField" + hb_ntos( i ), "" )
|
||||
oIni:WriteString( "Entries", cField + hb_ntos( nEntry ), ;
|
||||
StrTran( StrTran( oHTML:QueryFields( cField ), Chr( 10 ), "" ), Chr( 13 ), "<br />" ) )
|
||||
StrTran( StrTran( oHTML:QueryFields( cField ), Chr( 13 ) ), Chr( 10 ), "<br />" ) )
|
||||
|
||||
NEXT
|
||||
|
||||
@@ -128,7 +128,7 @@ FUNCTION Main()
|
||||
// Formats each line according to the INI file
|
||||
FOR i := 1 TO Len( aEntries )
|
||||
|
||||
cCode += "<table width=100% cellspacing=0>" + Chr( 13 ) + Chr( 10 )
|
||||
cCode += "<table width=100% cellspacing=0>" + hb_eol()
|
||||
cColor := iif( Mod( i, 2 ) == 0, cEvenColor, cOddColor )
|
||||
|
||||
FOR j := 1 TO oIni:ReadNumber( "Format", "FormatLines", 0 )
|
||||
@@ -144,11 +144,11 @@ FUNCTION Main()
|
||||
cLine := StrTran( cLine, "<#DateTime>", ;
|
||||
oIni:ReadString( "Entries", "DateTime" + hb_ntos( Len(aEntries ) - i + 1 ), "" ) )
|
||||
|
||||
cCode += cLine + "</td></tr>" + Chr( 13 ) + Chr( 10 )
|
||||
cCode += cLine + "</td></tr>" + hb_eol()
|
||||
|
||||
NEXT
|
||||
|
||||
cCode += "</table>" + Chr( 13 ) + Chr( 10 )
|
||||
cCode += "</table>" + hb_eol()
|
||||
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "fileio.ch"
|
||||
|
||||
FUNCTION TIniFile()
|
||||
|
||||
STATIC oClass
|
||||
@@ -48,8 +50,8 @@ STATIC FUNCTION New( cFileName )
|
||||
::Contents := {}
|
||||
CurrArray := ::Contents
|
||||
|
||||
IF File( cFileName )
|
||||
hFile := FOpen( cFilename, 0 )
|
||||
IF hb_FileExists( cFileName )
|
||||
hFile := FOpen( cFilename, FO_READ )
|
||||
ELSE
|
||||
hFile := FCreate( cFilename )
|
||||
ENDIF
|
||||
@@ -60,12 +62,12 @@ STATIC FUNCTION New( cFileName )
|
||||
cFile := Space( 256 )
|
||||
Done := ( FRead( hFile, @cFile, 256 ) <= 0 )
|
||||
|
||||
cFile := StrTran( cFile, Chr( 10 ), "" ) // so we can just search for CHR(13)
|
||||
cFile := StrTran( cFile, Chr( 13 ) ) // so we can just search for Chr( 10 )
|
||||
|
||||
// prepend last read
|
||||
cFile := cLine + cFile
|
||||
WHILE ! Empty( cFile )
|
||||
IF ( nPos := At( Chr(13 ), cFile ) ) > 0
|
||||
IF ( nPos := At( Chr( 10 ), cFile ) ) > 0
|
||||
cLine := Left( cFile, nPos - 1 )
|
||||
cFile := SubStr( cFile, nPos + 1 )
|
||||
|
||||
@@ -161,7 +163,7 @@ STATIC PROCEDURE WriteString( cSection, cIdent, cString )
|
||||
|
||||
ELSE
|
||||
cFind := Lower( cSection )
|
||||
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING(x[ 1 ] ) .AND. Lower(x[ 1 ] ) == cFind .AND. HB_ISARRAY(x[ 2 ] ) } ) ) > 0
|
||||
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cFind .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
|
||||
cFind := Lower( cIdent )
|
||||
j := AScan( ::Contents[ i ][ 2 ], {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cFind } )
|
||||
|
||||
@@ -252,7 +254,7 @@ STATIC PROCEDURE EraseSection( cSection )
|
||||
|
||||
ELSE
|
||||
cSection := Lower( cSection )
|
||||
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING(x[ 1 ] ) .AND. Lower(x[ 1 ] ) == cSection .AND. HB_ISARRAY(x[ 2 ] ) } ) ) > 0
|
||||
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cSection .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
|
||||
ADel( ::Contents, i )
|
||||
ASize( ::Contents, Len( ::Contents ) - 1 )
|
||||
ENDIF
|
||||
@@ -310,22 +312,22 @@ STATIC PROCEDURE UpdateFile()
|
||||
|
||||
FOR i := 1 TO Len( ::Contents )
|
||||
if ::Contents[ i ][ 1 ] == NIL
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ] + hb_eol() )
|
||||
|
||||
ELSEIF HB_ISARRAY( ::Contents[ i ][ 2 ] )
|
||||
FWrite( hFile, "[" + ::Contents[ i ][ 1 ] + "]" + Chr( 13 ) + Chr( 10 ) )
|
||||
FWrite( hFile, "[" + ::Contents[ i ][ 1 ] + "]" + hb_eol() )
|
||||
FOR j := 1 TO Len( ::Contents[ i ][ 2 ] )
|
||||
|
||||
if ::Contents[ i ][ 2 ][ j ][ 1 ] == NIL
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ][ j ][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ][ j ][ 2 ] + hb_eol() )
|
||||
ELSE
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ][ j ][ 1 ] + "=" + ::Contents[ i ][ 2 ][ j ][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
FWrite( hFile, ::Contents[ i ][ 2 ][ j ][ 1 ] + "=" + ::Contents[ i ][ 2 ][ j ][ 2 ] + hb_eol() )
|
||||
ENDIF
|
||||
NEXT
|
||||
FWrite( hFile, Chr( 13 ) + Chr( 10 ) )
|
||||
FWrite( hFile, hb_eol() )
|
||||
|
||||
ELSEIF HB_ISSTRING( ::Contents[ i ][ 2 ] )
|
||||
FWrite( hFile, ::Contents[ i ][ 1 ] + "=" + ::Contents[ i ][ 2 ] + Chr( 13 ) + Chr( 10 ) )
|
||||
FWrite( hFile, ::Contents[ i ][ 1 ] + "=" + ::Contents[ i ][ 2 ] + hb_eol() )
|
||||
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
@@ -179,10 +179,10 @@ STATIC FUNCTION Generate()
|
||||
|
||||
// Is this a meta file or hand generated script?
|
||||
IF Empty( ::cHTMLFile )
|
||||
::cContent := ;
|
||||
::cContent := ;
|
||||
"<html><head>" + hb_eol() + ;
|
||||
"<title>" + ::cTitle + "</title>" + hb_eol() + ;
|
||||
"<body link='" + ::cLinkColor + "' " + ;
|
||||
"<body link='" + ::cLinkColor + "' " + ;
|
||||
"vlink='" + ::cvLinkColor + "'>" + + hb_eol() + ;
|
||||
::cBody + hb_eol() + ;
|
||||
"</body></html>"
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
#define CRLF ( chr( 13 ) + chr( 10 ) )
|
||||
#define TABLE_NAME_PATH ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "tests" + hb_ps() + "test.dbf"
|
||||
#define SIMULATE_SLOW_REPLY
|
||||
|
||||
@@ -317,7 +316,7 @@ METHOD getXmlCount( nCount ) CLASS TableManager
|
||||
|
||||
xml:append( "<pages>" )
|
||||
FOR n := 1 TO nPages
|
||||
xml:append( "<page>" + LTrim( Str( n ) ) + "</page>" )
|
||||
xml:append( "<page>" + hb_ntos( n ) + "</page>" )
|
||||
NEXT
|
||||
xml:append( "</pages>" )
|
||||
|
||||
@@ -369,10 +368,10 @@ METHOD xmlEncode( input ) CLASS TableManager
|
||||
CASE '>'
|
||||
out += ">"
|
||||
EXIT
|
||||
//case ' '
|
||||
// out += " "
|
||||
// exit
|
||||
CASE Chr( 9 ) //E'\t'
|
||||
// CASE ' '
|
||||
// out += " "
|
||||
// EXIT
|
||||
CASE Chr( 9 ) //E'\t'
|
||||
CASE Chr( 13 ) //E'\r'
|
||||
CASE Chr( 10 ) //E'\n'
|
||||
out += c
|
||||
@@ -408,6 +407,6 @@ METHOD ToString() CLASS BasicXML
|
||||
|
||||
LOCAL s := ""
|
||||
|
||||
AEval( ::aData, {| c | s += c + iif( Right( c, 1 ) == ">", CRLF, "" ) } )
|
||||
AEval( ::aData, {| c | s += c + iif( Right( c, 1 ) == ">", hb_eol(), "" ) } )
|
||||
|
||||
RETURN s
|
||||
|
||||
Reference in New Issue
Block a user