diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bd5f073b47..d448761b9b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-07 15:00 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/xhb/cgi.ch + * contrib/xhb/tedit.prg + * contrib/xhb/htjlist.prg + * contrib/xhb/thtm.prg + * contrib/xhb/hterrsys.prg + * contrib/xhb/hjwindow.prg + * contrib/xhb/htmutil.prg + * NTRIM() -> hb_ntos() + - Deleted NTRIM() macro. + 2010-03-07 14:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/xhb/tframe.prg ! Using IS*() macros instead of NIL checks. diff --git a/harbour/contrib/xhb/cgi.ch b/harbour/contrib/xhb/cgi.ch index 6d27373ea4..3ddabd20c2 100644 --- a/harbour/contrib/xhb/cgi.ch +++ b/harbour/contrib/xhb/cgi.ch @@ -45,7 +45,6 @@ #xTranslate DEFAULT(

, ) =>

:= iif(

== NIL, ,

) #xTranslate HTMLSpace( ) => Replicate( " ", ) //" " -#xTranslate NTRIM() => hb_ntos( ) #xTranslate CRLF() => Chr( 13 ) + Chr( 10 ) #define STD_IN 0 diff --git a/harbour/contrib/xhb/hjwindow.prg b/harbour/contrib/xhb/hjwindow.prg index 2076835ab0..cbe72a32d0 100644 --- a/harbour/contrib/xhb/hjwindow.prg +++ b/harbour/contrib/xhb/hjwindow.prg @@ -268,11 +268,11 @@ METHOD SetSize( x, y, h, w ) CLASS TJsWindow ::height := h ::width := w - cStr := "screenX=" + NTRIM( ::screenX ) + "," + cStr := "screenX=" + hb_ntos( ::screenX ) + "," - cStr += "screenY=" + NTRIM( ::screenY ) + "," - cStr += "height=" + NTRIM( ::height ) + "," - cStr += "width=" + NTRIM( ::width ) + cStr += "screenY=" + hb_ntos( ::screenY ) + "," + cStr += "height=" + hb_ntos( ::height ) + "," + cStr += "width=" + hb_ntos( ::width ) ::features += IF( Empty( ::Features ), cStr + ",", cStr ) @@ -437,11 +437,11 @@ METHOD ImageURL( cImage, cUrl, nHeight, nBorder, ; ENDIF IF nBorder != NIL - cStr += " BORDER = " + NTRIM( nBorder ) + CRLF() + cStr += " BORDER = " + hb_ntos( nBorder ) + CRLF() ENDIF IF nHeight != NIL - cStr += " HEIGHT = " + NTRIM( nHeight ) + "% " + CRLF() + cStr += " HEIGHT = " + hb_ntos( nHeight ) + "% " + CRLF() ENDIF IF cOnClick != NIL diff --git a/harbour/contrib/xhb/hterrsys.prg b/harbour/contrib/xhb/hterrsys.prg index ec966e958d..b5f42e3ead 100644 --- a/harbour/contrib/xhb/hterrsys.prg +++ b/harbour/contrib/xhb/hterrsys.prg @@ -110,7 +110,7 @@ STATIC FUNC xhb_cgi_DefError( e ) // display message and traceback IF ( !Empty( e:osCode ) ) - cMessage += " (DOS Error : " + NTRIM( e:osCode ) + ")" + cMessage += " (DOS Error : " + hb_ntos( e:osCode ) + ")" ENDIF // RESET System // @@ -134,12 +134,12 @@ STATIC FUNC xhb_cgi_DefError( e ) cErrString += '' + CRLF() cErrstring += '' + CRLF() - cErrString += "ERRORCODE...... :" + NTRIM( e:GenCode ) + "
" + CRLF() + cErrString += "ERRORCODE...... :" + hb_ntos( e:GenCode ) + "
" + CRLF() cErrString += "SUBSYSTEM..... :" + e:SubSystem + "
" + CRLF() cErrString += "DESCRIPTION...:" + e:Description + "
" + CRLF() cErrString += "OPERATION......:" + e:Operation + "
" + CRLF() cErrString += "FILENAME........ :" + e:FileName + "
" + CRLF() - cErrString += "TRIES............. :" + NTRIM( e:Tries ) + CRLF() + cErrString += "TRIES............. :" + hb_ntos( e:Tries ) + CRLF() cErrString += '' cErrString += '' @@ -151,7 +151,7 @@ STATIC FUNC xhb_cgi_DefError( e ) DO WHILE ( !Empty( Procname( i ) ) ) cErrString += "Called from " + RTrim( Procname( i ) ) + ; - "(" + NTRIM( Procline( i ) ) + ")
" + CRLF() + "(" + hb_ntos( Procline( i ) ) + ")
" + CRLF() i ++ ENDDO @@ -215,7 +215,7 @@ STATIC FUNC ErrorMessage( e ) // add subsystem's error code if available IF ISNUMBER( e:subCode ) - cMessage += "/" + NTRIM( e:subCode ) + cMessage += "/" + hb_ntos( e:subCode ) ELSE cMessage += "/???" ENDIF diff --git a/harbour/contrib/xhb/htjlist.prg b/harbour/contrib/xhb/htjlist.prg index 720c013c53..d4e44eaafe 100644 --- a/harbour/contrib/xhb/htjlist.prg +++ b/harbour/contrib/xhb/htjlist.prg @@ -126,8 +126,8 @@ METHOD New( name, lOpen, width, height, bgColor, ; "" + crlf() cStr += "" + CRLF() @@ -263,7 +263,7 @@ METHOD Build( xPos, yPos ) CLASS TJsList cStr += "" + CRLF() cStr += '" + CRLF() @@ -277,7 +277,7 @@ METHOD Build( xPos, yPos ) CLASS TJsList //cStr += '

'+CRLF() FOR i := 0 TO ::nItems - cStr += '
' + CRLF() + cStr += '
' + CRLF() NEXT cStr += "" + CRLF() diff --git a/harbour/contrib/xhb/htmutil.prg b/harbour/contrib/xhb/htmutil.prg index a39e78b230..fad952a167 100644 --- a/harbour/contrib/xhb/htmutil.prg +++ b/harbour/contrib/xhb/htmutil.prg @@ -187,11 +187,11 @@ oHtm:endTable() oHtm:newTableCell( "center" ) IF lUseLinks LINK ( cAction ) ; - TEXT( NTrim( Recno() ) ) ; + TEXT( hb_ntos( Recno() ) ) ; OF oHtm ELSE PUSH BUTTON ; - NAME "'B" + NTRIM( Recno() ) + "'" ; + NAME "'B" + hb_ntos( Recno() ) + "'" ; CAPTION "' ? '" ; ONCLICK ( cAction ) ; OF oHtm @@ -259,11 +259,11 @@ oHtm:endTable() oHtm:newTableCell( "center" ) IF lUseLinks LINK( cAction ) ; - TEXT( NTrim( oQuery:RECNO() ) ) ; + TEXT( hb_ntos( oQuery:RECNO() ) ) ; OF oHtm ELSE PUSH BUTTON ; - NAME "'B" + NTRIM( oQuery:RECNO() ) + "'" ; + NAME "'B" + hb_ntos( oQuery:RECNO() ) + "'" ; CAPTION "' ? '" ; ONCLICK( cAction ) ; OF oHtm @@ -520,11 +520,11 @@ METHOD SetSize( x, y, h, w ) Class JWindow ::height := h ::width := w - cStr := "screenX=" + NTRIM( ::screenX ) + "," + cStr := "screenX=" + hb_ntos( ::screenX ) + "," - cStr += "screenY=" + NTRIM( ::screenY ) + "," - cStr += "height=" + NTRIM( ::height ) + "," - cStr += "width=" + NTRIM( ::width ) + cStr += "screenY=" + hb_ntos( ::screenY ) + "," + cStr += "height=" + hb_ntos( ::height ) + "," + cStr += "width=" + hb_ntos( ::width ) ::features += IF( Empty( ::Features ), cStr + ",", cStr ) @@ -695,11 +695,11 @@ METHOD ImageURL( cImage, cUrl, nHeight, nBorder, ; ENDIF IF nBorder != NIL - cStr += " BORDER = " + NTRIM( nBorder ) + CRLF() + cStr += " BORDER = " + hb_ntos( nBorder ) + CRLF() ENDIF IF nHeight != NIL - cStr += " HEIGHT = " + NTRIM( nHeight ) + "% " + CRLF() + cStr += " HEIGHT = " + hb_ntos( nHeight ) + "% " + CRLF() ENDIF IF cOnClick != NIL diff --git a/harbour/contrib/xhb/tedit.prg b/harbour/contrib/xhb/tedit.prg index 205111f219..15eb512ef6 100644 --- a/harbour/contrib/xhb/tedit.prg +++ b/harbour/contrib/xhb/tedit.prg @@ -222,11 +222,11 @@ METHOD Put() CLASS THtmlControl IF ::Type = "TEXTAREA" IF ::Rows != NIL - ::cOutput += Space( 2 ) + ' ROWS="' + NTRIM( ::Rows ) + '"' + CRLF() + ::cOutput += Space( 2 ) + ' ROWS="' + hb_ntos( ::Rows ) + '"' + CRLF() ENDIF IF ::Cols != NIL - ::cOutput += Space( 2 ) + ' COLS="' + NTRIM( ::Cols ) + '"' + CRLF() + ::cOutput += Space( 2 ) + ' COLS="' + hb_ntos( ::Cols ) + '"' + CRLF() ENDIF IF ::Wrap != NIL @@ -245,11 +245,11 @@ METHOD Put() CLASS THtmlControl ENDIF IF ::maxChars != NIL - ::cOutput += Space( 2 ) + 'MAXLENGTH="' + NTRIM( ::maxChars ) + '"' + CRLF() + ::cOutput += Space( 2 ) + 'MAXLENGTH="' + hb_ntos( ::maxChars ) + '"' + CRLF() ENDIF IF ::Size != NIL - ::cOutput += Space( 2 ) + ' SIZE="' + NTRIM( ::Size ) + '"' + CRLF() + ::cOutput += Space( 2 ) + ' SIZE="' + hb_ntos( ::Size ) + '"' + CRLF() ENDIF IF ::Id != NIL @@ -569,7 +569,7 @@ METHOD Put( lPutControls ) CLASS THtmlForm " ROWS=1 " + CRLF() + ; " CELLPADDING=3 " + CRLF() + ; " CELLSPACING=3 " + CRLF() + ; - " WIDTH=" + NTRIM( ::width ) + "% " + CRLF() + ; + " WIDTH=" + hb_ntos( ::width ) + "% " + CRLF() + ; ' BORDERCOLORLIGHT="#000000" ' + CRLF() + ; ' BORDERCOLORDARK="#FFFFFF" ' + CRLF() + ; " BORDER " + CRLF() + ; diff --git a/harbour/contrib/xhb/thtm.prg b/harbour/contrib/xhb/thtm.prg index ba42ed8875..acff56decf 100644 --- a/harbour/contrib/xhb/thtm.prg +++ b/harbour/contrib/xhb/thtm.prg @@ -141,13 +141,13 @@ CLASS THtml cName, cAlt, cTarget, nWidth, lBreak, ID, MAP, ALING, HSPACE ) METHOD TEXT( cText, nCols, lWrap ) INLINE DEFAULT( lWrap, .T. ), DEFAULT( nCols, 80 ),; - ::cStr += "", ">" ) + CRLF() + cText + CRLF() + "" + CRLF() + ::cStr += "", ">" ) + CRLF() + cText + CRLF() + "" + CRLF() METHOD MultiCol( txt, cols, gutter, width ) INLINE DEFAULT( txt, "" ),; DEFAULT( cols, 2 ),; DEFAULT( gutter, 5 ),; DEFAULT( width, 100 ),; - ::cStr += '' ,; + ::cStr += '' ,; ::cStr += txt ,; ::cStr += "" @@ -362,7 +362,7 @@ METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; ENDIF IF nRefresh != NIL - ::cStr += [ ] + ::cStr += [ ] ENDIF IF lnocache @@ -480,19 +480,19 @@ METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; ENDIF IF nMarginTop != NIL - ::cStr += ' topMargin=' + NTRIM( nMarginTop ) + ::cStr += ' topMargin=' + hb_ntos( nMarginTop ) ENDIF IF nMarginLeft != NIL - ::cStr += ' LeftMargin=' + NTRIM( nMarginLeft ) + ::cStr += ' LeftMargin=' + hb_ntos( nMarginLeft ) ENDIF IF nMarginHeight != NIL - ::cStr += ' MARGINHEIGHT=' + NTRIM( nMarginHeight ) + ::cStr += ' MARGINHEIGHT=' + hb_ntos( nMarginHeight ) ENDIF IF nMarginWidth != NIL - ::cStr += ' MARGINWIDTH=' + NTRIM( nMarginWidth ) + ::cStr += ' MARGINWIDTH=' + hb_ntos( nMarginWidth ) ENDIF ::cStr += '>' @@ -736,7 +736,7 @@ METHOD SAY( str, font, size, type, color, style ) CLASS THtml DEFAULT COLOR TO ::FontColor IF FONT != NIL .or. Size != NIL .or. COLOR != NIL - cOut := '' @@ -821,8 +821,8 @@ METHOD Paragraph( lStart, cAlign, cStyle ) CLASS THtml LOCAL cStr := "' + ; + '
' + ; CRLF() ELSE ::cStr += CRLF() + ; - '
' + ; + '
' + ; CRLF() ENDIF @@ -881,7 +881,7 @@ METHOD PutHeading( cText, nWeight, lCentered ) CLASS THtml ::cStr += "
" ENDIF - ::cStr += "" + cText + "" + CRLF() + ::cStr += "" + cText + "" + CRLF() IF lCentered ::cStr += "
" @@ -946,7 +946,7 @@ METHOD PutTextUrl( cText, cUrl, cOnClick, cOnMsOver, cOnMsout, cTarget, font, cl ENDIF IF size != NIL - cStr += ' size=' + NTRIM( size ) + cStr += ' size=' + hb_ntos( size ) ENDIF IF style != NIL @@ -1000,17 +1000,17 @@ METHOD PutImageUrl( cImage, nBorder, nHeight, cUrl, ; ENDIF IF nBorder != NIL - cStr += " border = " + IIF( Valtype( nBorder ) == "N", NTRIM( nBorder ), nBorder ) + CRLF() + cStr += " border = " + IIF( Valtype( nBorder ) == "N", hb_ntos( nBorder ), nBorder ) + CRLF() ENDIF IF nHeight != NIL .and. Valtype( nHeight ) == "N" - cStr += " height = " + NTRIM( nHeight ) + " " + CRLF() + cStr += " height = " + hb_ntos( nHeight ) + " " + CRLF() ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C" cStr += " height = " + nHeight + " " + CRLF() ENDIF IF nWidth != NIL .and. Valtype( nWidth ) == "N" - cStr += " width = " + NTRIM( nWidth ) + " " + CRLF() + cStr += " width = " + hb_ntos( nWidth ) + " " + CRLF() ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C" cStr += " width = " + nWidth + " " + CRLF() ENDIF @@ -1040,7 +1040,7 @@ METHOD PutImageUrl( cImage, nBorder, nHeight, cUrl, ; ENDIF IF hSpace != NIL - cStr += " hSpace= " + NTRIM( hSpace ) + " " + cStr += " hSpace= " + hb_ntos( hSpace ) + " " ENDIF ::cStr += ; @@ -1062,17 +1062,17 @@ METHOD PutTextImageUrl( cImage, nBorder, nHeight, cUrl, ; ENDIF IF nBorder != NIL - cStr += " border = " + NTRIM( nBorder ) + cStr += " border = " + hb_ntos( nBorder ) ENDIF IF nHeight != NIL .and. Valtype( nHeight ) == "N" - cStr += " height = " + NTRIM( nHeight ) + " " + cStr += " height = " + hb_ntos( nHeight ) + " " ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C" cStr += " height = " + nHeight + " " ENDIF IF nWidth != NIL .and. Valtype( nWidth ) == "N" - cStr += " width = " + NTRIM( nWidth ) + " " + cStr += " width = " + hb_ntos( nWidth ) + " " ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C" cStr += " width = " + nWidth + " " ENDIF @@ -1121,19 +1121,19 @@ METHOD PutImage( cImage, nBorder, nHeight, ; ENDIF IF nBorder != NIL .and. Valtype( nBorder ) == "N" - cStr += " BORDER = " + NTRIM( nBorder ) + cStr += " BORDER = " + hb_ntos( nBorder ) ELSEIF nBorder != NIL .and. Valtype( nBorder ) == "C" cStr += " BORDER = " + '"' + nBorder + '"' ENDIF IF nHeight != NIL .and. Valtype( nHeight ) == "N" - cStr += " HEIGHT = " + NTRIM( nHeight ) + " " + cStr += " HEIGHT = " + hb_ntos( nHeight ) + " " ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C" cStr += " HEIGHT = " + '"' + nHeight + '"' ENDIF IF nWidth != NIL .and. Valtype( nWidth ) == "N" - cStr += " width = " + NTRIM( nWidth ) + " " + cStr += " width = " + hb_ntos( nWidth ) + " " ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C" cStr += " width = " + nWidth + " " ENDIF @@ -1167,7 +1167,7 @@ METHOD PutImage( cImage, nBorder, nHeight, ; ENDIF IF hSpace != NIL - cStr += " hSpace= " + NTRIM( hSpace ) + " " + cStr += " hSpace= " + hb_ntos( hSpace ) + " " ENDIF ::cStr += ; @@ -1243,30 +1243,30 @@ METHOD DefineTable( nCols, nBorder, nWidth, nHeight, ColorFore, ColorBG, ; cStr += " bgcolor=" + ColorBG + ' ' ENDIF - cStr += IIF( nBorder = NIL, "border ", "border=" + NTRIM( nBorder ) + ' ' ) + cStr += IIF( nBorder = NIL, "border ", "border=" + hb_ntos( nBorder ) + ' ' ) IF ncellpadding != NIL - cStr += ' CellPadding=' + NTRIM( nCellPadding ) + cStr += ' CellPadding=' + hb_ntos( nCellPadding ) ENDIF IF nCellSpacing != NIL - cStr += ' CellSpacing=' + NTRIM( nCellSpacing ) + cStr += ' CellSpacing=' + hb_ntos( nCellSpacing ) ENDIF IF cAling != NIL cStr += ' aling=' + '"' + cAling + '"' ENDIF - cStr += IIF( xCols != NIL, " COLS=" + NTRIM( nCols ), "" ) + cStr += IIF( xCols != NIL, " COLS=" + hb_ntos( nCols ), "" ) IF nWidth != NIL .and. Valtype( nWidth ) == "N" - cStr += " WIDTH=" + NTRIM( nWidth ) + cStr += " WIDTH=" + hb_ntos( nWidth ) ELSEIF nWidth != NIL .and. Valtype( nWidth ) == "C" cStr += " WIDTH=" + '"' + nWidth + '"' ENDIF IF nHeight != NIL .and. Valtype( nHeight ) == "N" - cStr += " HEIGHT=" + NTRIM( nHeight ) + cStr += " HEIGHT=" + hb_ntos( nHeight ) ELSEIF nHeight != NIL .and. Valtype( nHeight ) == "C" cStr += " HEIGHT=" + '"' + nHeight + '"' ENDIF @@ -1343,7 +1343,7 @@ METHOD TableHead( cHead, cColor, cAlign, ; ENDIF IF nHeight != NIL - cStr += " height=" + '"' + NTRIM( nHeight ) + '"' + cStr += " height=" + '"' + hb_ntos( nHeight ) + '"' ENDIF IF cBgPic != NIL @@ -1356,7 +1356,7 @@ METHOD TableHead( cHead, cColor, cAlign, ; cStr += '