2013-04-02 17:49 UTC+0200 Viktor Szakats (harbour syenar.net)
+ bin/check.hb
+ new source verifier. Able to all documented (and more)
required text file and filename properties.
* bin/commit.hb
+ added feature to verify all files to be committed to
conform with certain naming and text file content rules
+ added some more feedback
* config/postinst.hb
+ include commit.hb and check.hb in 'install'
* include/extend.h
* contrib/hbcairo/paths.c
* contrib/hbcairo/png.c
* contrib/hbcairo/util.c
* contrib/hbtpathy/readme.txt
* tests/harbour.ini
* tests/parseins.ini
! multiple EOL at EOF
* contrib/hbhpdf/tests/files/cp932.txt
* contrib/hbhpdf/tests/files/cp936.txt
* contrib/hbhpdf/tests/files/elic_jp.txt
! line ending spaces
! missing EOL at EOF
* contrib/hbhttpd/tests/tpl/app/account/edit.tpl
* contrib/hbhttpd/tests/tpl/app/login.tpl
* contrib/hbhttpd/tests/tpl/app/logout.tpl
* contrib/hbhttpd/tests/tpl/app/main.tpl
* contrib/hbhttpd/tests/tpl/app/register.tpl
* lib/3rd/win/bcc/unicows_license.txt
* lib/3rd/win/mingw/libunicows_license.txt
! missing EOL at EOF
* COPYING.txt
* src/rtl/gtcrs/hb-charmap.def
* tests/big5_gen.prg
! tabs
* extras/gfspell/spell.prg
* src/rtl/gtwin/gtwin.c
! ASCII 127
* src/codepage/cp_tpl.c
! converted to UTF-8 (just guessing what the original CP was)
* src/pp/hbpp.c
! do not generate SVN header in hbverbld.h
+ avoid SVN header string in source as is to miss matched
in source verifier
* src/vm/extrap.c
! do not generate whitespace at EOL in output
* tests/lang2po.hb
* tests/po2lang.hb
+ minor improvements
! fixed to generate consistent EOL
* bin/3rdpatch.hb
* newline at top deleted
* extras/hbdoc/hbdoc.hbp
* extras/hbdoc/hbdoc.prg
* extras/hbdoc/_tmplates.prg -> extras/hbdoc/_tmplate.prg
* contrib/hbcairo/tests/lightning.prg -> contrib/hbcairo/tests/lightnin.prg
! long filename
* .gitattributes
* extras/guestbk/guestbk.prg
* extras/guestbk/guestbk.txt
* extras/guestbk/guestbk.htm -> extras/guestbk/guestbk.html
* deleted .htm file, now all HTML has extension .html
* .exe references in doc made OS neutral
; Can only be used on non-MS-DOS systems, so it's okay
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -19,7 +19,6 @@ ChangeLog.txt ident
|
|||||||
*.hbm text
|
*.hbm text
|
||||||
*.hbp text
|
*.hbp text
|
||||||
*.hbx text
|
*.hbx text
|
||||||
*.htm text
|
|
||||||
*.html text
|
*.html text
|
||||||
*.in text
|
*.in text
|
||||||
*.ini text
|
*.ini text
|
||||||
|
|||||||
14
COPYING.txt
14
COPYING.txt
@@ -548,8 +548,8 @@ all use GNU GPL 2. Find it below:
|
|||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place - Suite 330, Boston, MA
|
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
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
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
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
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 preserving the free status of all derivatives of our free software and
|
||||||
of promoting the sharing and reuse of software generally.
|
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
|
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
|
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
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
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
|
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
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
|||||||
@@ -10,6 +10,85 @@
|
|||||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
2013-04-02 17:49 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||||
|
+ bin/check.hb
|
||||||
|
+ new source verifier. Able to all documented (and more)
|
||||||
|
required text file and filename properties.
|
||||||
|
|
||||||
|
* bin/commit.hb
|
||||||
|
+ added feature to verify all files to be committed to
|
||||||
|
conform with certain naming and text file content rules
|
||||||
|
+ added some more feedback
|
||||||
|
|
||||||
|
* config/postinst.hb
|
||||||
|
+ include commit.hb and check.hb in 'install'
|
||||||
|
|
||||||
|
* include/extend.h
|
||||||
|
* contrib/hbcairo/paths.c
|
||||||
|
* contrib/hbcairo/png.c
|
||||||
|
* contrib/hbcairo/util.c
|
||||||
|
* contrib/hbtpathy/readme.txt
|
||||||
|
* tests/harbour.ini
|
||||||
|
* tests/parseins.ini
|
||||||
|
! multiple EOL at EOF
|
||||||
|
|
||||||
|
* contrib/hbhpdf/tests/files/cp932.txt
|
||||||
|
* contrib/hbhpdf/tests/files/cp936.txt
|
||||||
|
* contrib/hbhpdf/tests/files/elic_jp.txt
|
||||||
|
! line ending spaces
|
||||||
|
! missing EOL at EOF
|
||||||
|
|
||||||
|
* contrib/hbhttpd/tests/tpl/app/account/edit.tpl
|
||||||
|
* contrib/hbhttpd/tests/tpl/app/login.tpl
|
||||||
|
* contrib/hbhttpd/tests/tpl/app/logout.tpl
|
||||||
|
* contrib/hbhttpd/tests/tpl/app/main.tpl
|
||||||
|
* contrib/hbhttpd/tests/tpl/app/register.tpl
|
||||||
|
* lib/3rd/win/bcc/unicows_license.txt
|
||||||
|
* lib/3rd/win/mingw/libunicows_license.txt
|
||||||
|
! missing EOL at EOF
|
||||||
|
|
||||||
|
* COPYING.txt
|
||||||
|
* src/rtl/gtcrs/hb-charmap.def
|
||||||
|
* tests/big5_gen.prg
|
||||||
|
! tabs
|
||||||
|
|
||||||
|
* extras/gfspell/spell.prg
|
||||||
|
* src/rtl/gtwin/gtwin.c
|
||||||
|
! ASCII 127
|
||||||
|
|
||||||
|
* src/codepage/cp_tpl.c
|
||||||
|
! converted to UTF-8 (just guessing what the original CP was)
|
||||||
|
|
||||||
|
* src/pp/hbpp.c
|
||||||
|
! do not generate SVN header in hbverbld.h
|
||||||
|
+ avoid SVN header string in source as is to miss matched
|
||||||
|
in source verifier
|
||||||
|
|
||||||
|
* src/vm/extrap.c
|
||||||
|
! do not generate whitespace at EOL in output
|
||||||
|
|
||||||
|
* tests/lang2po.hb
|
||||||
|
* tests/po2lang.hb
|
||||||
|
+ minor improvements
|
||||||
|
! fixed to generate consistent EOL
|
||||||
|
|
||||||
|
* bin/3rdpatch.hb
|
||||||
|
* newline at top deleted
|
||||||
|
|
||||||
|
* extras/hbdoc/hbdoc.hbp
|
||||||
|
* extras/hbdoc/hbdoc.prg
|
||||||
|
* extras/hbdoc/_tmplates.prg -> extras/hbdoc/_tmplate.prg
|
||||||
|
* contrib/hbcairo/tests/lightning.prg -> contrib/hbcairo/tests/lightnin.prg
|
||||||
|
! long filename
|
||||||
|
|
||||||
|
* .gitattributes
|
||||||
|
* extras/guestbk/guestbk.prg
|
||||||
|
* extras/guestbk/guestbk.txt
|
||||||
|
* extras/guestbk/guestbk.htm -> extras/guestbk/guestbk.html
|
||||||
|
* deleted .htm file, now all HTML has extension .html
|
||||||
|
* .exe references in doc made OS neutral
|
||||||
|
; Can only be used on non-MS-DOS systems, so it's okay
|
||||||
|
|
||||||
2013-04-02 02:57 UTC+0200 Viktor Szakats (harbour syenar.net)
|
2013-04-02 02:57 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||||
* config/lang.hb
|
* config/lang.hb
|
||||||
+ include project name in screen output
|
+ include project name in screen output
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/hbmk2
|
#!/usr/bin/hbmk2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 3rdpatch - a tool to help update 3rd party components while keeping local fixes
|
* 3rdpatch - a tool to help update 3rd party components while keeping local fixes
|
||||||
*
|
*
|
||||||
|
|||||||
382
bin/check.hb
Normal file
382
bin/check.hb
Normal file
@@ -0,0 +1,382 @@
|
|||||||
|
#!/usr/bin/hbmk2
|
||||||
|
/*
|
||||||
|
* Harbour Project source code:
|
||||||
|
* Various validations of filenames and file content, meant to be
|
||||||
|
* run before committing to repository.
|
||||||
|
*
|
||||||
|
* Copyright 2013 Viktor Szakats (harbour syenar.net)
|
||||||
|
* www - http://harbour-project.org
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||||
|
* their web site at http://www.gnu.org/).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma -w3
|
||||||
|
#pragma -km+
|
||||||
|
#pragma -ko+
|
||||||
|
|
||||||
|
#include "directry.ch"
|
||||||
|
|
||||||
|
FUNCTION CheckFileList( xName )
|
||||||
|
|
||||||
|
LOCAL lPassed := .T.
|
||||||
|
|
||||||
|
LOCAL aErr, s
|
||||||
|
LOCAL file
|
||||||
|
|
||||||
|
IF HB_ISSTRING( xName )
|
||||||
|
xName := { xName }
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
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
|
||||||
|
ENDIF
|
||||||
|
FOR EACH file IN xName
|
||||||
|
IF ! CheckFile( file, @aErr )
|
||||||
|
lPassed := .F.
|
||||||
|
FOR EACH s IN aErr
|
||||||
|
OutStd( file + ": " + s + hb_eol() )
|
||||||
|
NEXT
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
RETURN lPassed
|
||||||
|
|
||||||
|
STATIC FUNCTION CheckFile( cName, /* @ */ aErr )
|
||||||
|
|
||||||
|
LOCAL cFile
|
||||||
|
LOCAL tmp
|
||||||
|
LOCAL cEOL
|
||||||
|
|
||||||
|
LOCAL aCanBeUpper := { ;
|
||||||
|
"Makefile", ;
|
||||||
|
"README.md", ;
|
||||||
|
"COPYING.txt", ;
|
||||||
|
"*/RELNOTES.txt", ;
|
||||||
|
"*/HARBOUR_README_*.txt", ;
|
||||||
|
"ChangeLog.txt", ;
|
||||||
|
"*.po", ;
|
||||||
|
"*.md" }
|
||||||
|
|
||||||
|
LOCAL aCanBeDot := { ;
|
||||||
|
".travis.yml", ;
|
||||||
|
".git*" }
|
||||||
|
|
||||||
|
LOCAL aCanBeLong := { ;
|
||||||
|
"ChangeLog.txt", ;
|
||||||
|
".git*", ;
|
||||||
|
"*.po", ;
|
||||||
|
"*.md", ;
|
||||||
|
"*.html", ;
|
||||||
|
"*/hb-charmap.def", ; /* TOFIX: Use 8.3 name */
|
||||||
|
"package/*", ;
|
||||||
|
"*/3rd/*", ;
|
||||||
|
"contrib/hbwin/*", ;
|
||||||
|
"contrib/rddads/unixutils.h", ;
|
||||||
|
"extras/httpsrv/*" }
|
||||||
|
|
||||||
|
LOCAL aCanHaveTab := { ;
|
||||||
|
"Makefile", ;
|
||||||
|
"*.mk", ;
|
||||||
|
"*.yyc", ;
|
||||||
|
"*.dif", ;
|
||||||
|
"*.xml", ;
|
||||||
|
"*.css" }
|
||||||
|
|
||||||
|
LOCAL aCanHaveSpaceAtEol := { ;
|
||||||
|
"*.dif", ;
|
||||||
|
"*.md" }
|
||||||
|
|
||||||
|
LOCAL aCanHaveAnyEncoding := { ;
|
||||||
|
"*.dif", ;
|
||||||
|
"contrib/hbmisc/tests/sample.txt", ; /* TOFIX: Not Unicode compatible component */
|
||||||
|
"contrib/hbhpdf/tests/files/*.txt" }
|
||||||
|
|
||||||
|
LOCAL aForcedCRLF := { ;
|
||||||
|
"*.bat" }
|
||||||
|
|
||||||
|
LOCAL aForcedLF := { ;
|
||||||
|
"*.sh" }
|
||||||
|
|
||||||
|
cName := hb_DirSepToOS( cName )
|
||||||
|
cFile := hb_MemoRead( cName )
|
||||||
|
|
||||||
|
aErr := {}
|
||||||
|
|
||||||
|
/* filename checks */
|
||||||
|
|
||||||
|
IF ! FNameExc( cName, LoadGitIgnore() )
|
||||||
|
|
||||||
|
IF ( Len( hb_FNameName( cName ) ) > 8 .OR. Len( hb_FNameExt( cName ) ) > 4 ) .AND. ! FNameExc( cName, aCanBeLong )
|
||||||
|
AAdd( aErr, "filename: non-8.3" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF Left( hb_FNameName( cName ), 1 ) == "." .AND. ! FNameExc( cName, aCanBeDot )
|
||||||
|
AAdd( aErr, "filename: non MS-DOS compatible" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF !( cName == Lower( cName ) ) .AND. ! FNameExc( cName, aCanBeUpper )
|
||||||
|
AAdd( aErr, "filename: non-lowercase" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF ! IsASCII7( cName )
|
||||||
|
AAdd( aErr, "filename: non-ASCII-7" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF IsBinary( cFile )
|
||||||
|
IF .F.
|
||||||
|
IF hb_FNameExt( cFile ) == ".png"
|
||||||
|
OutStd( cFile + ": " + "content: optimizing" + hb_eol() )
|
||||||
|
hb_run( "optipng " + cFile )
|
||||||
|
ENDIF
|
||||||
|
ENDIF
|
||||||
|
ELSE
|
||||||
|
|
||||||
|
IF hb_FileMatch( cName, "ChangeLog.txt" ) .AND. Len( cFile ) > 32768
|
||||||
|
cFile := Left( cFile, 16384 ) + Right( cFile, 16384 )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
/* text content checks */
|
||||||
|
|
||||||
|
IF ! FNameExc( cName, aCanHaveTab ) .AND. e"\t" $ cFile
|
||||||
|
AAdd( aErr, "content: has tab" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF hb_BLeft( cFile, Len( UTF8_BOM() ) ) == UTF8_BOM()
|
||||||
|
AAdd( aErr, "content: has BOM" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF ! FNameExc( cName, aCanHaveSpaceAtEol ) .AND. EndingWhitespace( cFile )
|
||||||
|
AAdd( aErr, "content: has ending whitespace" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF Right( cFile, 1 ) == Chr( 26 )
|
||||||
|
AAdd( aErr, "content: has legacy EOF char" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
cEOL := EOLDetect( cFile )
|
||||||
|
|
||||||
|
IF Len( cEOL ) == 0
|
||||||
|
AAdd( aErr, "content: has mixed EOL types" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF FNameExc( cName, aForcedCRLF ) .AND. !( cEOL == Chr( 13 ) + Chr( 10 ) )
|
||||||
|
AAdd( aErr, "content: must use CRLF EOL for file type" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF FNameExc( cName, aForcedLF ) .AND. !( cEOL == Chr( 10 ) )
|
||||||
|
AAdd( aErr, "content: must use LF EOL for file type" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF !( Right( cFile, Len( hb_eol() ) ) == hb_eol() ) .AND. ;
|
||||||
|
!( Right( cFile, Len( e"\n" ) ) == e"\n" )
|
||||||
|
AAdd( aErr, "content: has no EOL at EOF" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF Right( cFile, 2 * Len( hb_eol() ) ) == Replicate( hb_eol(), 2 )
|
||||||
|
AAdd( aErr, "content: has multiple EOL at EOF" )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF ! FNameExc( cName, aCanHaveAnyEncoding )
|
||||||
|
tmp := -1
|
||||||
|
IF ! IsASCII7( cFile, @tmp ) .AND. ! IsUTF8( cFile )
|
||||||
|
AAdd( aErr, "content: is non-UTF-8/ASCII-7: " + hb_ntos( tmp ) )
|
||||||
|
ENDIF
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF "$" + "Id" $ cFile .AND. ! hb_FileMatch( cName, "ChangeLog.txt" )
|
||||||
|
AAdd( aErr, "content: has " + "$" + "Id" )
|
||||||
|
ENDIF
|
||||||
|
ENDIF
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
RETURN Empty( aErr )
|
||||||
|
|
||||||
|
STATIC FUNCTION IsBinary( cFile )
|
||||||
|
RETURN Chr( 0 ) $ cFile .OR. !( Chr( 10 ) $ cFile )
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright (c) 1996 Eugene Roshal
|
||||||
|
Copyright (c) 2000 Far Group
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
3. The name of the authors may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
STATIC FUNCTION IsUTF8( cString )
|
||||||
|
|
||||||
|
LOCAL lASCII := .T.
|
||||||
|
LOCAL nOctets := 0
|
||||||
|
LOCAL nChar
|
||||||
|
LOCAL tmp
|
||||||
|
|
||||||
|
FOR EACH tmp IN cString
|
||||||
|
|
||||||
|
nChar := hb_BCode( tmp )
|
||||||
|
|
||||||
|
IF hb_bitAnd( nChar, 0x80 ) != 0
|
||||||
|
lASCII := .F.
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF nOctets != 0
|
||||||
|
|
||||||
|
IF hb_bitAnd( nChar, 0xC0 ) != 0x80
|
||||||
|
RETURN .F.
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
--nOctets
|
||||||
|
|
||||||
|
ELSEIF hb_bitAnd( nChar, 0x80 ) != 0
|
||||||
|
|
||||||
|
DO WHILE hb_bitAnd( nChar, 0x80 ) != 0
|
||||||
|
nChar := hb_bitAnd( hb_bitShift( nChar, 1 ), 0xFF )
|
||||||
|
++nOctets
|
||||||
|
ENDDO
|
||||||
|
|
||||||
|
--nOctets
|
||||||
|
|
||||||
|
IF nOctets == 0
|
||||||
|
RETURN .F.
|
||||||
|
ENDIF
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
RETURN !( nOctets > 0 .OR. lASCII )
|
||||||
|
|
||||||
|
STATIC FUNCTION IsASCII7( cString, /* @ */ nChar )
|
||||||
|
|
||||||
|
LOCAL tmp
|
||||||
|
|
||||||
|
FOR EACH tmp IN cString
|
||||||
|
nChar := hb_BCode( tmp )
|
||||||
|
IF ( nChar < 32 .OR. nChar > 126 ) .AND. ;
|
||||||
|
nChar != 10 .AND. nChar != 13 .AND. nChar != 9 .AND. nChar != 12
|
||||||
|
RETURN .F.
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
RETURN .T.
|
||||||
|
|
||||||
|
STATIC FUNCTION EOLDetect( cFile )
|
||||||
|
|
||||||
|
LOCAL nCR := 0
|
||||||
|
LOCAL nLF := 0
|
||||||
|
LOCAL tmp
|
||||||
|
|
||||||
|
FOR EACH tmp IN cFile
|
||||||
|
IF tmp == Chr( 13 )
|
||||||
|
++nCR
|
||||||
|
ELSEIF tmp == Chr( 10 )
|
||||||
|
++nLF
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
IF nCR > 0 .AND. nLF == 0
|
||||||
|
RETURN Chr( 13 )
|
||||||
|
ELSEIF nCR == 0 .AND. nLF > 0
|
||||||
|
RETURN Chr( 10 )
|
||||||
|
ELSEIF nCR == nLF
|
||||||
|
RETURN Chr( 13 ) + Chr( 10 )
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
RETURN ""
|
||||||
|
|
||||||
|
STATIC FUNCTION EndingWhitespace( cFile )
|
||||||
|
|
||||||
|
LOCAL cLine
|
||||||
|
|
||||||
|
FOR EACH cLine IN hb_ATokens( StrTran( cFile, Chr( 13 ) ), Chr( 10 ) )
|
||||||
|
IF Right( cLine, 1 ) == " "
|
||||||
|
RETURN .T.
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
RETURN .F.
|
||||||
|
|
||||||
|
STATIC FUNCTION FNameExc( cName, aList )
|
||||||
|
|
||||||
|
LOCAL tmp, tmp1
|
||||||
|
|
||||||
|
FOR EACH tmp IN aList
|
||||||
|
IF !( Left( tmp, 1 ) == "!" ) .AND. hb_FileMatch( cName, hb_DirSepToOS( tmp ) )
|
||||||
|
FOR EACH tmp1 IN aList
|
||||||
|
IF Left( tmp1, 1 ) == "!" .AND. hb_FileMatch( cName, hb_DirSepToOS( SubStr( tmp1, 2 ) ) )
|
||||||
|
RETURN .F.
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
RETURN .T.
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
RETURN .F.
|
||||||
|
|
||||||
|
STATIC FUNCTION UTF8_BOM()
|
||||||
|
RETURN ;
|
||||||
|
hb_BChar( 0xEF ) + ;
|
||||||
|
hb_BChar( 0xBB ) + ;
|
||||||
|
hb_BChar( 0xBF )
|
||||||
|
|
||||||
|
STATIC FUNCTION LoadGitIgnore()
|
||||||
|
|
||||||
|
THREAD STATIC s_aIgnore := NIL
|
||||||
|
|
||||||
|
LOCAL cLine
|
||||||
|
|
||||||
|
IF s_aIgnore == NIL
|
||||||
|
s_aIgnore := { "*/3rd/*" }
|
||||||
|
FOR EACH cLine IN hb_ATokens( StrTran( hb_MemoRead( ".gitignore" ), Chr( 13 ) ), Chr( 10 ) )
|
||||||
|
IF ! Empty( cLine ) .AND. !( Left( cLine, 1 ) == "#" )
|
||||||
|
/* TODO: clean this */
|
||||||
|
AAdd( s_aIgnore, ;
|
||||||
|
iif( Left( cLine, 1 ) $ "?*/!", "", "*/" ) + ;
|
||||||
|
cLine + ;
|
||||||
|
iif( Right( cLine, 1 ) == "/", "*", ;
|
||||||
|
iif( Empty( hb_FNameExt( cLine ) ) .AND. !( Right( cLine, 2 ) == "*/" ), "/*", "" ) ) )
|
||||||
|
IF !( ATail( s_aIgnore ) == cLine )
|
||||||
|
IF Left( ATail( s_aIgnore ), 2 ) == "*/"
|
||||||
|
AAdd( s_aIgnore, SubStr( ATail( s_aIgnore ), 3 ) )
|
||||||
|
ENDIF
|
||||||
|
AAdd( s_aIgnore, cLine )
|
||||||
|
ENDIF
|
||||||
|
ENDIF
|
||||||
|
NEXT
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
RETURN s_aIgnore
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/hbmk2
|
||||||
/*
|
/*
|
||||||
* Harbour Project source code:
|
* Harbour Project source code:
|
||||||
* Commit preparer
|
* Commit preparer
|
||||||
@@ -33,7 +34,8 @@ PROCEDURE Main()
|
|||||||
|
|
||||||
LOCAL cVCS := VCSDetect()
|
LOCAL cVCS := VCSDetect()
|
||||||
|
|
||||||
LOCAL aChanges := DoctorChanges( cVCS, Changes( cVCS ) )
|
LOCAL aFiles := {}
|
||||||
|
LOCAL aChanges := DoctorChanges( cVCS, Changes( cVCS ), aFiles )
|
||||||
LOCAL cLog
|
LOCAL cLog
|
||||||
LOCAL cLogNew
|
LOCAL cLogNew
|
||||||
LOCAL cLine
|
LOCAL cLine
|
||||||
@@ -45,7 +47,7 @@ PROCEDURE Main()
|
|||||||
LOCAL cLogName
|
LOCAL cLogName
|
||||||
|
|
||||||
IF Empty( aChanges )
|
IF Empty( aChanges )
|
||||||
OutStd( hb_ProgName() + ": no changes" + hb_eol() )
|
OutStd( hb_ProgName() + ": " + "no changes" + hb_eol() )
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
@@ -80,28 +82,35 @@ PROCEDURE Main()
|
|||||||
|
|
||||||
IF ! hb_FileExists( cLogName := "ChangeLog.txt" )
|
IF ! hb_FileExists( cLogName := "ChangeLog.txt" )
|
||||||
IF ! hb_FileExists( cLogName := "ChangeLog" )
|
IF ! hb_FileExists( cLogName := "ChangeLog" )
|
||||||
OutStd( hb_ProgName() + ": can't find ChangeLog file" + hb_eol() )
|
OutStd( hb_ProgName() + ": " + "can't find ChangeLog file" + hb_eol() )
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
cLog := MemoRead( cLogName )
|
IF CheckFileList( aFiles )
|
||||||
cOldLang := hb_cdpSelect( "EN" )
|
|
||||||
cHit := hb_AtX( "\n[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9] UTC[\-+][0-1][0-9][0-5][0-9] ", cLog )
|
|
||||||
IF Empty( cHit )
|
|
||||||
cHit := ""
|
|
||||||
ENDIF
|
|
||||||
hb_cdpSelect( cOldLang )
|
|
||||||
|
|
||||||
nPos := At( AllTrim( cHit ), cLog )
|
cLog := MemoRead( cLogName )
|
||||||
IF nPos > 0
|
cOldLang := hb_cdpSelect( "EN" )
|
||||||
cLog := Left( cLog, nPos - 1 ) + cLogNew + hb_eol() + SubStr( cLog, nPos )
|
cHit := hb_AtX( "\n[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9] UTC[\-+][0-1][0-9][0-5][0-9] ", cLog )
|
||||||
|
IF Empty( cHit )
|
||||||
|
cHit := ""
|
||||||
|
ENDIF
|
||||||
|
hb_cdpSelect( cOldLang )
|
||||||
|
|
||||||
|
nPos := At( AllTrim( cHit ), cLog )
|
||||||
|
IF nPos > 0
|
||||||
|
cLog := Left( cLog, nPos - 1 ) + cLogNew + hb_eol() + SubStr( cLog, nPos )
|
||||||
|
ELSE
|
||||||
|
cLog += hb_eol() + cLogNew
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
hb_MemoWrit( cLogName, cLog )
|
||||||
|
|
||||||
|
OutStd( hb_ProgName() + ": " + hb_StrFormat( "Edit %1$s and commit", cLogName ) + hb_eol() )
|
||||||
ELSE
|
ELSE
|
||||||
cLog += hb_eol() + cLogNew
|
OutStd( hb_ProgName() + ": " + "Please correct errors listed above and re-run" + hb_eol() )
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
hb_MemoWrit( cLogName, cLog )
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
STATIC FUNCTION VCSDetect()
|
STATIC FUNCTION VCSDetect()
|
||||||
@@ -113,7 +122,7 @@ STATIC FUNCTION VCSDetect()
|
|||||||
|
|
||||||
RETURN ""
|
RETURN ""
|
||||||
|
|
||||||
STATIC FUNCTION DoctorChanges( cVCS, aChanges )
|
STATIC FUNCTION DoctorChanges( cVCS, aChanges, aFiles )
|
||||||
|
|
||||||
LOCAL cLine
|
LOCAL cLine
|
||||||
LOCAL cStart
|
LOCAL cStart
|
||||||
@@ -146,6 +155,7 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges )
|
|||||||
ENDSWITCH
|
ENDSWITCH
|
||||||
IF ! Empty( cStart )
|
IF ! Empty( cStart )
|
||||||
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 8 + 1 ), "\", "/" ) )
|
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 8 + 1 ), "\", "/" ) )
|
||||||
|
AAdd( aFiles, SubStr( cLine, 8 + 1 ) )
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
NEXT
|
NEXT
|
||||||
@@ -181,6 +191,7 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges )
|
|||||||
ENDSWITCH
|
ENDSWITCH
|
||||||
IF ! Empty( cStart )
|
IF ! Empty( cStart )
|
||||||
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 3 + 1 ), "\", "/" ) )
|
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 3 + 1 ), "\", "/" ) )
|
||||||
|
AAdd( aFiles, SubStr( cLine, 3 + 1 ) )
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
NEXT
|
NEXT
|
||||||
@@ -239,3 +250,5 @@ STATIC FUNCTION GitUser()
|
|||||||
RETURN hb_StrFormat( "%s (%s)", ;
|
RETURN hb_StrFormat( "%s (%s)", ;
|
||||||
AllTrim( hb_StrReplace( cName, Chr( 10 ) + Chr( 13 ), "" ) ), ;
|
AllTrim( hb_StrReplace( cName, Chr( 10 ) + Chr( 13 ), "" ) ), ;
|
||||||
StrTran( AllTrim( hb_StrReplace( cEMail, Chr( 10 ) + Chr( 13 ), "" ) ), "@", " " ) )
|
StrTran( AllTrim( hb_StrReplace( cEMail, Chr( 10 ) + Chr( 13 ), "" ) ), "@", " " ) )
|
||||||
|
|
||||||
|
#include "check.hb"
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ PROCEDURE Main( ... )
|
|||||||
/* public Harbour scripts */
|
/* public Harbour scripts */
|
||||||
FOR EACH tmp IN { ;
|
FOR EACH tmp IN { ;
|
||||||
"bin/3rdpatch.hb", ;
|
"bin/3rdpatch.hb", ;
|
||||||
|
"bin/commit.hb", ;
|
||||||
|
"bin/check.hb", ;
|
||||||
"bin/harbour.ucf" }
|
"bin/harbour.ucf" }
|
||||||
mk_hb_FCopy( tmp, GetEnvC( "HB_INSTALL_BIN" ) + hb_ps() )
|
mk_hb_FCopy( tmp, GetEnvC( "HB_INSTALL_BIN" ) + hb_ps() )
|
||||||
NEXT
|
NEXT
|
||||||
|
|||||||
@@ -235,4 +235,3 @@ HB_FUNC( CAIRO_TEXT_PATH )
|
|||||||
hb_strfree( hText );
|
hb_strfree( hText );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,4 +71,3 @@ HB_FUNC( CAIRO_SURFACE_WRITE_TO_PNG )
|
|||||||
hb_retni( -1 ); /* There is no good CAIRO_STATUS_* for this */
|
hb_retni( -1 ); /* There is no good CAIRO_STATUS_* for this */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,4 +66,3 @@ HB_FUNC( CAIRO_VERSION_STRING )
|
|||||||
{
|
{
|
||||||
hb_retc( cairo_version_string() );
|
hb_retc( cairo_version_string() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
(こんにちは。)
|
(こんにちは。)
|
||||||
(おはようございます。)
|
(おはようございます。)
|
||||||
(こんばんは。)
|
(こんばんは。)
|
||||||
(はじめまして、どうぞよろしく。)
|
(はじめまして、どうぞよろしく。)
|
||||||
|
|||||||
@@ -7,4 +7,4 @@
|
|||||||
再见!
|
再见!
|
||||||
身体好吗?
|
身体好吗?
|
||||||
好久不见!
|
好久不见!
|
||||||
打扰了。<EFBFBD>
|
打扰了。<EFBFBD>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
(こんにちは。)
|
(こんにちは。)
|
||||||
(おはようございます。)
|
(おはようございます。)
|
||||||
(こんばんは。)
|
(こんばんは。)
|
||||||
(はじめまして、どうぞよろしく。)
|
(はじめまして、どうぞよろしく。)
|
||||||
|
|||||||
@@ -11,4 +11,4 @@
|
|||||||
<tr><td>Repeat password</td><td><input type="password" name="password2" value=""></td></tr>
|
<tr><td>Repeat password</td><td><input type="password" name="password2" value=""></td></tr>
|
||||||
<tr><td> </td><td><input type="submit" name="save" value="Save"></td></tr>
|
<tr><td> </td><td><input type="submit" name="save" value="Save"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -9,4 +9,4 @@
|
|||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<p>
|
<p>
|
||||||
<a href="/app/register">Create new account</a>
|
<a href="/app/register">Create new account</a>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{extend _main}}
|
{{extend _main}}
|
||||||
<a href="/app/login">Login</a>
|
<a href="/app/login">Login</a>
|
||||||
<hr>
|
<hr>
|
||||||
Thank, You, for using uhttpd.
|
Thank, You, for using uhttpd.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{extend _main}}
|
{{extend _main}}
|
||||||
<a href="/app/shopping">Shopping</a> | <a href="/app/cart">Cart</a> | <a href="/app/account">My account</a> | <a href="/app/logout">Logout</a>
|
<a href="/app/shopping">Shopping</a> | <a href="/app/cart">Cart</a> | <a href="/app/account">My account</a> | <a href="/app/logout">Logout</a>
|
||||||
<hr>
|
<hr>
|
||||||
You can do shopping, or edit your cart using menu links above
|
You can do shopping, or edit your cart using menu links above
|
||||||
|
|||||||
@@ -11,4 +11,4 @@
|
|||||||
<tr><td>Repeat password</td><td><input type="password" name="password2" value=""></td></tr>
|
<tr><td>Repeat password</td><td><input type="password" name="password2" value=""></td></tr>
|
||||||
<tr><td> </td><td><input type="submit" name="register" value="Create new account"></td></tr>
|
<tr><td> </td><td><input type="submit" name="register" value="Create new account"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -49,4 +49,3 @@ If you find a bug or write some new code for this project, pretty please send
|
|||||||
me email with it.
|
me email with it.
|
||||||
|
|
||||||
- Dan Levitt <dan@boba-fett.net>
|
- Dan Levitt <dan@boba-fett.net>
|
||||||
|
|
||||||
|
|||||||
@@ -1440,12 +1440,12 @@ FUNCTION AWords( cLine )
|
|||||||
DO WHILE z <= nSize
|
DO WHILE z <= nSize
|
||||||
z++
|
z++
|
||||||
y := Asc( SubStr( cLine, z, 1 ) )
|
y := Asc( SubStr( cLine, z, 1 ) )
|
||||||
IF y >= Asc( "0" ) .AND. ! Chr( y ) $ ":;<=>?@[\^]_`{|}~"
|
IF y >= Asc( "0" ) .AND. ! Chr( y ) $ ":;<=>?@[\^]_`{|}~" + Chr( 127 )
|
||||||
nOffset := z
|
nOffset := z
|
||||||
cWord := Chr( y )
|
cWord := Chr( y )
|
||||||
z++
|
z++
|
||||||
y := Asc( SubStr( cLine, z, 1 ) )
|
y := Asc( SubStr( cLine, z, 1 ) )
|
||||||
WHILE ( y >= Asc( "0" ) .AND. ! Chr( y ) $ ":;<=>?@[\^]_`{|}~" ) .OR. y == "'"
|
WHILE ( y >= Asc( "0" ) .AND. ! Chr( y ) $ ":;<=>?@[\^]_`{|}~" + Chr( 127 ) ) .OR. y == "'"
|
||||||
cWord += Chr( y )
|
cWord += Chr( y )
|
||||||
z++
|
z++
|
||||||
IF z > nSize
|
IF z > nSize
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ PROCEDURE Main()
|
|||||||
ELSE
|
ELSE
|
||||||
|
|
||||||
// Sets the metahtml file
|
// Sets the metahtml file
|
||||||
oHTML:SetHTMLFile( "C:\inetpub\wwwroot\guestbk.htm" )
|
oHTML:SetHTMLFile( "C:\inetpub\wwwroot\guestbk.html" )
|
||||||
|
|
||||||
// Retrieves odd and even entries color
|
// Retrieves odd and even entries color
|
||||||
cOddColor := oIni:ReadString( "Header", "OddColor", "#FFFFFF" )
|
cOddColor := oIni:ReadString( "Header", "OddColor", "#FFFFFF" )
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ Felipe Coury <fcoury@flexsys-ci.com>
|
|||||||
|
|
||||||
How to create and test the Harbour Guestbook
|
How to create and test the Harbour Guestbook
|
||||||
|
|
||||||
You'll find guestbk.prg and guestbk.htm files.
|
You'll find guestbk.prg and guestbk.html files.
|
||||||
To build the executable, review guestbk.prg and
|
To build the executable, review guestbk.prg and
|
||||||
check the directories for locating guestbk.ini
|
check the directories for locating guestbk.ini
|
||||||
and guestbk.htm correctly.
|
and guestbk.html correctly.
|
||||||
|
|
||||||
With that done, build it using hbmk2. Put the
|
With that done, build it using hbmk2. Put the resulting
|
||||||
resulting .exe, the .exe and .htm files on a script-
|
executable and .html files on a script-enabled directory
|
||||||
enabled directory and call guestbk.exe via WebBrowser.
|
and call guestbk executable via WebBrowser.
|
||||||
|
|
||||||
The best thing about this guestbook is its highly
|
The best thing about this guestbook is its highly
|
||||||
configurable architecture. Please review guestbk.ini
|
configurable architecture. Please review guestbk.ini
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ _genbase.prg
|
|||||||
_genhtml.prg
|
_genhtml.prg
|
||||||
_gentxt.prg
|
_gentxt.prg
|
||||||
_genxml.prg
|
_genxml.prg
|
||||||
_tmplates.prg
|
_tmplate.prg
|
||||||
|
|
||||||
# NOTE: hbdoc doesn't work from other locations than
|
# NOTE: hbdoc doesn't work from other locations than
|
||||||
# the current one, so we don't install it yet.
|
# the current one, so we don't install it yet.
|
||||||
|
|||||||
@@ -1147,7 +1147,7 @@ FUNCTION Filename( cFile, cFormat, nLength )
|
|||||||
RETURN cResult
|
RETURN cResult
|
||||||
|
|
||||||
#if defined( __HBSCRIPT__HBSHELL )
|
#if defined( __HBSCRIPT__HBSHELL )
|
||||||
SET PROCEDURE TO "_tmplates.prg"
|
SET PROCEDURE TO "_tmplate.prg"
|
||||||
SET PROCEDURE TO "_genbase.prg"
|
SET PROCEDURE TO "_genbase.prg"
|
||||||
SET PROCEDURE TO "_gentxt.prg"
|
SET PROCEDURE TO "_gentxt.prg"
|
||||||
SET PROCEDURE TO "_genhtml.prg"
|
SET PROCEDURE TO "_genhtml.prg"
|
||||||
|
|||||||
@@ -62,4 +62,3 @@
|
|||||||
#include "fm.api"
|
#include "fm.api"
|
||||||
|
|
||||||
#endif /* HB_EXTEND_H_ */
|
#endif /* HB_EXTEND_H_ */
|
||||||
|
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
If accented characters need special sorting ( HB_CDP_ACSORT_EQUAL or
|
If accented characters need special sorting ( HB_CDP_ACSORT_EQUAL or
|
||||||
HB_CDP_ACSORT_INTERLEAVE ) then you need to mark the accented characters
|
HB_CDP_ACSORT_INTERLEAVE ) then you need to mark the accented characters
|
||||||
with the symbol '~' before each of them, for example:
|
with the symbol '~' before each of them, for example:
|
||||||
a~€
|
a~Ç
|
||||||
If there is two-character sequence, which is considered as one, it should
|
If there is two-character sequence, which is considered as one, it should
|
||||||
be marked with '.' before and after it, for example:
|
be marked with '.' before and after it, for example:
|
||||||
... h.ch.i ...
|
... h.ch.i ...
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ static int hb_pp_generateVerInfo( char * szVerFile, int iRevID, char * szChangeL
|
|||||||
{
|
{
|
||||||
char * pszEscaped;
|
char * pszEscaped;
|
||||||
|
|
||||||
fprintf( fout, "/*\n * $" "Id" "$\n */\n\n/*\n"
|
fprintf( fout, "/*\n"
|
||||||
" * Harbour Project source code:\n"
|
" * Harbour Project source code:\n"
|
||||||
" * Version information and build time switches.\n"
|
" * Version information and build time switches.\n"
|
||||||
" *\n"
|
" *\n"
|
||||||
@@ -528,7 +528,7 @@ static int hb_pp_parseChangelog( PHB_PP_STATE pState, const char * pszFileName,
|
|||||||
|
|
||||||
if( ! *szId )
|
if( ! *szId )
|
||||||
{
|
{
|
||||||
szFrom = strstr( szLine, "$Id" );
|
szFrom = strstr( szLine, "$" "Id" );
|
||||||
if( szFrom )
|
if( szFrom )
|
||||||
{
|
{
|
||||||
szFrom += 3;
|
szFrom += 3;
|
||||||
@@ -569,7 +569,7 @@ static int hb_pp_parseChangelog( PHB_PP_STATE pState, const char * pszFileName,
|
|||||||
if( ! *szLog )
|
if( ! *szLog )
|
||||||
{
|
{
|
||||||
if( iQuiet < 2 )
|
if( iQuiet < 2 )
|
||||||
fprintf( stderr, "Cannot find valid $Id entry in the %s file.\n", pszFileName );
|
fprintf( stderr, "Cannot find valid $" "Id entry in the %s file.\n", pszFileName );
|
||||||
iResult = 1;
|
iResult = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -21,13 +21,13 @@
|
|||||||
# + = add, - = sub, | = or, & = and, ^ = xor
|
# + = add, - = sub, | = or, & = and, ^ = xor
|
||||||
#
|
#
|
||||||
# values:
|
# values:
|
||||||
# [0-9]+ = decim value
|
# [0-9]+ = decim value
|
||||||
# 0x[0-9A-Fa-f]+ = hex value
|
# 0x[0-9A-Fa-f]+ = hex value
|
||||||
# '[.]+' = alpha value
|
# '[.]+' = alpha value
|
||||||
#
|
#
|
||||||
# example:
|
# example:
|
||||||
# 'A'-'Z': *|0x20 1
|
# 'A'-'Z': *|0x20 1
|
||||||
# makes all output chars lower
|
# makes all output chars lower
|
||||||
#
|
#
|
||||||
# Harbour program is looking for this file in $HB_CHARMAP,
|
# Harbour program is looking for this file in $HB_CHARMAP,
|
||||||
# $HB_ROOT/etc/harbour/hb-charmap.def, /etc/harbour/hb-charmap.def
|
# $HB_ROOT/etc/harbour/hb-charmap.def, /etc/harbour/hb-charmap.def
|
||||||
@@ -40,22 +40,22 @@
|
|||||||
# initialization
|
# initialization
|
||||||
#
|
#
|
||||||
# default:
|
# default:
|
||||||
# 0-127: * 1
|
# 0-127: * 1
|
||||||
# 128-255: * 0
|
# 128-255: * 0
|
||||||
#
|
#
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
:linux|fslinux|console|vt100|vt102|vt320 = Linux system console and VT terms
|
:linux|fslinux|console|vt100|vt102|vt320 = Linux system console and VT terms
|
||||||
0-31: '.' 1
|
0-31: '.' 1
|
||||||
127: '.' 1
|
127: '.' 1
|
||||||
04: '`' 5 # ACS_DIAMOND
|
04: '`' 5 # ACS_DIAMOND
|
||||||
16: '+' 5 # ACS_RARROW
|
16: '+' 5 # ACS_RARROW
|
||||||
17: ',' 5 # ACS_LARROW
|
17: ',' 5 # ACS_LARROW
|
||||||
24: '-' 5 # ACS_UARROW
|
24: '-' 5 # ACS_UARROW
|
||||||
25: '.' 5 # ACS_DARROW
|
25: '.' 5 # ACS_DARROW
|
||||||
26: '+' 5 # ACS_RARROW
|
26: '+' 5 # ACS_RARROW
|
||||||
27: ',' 5 # ACS_LARROW
|
27: ',' 5 # ACS_LARROW
|
||||||
30: '-' 5 # ACS_UARROW
|
30: '-' 5 # ACS_UARROW
|
||||||
31: '.' 5 # ACS_DARROW
|
31: '.' 5 # ACS_DARROW
|
||||||
128-255: * 2
|
128-255: * 2
|
||||||
155: '.' 1
|
155: '.' 1
|
||||||
# @acsc # include acsc section
|
# @acsc # include acsc section
|
||||||
@@ -86,63 +86,63 @@
|
|||||||
@acsc # include acsc section
|
@acsc # include acsc section
|
||||||
|
|
||||||
:acsc = display semigraphics chars as ACSC ones
|
:acsc = display semigraphics chars as ACSC ones
|
||||||
04: '`' 5 # ACS_DIAMOND
|
04: '`' 5 # ACS_DIAMOND
|
||||||
16: '+' 5 # ACS_RARROW
|
16: '+' 5 # ACS_RARROW
|
||||||
17: ',' 5 # ACS_LARROW
|
17: ',' 5 # ACS_LARROW
|
||||||
24: '-' 5 # ACS_UARROW
|
24: '-' 5 # ACS_UARROW
|
||||||
25: '.' 5 # ACS_DARROW
|
25: '.' 5 # ACS_DARROW
|
||||||
26: '+' 5 # ACS_RARROW
|
26: '+' 5 # ACS_RARROW
|
||||||
27: ',' 5 # ACS_LARROW
|
27: ',' 5 # ACS_LARROW
|
||||||
30: '-' 5 # ACS_UARROW
|
30: '-' 5 # ACS_UARROW
|
||||||
31: '.' 5 # ACS_DARROW
|
31: '.' 5 # ACS_DARROW
|
||||||
176: 104 5 # ACS_BOARD
|
176: 104 5 # ACS_BOARD
|
||||||
177: 97 5 # ACS_CKBOARD
|
177: 97 5 # ACS_CKBOARD
|
||||||
178: 48 5 # ACS_BLOCK
|
178: 48 5 # ACS_BLOCK
|
||||||
179: 120 5 # ACS_VLINE
|
179: 120 5 # ACS_VLINE
|
||||||
180: 117 5 # ACS_RTEE
|
180: 117 5 # ACS_RTEE
|
||||||
181: 117 5 # ACS_RTEE
|
181: 117 5 # ACS_RTEE
|
||||||
182: 117 5 # ACS_RTEE
|
182: 117 5 # ACS_RTEE
|
||||||
183: 107 5 # ACS_URCORNER
|
183: 107 5 # ACS_URCORNER
|
||||||
184: 107 5 # ACS_URCORNER
|
184: 107 5 # ACS_URCORNER
|
||||||
185: 117 5 # ACS_RTEE
|
185: 117 5 # ACS_RTEE
|
||||||
186: 120 5 # ACS_VLINE
|
186: 120 5 # ACS_VLINE
|
||||||
187: 107 5 # ACS_URCORNER
|
187: 107 5 # ACS_URCORNER
|
||||||
188: 106 5 # ACS_LRCORNER
|
188: 106 5 # ACS_LRCORNER
|
||||||
189: 106 5 # ACS_LRCORNER
|
189: 106 5 # ACS_LRCORNER
|
||||||
190: 106 5 # ACS_LRCORNER
|
190: 106 5 # ACS_LRCORNER
|
||||||
191: 107 5 # ACS_URCORNER
|
191: 107 5 # ACS_URCORNER
|
||||||
192: 109 5 # ACS_LLCORNER
|
192: 109 5 # ACS_LLCORNER
|
||||||
193: 118 5 # ACS_BTEE
|
193: 118 5 # ACS_BTEE
|
||||||
194: 119 5 # ACS_TTEE
|
194: 119 5 # ACS_TTEE
|
||||||
195: 116 5 # ACS_LTEE
|
195: 116 5 # ACS_LTEE
|
||||||
196: 113 5 # ACS_HLINE
|
196: 113 5 # ACS_HLINE
|
||||||
197: 110 5 # ACS_PLUS
|
197: 110 5 # ACS_PLUS
|
||||||
198: 116 5 # ACS_LTEE
|
198: 116 5 # ACS_LTEE
|
||||||
199: 116 5 # ACS_LTEE
|
199: 116 5 # ACS_LTEE
|
||||||
200: 109 5 # ACS_LLCORNER
|
200: 109 5 # ACS_LLCORNER
|
||||||
201: 108 5 # ACS_ULCORNER
|
201: 108 5 # ACS_ULCORNER
|
||||||
202: 118 5 # ACS_BTEE
|
202: 118 5 # ACS_BTEE
|
||||||
203: 119 5 # ACS_TTEE
|
203: 119 5 # ACS_TTEE
|
||||||
204: 116 5 # ACS_LTEE
|
204: 116 5 # ACS_LTEE
|
||||||
205: 113 5 # ACS_HLINE
|
205: 113 5 # ACS_HLINE
|
||||||
206: 110 5 # ACS_PLUS
|
206: 110 5 # ACS_PLUS
|
||||||
207: 118 5 # ACS_BTEE
|
207: 118 5 # ACS_BTEE
|
||||||
208: 118 5 # ACS_BTEE
|
208: 118 5 # ACS_BTEE
|
||||||
209: 119 5 # ACS_TTEE
|
209: 119 5 # ACS_TTEE
|
||||||
210: 119 5 # ACS_TTEE
|
210: 119 5 # ACS_TTEE
|
||||||
211: 109 5 # ACS_LLCORNER
|
211: 109 5 # ACS_LLCORNER
|
||||||
212: 109 5 # ACS_LLCORNER
|
212: 109 5 # ACS_LLCORNER
|
||||||
213: 108 5 # ACS_ULCORNER
|
213: 108 5 # ACS_ULCORNER
|
||||||
214: 108 5 # ACS_ULCORNER
|
214: 108 5 # ACS_ULCORNER
|
||||||
215: 110 5 # ACS_PLUS
|
215: 110 5 # ACS_PLUS
|
||||||
216: 110 5 # ACS_PLUS
|
216: 110 5 # ACS_PLUS
|
||||||
217: 106 5 # ACS_LRCORNER
|
217: 106 5 # ACS_LRCORNER
|
||||||
218: 108 5 # ACS_ULCORNER
|
218: 108 5 # ACS_ULCORNER
|
||||||
# 219: 96 5 # ACS_DIAMOND
|
# 219: 96 5 # ACS_DIAMOND
|
||||||
# 220: 96 5 # ACS_DIAMOND
|
# 220: 96 5 # ACS_DIAMOND
|
||||||
# 221: 96 5 # ACS_DIAMOND
|
# 221: 96 5 # ACS_DIAMOND
|
||||||
# 222: 96 5 # ACS_DIAMOND
|
# 222: 96 5 # ACS_DIAMOND
|
||||||
# 223: 96 5 # ACS_DIAMOND
|
# 223: 96 5 # ACS_DIAMOND
|
||||||
|
|
||||||
:maz2iso = mazovia to ISO-8859-2 translation
|
:maz2iso = mazovia to ISO-8859-2 translation
|
||||||
143: 161 1
|
143: 161 1
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ static const CLIPKEYCODE s_stdKeyTab[ CLIP_STDKEY_COUNT ] = {
|
|||||||
{ 124, 299, 28, 0, 0 }, /* '|' */
|
{ 124, 299, 28, 0, 0 }, /* '|' */
|
||||||
{ 125, 283, 29, 0, 0 }, /* '}' */
|
{ 125, 283, 29, 0, 0 }, /* '}' */
|
||||||
{ 126, 297, 297, 0, 0 }, /* '~' */
|
{ 126, 297, 297, 0, 0 }, /* '~' */
|
||||||
{ 127, K_ALT_BS, 127, 0, K_ALT_BS }, /* '' */
|
{ 127, K_ALT_BS, 127, 0, K_ALT_BS }, /* 0x7F */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define EXKEY_F1 ( 0 )
|
#define EXKEY_F1 ( 0 )
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ static LONG WINAPI hb_winExceptionHandler( struct _EXCEPTION_POINTERS * pExcepti
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hb_errInternalRaw( 6005, "Exception error: %s", errmsg, NULL );
|
hb_errInternalRaw( 6005, "Exception error:%s", errmsg, NULL );
|
||||||
|
|
||||||
return hb_cmdargCheck( "BATCH" ) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
|
return hb_cmdargCheck( "BATCH" ) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,30 +21,30 @@ these characters are mapped to U+FFFD REPLACEMENT CHARACTER in BIG5.TXT:
|
|||||||
0xA2CE HANGZHOU NUMERAL THIRTY conflicts with A4CA mapping
|
0xA2CE HANGZHOU NUMERAL THIRTY conflicts with A4CA mapping
|
||||||
|
|
||||||
duplicated character has the following mapping in BIG5.TXT:
|
duplicated character has the following mapping in BIG5.TXT:
|
||||||
0xA1C4 0xFF3F # FULLWIDTH LOW LINE
|
0xA1C4 0xFF3F # FULLWIDTH LOW LINE
|
||||||
0xA2AC 0x2571 # BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
|
0xA2AC 0x2571 # BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
|
||||||
0xA2AD 0x2572 # BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
|
0xA2AD 0x2572 # BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
|
||||||
0xA451 0x5341 # <CJK>
|
0xA451 0x5341 # <CJK>
|
||||||
0xA4CA 0x5345 # <CJK>
|
0xA4CA 0x5345 # <CJK>
|
||||||
|
|
||||||
|
|
||||||
# iconv using the following mapping for them:
|
# iconv using the following mapping for them:
|
||||||
0xA15A 0x2574 # BOX DRAWINGS LIGHT LEFT
|
0xA15A 0x2574 # BOX DRAWINGS LIGHT LEFT
|
||||||
0xA1C3 0xFFE3 # FULLWIDTH MACRON
|
0xA1C3 0xFFE3 # FULLWIDTH MACRON
|
||||||
0xA1C5 0x02CD # MODIFIER LETTER LOW MACRON
|
0xA1C5 0x02CD # MODIFIER LETTER LOW MACRON
|
||||||
0xA1FE 0xFF0F # FULLWIDTH SOLIDUS
|
0xA1FE 0xFF0F # FULLWIDTH SOLIDUS
|
||||||
0xA240 0xFF3C # FULLWIDTH REVERSE SOLIDUS
|
0xA240 0xFF3C # FULLWIDTH REVERSE SOLIDUS
|
||||||
0xA2CC 0x5341 # <CJK>
|
0xA2CC 0x5341 # <CJK>
|
||||||
0xA2CE 0x5345 # <CJK>
|
0xA2CE 0x5345 # <CJK>
|
||||||
|
|
||||||
# this seems to be closer mapping:
|
# this seems to be closer mapping:
|
||||||
0xA15A 0xFF3F # FULLWIDTH LOW LINE
|
0xA15A 0xFF3F # FULLWIDTH LOW LINE
|
||||||
0xA1C3 0xFFE3 # FULLWIDTH MACRON
|
0xA1C3 0xFFE3 # FULLWIDTH MACRON
|
||||||
0xA1C5 0x02CD # MODIFIER LETTER LOW MACRON
|
0xA1C5 0x02CD # MODIFIER LETTER LOW MACRON
|
||||||
0xA1FE 0x2571 # BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
|
0xA1FE 0x2571 # BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
|
||||||
0xA240 0x2572 # BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
|
0xA240 0x2572 # BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
|
||||||
0xA2CC 0x5341 # <CJK>
|
0xA2CC 0x5341 # <CJK>
|
||||||
0xA2CE 0x5345 # <CJK>
|
0xA2CE 0x5345 # <CJK>
|
||||||
|
|
||||||
*************************************************************************** */
|
*************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@@ -12,4 +12,3 @@ Today=20121208
|
|||||||
|
|
||||||
[Bool Test]
|
[Bool Test]
|
||||||
True=.T.
|
True=.T.
|
||||||
|
|
||||||
|
|||||||
@@ -12,34 +12,53 @@
|
|||||||
|
|
||||||
#include "hblang.ch"
|
#include "hblang.ch"
|
||||||
|
|
||||||
#define LEFTEQUAL( l, r ) ( Left( l, Len( r ) ) == r )
|
|
||||||
|
|
||||||
PROCEDURE Main()
|
PROCEDURE Main()
|
||||||
|
|
||||||
LOCAL tmp, tmp1
|
LOCAL cLang
|
||||||
LOCAL nCount
|
|
||||||
LOCAL cName
|
FOR EACH cLang IN CoreLangList()
|
||||||
LOCAL cPO
|
hb_MemoWrit( Lower( hb_FNameName( cLang ) ) + ".po", LangToPO( cLang ) )
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
|
||||||
|
STATIC FUNCTION LangToPO( cLang )
|
||||||
|
|
||||||
|
LOCAL nPos := 0
|
||||||
|
LOCAL cPO := Item( "", Meta( cLang ), nPos++ )
|
||||||
|
LOCAL tmp
|
||||||
|
|
||||||
|
FOR tmp := HB_LANG_ITEM_BASE_MONTH TO HB_LANG_ITEM_MAX_ - 1
|
||||||
|
cPO += Item( ;
|
||||||
|
hb_langMessage( tmp, "en" ), ;
|
||||||
|
iif( hb_langMessage( tmp, "en" ) == hb_langMessage( tmp, cLang ), "", hb_langMessage( tmp, cLang ) ), ;
|
||||||
|
nPos++ )
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
RETURN hb_StrShrink( cPO, Len( hb_eol() ) )
|
||||||
|
|
||||||
|
#define LEFTEQUAL( l, r ) ( Left( l, Len( r ) ) == r )
|
||||||
|
|
||||||
|
STATIC FUNCTION CoreLangList()
|
||||||
|
|
||||||
|
LOCAL aList := {}
|
||||||
|
|
||||||
|
LOCAL nCount := __dynsCount()
|
||||||
|
LOCAL cName
|
||||||
|
LOCAL tmp
|
||||||
|
|
||||||
nCount := __dynsCount()
|
|
||||||
FOR tmp := 1 TO nCount
|
FOR tmp := 1 TO nCount
|
||||||
cName := __dynsGetName( tmp )
|
cName := __dynsGetName( tmp )
|
||||||
IF LEFTEQUAL( cName, "HB_LANG_" )
|
IF LEFTEQUAL( cName, "HB_LANG_" )
|
||||||
cName := SubStr( cName, Len( "HB_LANG_" ) + 1 )
|
cName := SubStr( cName, Len( "HB_LANG_" ) + 1 )
|
||||||
IF Len( cName ) != 5 .AND. ;
|
IF Len( cName ) != 5 .AND. ;
|
||||||
! "|" + cName + "|" $ "|RUKOI8|UAKOI8|ZHB5|ZHGB|"
|
! "|" + cName + "|" $ "|RUKOI8|UAKOI8|ZHB5|ZHGB|"
|
||||||
cPO := Item( "", Meta( cName ) )
|
AAdd( aList, cName )
|
||||||
/* TODO: do something with the metadata (position 0 to 5) */
|
|
||||||
FOR tmp1 := HB_LANG_ITEM_BASE_MONTH TO HB_LANG_ITEM_MAX_ - 1
|
|
||||||
cPO += Item( hb_langMessage( tmp1, "en" ), ;
|
|
||||||
iif( hb_langMessage( tmp1, "en" ) == hb_langMessage( tmp1, cName ), "", hb_langMessage( tmp1, cName ) ) )
|
|
||||||
NEXT
|
|
||||||
hb_MemoWrit( Lower( hb_FNameName( cName ) ) + ".po", hb_StrShrink( cPO, Len( hb_eol() ) ) )
|
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
RETURN
|
RETURN aList
|
||||||
|
|
||||||
STATIC FUNCTION Meta( cName )
|
STATIC FUNCTION Meta( cName )
|
||||||
|
|
||||||
@@ -54,7 +73,7 @@ STATIC FUNCTION Meta( cName )
|
|||||||
/* NOTE: workaround for Harbour not retaining definition order of hash literals */
|
/* NOTE: workaround for Harbour not retaining definition order of hash literals */
|
||||||
hMeta := { => }
|
hMeta := { => }
|
||||||
hb_HKeepOrder( hMeta, .T. )
|
hb_HKeepOrder( hMeta, .T. )
|
||||||
hMeta[ "Project-Id-Version:" ] := "harbour"
|
hMeta[ "Project-Id-Version:" ] := "core-lang"
|
||||||
hMeta[ "Report-Msgid-Bugs-To:" ] := "https://groups.google.com/group/harbour-devel/"
|
hMeta[ "Report-Msgid-Bugs-To:" ] := "https://groups.google.com/group/harbour-devel/"
|
||||||
hMeta[ "POT-Creation-Date:" ] := cISO_TimeStamp
|
hMeta[ "POT-Creation-Date:" ] := cISO_TimeStamp
|
||||||
hMeta[ "PO-Revision-Date:" ] := cISO_TimeStamp
|
hMeta[ "PO-Revision-Date:" ] := cISO_TimeStamp
|
||||||
@@ -65,10 +84,10 @@ STATIC FUNCTION Meta( cName )
|
|||||||
hMeta[ "Content-Transfer-Encoding:" ] := "8bit"
|
hMeta[ "Content-Transfer-Encoding:" ] := "8bit"
|
||||||
|
|
||||||
FOR tmp := 0 TO 5
|
FOR tmp := 0 TO 5
|
||||||
hMeta[ hb_StrFormat( "Harbour-Meta-%1$d:", tmp ) ] := hb_langMessage( tmp, cName )
|
hMeta[ hb_StrFormat( "Harbour-Lang-Meta-%1$d:", tmp ) ] := hb_langMessage( tmp, cName )
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
cMeta := '"' + e"\n"
|
cMeta := '"' + hb_eol()
|
||||||
FOR EACH meta IN hMeta
|
FOR EACH meta IN hMeta
|
||||||
cMeta += ;
|
cMeta += ;
|
||||||
'"' + ;
|
'"' + ;
|
||||||
@@ -76,7 +95,7 @@ STATIC FUNCTION Meta( cName )
|
|||||||
" " + ;
|
" " + ;
|
||||||
meta + ;
|
meta + ;
|
||||||
"\n" + ;
|
"\n" + ;
|
||||||
iif( meta:__enumIsLast(), "", '"' + e"\n" )
|
iif( meta:__enumIsLast(), "", '"' + hb_eol() )
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
RETURN cMeta
|
RETURN cMeta
|
||||||
@@ -91,9 +110,9 @@ STATIC FUNCTION ISO_TimeStamp()
|
|||||||
Int( nOffset / 3600 ), ;
|
Int( nOffset / 3600 ), ;
|
||||||
Int( ( ( nOffset / 3600 ) - Int( nOffset / 3600 ) ) * 60 ) )
|
Int( ( ( nOffset / 3600 ) - Int( nOffset / 3600 ) ) * 60 ) )
|
||||||
|
|
||||||
STATIC FUNCTION Item( cEN, cTrs )
|
STATIC FUNCTION Item( cOri, cTrs, nPos )
|
||||||
RETURN hb_StrFormat( ;
|
RETURN hb_StrFormat( ;
|
||||||
"#, c-format" + hb_eol() + ;
|
"#, c-format" + hb_eol() + ;
|
||||||
'msgid "%1$s"' + hb_eol() + ;
|
'msgid "%1$s"' + hb_eol() + ;
|
||||||
'msgstr "%2$s"' + hb_eol() + ;
|
'msgstr "%2$s"' + hb_eol() + ;
|
||||||
hb_eol(), cEN, cTrs )
|
hb_eol(), iif( Empty( cOri ) .AND. nPos != 0, "{" + StrZero( nPos, 3, 0 ) + "}", cOri ), cTrs )
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Long= A Data ||
|
|||||||
Spreading ||
|
Spreading ||
|
||||||
On varius lines ||
|
On varius lines ||
|
||||||
here.
|
here.
|
||||||
|
|
||||||
[Printers]
|
[Printers]
|
||||||
LPT1 = \\HEAD\Lexmark
|
LPT1 = \\HEAD\Lexmark
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,14 @@ STATIC FUNCTION PO_2_C( cFileIn, cFileOut, ... )
|
|||||||
|
|
||||||
IF ( aTrans := __i18n_potArrayLoad( cFileIn, @cErrorMsg ) ) != NIL
|
IF ( aTrans := __i18n_potArrayLoad( cFileIn, @cErrorMsg ) ) != NIL
|
||||||
|
|
||||||
cContent := _begin()
|
cContent := StrTran( _begin(), e"\n", hb_eol() )
|
||||||
nPos := 0
|
nPos := 0
|
||||||
|
|
||||||
__i18n_potArrayClean( aTrans,,, {| cTrs, cOri | ProcessTrs( @cContent, cTrs, cOri, @cTranslator, @cID, @nPos ) } )
|
__i18n_potArrayClean( aTrans,,, {| cTrs, cOri | ProcessTrs( @cContent, cTrs, cOri, @cTranslator, @cID, @nPos ) } )
|
||||||
|
|
||||||
cContent := "/* Last Translator: " + cTranslator + " */" + hb_eol() + ;
|
cContent := "/* Last Translator: " + cTranslator + " */" + hb_eol() + ;
|
||||||
Left( cContent, Len( cContent ) - Len( "," ) - Len( hb_eol() ) ) + hb_eol() + ;
|
Left( cContent, Len( cContent ) - Len( "," ) - Len( hb_eol() ) ) + hb_eol() + ;
|
||||||
StrTran( _end(), "{LNG}", Upper( cID ) )
|
StrTran( StrTran( _end(), e"\n", hb_eol() ), "{LNG}", Upper( cID ) )
|
||||||
|
|
||||||
hb_MemoWrit( cFileOut, cContent )
|
hb_MemoWrit( cFileOut, cContent )
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ STATIC FUNCTION ProcessTrs( /* @ */ cContent, cTrs, cOri, /* @ */ cTranslator, /
|
|||||||
cTranslator := ""
|
cTranslator := ""
|
||||||
ENDIF
|
ENDIF
|
||||||
FOR tmp := 0 TO 5
|
FOR tmp := 0 TO 5
|
||||||
cContent += Space( 6 ) + ConvToC( tmp1 := hb_regexAll( hb_StrFormat( "Harbour-Meta-%1$d: ([\S]*)", tmp ), cTrs,,,,, .T. )[ 1 ][ 2 ] ) + "," + hb_eol()
|
cContent += Space( 6 ) + ConvToC( tmp1 := hb_regexAll( hb_StrFormat( "Harbour-Lang-Meta-%1$d: ([\S]*)", tmp ), cTrs,,,,, .T. )[ 1 ][ 2 ] ) + "," + hb_eol()
|
||||||
++nPos
|
++nPos
|
||||||
IF tmp == 0
|
IF tmp == 0
|
||||||
cID := tmp1
|
cID := tmp1
|
||||||
|
|||||||
Reference in New Issue
Block a user