From 38310bc7816068001b61042712850efc8ec2a1dd Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 5 Apr 2013 03:02:47 +0200 Subject: [PATCH] 2013-04-05 02:57 UTC+0200 Viktor Szakats (harbour syenar.net) * bin/check.hb ! fixed to use local implementation instead of hb_DirScan() which has known bug of missing extensionless files on win. (due to hb_FileMatch() problem) + added support to optimize images and uncrustify C source before upload (inactive yet) + added necessary exceptions now that extensionless files properly found + checks for filenames without extensions + checks for filenames with extensions not in .gitattributes * bin/commit.hb + show helpful advice when pre-commit hook check fails ! fixed to propely pick filenames that result from rename operations (for check) ! fixed to not pick filenames of deleted files (for check) * config/lang.hb * doc/en/lang.txt * include/hblang.hbx * src/lang/Makefile * src/lang/l_zh_tra.c -> src/lang/l_zh.c * src/rtl/langcomp.prg * Language renamed: zh_tra -> zh (in sync with recently laid rules) The 'REQUEST HB_LANG_*' value become INCOMPATIBLE compared to previous dev versions * src/rtl/cdpdet.prg + added 'zh' country code to codepage detection * contrib/make.hb * contrib/hbplist -> contrib/hbplist.txt * renamed to have an extension * contrib/hbrun/doc/_GENERATED_ -> contrib/hbrun/doc/_autogen.txt * utils/hbmk2/doc/_GENERATED_ -> utils/hbmk2/doc/_autogen.txt * renamed to have names fitting naming rules + added warning message inside - extras/httpsrv/logs/empty - deleted unnecessary file with non-compliant filename - tests/stripeol.hb % deleted, now similar functionality is implemented in bin/check.hb * .gitattributes ! added missing .log and .ucf * contrib/hbtinymt/3rd/tinymt/tinymt.hbp ! deleted SVN ID * debian/copyright ! synced with COPYING.txt * debian/postinst * debian/postrm ! deleted multiple EOL at EOF --- .gitattributes | 2 + ChangeLog.txt | 58 +++++++++++++ bin/check.hb | 108 ++++++++++++++++++++++--- bin/commit.hb | 17 +++- config/lang.hb | 1 - contrib/{hbplist => hbplist.txt} | 0 contrib/hbrun/doc/_GENERATED_ | 0 contrib/hbrun/doc/_autogen.txt | 2 + contrib/hbtinymt/3rd/tinymt/tinymt.hbp | 3 - contrib/make.hb | 2 +- debian/copyright | 14 ++-- debian/postinst | 1 - debian/postrm | 1 - doc/en/lang.txt | 2 +- extras/httpsrv/logs/empty | 0 include/hblang.hbx | 2 +- src/lang/Makefile | 2 +- src/lang/{l_zh_tra.c => l_zh.c} | 4 +- src/rtl/cdpdet.prg | 1 + src/rtl/langcomp.prg | 4 +- tests/stripeol.hb | 39 --------- utils/hbmk2/doc/_GENERATED_ | 0 utils/hbmk2/doc/_autogen.txt | 2 + 23 files changed, 192 insertions(+), 73 deletions(-) rename contrib/{hbplist => hbplist.txt} (100%) delete mode 100644 contrib/hbrun/doc/_GENERATED_ create mode 100644 contrib/hbrun/doc/_autogen.txt delete mode 100644 extras/httpsrv/logs/empty rename src/lang/{l_zh_tra.c => l_zh.c} (98%) delete mode 100644 tests/stripeol.hb delete mode 100644 utils/hbmk2/doc/_GENERATED_ create mode 100644 utils/hbmk2/doc/_autogen.txt diff --git a/.gitattributes b/.gitattributes index 719794299b..b8f82a6af4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,6 +23,7 @@ ChangeLog.txt ident *.in text *.ini text *.js text +*.log text *.m text *.md text *.mft text @@ -38,6 +39,7 @@ ChangeLog.txt ident *.sx text *.tpl text *.txt text +*.ucf text *.vbs text *.xml text *.xsl text diff --git a/ChangeLog.txt b/ChangeLog.txt index 875ed95413..eacda345db 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,64 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-04-05 02:57 UTC+0200 Viktor Szakats (harbour syenar.net) + * bin/check.hb + ! fixed to use local implementation instead of hb_DirScan() + which has known bug of missing extensionless files on win. + (due to hb_FileMatch() problem) + + added support to optimize images and uncrustify C source + before upload (inactive yet) + + added necessary exceptions now that extensionless files + properly found + + checks for filenames without extensions + + checks for filenames with extensions not in .gitattributes + + * bin/commit.hb + + show helpful advice when pre-commit hook check fails + ! fixed to propely pick filenames that result from rename operations (for check) + ! fixed to not pick filenames of deleted files (for check) + + * config/lang.hb + * doc/en/lang.txt + * include/hblang.hbx + * src/lang/Makefile + * src/lang/l_zh_tra.c -> src/lang/l_zh.c + * src/rtl/langcomp.prg + * Language renamed: zh_tra -> zh (in sync with recently laid rules) + The 'REQUEST HB_LANG_*' value become INCOMPATIBLE compared + to previous dev versions + + * src/rtl/cdpdet.prg + + added 'zh' country code to codepage detection + + * contrib/make.hb + * contrib/hbplist -> contrib/hbplist.txt + * renamed to have an extension + + * contrib/hbrun/doc/_GENERATED_ -> contrib/hbrun/doc/_autogen.txt + * utils/hbmk2/doc/_GENERATED_ -> utils/hbmk2/doc/_autogen.txt + * renamed to have names fitting naming rules + + added warning message inside + + - extras/httpsrv/logs/empty + - deleted unnecessary file with non-compliant filename + + - tests/stripeol.hb + % deleted, now similar functionality is implemented in bin/check.hb + + * .gitattributes + ! added missing .log and .ucf + + * contrib/hbtinymt/3rd/tinymt/tinymt.hbp + ! deleted SVN ID + + * debian/copyright + ! synced with COPYING.txt + + * debian/postinst + * debian/postrm + ! deleted multiple EOL at EOF + 2013-04-04 16:09 UTC+0200 Viktor Szakats (harbour syenar.net) * config/lang.hb * utils/hbmk2/hbmk2.hbp diff --git a/bin/check.hb b/bin/check.hb index 6b681434eb..49fd613cb8 100644 --- a/bin/check.hb +++ b/bin/check.hb @@ -25,9 +25,6 @@ */ /* TODO: Apply transformations: - Uncrustify, hbformat, - pngout/pngcrush/optipng/advpng, - jpgoptim/jpegtran/jpegrescan, css/html/xml format, etc */ #pragma -w3 @@ -49,10 +46,7 @@ FUNCTION CheckFileList( xName ) IF Empty( xName ) .OR. HB_ISARRAY( xName ) IF Empty( xName ) - xName := hb_DirScan( "", hb_osFileMask() ) - FOR EACH file IN xName - file := file[ F_NAME ] - NEXT + xName := my_DirScan( hb_osFileMask() ) ENDIF FOR EACH file IN xName IF ! CheckFile( file, @aErr ) @@ -72,6 +66,7 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) LOCAL tmp LOCAL cEOL + LOCAL lProcess LOCAL lReBuild LOCAL lRemoveEndingWhitespace @@ -96,14 +91,21 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) "*.md", ; "*.html", ; "*/hb-charmap.def", ; /* TOFIX: Use 8.3 name */ + "debian/*", ; "package/*", ; "*/3rd/*", ; "contrib/hbwin/*", ; "contrib/rddads/unixutils.h", ; "extras/httpsrv/*" } + LOCAL aCanHaveNoExtension := { ; + "Makefile", ; + ".*", ; + "debian/*" } + LOCAL aCanHaveTab := { ; "Makefile", ; + "debian/rules", ; "*.mk", ; "*.yyc", ; "*.dif", ; @@ -125,6 +127,13 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) LOCAL aForcedLF := { ; "*.sh" } + LOCAL hAllowedExt := LoadGitattributes() + + /* TODO: extend as you go */ + LOCAL hDoNotProcess := { ; + ".c" => { "3rd", "include", "dlmalloc", "hvm", "sha1", "sha2" }, ; + ".h" => { "3rd", "include" } } + hb_default( @lApplyFixes, .F. ) cName := hb_DirSepToOS( cName ) @@ -144,6 +153,14 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) AAdd( aErr, "filename: non MS-DOS compatible" ) ENDIF + IF Empty( hb_FNameExt( cName ) ) + IF ! FNameExc( cName, aCanHaveNoExtension ) + AAdd( aErr, "filename: missing extension" ) + ENDIF + ELSEIF ! hb_FNameExt( cName ) $ hAllowedExt + AAdd( aErr, "filename: unknown extension. Either change it or update .gitattributes." ) + ENDIF + IF !( cName == Lower( cName ) ) .AND. ! FNameExc( cName, aCanBeUpper ) AAdd( aErr, "filename: non-lowercase" ) ENDIF @@ -154,9 +171,16 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) IF IsBinary( cFile ) IF lApplyFixes - IF hb_FNameExt( cFile ) == ".png" - OutStd( cFile + ": " + "content: optimizing" + hb_eol() ) - hb_run( "optipng " + cFile ) + lProcess := .T. + FOR EACH tmp IN hb_HGetDef( hDoNotProcess, hb_FNameExt( cName ), {} ) + IF tmp $ cName + lProcess := .F. + EXIT + ENDIF + NEXT + IF lProcess + OutStd( cName + ": " + "content: processing" + hb_eol() ) + ProcFile( cName ) ENDIF ENDIF ELSE @@ -428,6 +452,31 @@ STATIC FUNCTION FNameExc( cName, aList ) RETURN .F. +STATIC PROCEDURE ProcFile( cFileName ) + + STATIC sc_hProc := { ; + ".png" => { "avdpng -z -4 %1$s", "optipng -o7 %1$s" }, ; + ".jpg" => { "jpegoptim --strip-all %1$s" }, ; + ".c" => { "uncrustify -c bin/harbour.ucf %1$s" }, ; + ".cpp" => ".c", ; + ".h" => ".c" } +// NOTE: hbformat has bugs which make it unsuitable for unattended use +// ".prg" => { "hbformat %1$s" } } + + LOCAL aProc := hb_FNameExt( cFileName ) + LOCAL cCmd + + DO WHILE HB_ISSTRING( aProc := hb_HGetDef( sc_hProc, aProc, NIL ) ) + ENDDO + + IF HB_ISARRAY( aProc ) + FOR EACH cCmd IN aProc + hb_run( hb_StrFormat( hb_DirSepToOS( cCmd ), '"' + cFileName + '"' ) ) + NEXT + ENDIF + + RETURN + STATIC FUNCTION UTF8_BOM() RETURN ; hb_BChar( 0xEF ) + ; @@ -467,3 +516,42 @@ STATIC FUNCTION LoadGitignore() ENDIF RETURN s_aIgnore + +STATIC FUNCTION LoadGitattributes() + + THREAD STATIC s_hExt := NIL + + LOCAL cLine + LOCAL tmp + + IF s_hExt == NIL + s_hExt := { => } + FOR EACH cLine IN hb_ATokens( StrTran( hb_MemoRead( ".gitattributes" ), Chr( 13 ) ), Chr( 10 ) ) + IF Left( cLine, 2 ) == "*." + cLine := SubStr( cLine, 2 ) + IF ( tmp := At( " ", cLine ) ) > 0 + s_hExt[ RTrim( Left( cLine, tmp - 1 ) ) ] := NIL + ENDIF + ENDIF + NEXT + ENDIF + + RETURN s_hExt + +STATIC FUNCTION my_DirScan( cMask ) + RETURN my_DirScanWorker( cMask, {} ) + +STATIC FUNCTION my_DirScanWorker( cMask, aList ) + + LOCAL file + + FOR EACH file IN Directory( cMask, "D" ) + IF file[ F_NAME ] == "." .OR. file[ F_NAME ] == ".." + ELSEIF "D" $ file[ F_ATTR ] + my_DirScanWorker( hb_FNameDir( cMask ) + file[ F_NAME ] + hb_ps() + hb_FNameNameExt( cMask ), aList ) + ELSE + AAdd( aList, hb_FNameDir( cMask ) + file[ F_NAME ] ) + ENDIF + NEXT + + RETURN aList diff --git a/bin/commit.hb b/bin/commit.hb index 30f50d2c11..5f29125585 100644 --- a/bin/commit.hb +++ b/bin/commit.hb @@ -64,7 +64,7 @@ PROCEDURE Main() IF "--hb-check-only" $ Lower( hb_CmdLine() ) IF AScan( aFiles, {| tmp | tmp == cLogName } ) == 0 - OutStd( hb_ProgName() + ": " + hb_StrFormat( "%1$s not updated", cLogName ) + hb_eol() ) + OutStd( hb_ProgName() + ": " + hb_StrFormat( "%1$s not updated. Run 'hbrun bin/commit' and retry.", cLogName ) + hb_eol() ) ErrorLevel( 3 ) RETURN ENDIF @@ -140,6 +140,9 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges, aFiles ) LOCAL cStart LOCAL aNew := {} + LOCAL cFile + LOCAL tmp + ASort( aChanges,,, {| x, y | x < y } ) DO CASE @@ -167,7 +170,9 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges, aFiles ) ENDSWITCH IF ! Empty( cStart ) AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 8 + 1 ), "\", "/" ) ) - AAdd( aFiles, SubStr( cLine, 8 + 1 ) ) + IF !( cStart == "-" ) + AAdd( aFiles, SubStr( cLine, 8 + 1 ) ) + ENDIF ENDIF ENDIF NEXT @@ -203,7 +208,13 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges, aFiles ) ENDSWITCH IF ! Empty( cStart ) AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 3 + 1 ), "\", "/" ) ) - AAdd( aFiles, SubStr( cLine, 3 + 1 ) ) + IF !( cStart == "-" ) + cFile := SubStr( cLine, 3 + 1 ) + IF ( tmp := At( " -> ", cFile ) ) > 0 + cFile := SubStr( cFile, tmp + Len( " -> " ) ) + ENDIF + AAdd( aFiles, cFile ) + ENDIF ENDIF ENDIF NEXT diff --git a/config/lang.hb b/config/lang.hb index bc2c1b6159..43b2b46dd7 100644 --- a/config/lang.hb +++ b/config/lang.hb @@ -37,7 +37,6 @@ #include "directry.ch" STATIC sc_hLangMapping := { ; - "zh_CN" => "zh_tra", ; "zh_CN.GB2312" => "zh_sim", ; "sr" => "sr_cyr", ; "sr@latin" => "sr_lat" } diff --git a/contrib/hbplist b/contrib/hbplist.txt similarity index 100% rename from contrib/hbplist rename to contrib/hbplist.txt diff --git a/contrib/hbrun/doc/_GENERATED_ b/contrib/hbrun/doc/_GENERATED_ deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/hbrun/doc/_autogen.txt b/contrib/hbrun/doc/_autogen.txt new file mode 100644 index 0000000000..91e0046cb6 --- /dev/null +++ b/contrib/hbrun/doc/_autogen.txt @@ -0,0 +1,2 @@ +These files are automatically generated, +do not edit them. diff --git a/contrib/hbtinymt/3rd/tinymt/tinymt.hbp b/contrib/hbtinymt/3rd/tinymt/tinymt.hbp index 553a960073..3860a5661a 100644 --- a/contrib/hbtinymt/3rd/tinymt/tinymt.hbp +++ b/contrib/hbtinymt/3rd/tinymt/tinymt.hbp @@ -1,6 +1,3 @@ -# -# $Id: expat.hbp 16466 2011-03-11 00:28:04Z vszakats $ -# -stop{hbdyn} diff --git a/contrib/make.hb b/contrib/make.hb index cd5cbaf0ea..c9ace54dc5 100755 --- a/contrib/make.hb +++ b/contrib/make.hb @@ -78,7 +78,7 @@ PROCEDURE Main( ... ) hProjectList := { => } hb_HKeepOrder( hProjectList, .T. ) - LoadProjectListFromFile( hProjectList, s_cHome + "hbplist" ) + LoadProjectListFromFile( hProjectList, s_cHome + "hbplist.txt" ) LoadProjectListFromString( hProjectList, GetEnv( "HB_BUILD_ADDONS" ) ) aParams := hb_AParams() diff --git a/debian/copyright b/debian/copyright index 404c71f898..f9e0d2876e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -548,8 +548,8 @@ all use GNU GPL 2. Find it below: ------------------------------------------------------------------------ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA @@ -557,7 +557,7 @@ all use GNU GPL 2. Find it below: Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -607,7 +607,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -806,7 +806,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -828,9 +828,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it diff --git a/debian/postinst b/debian/postinst index fcef884e0f..70db5b700d 100644 --- a/debian/postinst +++ b/debian/postinst @@ -19,4 +19,3 @@ esac #DEBHELPER# exit 0 - diff --git a/debian/postrm b/debian/postrm index 497a40678f..ec2e658df7 100644 --- a/debian/postrm +++ b/debian/postrm @@ -19,4 +19,3 @@ esac #DEBHELPER# exit 0 - diff --git a/doc/en/lang.txt b/doc/en/lang.txt index f26b8e05fd..5c6af7e15c 100644 --- a/doc/en/lang.txt +++ b/doc/en/lang.txt @@ -187,8 +187,8 @@ Belorussian be Bulgarian bg Catalan ca + Chinese Traditional zh Chinese Simplified zh_sim - Chinese Traditional zh_tra Croatian hr Czech cs Dutch nl diff --git a/extras/httpsrv/logs/empty b/extras/httpsrv/logs/empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/include/hblang.hbx b/include/hblang.hbx index 50f85f6463..051b44526b 100644 --- a/include/hblang.hbx +++ b/include/hblang.hbx @@ -63,8 +63,8 @@ DYNAMIC HB_LANG_SR_LAT DYNAMIC HB_LANG_SV DYNAMIC HB_LANG_TR DYNAMIC HB_LANG_UK +DYNAMIC HB_LANG_ZH DYNAMIC HB_LANG_ZH_SIM -DYNAMIC HB_LANG_ZH_TRA #if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBLANG__REQUEST ) #uncommand DYNAMIC => EXTERNAL diff --git a/src/lang/Makefile b/src/lang/Makefile index 9a41c73111..d07a8f0514 100644 --- a/src/lang/Makefile +++ b/src/lang/Makefile @@ -35,8 +35,8 @@ C_SOURCES := \ l_sv.c \ l_tr.c \ l_uk.c \ + l_zh.c \ l_zh_sim.c \ - l_zh_tra.c \ LIBNAME := hblang diff --git a/src/lang/l_zh_tra.c b/src/lang/l_zh.c similarity index 98% rename from src/lang/l_zh_tra.c rename to src/lang/l_zh.c index 27f8705945..5a10d882c2 100644 --- a/src/lang/l_zh_tra.c +++ b/src/lang/l_zh.c @@ -7,7 +7,7 @@ static HB_LANG s_lang = { /* Identification */ - "zh_tra", + "zh", "Chinese Traditional", "中文繁體", "", @@ -146,5 +146,5 @@ static HB_LANG s_lang = } }; -#define HB_LANG_ID ZH_TRA +#define HB_LANG_ID ZH #include "hbmsgreg.h" diff --git a/src/rtl/cdpdet.prg b/src/rtl/cdpdet.prg index 3da318ffb3..9242a25165 100644 --- a/src/rtl/cdpdet.prg +++ b/src/rtl/cdpdet.prg @@ -463,6 +463,7 @@ STATIC FUNCTION __LangStdToCPCtryHb( cCtryStd ) CASE "zh-mo" ; EXIT CASE "zh-sg" ; EXIT CASE "zh-tw" ; EXIT + CASE "zh" ; EXIT ENDSWITCH ENDIF diff --git a/src/rtl/langcomp.prg b/src/rtl/langcomp.prg index 935d17f269..1fb43a6523 100644 --- a/src/rtl/langcomp.prg +++ b/src/rtl/langcomp.prg @@ -122,7 +122,7 @@ FUNCTION hb_langSelect( cLangID, cCP ) CASE "UADOS" ; cCPDef := "UA1125"; cLangIDBase := "uk" ; EXIT CASE "UAKOI8" ; cCPDef := "UAKOI8"; cLangIDBase := "uk" ; EXIT CASE "UAWIN" ; cCPDef := "UA1251"; cLangIDBase := "uk" ; EXIT - CASE "ZHB5" ; cCPDef := "BIG5" ; cLangIDBase := "zh_tra" ; EXIT + CASE "ZHB5" ; cCPDef := "BIG5" ; cLangIDBase := "zh" ; EXIT CASE "ZHGB" ; cCPDef := "GBK" ; cLangIDBase := "zh_sim" ; EXIT OTHERWISE /* Case sensitive legacy IDs. Lowercase flavours denote new @@ -388,7 +388,7 @@ STATIC FUNCTION __LangStdToLangHb( cLangStd ) CASE "zh-mo" CASE "zh-sg" CASE "zh-tw" - CASE "zh" ; cLangHb := "zh_tra" ; EXIT + CASE "zh" ; cLangHb := "zh" ; EXIT ENDSWITCH ENDIF diff --git a/tests/stripeol.hb b/tests/stripeol.hb deleted file mode 100644 index 874bf628e1..0000000000 --- a/tests/stripeol.hb +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Strips spaces at EOL text files. - * - * Copyright 2012 Viktor Szakats (harbour syenar.net) - * www - http://harbour-project.org - * - */ - -#pragma -w3 -#pragma -km+ -#pragma -ko+ - -#include "directry.ch" - -PROCEDURE Main( cMask ) - - LOCAL aFile - - hb_default( @cMask, "*.txt" ) - - FOR EACH aFile IN Directory( hb_osFileMask() ) - hb_MemoWrit( aFile[ F_NAME ], __stripeol( MemoRead( aFile[ F_NAME ] ) ) ) - NEXT - - RETURN - -FUNCTION __stripeol( cFile ) - - LOCAL cOK := "" - LOCAL cLine - - FOR EACH cLine IN hb_ATokens( StrTran( StrTran( cFile, Chr( 13 ) ), Chr( 9 ), " " ), Chr( 10 ) ) - cOK += RTrim( cLine ) - IF ! cLine:__enumIsLast() - cOK += hb_eol() - ENDIF - NEXT - - RETURN cOK diff --git a/utils/hbmk2/doc/_GENERATED_ b/utils/hbmk2/doc/_GENERATED_ deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/hbmk2/doc/_autogen.txt b/utils/hbmk2/doc/_autogen.txt new file mode 100644 index 0000000000..91e0046cb6 --- /dev/null +++ b/utils/hbmk2/doc/_autogen.txt @@ -0,0 +1,2 @@ +These files are automatically generated, +do not edit them.