Permalink
Browse files

curl tool: reviewed code moved to tool_*.[ch] files

  • Loading branch information...
1 parent 7afccf7 commit f7bfdbabf2d5398f4c266eabb0992a04af661f22 @yangtse yangtse committed Oct 6, 2011
View
@@ -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`
@@ -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 \
@@ -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 \
@@ -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 \
View
@@ -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
View
@@ -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 \
@@ -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 \
@@ -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 \
@@ -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 \
@@ -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)
View
@@ -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 \
@@ -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 \
@@ -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 \
@@ -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 \
@@ -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
#################################################
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
View
@@ -20,7 +20,7 @@
*
***************************************************************************/
#include <winver.h>
-#include "version.h"
+#include "tool_version.h"
LANGUAGE 0x09,0x01
View
@@ -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 */
@@ -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;
View
@@ -33,8 +33,6 @@
# include "hugehelp.h"
#endif
-#include "version.h"
-
#include "tool_binmode.h"
#include "tool_cfgable.h"
#include "tool_cb_prg.h"
@@ -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 */
Oops, something went wrong. Retry.

0 comments on commit f7bfdba

Please sign in to comment.