SF.net SVN: harbour-project:[16644] trunk/harbour

70 views
Skip to first unread message

vsza...@users.sourceforge.net

unread,
Apr 20, 2011, 7:01:15 PM4/20/11
to harbou...@googlegroups.com
Revision: 16644
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=16644&view=rev
Author: vszakats
Date: 2011-04-20 23:01:14 +0000 (Wed, 20 Apr 2011)

Log Message:
-----------
2011-04-21 01:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbmxml/3rd/minixml/mxml.hbp
* contrib/hbmxml/3rd/minixml/mxml_str.c
! Fixed isdigit() warning which was result of missing
mxml header. [Tamas Tevesz]

+ contrib/hbcurl/hbcurlt1.ch
+ contrib/hbcurl/core_t1.c
+ Implemented new way of using HB_CURLOPT_HTTPPOST, now
all meaningful values are supported in any order and
combination. See:
http://curl.haxx.se/libcurl/c/curl_formadd.html
The patch is heavily based on patch/implementation submitted
by Benjamin Jacobs, many thanks for it. Final patch
includes some rework, simplification, compile and
other fixes, plus formatting with uncrustify. Please
make sure to test/review this version as I didn't do
any functional tests, just build ones.
Sample code:
curl_easy_setopt( curl, HB_CURLOPT_HTTPPOST, { ;
{ HB_CURLFORM_COPYNAME, "nparam1", ;
HB_CURLFORM_COPYCONTENTS, "value1" }, ;
{ HB_CURLFORM_COPYNAME, "nparam2", ;
HB_CURLFORM_COPYCONTENTS, "value" }, ;
{ HB_CURLFORM_COPYNAME, "fileparam", ;
HB_CURLFORM_FILE, filename } } )
WARNING: This implementation is INCOMPATIBLE with the
previous one.
TOFIX: Current implementation does allow to create GPFs because
it allows .prg code manually pass buffer sizes. This must
be fixed and buffer length should always be automatically
taken from Harbour item. This will require more sophisticated
code to build the low-level array (f.e. size calculation).
Benjamin, can you look at it?
NOTE: I'm uploading this unfinished code as new temp files,
because SVN doesn't support light branching, so this poor man's
solution is left to manage it.

Modified Paths:
--------------
trunk/harbour/ChangeLog
trunk/harbour/contrib/hbmxml/3rd/minixml/mxml.hbp
trunk/harbour/contrib/hbmxml/3rd/minixml/mxml_str.c
trunk/harbour/src/rtl/gtwin/gtwin.c

Added Paths:
-----------
trunk/harbour/contrib/hbcurl/core_t1.c
trunk/harbour/contrib/hbcurl/hbcurlt1.ch


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Tamas TEVESZ

unread,
Apr 20, 2011, 7:42:46 PM4/20/11
to harbou...@googlegroups.com
On Wed, 20 Apr 2011, vsza...@users.sourceforge.net wrote:

> * contrib/hbmxml/3rd/minixml/mxml.hbp
> * contrib/hbmxml/3rd/minixml/mxml_str.c
> ! Fixed isdigit() warning which was result of missing
> mxml header. [Tamas Tevesz]

started putting together a bug report for upstream, and lo and behold,
upstream sources don't have this problem.

turns out, upstream is quite ok, config.h.in goes along the lines of

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>

which is just fine, with or without HAVE_*SNPRINTF and others we've
been putting on the table.

out config.h currently goes like:

#include "hbdefs.h"
#include "hb_io.h"

none of which pulls in ctype.h

so upstream is ok, credit where credit is due.

the situation is now reduced to:

- original config.h with it's bunch of includes is ok
- our config.h includes hbdefs+hbio
- these two pull in most of what's in the original config.h, except
for ctype.h
- so let's just fetch ctype.h, but only if it's actually needed

Index: mxml_str.c
===================================================================
--- mxml_str.c (revision 16645)
+++ mxml_str.c (working copy)
@@ -27,8 +27,10 @@
*/

#include "config.h"
-#include "mxml.h"

+#ifndef HAVE_VSNPRINTF
+# include <ctype.h>
+#endif

/*
* The va_copy macro is part of C99, but many compilers don't implement it.


i think this is more orderly an approach.

--
[-]

mkdir /nonexistent

Viktor Szakáts

unread,
Apr 20, 2011, 9:27:38 PM4/20/11
to harbou...@googlegroups.com

It's perfect, thanks!

Viktor

Reply all
Reply to author
Forward
0 new messages