Commit Graph

26 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
61f278a65b 2009-10-21 13:46 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbini.prg
    ! fixed stripping last character when the last line in ini file
      does not contain valid EOL - thanks to Mario H. Sabado for information
      about the problem
2009-10-21 11:47:22 +00:00
Przemyslaw Czerpak
ed9cd3fc9e 2009-10-20 13:48 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/thread.c
  * harbour/include/hbthread.h
    * eliminated nameless unions
2009-10-20 11:48:46 +00:00
Przemyslaw Czerpak
0e8c6557b9 2009-10-19 22:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/dateshb.c
    ! fixed HB_TTOD() and HB_DTOT() results - they were reverted by mistake
    + added support for optional second parameter in HB_DTOT() function with
      time as numeric value in second() like representation or as character
      string with HH:MM[:S[S][.f[f[f[f]]]]] [PM|AM] representation, i.e.:
         ? HB_DATETIME()
         ? HB_DTOT( date(), seconds() )
         ? HB_DTOT( date(), time() )
    + added support for optional second parameter passed by reference in
      HB_TTOD() function. If given then this functions stores in it number
      of seconds in given day specified by timestamp value, i.e.:
         dDate := HB_TTOD( HB_DATETIME(), @nSec )
      gives similar functionality to:
         dDate := date()
         nSec := seconds()
    + added support for optional 3-rd parameter in HB_TTOD() functions
      with timestamp format. If given then this function stores time
      part in second parameter as formatted string value. For empty
      string _SET_TIMEFORMAT is used, i.e.:
         dDate := HB_TTOD( HB_DATETIME(), @cTime, "hh:mm:ss" )
2009-10-19 20:12:36 +00:00
Viktor Szakats
b5c93263e5 2009-10-19 15:04 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbwince.c
    ! Typos in comments.

  * contrib/rddads/rddads.h
    * Minor formatting.
2009-10-19 13:04:55 +00:00
Przemyslaw Czerpak
890b9ac2ad 2009-10-19 14:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/common/hbwince.c
    + added GetEnvironmentVariableW() - it fixes WinCE builds after recent
      ANSI to UNICODE function conversions. In WINCE such functions do not
      exist.

  * harbour/src/rtl/gtclip.c
    * pacified MinGWCE warnings

  * harbour/src/rtl/dateshb.c
    + added HB_TTOD() and HB_DTOT() functions
2009-10-19 12:54:46 +00:00
Przemyslaw Czerpak
fc6853c254 2009-10-19 10:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/cdpapi.c
  * harbour/include/hbapicdp.h
    + added new functions: hb_cdpStrnToU16LE() and hb_cdpStringInU16Length()

  * harbour/contrib/rddads/rddads.h
    ! define (if not defined) x64 macro in all 64bit builds not only for
      MinGW64
    * define (if not defined) unix macro in all HB_OS_UNIX builds not only
      for Linux. TOCHECK: CygWIN builds.
2009-10-19 08:55:27 +00:00
Przemyslaw Czerpak
8f0f023887 2009-10-18 13:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsocket.h
  * harbour/src/rtl/hbsocket.c
    * added new function b_socketResolveInetAddr()

  * harbour/ChangeLog
    * minor formatting
2009-10-18 11:47:24 +00:00
Przemyslaw Czerpak
c3e0439921 2009-10-17 01:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/Makefile
  + harbour/src/rtl/hbbffnc.c
  * harbour/include/hbextern.ch
    + added PRG functions for BlowFish encryption:
         hb_blowfishKey( <cPass> ) -> <bfKey>
         hb_blowfishEncrypt( <bfKey>, <cData> ) -> <cCryptedData>
         hb_blowfishDecrypt( <bfKey>, <cCryptedData> ) -> <cData>
      On errors above functions return NIL.
      Warning: the size of encrypted data is padded to 64bit (8 bytes)
      so it's bigger then original one.
2009-10-16 23:22:41 +00:00
Przemyslaw Czerpak
864d74c6a5 2009-10-16 20:02 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/Makefile
  + harbour/src/rtl/hbbfish.c
  * harbour/include/Makefile
  + harbour/include/hbbfish.h
    + added support for BlowFish encryption at C level:
      hb_blowfishInit(), hb_blowfishEncrypt(), hb_blowfishDecrypt()
      This code implements BlowFish algorithm designed by Bruce Schneier.
      The description of BlowFish algorithm can be found at:
         http://www.schneier.com/paper-blowfish-fse.html
      This code uses for initial s-boxes and p-array values PI hex digits
      taken from tables public at:
         http://www.schneier.com/blowfish.html
      which can be downloaded from:
         http://www.schneier.com/code/constants.txt
      This should be quite fast implementation (probably much faster
      then reference one) but please remember that in BlowFish algorithm
      startup initialization of encryption tables is intentionally
      designed to be expensive to strongly reduce the efficiency of
      brute force attacks so call hb_blowfishInit() once for each
      new password and then reuse initialized encryption tables in
      hb_blowfishEncrypt() and hb_blowfishDecrypt().
      I'll add .prg functions later.
      TODO: add some asymmetric key encryption.
2009-10-16 18:02:57 +00:00
Przemyslaw Czerpak
92f0efd1c9 2009-10-15 18:01 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/compiler/genc.c
  * harbour/src/compiler/compi18n.c
    * use "w' instead of "wb" in hb_fopen flags. It causes that in some
      systems like DOS or Windows if CRTL supports it then all \n in
      generated files will be automatically translated to native EOLs
      (\r\n).
      This modification should make .pot and .c files generated by
      Harbour compiler more readable for DOS and Windows users.

  * harbour/src/compiler/gencobj.c
    ! fixed wrong hb_fopen() flags 't' is not documented fopen() flag
      so some systems may refuse to open files when it's used.
2009-10-15 16:01:39 +00:00
Viktor Szakats
3bba486c12 2009-10-15 17:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbver.c
  * src/rtl/fstemp.c
  * contrib/hbwin/win_prn2.c
    + Changed to use native instead of fixed ANSI version of win API calls.
    ; Please review me, all these are critical low level functions, 
      so any mistakes can be deadly.
    ; TODO: Remaining dynamic versions, although maybe for dynamically 
            loaded win API functions it's better to stay with ANSI 
            version for compatibility.
2009-10-15 15:17:50 +00:00
Przemyslaw Czerpak
d2ffd92ee3 2009-10-15 17:03 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rdd/dbfcdx/dbfcdx1.c
    * removed old unused macros

  * harbour/include/hbcompdf.h
  * harbour/src/compiler/hbmain.c
  * harbour/src/compiler/cmdcheck.c
  * harbour/src/compiler/complex.c
  * harbour/src/compiler/hbcomp.c
  * harbour/src/compiler/gencobj.c
  * harbour/src/compiler/hbusage.c
    + added support for -gd[.<destExt>] switch.
      When used Harbour compiler generates also .d file with dependencies
      list in the form like for make systems:
         <destFile>: <sourceFiles,...>
      optional .<destExt> parameter value can be used to replace default
      extension in <destFile>.
      Now users can generate .d files without additional overhead in the
      same pass as normal compilation by simple adding -gd[.<destExt>]
      switch to compilation command instead of executing harbour compiler
      second time with -sm switch.

  * harbour/doc/man/harbour.1
    * updated man page

  * harbour/utils/hbmk2/hbmk2.prg
    * removed -kj switch - it's not longer necessary to improve -sm
    * minor formatting
2009-10-15 15:04:02 +00:00
Viktor Szakats
1a71aa5b61 2009-10-15 15:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbgete.c
  * src/rtl/filesys.c
  * src/rtl/net.c
    + Changed to use native instead of fixed ANSI version of win API calls.
    ; Please review me, all these are critical low level functions, 
      so any mistakes can be deadly.

    ; TODO: There are still some forced ANSI calls in Harbour code:
            (plus some dynamically called ones)
      ---
      source/common/hbver.c:264:      if( GetVersionExA( &osVer ) )
      source/common/hbver.c:306:                  if( GetVersionExA( ( OSVERSIONINFOA * ) &osVerEx ) )
      source/rtl/fstemp.c:153:         if( ! GetTempPathA( ( DWORD ) ( HB_PATH_MAX - 1 ), pszName ) )
      source/rtl/fstemp.c:270:         if( ! GetTempPathA( ( DWORD ) HB_PATH_MAX, szTempDir ) )
      source/rtl/fstemp.c:278:      fResult = GetTempFileNameA( szTempDir, pszPrefix ? pszPrefix : "hb", 0, pszBuffer );
      contrib/hbwin/win_prn2.c:169:      DWORD dwSize = GetProfileStringA( "windows", "device", "", pPrinterName, *pdwBufferSize );
      ---

  * src/rtl/fstemp.c
    * Minor formatting.
2009-10-15 13:56:40 +00:00
Viktor Szakats
9db20419ea 2009-10-15 10:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/filesys.c
    ! hb_fsIsDrv() changed on win platform to use GetLogicalDrives() API 
      instead of GetDriveTypeA(). This should fix existing TOFIX.
      Thanks for Saulius Zrelskis for the suggestion.
      I'd like to ask users to make side-by-side comparisons with 
      CA-Cl*pper to see if we're compatible.
    ! Fixed hb_fsIsDrv() on non-win platforms to always set 
      internal error to zero. CA-Cl*pper does the same.
2009-10-15 08:19:40 +00:00
Viktor Szakats
2d330ec865 2009-10-14 20:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwvt/gtwvt.c
    + Added _SET_OSCODEPAGE support for HB_GTINFO( HB_GTI_WINTITLE ) 
      and HB_GTINFO( HB_GTI_SELECTCOPY ).
2009-10-14 18:10:33 +00:00
Viktor Szakats
64e135a7ac 2009-10-14 10:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
    * Renamed header parsing mode 'real' to 'native'.
      Looks to be the final.
    ! Fixed minor error in prev: one debug message was always on.
    ! Turn off native .prg header parsing in -xhb and -hb10 operating 
      modes.
    ; TODO: for .prg header parsing use one compiler call instead of 
            one for each .prg.
    ; TODO: with gcc family compilers use 'gcc -MM' mode for header 
            parsing. Probably needs separate control, as (at first) 
            it seems to be much slower than current simple method.

  * src/codepage/cpes850c.c
    ! Updated to be compatible with CA-Cl*pper.
      Submitted by Maurizio Faccio.

  * src/codepage/cpesisoc.c
  * src/codepage/cpeswinc.c
    * Synced with cpes850c.

  * contrib/hbwin/tests/testole.prg
    * Minor cleanups.
2009-10-14 08:24:38 +00:00
Przemyslaw Czerpak
50f3d82d7d 2009-10-14 01:03 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/compiler/cmdcheck.c
    * minor formatting

  * harbour/src/compiler/complex.c
    % disabled lexer when -sm is used with -m switch.
      In Harbour compiler lexer is only simple translator between PP and
      grammar parser tokens so the overhead is rather small anyhow it
      eliminates executing some unnecessary code.
      If -sm switch is used then we need lexer to detect files included by
      statements like:
         DO <file> [WITH ... ]
         _procReq_( <file> )
         _procReq_( <file> + <ext> )
      -m switch disable including such files so we can fully eliminate
      lexer and preprocess PP tokens directly in a loop.
      Now the cost of -sm switch is reduced to the PP cost plus some
      minor static overhead.
2009-10-13 23:04:05 +00:00
Przemyslaw Czerpak
bc8ff36826 2009-10-14 00:16 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
  * harbour/src/compiler/hbmain.c
  * harbour/src/compiler/complex.c
  * harbour/src/compiler/harbour.y
  * harbour/src/compiler/harbour.yyc
    % disable grammar parser when -sm switch is used
2009-10-13 22:16:30 +00:00
Przemyslaw Czerpak
1007cfa311 2009-10-13 16:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/compiler/hbmain.c
    * do not set TAB after last dependencies list generated by -sm
      switch
2009-10-13 14:47:49 +00:00
Przemyslaw Czerpak
4522500293 2009-10-13 15:16 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
  * harbour/include/hbcompdf.h
  * harbour/src/pp/ppcore.c
  * harbour/src/compiler/hbmain.c
  * harbour/src/compiler/cmdcheck.c
  * harbour/src/compiler/ppcomp.c
  * harbour/src/compiler/hbusage.c
  * harbour/doc/man/harbour.1
    + added support for new compiler switch -sm which can be used to
      generate dependencies list.
    * modified HB_COMPILEBUF() function to return dependencies list
      instead of .HRB file body when -sm switch is used. Files in
      single module are separated by spaces and modules are separated
      by TABs (chr(9))
      To reduce overhead I suggest to use in programs like hbmk2
      together with -sm also -kj switch - it disables some time
      consuming optimizations in compiler code.
2009-10-13 13:17:15 +00:00
Francesco Saverio Giudice
0cc5bbb822 2009-10-13 00:21 UTC+0200 Francesco Saverio Giudice (info/at/fsgiudice.com)
* harbour/src/rtl/hbini.prg
     * Changed hb_IniString() function name to hb_IniReadStr()
     + Added hb_IniWriteStr() that returns a string from an Ini hash
        hb_iniWriteStr( hIni, cCommentBegin, cCommentEnd, lAutoMain )
         -> cData | NIL
        ! Fixed a previous error in logic in case of hIni with missing MAIN section
  * harbour/include/hbextern.ch
     - Removed hb_IniString() declaration
     + Added hb_IniReadStr() and hb_IniWriteStr() external declarations
  * harbour/tests/parseini.prg
     + Added samples of hb_IniReadStr() and hb_IniWriteStr() functions
2009-10-12 22:22:37 +00:00
Francesco Saverio Giudice
d78216683c 2009-10-12 22:28 UTC+0200 Francesco Saverio Giudice (info/at/fsgiudice.com)
* harbour/src/rtl/hbini.prg
    * Splitted hb_IniRdLow() internal function into two functions:
       hb_IniFileLow( cFileSpec ) -> cData
       hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMain ) -> hIni
    + Added new hb_IniString() funtion
       hb_IniString( cData, lKeyCaseSens, cSplitters, lAutoMain ) -> hIni
       that reads directly from a string.
       So hb_IniRead() read from a file, hb_IniString() read from memory string.
2009-10-12 20:34:07 +00:00
Przemyslaw Czerpak
5dc55239ba 2009-10-12 00:34 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/debian/copyright
  * harbour/debian/rules
  * harbour/src/common/hbtrace.c
  * harbour/src/rdd/usrrdd/rdds/logrdd.prg
  * harbour/tests/cpinfo.prg
  * harbour/doc/gtapi.txt
  * harbour/doc/en-EN/string.txt
  * harbour/doc/en-EN/license.txt
  * harbour/doc/en-EN/compiler.txt
  * harbour/doc/en-EN/terminal.txt
  * harbour/doc/en-EN/dbstrux.txt
  * harbour/doc/en-EN/idle.txt
  * harbour/doc/en-EN/garbage.txt
  * harbour/doc/en-EN/browse.txt
  * harbour/doc/en-EN/lang.txt
  * harbour/doc/en-EN/misc.txt
  * harbour/doc/windll.txt
  * harbour/doc/whatsnew.txt
  * harbour/COPYING
    * finished some missed source/ -> src/ translations
2009-10-11 22:35:16 +00:00
Przemyslaw Czerpak
71536976d4 2009-10-11 20:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/cdpapi.c
    ! fixed bad typo in last commit
2009-10-11 18:49:55 +00:00
Przemyslaw Czerpak
a33106ec02 2009-10-11 19:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicdp.h
  * harbour/src/rtl/cdpapi.c
  * harbour/src/rtl/is.c
    * moved hb_charIs*() functions to cdpapi.c file for easier updating
      in the future
    % optimized memory allocation for new codepages

  * harbour/contrib/hbct/pos1.c
    * use hb_charIs*() functions instead of accessing HB_CODEPAGE
      structure members
2009-10-11 17:55:14 +00:00
Viktor Szakats
1b080a03f9 2009-10-09 16:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
- source
  + src
  * src/Makefile
  * src/dynlib/mt/Makefile
  * src/dynlib/Makefile
  * INSTALL
  * Makefile
  * ChangeLog
  * harbour.spec
  * mpkg_tgz.sh
    * Renamed 'source' dir to 'src' to move closer to other FOSS 
      projects. It's also easier to type, plus it has the side 
      effect that some cmdlines will be shorter in the 
      build process.
2009-10-09 14:54:14 +00:00