2008-05-31 21:00 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbcurl/hbcurl.c
* contrib/hbcurl/tests/ftp_uldl.prg
+ Using hb_fsReadLarge()/hb_fsWriteLarge()
+ Added redefinitiion of memory allocator functions.
(doesn't work, disabled. hb_xgrab() is getting ptrs
not allocated by us.)
! Fixes handling of size options in CURL_EASY_SETOPT().
+ CURL_VERSION()
+ CURL_VERSION_INFO()
+ CURL_EASY_STRERROR()
+ CURL_SHARE_STRERROR()
+ CURL_EASY_ESCAPE() (see TOFIX)
+ CURL_EASY_UNESCAPE() (see TOFIX)
+ Test app extended.
* Renames.
; Added several more TOFIXes.
* source/rtl/tget.prg
* Minor formatting.
This commit is contained in:
@@ -8,6 +8,27 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-05-31 21:00 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/hbcurl/hbcurl.c
|
||||
* contrib/hbcurl/tests/ftp_uldl.prg
|
||||
+ Using hb_fsReadLarge()/hb_fsWriteLarge()
|
||||
+ Added redefinitiion of memory allocator functions.
|
||||
(doesn't work, disabled. hb_xgrab() is getting ptrs
|
||||
not allocated by us.)
|
||||
! Fixes handling of size options in CURL_EASY_SETOPT().
|
||||
+ CURL_VERSION()
|
||||
+ CURL_VERSION_INFO()
|
||||
+ CURL_EASY_STRERROR()
|
||||
+ CURL_SHARE_STRERROR()
|
||||
+ CURL_EASY_ESCAPE() (see TOFIX)
|
||||
+ CURL_EASY_UNESCAPE() (see TOFIX)
|
||||
+ Test app extended.
|
||||
* Renames.
|
||||
; Added several more TOFIXes.
|
||||
|
||||
* source/rtl/tget.prg
|
||||
* Minor formatting.
|
||||
|
||||
2008-05-31 15:37 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/rddads/adsfunc.c
|
||||
* contrib/rddads/ads1.c
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,28 +2,50 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Redirect STDERR to a file to see the verbose output. */
|
||||
/* NOTE: Redirect STDERR to a file to see the verbose output. */
|
||||
|
||||
#include "hbcurl.ch"
|
||||
|
||||
#include "common.ch"
|
||||
|
||||
#define LOCAL_FILE "ftp_uldl.prg"
|
||||
#define UPLOAD_FILE_AS "ftp_upped.prg"
|
||||
#define UPLOAD_FILE_AS "test_ul.bin"
|
||||
#define REMOTE_URL "ftp://harbour:power@localhost/" + UPLOAD_FILE_AS
|
||||
#define RENAME_FILE_TO "ftp_upped_renamed.prg"
|
||||
#define RENAME_FILE_TO "test_ul_renamed.bin"
|
||||
|
||||
FUNCTION Main( cDL )
|
||||
FUNCTION Main( cDL, cUL )
|
||||
LOCAL curl
|
||||
LOCAL info
|
||||
LOCAL tmp
|
||||
LOCAL tmp1
|
||||
|
||||
? curl_version()
|
||||
|
||||
info := curl_version_info()
|
||||
|
||||
FOR tmp := 1 TO Len( info )
|
||||
IF tmp == 8
|
||||
? tmp, ""
|
||||
FOR tmp1 := 1 TO Len( info[ 8 ] )
|
||||
?? info[ 8 ][ tmp1 ] + " "
|
||||
NEXT
|
||||
ELSE
|
||||
? tmp, info[ tmp ]
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
Inkey( 0 )
|
||||
|
||||
? "INIT:", curl_global_init()
|
||||
|
||||
IF ! Empty( curl := curl_easy_init() )
|
||||
|
||||
DEFAULT cUL TO "ftp_uldl.prg"
|
||||
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_UPLOAD )
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_URL, REMOTE_URL )
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_SETUPLOADFILE, LOCAL_FILE )
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_USERPWD, "harbour:power" ) /* May use this instead of embedding in URL */
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_SETUPLOADFILE, cUL )
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_INFILESIZE, hb_FSize( cUL ) ), hb_FSize( cUL )
|
||||
// ? curl_easy_setopt( curl, HB_CURLOPT_USERPWD, "harbour:power" ) /* May use this instead of embedding in URL */
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_SETPROGRESS, {| nPos, nLen | DispOutAt( 10, 10, Str( ( nPos / nLen ) * 100, 6, 2 ) + "%" ) } )
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_NOPROGRESS, .F. )
|
||||
? curl_easy_setopt( curl, HB_CURLOPT_POSTQUOTE, { "RNFR " + UPLOAD_FILE_AS, "RNTO " + RENAME_FILE_TO } )
|
||||
|
||||
@@ -259,9 +259,9 @@ METHOD display() CLASS Get
|
||||
IF ::hasFocus
|
||||
cBuffer := ::cBuffer
|
||||
ELSE
|
||||
::cType := ValType( ::xVarGet := ::varGet() )
|
||||
::picture := ::cPicture
|
||||
cBuffer := ::PutMask( ::xVarGet )
|
||||
::cType := ValType( ::xVarGet := ::varGet() )
|
||||
::picture := ::cPicture
|
||||
cBuffer := ::PutMask( ::xVarGet )
|
||||
ENDIF
|
||||
|
||||
::nMaxLen := Len( cBuffer )
|
||||
@@ -391,15 +391,15 @@ METHOD home() CLASS Get
|
||||
METHOD reset() CLASS Get
|
||||
|
||||
IF ::hasFocus
|
||||
::cBuffer := ::PutMask( ::varGet(), .F. )
|
||||
::xVarGet := ::original
|
||||
::cType := ValType( ::xVarGet )
|
||||
::pos := ::FirstEditable() /* ; Simple 0 in CA-Cl*pper [vszakats] */
|
||||
::lClear := ( "K" $ ::cPicFunc .OR. ::cType == "N" )
|
||||
::lEdit := .F.
|
||||
::lMinus := .F.
|
||||
::rejected := .F.
|
||||
::typeOut := !( ::type $ "CNDL" ) .OR. ( ::nPos == 0 ) /* ; Simple .F. in CA-Cl*pper [vszakats] */
|
||||
::cBuffer := ::PutMask( ::varGet(), .F. )
|
||||
::xVarGet := ::original
|
||||
::cType := ValType( ::xVarGet )
|
||||
::pos := ::FirstEditable() /* ; Simple 0 in CA-Cl*pper [vszakats] */
|
||||
::lClear := ( "K" $ ::cPicFunc .OR. ::cType == "N" )
|
||||
::lEdit := .F.
|
||||
::lMinus := .F.
|
||||
::rejected := .F.
|
||||
::typeOut := !( ::type $ "CNDL" ) .OR. ( ::nPos == 0 ) /* ; Simple .F. in CA-Cl*pper [vszakats] */
|
||||
::display()
|
||||
ENDIF
|
||||
|
||||
@@ -425,18 +425,18 @@ METHOD setFocus() CLASS Get
|
||||
|
||||
xVarGet := ::xVarGet := ::varGet()
|
||||
|
||||
::hasFocus := .T.
|
||||
::rejected := .F.
|
||||
::hasFocus := .T.
|
||||
::rejected := .F.
|
||||
|
||||
::original := xVarGet
|
||||
::cType := ValType( xVarGet )
|
||||
::picture := ::cPicture
|
||||
::cBuffer := ::PutMask( xVarGet, .F. )
|
||||
::original := xVarGet
|
||||
::cType := ValType( xVarGet )
|
||||
::picture := ::cPicture
|
||||
::cBuffer := ::PutMask( xVarGet, .F. )
|
||||
|
||||
::lChanged := .F.
|
||||
::lClear := ( "K" $ ::cPicFunc .OR. ::cType == "N" )
|
||||
::lEdit := .F.
|
||||
::pos := 1
|
||||
::lChanged := .F.
|
||||
::lClear := ( "K" $ ::cPicFunc .OR. ::cType == "N" )
|
||||
::lEdit := .F.
|
||||
::pos := 1
|
||||
|
||||
::lMinusPrinted := .F.
|
||||
::lMinus := .F.
|
||||
|
||||
Reference in New Issue
Block a user