Skip to content

Commit

Permalink
curl tool: reviewed code moved to tool_*.[ch] files
Browse files Browse the repository at this point in the history
  • Loading branch information
yangtse committed Oct 6, 2011
1 parent 7afccf7 commit f7bfdba
Show file tree
Hide file tree
Showing 26 changed files with 218 additions and 203 deletions.
2 changes: 1 addition & 1 deletion maketgz
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ patch=`echo $libversion |cut -d. -f3 | cut -d- -f1 | sed -e "s/[^0-9]//g"`
numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"`

HEADER=include/curl/curlver.h
CHEADER=src/version.h
CHEADER=src/tool_version.h

# requires a date command that knows -u for UTC time zone
datestamp=`date -u`
Expand Down
11 changes: 8 additions & 3 deletions packages/Symbian/group/curl.mmp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ UID 0x00000000 0xF0206442

SOURCEPATH ../../../src
SOURCE \
hugehelp.c writeout.c writeenv.c \
getpass.c homedir.c curlutil.c xattr.c \
hugehelp.c \
tool_binmode.c \
tool_bname.c \
tool_cb_dbg.c \
Expand All @@ -26,8 +25,10 @@ SOURCE \
tool_easysrc.c \
tool_formparse.c \
tool_getparam.c \
tool_getpass.c \
tool_help.c \
tool_helpers.c \
tool_homedir.c \
tool_libinfo.c \
tool_main.c \
tool_mfiles.c \
Expand All @@ -40,7 +41,11 @@ SOURCE \
tool_setopt.c \
tool_sleep.c \
tool_urlglob.c \
tool_vms.c
tool_util.c \
tool_vms.c \
tool_writeenv.c \
tool_writeout.c \
tool_xattr.c

SOURCEPATH ../../../lib
SOURCE \
Expand Down
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ stamp-h2
Makefile.vc8.dist
Makefile.vc9.dist
version.h.dist
tool_version.h.dist
Makefile.vc10.dist
config-win32.h
23 changes: 17 additions & 6 deletions src/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ CURLX_ONES = $(top_srcdir)/lib/strtoofft.c \
$(top_srcdir)/lib/rawstr.c \
$(top_srcdir)/lib/nonblock.c

CURL_CFILES = hugehelp.c writeout.c writeenv.c \
getpass.c homedir.c curlutil.c xattr.c \
CURL_CFILES = hugehelp.c \
tool_binmode.c \
tool_bname.c \
tool_cb_dbg.c \
Expand All @@ -32,8 +31,10 @@ CURL_CFILES = hugehelp.c writeout.c writeenv.c \
tool_easysrc.c \
tool_formparse.c \
tool_getparam.c \
tool_getpass.c \
tool_help.c \
tool_helpers.c \
tool_homedir.c \
tool_libinfo.c \
tool_main.c \
tool_mfiles.c \
Expand All @@ -46,11 +47,14 @@ CURL_CFILES = hugehelp.c writeout.c writeenv.c \
tool_setopt.c \
tool_sleep.c \
tool_urlglob.c \
tool_vms.c
tool_util.c \
tool_vms.c \
tool_writeenv.c \
tool_writeout.c \
tool_xattr.c

CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
config-riscos.h version.h xattr.h \
writeout.h writeenv.h getpass.h homedir.h curlutil.h \
config-riscos.h \
tool_binmode.h \
tool_bname.h \
tool_cb_dbg.h \
Expand All @@ -67,8 +71,10 @@ CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
tool_easysrc.h \
tool_formparse.h \
tool_getparam.h \
tool_getpass.h \
tool_help.h \
tool_helpers.h \
tool_homedir.h \
tool_libinfo.h \
tool_main.h \
tool_mfiles.h \
Expand All @@ -82,7 +88,12 @@ CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
tool_setopt.h \
tool_sleep.h \
tool_urlglob.h \
tool_vms.h
tool_util.h \
tool_version.h \
tool_vms.h \
tool_writeenv.h \
tool_writeout.h \
tool_xattr.h

curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)

66 changes: 36 additions & 30 deletions src/Makefile.vc6
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
!ENDIF

RELEASE_OBJS= \
curlutilr.obj \
getpassr.obj \
homedirr.obj \
hugehelpr.obj \
nonblockr.obj \
rawstrr.obj \
Expand All @@ -156,8 +153,10 @@ RELEASE_OBJS= \
tool_easysrcr.obj \
tool_formparser.obj \
tool_getparamr.obj \
tool_getpassr.obj \
tool_helpr.obj \
tool_helpersr.obj \
tool_homedirr.obj \
tool_libinfor.obj \
tool_mainr.obj \
tool_mfilesr.obj \
Expand All @@ -170,15 +169,14 @@ RELEASE_OBJS= \
tool_setoptr.obj \
tool_sleepr.obj \
tool_urlglobr.obj \
tool_utilr.obj \
tool_vmsr.obj \
writeoutr.obj \
xattrr.obj \
tool_writeenvr.obj \
tool_writeoutr.obj \
tool_xattrr.obj \
curlr.res

DEBUG_OBJS= \
curlutild.obj \
getpassd.obj \
homedird.obj \
hugehelpd.obj \
nonblockd.obj \
rawstrd.obj \
Expand All @@ -199,8 +197,10 @@ DEBUG_OBJS= \
tool_easysrcd.obj \
tool_formparsed.obj \
tool_getparamd.obj \
tool_getpassd.obj \
tool_helpd.obj \
tool_helpersd.obj \
tool_homedird.obj \
tool_libinfod.obj \
tool_maind.obj \
tool_mfilesd.obj \
Expand All @@ -213,9 +213,11 @@ DEBUG_OBJS= \
tool_setoptd.obj \
tool_sleepd.obj \
tool_urlglobd.obj \
tool_utild.obj \
tool_vmsd.obj \
writeoutd.obj \
xattrd.obj \
tool_writeenvd.obj \
tool_writeoutd.obj \
tool_xattrd.obj \
curld.res

#################################################
Expand Down Expand Up @@ -340,14 +342,6 @@ debug: $(DEBUG_OBJS)
## Release
hugehelpr.obj: hugehelp.c
$(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
writeoutr.obj: writeout.c
$(CCR) $(CFLAGS) /Fo"$@" writeout.c
getpassr.obj: getpass.c
$(CCR) $(CFLAGS) /Fo"$@" getpass.c
homedirr.obj: homedir.c
$(CCR) $(CFLAGS) /Fo"$@" homedir.c
curlutilr.obj: curlutil.c
$(CCR) $(CFLAGS) /Fo"$@" curlutil.c
nonblockr.obj: ../lib/nonblock.c
$(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
rawstrr.obj: ../lib/rawstr.c
Expand Down Expand Up @@ -386,10 +380,14 @@ tool_formparser.obj: tool_formparse.c
$(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c
tool_getparamr.obj: tool_getparam.c
$(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c
tool_getpassr.obj: tool_getpass.c
$(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c
tool_helpr.obj: tool_help.c
$(CCR) $(CFLAGS) /Fo"$@" tool_help.c
tool_helpersr.obj: tool_helpers.c
$(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c
tool_homedirr.obj: tool_homedir.c
$(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c
tool_libinfor.obj: tool_libinfo.c
$(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c
tool_mainr.obj: tool_main.c
Expand All @@ -414,24 +412,22 @@ tool_sleepr.obj: tool_sleep.c
$(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c
tool_urlglobr.obj: tool_urlglob.c
$(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c
tool_utilr.obj: tool_util.c
$(CCR) $(CFLAGS) /Fo"$@" tool_util.c
tool_vmsr.obj: tool_vms.c
$(CCR) $(CFLAGS) /Fo"$@" tool_vms.c
xattrr.obj: xattr.c
$(CCR) $(CFLAGS) /Fo"$@" xattr.c
tool_writeenvr.obj: tool_writeenv.c
$(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c
tool_writeoutr.obj: tool_writeout.c
$(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c
tool_xattrr.obj: tool_xattr.c
$(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c
curlr.res : curl.rc
$(RCR) $(RESFLAGS) /Fo"$@" curl.rc

## Debug
hugehelpd.obj: hugehelp.c
$(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
writeoutd.obj: writeout.c
$(CCD) $(CFLAGS) /Fo"$@" writeout.c
getpassd.obj: getpass.c
$(CCD) $(CFLAGS) /Fo"$@" getpass.c
homedird.obj: homedir.c
$(CCD) $(CFLAGS) /Fo"$@" homedir.c
curlutild.obj: curlutil.c
$(CCD) $(CFLAGS) /Fo"$@" curlutil.c
nonblockd.obj: ../lib/nonblock.c
$(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c
rawstrd.obj: ../lib/rawstr.c
Expand Down Expand Up @@ -470,10 +466,14 @@ tool_formparsed.obj: tool_formparse.c
$(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c
tool_getparamd.obj: tool_getparam.c
$(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c
tool_getpassd.obj: tool_getpass.c
$(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c
tool_helpd.obj: tool_help.c
$(CCD) $(CFLAGS) /Fo"$@" tool_help.c
tool_helpersd.obj: tool_helpers.c
$(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c
tool_homedird.obj: tool_homedir.c
$(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c
tool_libinfod.obj: tool_libinfo.c
$(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c
tool_maind.obj: tool_main.c
Expand All @@ -498,10 +498,16 @@ tool_sleepd.obj: tool_sleep.c
$(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c
tool_urlglobd.obj: tool_urlglob.c
$(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c
tool_utild.obj: tool_util.c
$(CCD) $(CFLAGS) /Fo"$@" tool_util.c
tool_vmsd.obj: tool_vms.c
$(CCD) $(CFLAGS) /Fo"$@" tool_vms.c
xattrd.obj: xattr.c
$(CCD) $(CFLAGS) /Fo"$@" xattr.c
tool_writeenvd.obj: tool_writeenv.c
$(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c
tool_writeoutd.obj: tool_writeout.c
$(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c
tool_xattrd.obj: tool_xattr.c
$(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c
curld.res : curl.rc
$(RCD) $(RESFLAGS) /Fo"$@" curl.rc

Expand Down
2 changes: 1 addition & 1 deletion src/curl.rc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
***************************************************************************/
#include <winver.h>
#include "version.h"
#include "tool_version.h"

LANGUAGE 0x09,0x01

Expand Down
5 changes: 2 additions & 3 deletions src/tool_cb_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
/* use our own printf() functions */
#include "curlx.h"

#include "curlutil.h"

#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_cb_dbg.h"
#include "tool_util.h"

#include "memdebug.h" /* keep this as LAST include */

Expand Down Expand Up @@ -60,7 +59,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
(void)handle; /* not used */

if(config->tracetime) {
tv = cutil_tvnow();
tv = tvnow();
if(!known_offset) {
epoch_offset = time(NULL) - tv.tv_sec;
known_offset = 1;
Expand Down
3 changes: 1 addition & 2 deletions src/tool_getparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
# include "hugehelp.h"
#endif

#include "version.h"

#include "tool_binmode.h"
#include "tool_cfgable.h"
#include "tool_cb_prg.h"
Expand All @@ -46,6 +44,7 @@
#include "tool_msgs.h"
#include "tool_paramhlp.h"
#include "tool_parsecfg.h"
#include "tool_version.h"

#include "memdebug.h" /* keep this as LAST include */

Expand Down
Loading

0 comments on commit f7bfdba

Please sign in to comment.