diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 090e98eb7d..cbca737717 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,28 @@ +20000115-20:3 GMT+3 Luiz Rafael Culik + *source/rtl/arrays.c + *source/rtl/type.c + *source/rtl/text.prg + *source/rtl/inkey.c + *source/rtl/setkey.prg + *source/rtl/proc.c + *source/rtl/adir.prg + *source/rtl/dircmd.prg + *source/rtl/asort.prg + *source/rtl/achoice.prg + *source/rtl/alert.prg + *source/rtl/Objfunc.prg + *source/rdd/dbcmd.c + *Fixed some seealso's reference that was missing the comma separator + *Source/rtl/strings.c + *Added document to : SUBSTR(),LEFT(),RIGHT(),LTRIM functions + *Source/rtl/Environ.c + *Added document to : VERSION() and GETENV() function + *ngdoc/ft_helpc.prg + *Fixed a bug on generating see alsos for HTML output + *Source/tools/rtf.prg + *All topics now start with the 'IDH_' prefix + + 20000115-19:35 GMT+1 Ryszard Glab *source/macro/macro.l diff --git a/harbour/makefile.b32 b/harbour/makefile.b32 index efd3e4db35..85b9db81aa 100644 --- a/harbour/makefile.b32 +++ b/harbour/makefile.b32 @@ -40,7 +40,7 @@ harbour.lib : achoice.obj adir.obj alert.obj arrays.obj \ maindll.obj mainstd.obj mainwin.obj math.obj \ mathx.obj memofile.obj memoline.obj memvars.obj \ memvarbl.obj menuto.obj mlcount.obj mtran.obj msgen.obj \ - natmsg.obj net.obj objfunc.obj oldbox.obj oldclear.obj \ + natmsg.obj net.obj objfunc.obj oldbox.obj oldclear.obj oemansi.obj\ pcount.obj proc.obj pvalue.obj readvar.obj readkey.obj \ samples.obj set.obj setta.obj setcolor.obj \ setkey.obj setta.obj soundex.obj strfmt.obj \ @@ -123,6 +123,7 @@ mtran.obj : mtran.c extend.h hbdefs.h natmsg.obj : natmsg.c extend.h hbdefs.h net.obj : net.c extend.h hbdefs.h objfunc.obj : objfunc.c extend.h hbdefs.h +oemansi.obj : oemansi.c extend.h hbdefs.h oldbox.obj : oldbox.c extend.h hbdefs.h oldclear.obj : oldclear.c extend.h hbdefs.h pcount.obj : pcount.c extend.h hbdefs.h @@ -199,7 +200,7 @@ xsavescr.c : xsavescr.prg harbour.exe bin\harbour $< /n /osource\rtl\ /iinclude .c.obj: - bcc32 $(BCC_OPT) -c -Iinclude;source\macro -o$@ -DHARBOUR_USE_WIN_GTAPI $< + bcc32 $(BCC_OPT) -c -Iinclude;source\macro -o$@ -DHARBOUR_USE_WIN_GTAPI -DHB_COMPAT_C53 $< tlib lib\b32\harbour.lib -+$@,, harbour.exe : cmdcheck.c harboury.c harbourl.c hbfunchk.c hbgenerr.c hbpcode.c \ @@ -273,4 +274,4 @@ expropt.obj : expropt.c harbour.obj : harbour.c bcc32 $(BCC_OPT) -c -Iinclude;source\compiler -osource\compiler\harbour.obj \ - source\compiler\harbour.c \ No newline at end of file + source\compiler\harbour.c diff --git a/harbour/ngdoc/bldfthe.bat b/harbour/ngdoc/bldfthe.bat index 60394dc359..b4b62efd1e 100644 --- a/harbour/ngdoc/bldfthe.bat +++ b/harbour/ngdoc/bldfthe.bat @@ -4,5 +4,5 @@ rem $Id$ rem ..\bin\harbour %1 %2 /n /iinclude /DNANFOR -bcc32 -e..\bin\%1.exe -O2 -I..\include -L..\lib\b32 -v harbour.lib terminal.lib hbpp.lib hbgt.lib common.lib rdd.lib %1.c +bcc32 -e..\bin\%1.exe -O2 -M -I..\include -L..\lib\b32 -v harbour.lib terminal.lib hbpp.lib hbgt.lib common.lib rdd.lib %1.c rem del %1.c diff --git a/harbour/ngdoc/ft_helpc.prg b/harbour/ngdoc/ft_helpc.prg index 6a7cd4a2e8..e0508299a6 100644 --- a/harbour/ngdoc/ft_helpc.prg +++ b/harbour/ngdoc/ft_helpc.prg @@ -33,6 +33,9 @@ * Output files names are in lower case to Linux Compatibility * * 1/13/2000 Added the link for the HARBOUR GPL LICENSE + * 1/14/2000 Fixed a bug on generating the HTML file + * 1/15/2000 Strip out the for Norton guides controls characters + * when generating HTML and RTF output */ /* @@ -918,8 +921,6 @@ FOR i=1 TO nFiles FWRITE(nWriteHandle,CRLF) lAddBlank=.F. ENDIF - nNonBlank:=FirstNB(cBuffer) - cBuffer=STUFF(cBuffer,nNonBlank,0,"^a1f ") FWRITE(nWriteHandle,cBuffer+CRLF) ELSEIF nMode=D_ARG IF LEN(cBuffer)>LONGLINE @@ -944,7 +945,7 @@ FOR i=1 TO nFiles FWRITE(nWriteHandle,CRLF) lAddBlank=.F. ENDIF - FWRITE(nWriteHandle,cBuffer+CRLF) + FWRITE(nWriteHandle,StripNgControls(cBuffer)+CRLF) ELSEIF nMode=D_SEEALSO IF .NOT.EMPTY(cBuffer) cSeeAlso=StripFiles(ALLTRIM(cBuffer)) @@ -964,7 +965,7 @@ FOR i=1 TO nFiles FWRITE(nWriteHandle," Status"+CRLF) fwrite(nWriteHandle,".endpar"+CRLF) Endif - ProcStatus(nWriteHandle,cBuffer) + ProcStatus(nWriteHandle,StripNgControls(cBuffer)) ELSE @@ -2231,9 +2232,9 @@ FOR i=1 TO nFiles oRtf:WritePar(""):EndPar() lAddBlank=.F. ENDIF - nNonBlank:=FirstNB(cBuffer) + /* nNonBlank:=FirstNB(cBuffer) cBuffer=STUFF(cBuffer,nNonBlank,0,"^a1f ") - oRtf:WritePar(cBuffer):EndPar() + oRtf:WritePar(cBuffer):EndPar()*/ ELSEIF nMode=D_ARG IF LEN(cBuffer)>LONGLINE write_error("Arguments",cBuffer,nLineCnt,; @@ -2246,7 +2247,7 @@ FOR i=1 TO nFiles ENDIF cBuffer=STRTRAN(cBuffer,"<","<",1) cBuffer=STRTRAN(cBuffer,">",">",1) - oRtf:WritePar(cBuffer):EndPar() + oRtf:WritePar( StripNgControls(cBuffer) ):EndPar() ELSEIF nMode=D_NORMAL IF LEN(cBuffer)>LONGLINE write_error("General",cBuffer,nLineCnt,; @@ -2257,7 +2258,7 @@ FOR i=1 TO nFiles oRtf:WritePar(""):EndPar() lAddBlank=.F. ENDIF - oRtf:WritePar(cBuffer):EndPar() + oRtf:WritePar(StripNgControls(cBuffer)):EndPar() ELSEIF nMode=D_SEEALSO IF .NOT.EMPTY(cBuffer) cSeeAlso=StripFiles(ALLTRIM(cBuffer)) @@ -2731,7 +2732,7 @@ FOR i=1 TO nFiles oHtm:WritePar("") lAddBlank=.F. ENDIF - oHtm:WritePar(cBuffer) + oHtm:WritePar(StripNgControls(cBuffer)) ELSEIF nMode=D_SEEALSO IF .NOT.EMPTY(cBuffer) cSeeAlso=StripFiles(ALLTRIM(cBuffer)) @@ -2786,7 +2787,6 @@ RETURN ctemp * Return NIL */ - FUNCTION ProcWwwAlso(nWriteHandle,cSeeAlso) LOCAL nPos,cTemp:='',nLen,xPos,tPos nLen:=LEN(cSeeAlso) @@ -2857,3 +2857,50 @@ ELse nWriteHandle:WritePar(" Not Started") endif return nil + + + +FUNCTION StripNgControls(cString) +LOCAL nPos,lStriped:=.f. + +nPos:=AT("^b",cString) +IF nPos>0 + cString:=substr(cString,nPos+3) + lStriped:=.t. +ELSE + IF !lStriped + cString:=cString + ENDIF +ENDIF + +nPos:=AT("^b^",cString) +IF nPos>0 + cString:=substr(cString,1,nPos-1) + lStriped:=.t. +ELSE + IF !lStriped + cString:=cString + ENDIF +ENDIF + +nPos:=AT("^CFE",cString) +IF nPos>0 + cString:=substr(cString,nPos+5) + lStriped:=.t. +ELSE + IF !lStriped + cString:=cString + ENDIF +ENDIF + +nPos:=AT("^a1f",cString) +IF nPos>0 + cString:=substr(cString,nPos+5) + lStriped:=.t. +ELSE + IF !lStriped + cString:=cString + ENDIF +ENDIF + +RETURN cString diff --git a/harbour/obj/symbols.obj b/harbour/obj/symbols.obj deleted file mode 100644 index 8f8f845270..0000000000 Binary files a/harbour/obj/symbols.obj and /dev/null differ diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index 85e905b4de..b44b14210e 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -5815,7 +5815,7 @@ HARBOUR HB_LUPDATE( void ) * $COMPLIANCE$ * * $SEEALSO$ - * FLOCK() RLOCK() + * FLOCK(),RLOCK() * $INCLUDE$ * * $END$ diff --git a/harbour/source/rtl/achoice.prg b/harbour/source/rtl/achoice.prg index 72140e92d7..49fab1e4aa 100644 --- a/harbour/source/rtl/achoice.prg +++ b/harbour/source/rtl/achoice.prg @@ -23,7 +23,6 @@ * ACHOICE() * $CATEGORY$ * Array - * * $ONELINER$ * Allows selection of an element from an array * $SYNTAX$ diff --git a/harbour/source/rtl/adir.prg b/harbour/source/rtl/adir.prg index 02d1a0933f..71cdabb74b 100644 --- a/harbour/source/rtl/adir.prg +++ b/harbour/source/rtl/adir.prg @@ -114,6 +114,7 @@ * ENDIF * $TESTS$ * $STATUS$ + * R * $COMPLIANCE$ * is going to be fill with long file name and not necessarily * the 8.3 uppercase name. diff --git a/harbour/source/rtl/alert.prg b/harbour/source/rtl/alert.prg index 1438156638..55a4e92685 100644 --- a/harbour/source/rtl/alert.prg +++ b/harbour/source/rtl/alert.prg @@ -134,7 +134,7 @@ STATIC s_lNoAlert := NIL * * is an Harbour extension. * $SEEALSO$ - * @...PROMPT,MENU TO, STDOUT() ,__NONOALERT() + * @...PROMPT,MENU TO, STDOUT(),__NONOALERT() * $END$ */ diff --git a/harbour/source/rtl/arrays.c b/harbour/source/rtl/arrays.c index b13f2709eb..f6080b84a6 100644 --- a/harbour/source/rtl/arrays.c +++ b/harbour/source/rtl/arrays.c @@ -838,7 +838,7 @@ static void hb_arrayNewRagged( PHB_ITEM pArray, int iDimension ) aArray := ARRAY(3, {NIL,NIL}) * $SEEALSO$ - * AADD(), ADEL(), AFILL(), AINS() + * AADD(),ADEL(),AFILL(),AINS() * $INCLUDE$ * * $END$ @@ -926,7 +926,7 @@ HARBOUR HB_ARRAY( void ) // { 5, 10, { 12, 10 } } * * $SEEALSO$ - * AINS(), ASIZE() + * AINS(),ASIZE() * $INCLUDE$ * * $END$ @@ -1519,7 +1519,7 @@ HARBOUR HB_AEVAL( void ) * subdimensions will be copied from one array to the next. This must * be accomplished via the ACLONE() function. * - * ^bNote + * ^b note * If array is larger then , array elements will * start copying at and continue copying until the end of * array is reached. The ACOPY() function doesn't append @@ -1612,7 +1612,7 @@ HARBOUR HB_ACOPY( void ) * $COMPLIANCE$ * * $SEEALSO$ - * ACOPY() ADEL(),AINS(),ASIZE() + * ACOPY(),ADEL(),AINS(),ASIZE() * $INCLUDE$ * * $END$ diff --git a/harbour/source/rtl/asort.prg b/harbour/source/rtl/asort.prg index 154c0d037c..faf6b81e70 100644 --- a/harbour/source/rtl/asort.prg +++ b/harbour/source/rtl/asort.prg @@ -99,6 +99,7 @@ * // result: { {"Wed",-6}, {"Mon",1}, {"Sun",8}, {"Tue",57} } * $TESTS$ * $STATUS$ + * R * $COMPLIANCE$ * For speed we are checking the return type of the passed code block. * This will result in a small incompatibility since the code block diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index af1370eefb..402c24eccb 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -215,7 +215,7 @@ char * hb_consoleGetNewLine( void ) * $COMPLIANCE$ * This is an add-on Operating System Tool function. * $SEEALSO$ - * dos.ngo:OS() OUTSTD() OUTERR() + * dos.ngo:OS(),OUTSTD(),OUTERR() * $END$ */ diff --git a/harbour/source/rtl/dircmd.prg b/harbour/source/rtl/dircmd.prg index 866a7eb94f..5be64a3944 100644 --- a/harbour/source/rtl/dircmd.prg +++ b/harbour/source/rtl/dircmd.prg @@ -153,7 +153,7 @@ * CA-Clipper use 8.3 file name, with Harbour it would probably cut * long file names to feet this template. * $SEEALSO$ - * ADIR(),DIRECTORY(),SET DEFAULT,__DIR() + * ADIR(),DIRECTORY(),SET DEFAULT,__DIR()* * $END$ */ diff --git a/harbour/source/rtl/environ.c b/harbour/source/rtl/environ.c index 2008088360..82d0f613f3 100644 --- a/harbour/source/rtl/environ.c +++ b/harbour/source/rtl/environ.c @@ -106,9 +106,9 @@ * $ARGUMENTS$ * * $RETURNS$ - -> The Current operating system + * -> The Current operating system * $DESCRIPTION$ - This function will return the current operating system + * This function will return the current operating system * $EXAMPLES$ * ? OS() * @@ -527,6 +527,49 @@ char * hb_version( USHORT uiMode ) return pszVersion; } +/* $DOC$ + * $FUNCNAME$ + * VERSION() + * $CATEGORY$ + * Environment + * $ONELINER$ + * Returns the HARBOUR Version or the Harbour/Compiler Version + * $SYNTAX$ + * VERSION([] --> + * $ARGUMENTS$ + * [] Optional Parameter that toggle to the display + * of the C compiler version that HARBOUR was Build. Default is 0 + * + * [] Returns + * 0 Harbour Version + * 1 Harbour Version+C compiler Version + * $RETURNS$ + * String contining the Harbour Version or the + * Harbour Version+C compiler Version when the parameter is defined + * $DESCRIPTION$ + * This function returns the HARBOUR Version or the Harbour Version+C compiler Version + * used to create the Harbour runtime library + * $EXAMPLES$ + * ? QOUT(VERSION()) + * ? OOUT(VERSION(1)) + * $TESTS$ + * + * $STATUS$ + * S + * $COMPLIANCE$ + * This function isn't compatible with CA CLIPPER. + * CA Clipper only returns the Version of the Clipper Compiler + * Harbour returns the Harbour Version or the Harbour Version+C compiler Version + * when the parameter is set to 1 + * $PLATFORMS$ + * + * $FILES$ + * source/rtl/environ.c + * $SEEALSO$ + * OS() + * $END$ + */ + HARBOUR HB_VERSION( void ) { char * pszVersion = hb_version( hb_pcount() > 0 ? 1 : 0 ); @@ -534,6 +577,42 @@ HARBOUR HB_VERSION( void ) hb_xfree( pszVersion ); } +/* $DOC$ + * $FUNCNAME$ + * GETENV() + * $CATEGORY$ + * Environment + * $ONELINER$ + * Obtains DOS system environmental settings + * $SYNTAX$ + * GETENV() --> + * $ARGUMENTS$ + * Enviromental variable to obtain + * $RETURNS$ + * Value of the Variable + * $DESCRIPTION$ + * This function yields a string that is the value of the + * environmental variable , witch is stored at the + * level with the Set command. If no environmental variable + * can be found, the value of the function will be a empty string. + * $EXAMPLES$ + * ? QOUT(GETENV('PATH')) + ? QOUT(GETENV('CONFIG')) + * $TESTS$ + * + * $STATUS$ + * R + * $COMPLIANCE$ + * This functions is CA-CLIPPER compilant + * $PLATFORMS$ + * + * $FILES$ + * source/rtl/environ.c + * $SEEALSO$ + * + * $END$ + */ + HARBOUR HB_GETENV( void ) { if( hb_pcount() == 1 ) @@ -573,7 +652,6 @@ HARBOUR HB_GETE( void ) * __RUN( ) * $CATEGORY$ * DOS - * * $ARGUMENTS$ * Command to execute * $DESCRIPTION$ diff --git a/harbour/source/rtl/objfunc.prg b/harbour/source/rtl/objfunc.prg index 5cb383d42b..dd52671294 100644 --- a/harbour/source/rtl/objfunc.prg +++ b/harbour/source/rtl/objfunc.prg @@ -82,7 +82,7 @@ * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __ObjGetMethodLis,__objGetMsgList(),__objHasMethod() + * __ObjGetMethodList(),__objGetMsgList(),__objHasMethod() * $END$ */ @@ -127,7 +127,7 @@ return __objHasMsg( oObject, cSymbol ) .and. ; * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __ObjGetMethodLis,__objGetMsgList(),__objHasData() + * __ObjGetMethodList(),__objGetMsgList(),__objHasData() * $END$ */ @@ -184,7 +184,7 @@ return __objHasMsg( oObject, cSymbol ) .and. ; * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __ObjGetMethodLis,__ObjGetValueList,__objHasData(),__objHasMethod() + * __ObjGetMethodList(),__ObjGetValueList,__objHasData(),__objHasMethod() * $END$ */ @@ -260,7 +260,7 @@ return aData * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objGetMsgList(),__ObjGetValueList,__objHasData(),__objHasMethod() + * __objGetMsgList(),__ObjGetValueList(),__objHasData(),__objHasMethod() * $END$ */ @@ -312,7 +312,7 @@ return __objGetMsgList( oObject, .F. ) * $FILES$ * Header file is hboo.ch * $SEEALSO$ - * __ObjGetMethodLis,__objGetMsgList(),__objHasData(),__objHasMethod(),__ObjSetValueList + * __ObjGetMethodList(),__objGetMsgList(),__objHasData(),__objHasMethod(),__ObjSetValueList() * $END$ */ @@ -392,7 +392,7 @@ return aData * $FILES$ * Header file is hboo.ch * $SEEALSO$ - * __ObjGetValueList + * __ObjGetValueList() * $END$ */ @@ -457,7 +457,7 @@ return oObject * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddInline(),__objAddData(),__objDelMethod(),__ObjGetMethodLis,__objGetMsgList(),__objHasMethod(),__objModMethod() + * __objAddInline(),__objAddData(),__objDelMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod(),__objModMethod() * $END$ */ @@ -514,7 +514,7 @@ return oObject * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddData(),__objAddMethod(),__objDelInline(),__ObjGetMethodLis,__objGetMsgList(),__objHasMethod() ,__objModInline() + * __objAddData(),__objAddMethod(),__objDelInline(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod() ,__objModInline() * $END$ */ @@ -569,7 +569,7 @@ return oObject * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddInline(),__objAddMethod(),__objDelData(),__objGetMsgList(),__ObjGetValueList,__objHasData() ,__ObjSetValueList + * __objAddInline(),__objAddMethod(),__objDelData(),__objGetMsgList(),__ObjGetValueList(),__objHasData() ,__ObjSetValueList() * $END$ */ @@ -658,7 +658,7 @@ return oObject * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddMethod(),__objDelMethod(),__ObjGetMethodLis,__objGetMsgList(),__objHasMethod() + * __objAddMethod(),__objDelMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod() * $END$ */ @@ -720,7 +720,7 @@ return oObject * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddInline(),__objDelInline(),__ObjGetMethodLis,__objGetMsgList(),__objHasMethod() + * __objAddInline(),__objDelInline(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod() * $END$ */ @@ -789,7 +789,7 @@ return oObject * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddInline() __objAddMethod() __ObjGetMethodLis __objGetMsgList() __objHasMethod() __objModInline() __objModMethod() + * __objAddInline(),__objAddMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod(),__objModInline(),__objModMethod() * $END$ */ @@ -854,7 +854,7 @@ return oObject * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddInline(),__objAddMethod(),__ObjGetMethodLis,__objGetMsgList(),__objHasMethod(),__objModInline() __objModMethod() + * __objAddInline(),__objAddMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod(),__objModInline(),__objModMethod() * $END$ */ @@ -896,7 +896,7 @@ return __objDelMethod( oObject, cSymbol ) // Same story * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * __objAddData(),__objGetMsgList(),__ObjGetValueList,__objHasData(),__ObjSetValueList + * __objAddData(),__objGetMsgList(),__ObjGetValueList(),__objHasData(),__ObjSetValueList() * $END$ */ diff --git a/harbour/source/rtl/proc.c b/harbour/source/rtl/proc.c index c23ed008b0..0519b66b20 100644 --- a/harbour/source/rtl/proc.c +++ b/harbour/source/rtl/proc.c @@ -142,7 +142,7 @@ HARBOUR HB_PROCNAME( void ) * $COMPLIANCE$ * PROCLINE() is fully CA-Clipper compliant. * $SEEALSO$ - * PROCNAME() PROCFILE() + * PROCNAME(),PROCFILE() * $END$ */ @@ -189,7 +189,7 @@ HARBOUR HB_PROCLINE( void ) * $COMPLIANCE$ * PROCFILE() is fully CA-Clipper compliant. * $SEEALSO$ - * PROCNAME() PROCLINE() + * PROCNAME(),PROCLINE() * $END$ */ diff --git a/harbour/source/rtl/setkey.prg b/harbour/source/rtl/setkey.prg index 2978998fb9..14da223e2f 100644 --- a/harbour/source/rtl/setkey.prg +++ b/harbour/source/rtl/setkey.prg @@ -285,7 +285,7 @@ return aReturn * $COMPLIANCE$ * HB_SETKEYCHECK() is new. * $SEEALSO$ - * SETKEY() HB_SETKEYSAVE() + * SETKEY(),HB_SETKEYSAVE() * $END$ */ Function HB_SetKeyCheck( nKey, p1, p2, p3 ) diff --git a/harbour/source/rtl/strings.c b/harbour/source/rtl/strings.c index c25a8032a0..674b86b02b 100644 --- a/harbour/source/rtl/strings.c +++ b/harbour/source/rtl/strings.c @@ -244,6 +244,38 @@ char * hb_strLTrim( const char * szText, ULONG * ulLen ) /* trims leading spaces from a string */ /* TEST: QOUT( "ltrim( ' hello world ' ) = '" + ltrim( ' hello world ' ) + "'" ) */ +/* $DOC$ + * $FUNCNAME$ + * LTRIM() + * $CATEGORY$ + * Strings + * $ONELINER$ + * Removes leading spaces from a string + * $SYNTAX$ + * LTRIM() --> + * $ARGUMENTS$ + * Character expression with leading spaces + * $RETURNS$ + * The same character expression with leading spaces removed + * $DESCRIPTION$ + * This function trims the leading space blanl + * $EXAMPLES$ + * ? QOUT( LTRIM("HELLO ")) + * $TESTS$ + * + * $STATUS$ + * R + * $COMPLIANCE$ + * This functions is CA-CLIPPER compatible + * $PLATFORMS$ + * + * $FILES$ + * + * $SEEALSO$ + * TRIM(),RTRIM(),ALLTRIM() + * $END$ + */ + HARBOUR HB_LTRIM( void ) { PHB_ITEM pText = hb_param( 1, IT_STRING ); @@ -648,6 +680,41 @@ HARBOUR HB_ASC( void ) } /* returns the left-most n characters in string */ +/* $DOC$ + * $FUNCNAME$ + * LEFT() + * $CATEGORY$ + * Strings + * $ONELINER$ + * Extract the leftmost substring of a character expression + * $SYNTAX$ + * LEFT(,) --> + * $ARGUMENTS$ + * Main character to be parsed + * Number of bytes to return beggining at the leftmost position + * $RETURNS$ + * Substring of evaluation + * $DESCRIPTION$ + * This functions returns the leftmost characters of . + * It is equivalent to the following programing expression: + * SUBSTR(,1, + * $EXAMPLES$ + * ? QOUT(LEFT('HELLO HARBOUR',5) + * $TESTS$ + * + * $STATUS$ + * R + * $COMPLIANCE$ + * This functions is CA CLIPPER compatible + * $PLATFORMS$ + * + * $FILES$ + * + * $SEEALSO$ + * SUBSTR(),RIGHT(),AT(),RAT() + * $END$ + */ + HARBOUR HB_LEFT( void ) { PHB_ITEM pText = hb_param( 1, IT_STRING ); @@ -677,6 +744,40 @@ HARBOUR HB_LEFT( void ) } /* returns the right-most n characters in string */ +/* $DOC$ + * $FUNCNAME$ + * RIGHT() + * $CATEGORY$ + * Strings + * $ONELINER$ + * Extract the rightmost substring of a character expression + * $SYNTAX$ + * SUBSTR(,) --> + * $ARGUMENTS$ + * Character expression to be parsed + * Number of bytes to return beggining at the rightmost position + * $RETURNS$ + * Substring of evaluation + * $DESCRIPTION$ + * This functions returns the rightmost characters of . + * + * $EXAMPLES$ + * ? QOUT(RIGHT('HELLO HARBOUR',5) + * $TESTS$ + * + * $STATUS$ + * R + * $COMPLIANCE$ + * This functions is CA CLIPPER compatible + * $PLATFORMS$ + * + * $FILES$ + * + * $SEEALSO$ + * SUBSTR(),LEFT(),AT(),RAT() + * $END$ + */ + HARBOUR HB_RIGHT( void ) { PHB_ITEM pText = hb_param( 1, IT_STRING ); @@ -701,6 +802,55 @@ HARBOUR HB_RIGHT( void ) } /* returns l characters from n characters into string */ +/* $DOC$ + * $FUNCNAME$ + * SUBSTR() + * $CATEGORY$ + * Strings + * $ONELINER$ + * Returns a substring from a main string + * $SYNTAX$ + * SUBSTR(,[,)] --> + * $ARGUMENTS$ + * Character expression to be parsed + * Start position + * Number of characters to return + * $RETURNS$ + * Substring of evaluation + * $DESCRIPTION$ + * This functions returns a character string formed from , + * starting at the position of and continuing on for a + * lenght of characters. If is not specified, the value + * will be all remaining characters from the position of . + * The value of may be negative. If it is, the direction of + * operation is reversed from a default of left-to-right to right-to-left + * for the number of characters specified in . + * + * + * $EXAMPLES$ + * FUNCTION MAIN() + * LOCAL X:=REPLICATE('ABCD',70000) + * + * ? QOUT(SUBSTR(X,65519,200) + * + * RETURN NIL + * $TESTS$ + * ? QOUT(SUBSTR('HELLO HARBOUR',5) + * $STATUS$ + * R + * $COMPLIANCE$ + * This functions is CA CLIPPER compatible with the execption that + * CA CLIPPER will generate an error if the passed string is >65519 bytes. + * Harbour Not. + * $PLATFORMS$ + * + * $FILES$ + * + * $SEEALSO$ + * LEFT(),AT(),RIGHT() + * $END$ + */ + HARBOUR HB_SUBSTR( void ) { PHB_ITEM pText = hb_param( 1, IT_STRING ); diff --git a/harbour/source/rtl/text.prg b/harbour/source/rtl/text.prg index 20eeb4f71f..edc5cf85d3 100644 --- a/harbour/source/rtl/text.prg +++ b/harbour/source/rtl/text.prg @@ -79,7 +79,7 @@ STATIC s_cOldExtraFile * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * envirom.ngo:SET() 'SET ALTERNATE' 'SET PRINTER' 'TEXT' __TextRestore() + * SET(),SET ALTERNATE,SET PRINTER,TEXT,__TextRestore() * $END$ */ @@ -121,7 +121,7 @@ PROCEDURE __TextSave( cFile ) * $PLATFORMS$ * $FILES$ * $SEEALSO$ - * envirom.ngo:SET() 'SET ALTERNATE' 'SET PRINTER' 'TEXT' __TextSave() + * SET(),SET ALTERNATE,SET PRINTER,TEXT,__TextSave() * $END$ */ diff --git a/harbour/source/rtl/type.c b/harbour/source/rtl/type.c index 88f84e2909..d00f27183a 100644 --- a/harbour/source/rtl/type.c +++ b/harbour/source/rtl/type.c @@ -57,7 +57,7 @@ * $STATUS$ * S * $COMPLIANCE$ - * TYPE() is + * * $SEEALSO$ * VALTYPE() * $END$ diff --git a/harbour/source/tools/nconvert.prg b/harbour/source/tools/nconvert.prg index 8ad02fdd59..7a562b9b14 100644 --- a/harbour/source/tools/nconvert.prg +++ b/harbour/source/tools/nconvert.prg @@ -55,7 +55,7 @@ * $EXAMPLES$ * * $SEEALSO$ - * ISOCTAL() ISDEC() ISHEXA() + * ISOCTAL(), ISDEC(), ISHEXA() * $INCLUDE$ * * $END$ @@ -95,7 +95,7 @@ FUNCTION IsBin(cString) * $EXAMPLES$ * * $SEEALSO$ - * ISBIN() ISDEC() ISHEXA() + * ISBIN(), ISDEC(), ISHEXA() * $INCLUDE$ * * $END$ @@ -133,7 +133,7 @@ FUNCTION IsOctal(cString) * $EXAMPLES$ * * $SEEALSO$ - * ISOCTAL() ISBIN() ISHEXA() + * ISOCTAL(), ISBIN(), ISHEXA() * $INCLUDE$ * * $END$ @@ -171,7 +171,7 @@ FUNCTION IsDec(cString) * $EXAMPLES$ * * $SEEALSO$ - * ISOCTAL() ISDEC() ISBIN() + * ISOCTAL(), ISDEC(), ISBIN() * $INCLUDE$ * * $END$