Commit Graph

16 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
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
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
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
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
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
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