Skip to content

Commit 4a5aa66

Browse files
committed
Revert changes relative to lib/*.[ch] recent renaming
This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bb follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
1 parent e0ba958 commit 4a5aa66

File tree

370 files changed

+1740
-2032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

370 files changed

+1740
-2032
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -769,13 +769,13 @@ if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
769769
check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
770770
if(HAVE_C_FLAG_Wno_long_double)
771771
# The Mac version of GCC warns about use of long double. Disable it.
772-
get_source_file_property(MPRINTF_COMPILE_FLAGS curl_mprintf.c COMPILE_FLAGS)
772+
get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
773773
if(MPRINTF_COMPILE_FLAGS)
774774
set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
775775
else(MPRINTF_COMPILE_FLAGS)
776776
set(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
777777
endif(MPRINTF_COMPILE_FLAGS)
778-
set_source_files_properties(curl_mprintf.c PROPERTIES
778+
set_source_files_properties(mprintf.c PROPERTIES
779779
COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
780780
endif(HAVE_C_FLAG_Wno_long_double)
781781
endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)

buildconf

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ removethis(){
8181
#
8282
if test ! -f configure.ac ||
8383
test ! -f src/tool_main.c ||
84-
test ! -f lib/curl_urldata.h ||
84+
test ! -f lib/urldata.h ||
8585
test ! -f include/curl/curl.h ||
8686
test ! -f m4/curl-functions.m4; then
8787
echo "Can not run buildconf from outside of curl's source subdirectory!"

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ AC_COPYRIGHT([Copyright (c) 1998 - 2012 Daniel Stenberg, <[email protected]>
3434
This configure script may be copied, distributed and modified under the
3535
terms of the curl license; see COPYING for more details])
3636

37-
AC_CONFIG_SRCDIR([lib/curl_urldata.h])
37+
AC_CONFIG_SRCDIR([lib/urldata.h])
3838
AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h)
3939
AC_CONFIG_MACRO_DIR([m4])
4040
AM_MAINTAINER_MODE

docs/INSTALL

+1-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ Win32
464464
possibilities:
465465

466466
- Modify lib/config-win32.h
467-
- Modify lib/curl_setup.h
467+
- Modify lib/setup.h
468468
- Modify lib/Makefile.vc6
469469
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
470470
in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.

docs/INTERNALS

+53-54
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ Library
114114
There are plenty of entry points to the library, namely each publicly defined
115115
function that libcurl offers to applications. All of those functions are
116116
rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are
117-
put in the lib/curl_easy.c file.
117+
put in the lib/easy.c file.
118118

119119
curl_global_init_() and curl_global_cleanup() should be called by the
120120
application to initialize and clean up global stuff in the library. As of
121121
today, it can handle the global SSL initing if SSL is enabled and it can init
122122
the socket layer on windows machines. libcurl itself has no "global" scope.
123123

124-
All printf()-style functions use the supplied clones in lib/curl_mprintf.c.
125-
This makes sure we stay absolutely platform independent.
124+
All printf()-style functions use the supplied clones in lib/mprintf.c. This
125+
makes sure we stay absolutely platform independent.
126126

127127
curl_easy_init() allocates an internal struct and makes some initializations.
128128
The returned handle does not reveal internals. This is the 'SessionHandle'
@@ -137,17 +137,17 @@ Library
137137

138138
curl_easy_perform() does a whole lot of things:
139139

140-
It starts off in the lib/curl_easy.c file by calling Curl_perform() and the
141-
main work then continues in lib/curl_url.c. The flow continues with a call to
140+
It starts off in the lib/easy.c file by calling Curl_perform() and the main
141+
work then continues in lib/url.c. The flow continues with a call to
142142
Curl_connect() to connect to the remote site.
143143

144144
o Curl_connect()
145145

146146
... analyzes the URL, it separates the different components and connects to
147147
the remote host. This may involve using a proxy and/or using SSL. The
148-
Curl_resolv() function in lib/curl_hostip.c is used for looking up host
149-
names (it does then use the proper underlying method, which may vary
150-
between platforms and builds).
148+
Curl_resolv() function in lib/hostip.c is used for looking up host names
149+
(it does then use the proper underlying method, which may vary between
150+
platforms and builds).
151151

152152
When Curl_connect is done, we are connected to the remote site. Then it is
153153
time to tell the server to get a document/file. Curl_do() arranges this.
@@ -162,15 +162,15 @@ Library
162162
Curl_do() makes sure the proper protocol-specific function is called. The
163163
functions are named after the protocols they handle. Curl_ftp(),
164164
Curl_http(), Curl_dict(), etc. They all reside in their respective files
165-
(curl_ftp.c, curl_http.c and curl_dict.c). HTTPS is handled by Curl_http()
166-
and FTPS by Curl_ftp().
165+
(ftp.c, http.c and dict.c). HTTPS is handled by Curl_http() and FTPS by
166+
Curl_ftp().
167167

168168
The protocol-specific functions of course deal with protocol-specific
169169
negotiations and setup. They have access to the Curl_sendf() (from
170-
lib/curl_sendf.c) function to send printf-style formatted data to the
171-
remote host and when they're ready to make the actual file transfer they
172-
call the Curl_Transfer() function (in lib/curl_transfer.c) to setup the
173-
transfer and returns.
170+
lib/sendf.c) function to send printf-style formatted data to the remote
171+
host and when they're ready to make the actual file transfer they call the
172+
Curl_Transfer() function (in lib/transfer.c) to setup the transfer and
173+
returns.
174174

175175
If this DO function fails and the connection is being re-used, libcurl will
176176
then close this connection, setup a new connection and re-issue the DO
@@ -184,13 +184,13 @@ Library
184184

185185
o Transfer()
186186

187-
Curl_perform() then calls Transfer() in lib/curl_transfer.c that performs
188-
the entire file transfer.
187+
Curl_perform() then calls Transfer() in lib/transfer.c that performs the
188+
entire file transfer.
189189

190-
During transfer, the progress functions in lib/curl_progress.c are called
191-
at a frequent interval (or at the user's choice, a specified callback
192-
might get called). The speedcheck functions in lib/curl_speedcheck.c are
193-
also used to verify that the transfer is as fast as required.
190+
During transfer, the progress functions in lib/progress.c are called at a
191+
frequent interval (or at the user's choice, a specified callback might get
192+
called). The speedcheck functions in lib/speedcheck.c are also used to
193+
verify that the transfer is as fast as required.
194194

195195
o Curl_done()
196196

@@ -238,20 +238,20 @@ Library
238238
HTTP(S)
239239

240240
HTTP offers a lot and is the protocol in curl that uses the most lines of
241-
code. There is a special file (lib/curl_formdata.c) that offers all the
242-
multipart post functions.
241+
code. There is a special file (lib/formdata.c) that offers all the multipart
242+
post functions.
243243

244-
base64-functions for user+password stuff (and more) is in (lib/curl_base64.c)
245-
and all functions for parsing and sending cookies in (lib/curl_cookie.c).
244+
base64-functions for user+password stuff (and more) is in (lib/base64.c) and
245+
all functions for parsing and sending cookies are found in (lib/cookie.c).
246246

247247
HTTPS uses in almost every means the same procedure as HTTP, with only two
248248
exceptions: the connect procedure is different and the function used to read
249249
or write from the socket is different, although the latter fact is hidden in
250250
the source by the use of Curl_read() for reading and Curl_write() for writing
251251
data to the remote server.
252252

253-
curl_http_chunks.c contains functions that understands HTTP 1.1 chunked
254-
transfer encoding.
253+
http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
254+
encoding.
255255

256256
An interesting detail with the HTTP(S) request, is the Curl_add_buffer()
257257
series of functions we use. They append data to one single buffer, and when
@@ -261,7 +261,7 @@ Library
261261
FTP
262262

263263
The Curl_if2ip() function can be used for getting the IP number of a
264-
specified network interface, and it resides in lib/curl_if2ip.c.
264+
specified network interface, and it resides in lib/if2ip.c.
265265

266266
Curl_ftpsendf() is used for sending FTP commands to the remote server. It was
267267
made a separate function to prevent us programmers from forgetting that they
@@ -270,42 +270,41 @@ Library
270270

271271
Kerberos
272272

273-
The kerberos support is mainly in lib/curl_krb4.c and lib/curl_security.c.
273+
The kerberos support is mainly in lib/krb4.c and lib/security.c.
274274

275275
TELNET
276276

277-
Telnet is implemented in lib/curl_telnet.c.
277+
Telnet is implemented in lib/telnet.c.
278278

279279
FILE
280280

281-
The file:// protocol is dealt with in lib/curl_file.c.
281+
The file:// protocol is dealt with in lib/file.c.
282282

283283
LDAP
284284

285-
Everything LDAP is in lib/curl_ldap.c and lib/curl_openldap.c
285+
Everything LDAP is in lib/ldap.c and lib/openldap.c
286286

287287
GENERAL
288288

289289
URL encoding and decoding, called escaping and unescaping in the source code,
290-
is found in lib/curl_escape.c.
290+
is found in lib/escape.c.
291291

292292
While transferring data in Transfer() a few functions might get used.
293-
curl_getdate() in lib/curl_parsedate.c is for HTTP date comparisons (and
294-
more).
293+
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
295294

296-
lib/curl_getenv.c offers curl_getenv() which is for reading environment
297-
variables in a neat platform independent way. That's used in the client,
298-
but also in lib/curl_url.c when checking the proxy environment variables.
299-
Note that contrary to the normal unix getenv(), this returns an allocated
300-
buffer that must be free()ed after use.
295+
lib/getenv.c offers curl_getenv() which is for reading environment variables
296+
in a neat platform independent way. That's used in the client, but also in
297+
lib/url.c when checking the proxy environment variables. Note that contrary
298+
to the normal unix getenv(), this returns an allocated buffer that must be
299+
free()ed after use.
301300

302-
lib/curl_netrc.c holds the .netrc parser
301+
lib/netrc.c holds the .netrc parser
303302

304-
lib/curl_timeval.c features replacement functions for systems that don't have
303+
lib/timeval.c features replacement functions for systems that don't have
305304
gettimeofday() and a few support functions for timeval conversions.
306305

307306
A function named curl_version() that returns the full curl version string is
308-
found in lib/curl_version.c.
307+
found in lib/version.c.
309308

310309
Persistent Connections
311310
======================
@@ -409,10 +408,10 @@ API/ABI
409408
Client
410409
======
411410

412-
main() resides in src/tool_main.c together with most of the client code.
411+
main() resides in src/main.c together with most of the client code.
413412

414413
src/tool_hugehelp.c is automatically generated by the mkhelp.pl perl script
415-
to display the complete "manual" and the src/tool_urlglob.c file holds the
414+
to display the complete "manual" and the src/urlglob.c file holds the
416415
functions used for the URL-"globbing" support. Globbing in the sense that
417416
the {} and [] expansion stuff is there.
418417

@@ -421,23 +420,23 @@ Client
421420
control after the curl_easy_perform() it cleans up the library, checks status
422421
and exits.
423422

424-
When the operation is done, the ourWriteOut() function in
425-
src/tool_writeout.c may be called to report about the operation. That
426-
function is using the curl_easy_getinfo() function to extract useful
427-
information from the curl session.
423+
When the operation is done, the ourWriteOut() function in src/writeout.c may
424+
be called to report about the operation. That function is using the
425+
curl_easy_getinfo() function to extract useful information from the curl
426+
session.
428427

429428
Recent versions may loop and do all this several times if many URLs were
430429
specified on the command line or config file.
431430

432431
Memory Debugging
433432
================
434433

435-
The file lib/curl_memdebug.c contains debug-versions of a few functions.
436-
Functions such as malloc, free, fopen, fclose, etc that somehow deal with
437-
resources that might give us problems if we "leak" them. The functions in
438-
the memory tracking system do nothing fancy, they do their normal function
439-
and then log information about what they just did. The logged data can then
440-
be analyzed after a complete session,
434+
The file lib/memdebug.c contains debug-versions of a few functions. Functions
435+
such as malloc, free, fopen, fclose, etc that somehow deal with resources
436+
that might give us problems if we "leak" them. The functions in the memdebug
437+
system do nothing fancy, they do their normal function and then log
438+
information about what they just did. The logged data can then be analyzed
439+
after a complete session,
441440

442441
memanalyze.pl is the perl script present in tests/ that analyzes a log file
443442
generated by the memory tracking system. It detects if resources are

docs/TODO

+2-2
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ to provide the data to send.
541541

542542
19.1 http-style HEAD output for ftp
543543

544-
#undef CURL_FTP_HTTPSTYLE_HEAD in lib/curl_ftp.c to remove the HTTP-style
545-
headers from being output in NOBODY requests over ftp
544+
#undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
545+
from being output in NOBODY requests over ftp
546546

547547
19.2 combine error codes
548548

include/curl/curlrules.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ typedef char
190190
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
191191
* these to be visible and exported by the external libcurl interface API,
192192
* while also making them visible to the library internals, simply including
193-
* curl_setup.h, without actually needing to include curl.h internally.
193+
* setup.h, without actually needing to include curl.h internally.
194194
* If some day this section would grow big enough, all this should be moved
195195
* to its own header file.
196196
*/

lib/CMakeLists.txt

+22-22
Original file line numberDiff line numberDiff line change
@@ -18,52 +18,52 @@ if(MSVC)
1818
endif()
1919

2020
# SET(CSOURCES
21-
# # curl_memdebug.c -not used
22-
# # curl_nwlib.c - Not used
23-
# # curl_strtok.c - specify later
24-
# # curl_strtoofft.c - specify later
21+
# # memdebug.c -not used
22+
# # nwlib.c - Not used
23+
# # strtok.c - specify later
24+
# # strtoofft.c - specify later
2525
# )
2626

2727
# # if we have Kerberos 4, right now this is never on
2828
# #OPTION(CURL_KRB4 "Use Kerberos 4" OFF)
2929
# IF(CURL_KRB4)
3030
# SET(CSOURCES ${CSOURCES}
31-
# curl_krb4.c
32-
# curl_security.c
31+
# krb4.c
32+
# security.c
3333
# )
3434
# ENDIF(CURL_KRB4)
3535

3636
# #OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF)
3737
# MARK_AS_ADVANCED(CURL_MALLOC_DEBUG)
3838
# IF(CURL_MALLOC_DEBUG)
3939
# SET(CSOURCES ${CSOURCES}
40-
# curl_memdebug.c
40+
# memdebug.c
4141
# )
4242
# ENDIF(CURL_MALLOC_DEBUG)
4343

4444
# # only build compat strtoofft if we need to
4545
# IF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
4646
# SET(CSOURCES ${CSOURCES}
47-
# curl_strtoofft.c
47+
# strtoofft.c
4848
# )
4949
# ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
5050

5151
if(HAVE_FEATURES_H)
5252
set_source_files_properties(
53-
curl_cookie.c
54-
curl_easy.c
55-
curl_formdata.c
56-
curl_getenv.c
57-
curl_nonblock.c
58-
curl_hash.c
59-
curl_http.c
60-
curl_if2ip.c
61-
curl_mprintf.c
62-
curl_multi.c
63-
curl_sendf.c
64-
curl_telnet.c
65-
curl_transfer.c
66-
curl_url.c
53+
cookie.c
54+
easy.c
55+
formdata.c
56+
getenv.c
57+
nonblock.c
58+
hash.c
59+
http.c
60+
if2ip.c
61+
mprintf.c
62+
multi.c
63+
sendf.c
64+
telnet.c
65+
transfer.c
66+
url.c
6767
COMPILE_FLAGS -D_BSD_SOURCE)
6868
endif(HAVE_FEATURES_H)
6969

0 commit comments

Comments
 (0)