Skip to content

Commit

Permalink
Revert changes relative to lib/*.[ch] recent renaming
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yangtse committed Jan 6, 2013
1 parent e0ba958 commit 4a5aa66
Show file tree
Hide file tree
Showing 370 changed files with 1,740 additions and 2,032 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -769,13 +769,13 @@ if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
if(HAVE_C_FLAG_Wno_long_double)
# The Mac version of GCC warns about use of long double. Disable it.
get_source_file_property(MPRINTF_COMPILE_FLAGS curl_mprintf.c COMPILE_FLAGS)
get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
if(MPRINTF_COMPILE_FLAGS)
set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
else(MPRINTF_COMPILE_FLAGS)
set(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
endif(MPRINTF_COMPILE_FLAGS)
set_source_files_properties(curl_mprintf.c PROPERTIES
set_source_files_properties(mprintf.c PROPERTIES
COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
endif(HAVE_C_FLAG_Wno_long_double)
endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
Expand Down
2 changes: 1 addition & 1 deletion buildconf
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ removethis(){
#
if test ! -f configure.ac ||
test ! -f src/tool_main.c ||
test ! -f lib/curl_urldata.h ||
test ! -f lib/urldata.h ||
test ! -f include/curl/curl.h ||
test ! -f m4/curl-functions.m4; then
echo "Can not run buildconf from outside of curl's source subdirectory!"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AC_COPYRIGHT([Copyright (c) 1998 - 2012 Daniel Stenberg, <[email protected]>
This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details])

AC_CONFIG_SRCDIR([lib/curl_urldata.h])
AC_CONFIG_SRCDIR([lib/urldata.h])
AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h)
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ Win32
possibilities:

- Modify lib/config-win32.h
- Modify lib/curl_setup.h
- Modify lib/setup.h
- Modify lib/Makefile.vc6
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
Expand Down
107 changes: 53 additions & 54 deletions docs/INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ Library
There are plenty of entry points to the library, namely each publicly defined
function that libcurl offers to applications. All of those functions are
rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are
put in the lib/curl_easy.c file.
put in the lib/easy.c file.

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

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

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

curl_easy_perform() does a whole lot of things:

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

o Curl_connect()

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

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

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

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

o Transfer()

Curl_perform() then calls Transfer() in lib/curl_transfer.c that performs
the entire file transfer.
Curl_perform() then calls Transfer() in lib/transfer.c that performs the
entire file transfer.

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

o Curl_done()

Expand Down Expand Up @@ -238,20 +238,20 @@ Library
HTTP(S)

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

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

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

curl_http_chunks.c contains functions that understands HTTP 1.1 chunked
transfer encoding.
http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
encoding.

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

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

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

Kerberos

The kerberos support is mainly in lib/curl_krb4.c and lib/curl_security.c.
The kerberos support is mainly in lib/krb4.c and lib/security.c.

TELNET

Telnet is implemented in lib/curl_telnet.c.
Telnet is implemented in lib/telnet.c.

FILE

The file:// protocol is dealt with in lib/curl_file.c.
The file:// protocol is dealt with in lib/file.c.

LDAP

Everything LDAP is in lib/curl_ldap.c and lib/curl_openldap.c
Everything LDAP is in lib/ldap.c and lib/openldap.c

GENERAL

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

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

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

lib/curl_netrc.c holds the .netrc parser
lib/netrc.c holds the .netrc parser

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

A function named curl_version() that returns the full curl version string is
found in lib/curl_version.c.
found in lib/version.c.

Persistent Connections
======================
Expand Down Expand Up @@ -409,10 +408,10 @@ API/ABI
Client
======

main() resides in src/tool_main.c together with most of the client code.
main() resides in src/main.c together with most of the client code.

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

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

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

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

Memory Debugging
================

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

memanalyze.pl is the perl script present in tests/ that analyzes a log file
generated by the memory tracking system. It detects if resources are
Expand Down
4 changes: 2 additions & 2 deletions docs/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ to provide the data to send.

19.1 http-style HEAD output for ftp

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

19.2 combine error codes

Expand Down
2 changes: 1 addition & 1 deletion include/curl/curlrules.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ typedef char
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
* these to be visible and exported by the external libcurl interface API,
* while also making them visible to the library internals, simply including
* curl_setup.h, without actually needing to include curl.h internally.
* setup.h, without actually needing to include curl.h internally.
* If some day this section would grow big enough, all this should be moved
* to its own header file.
*/
Expand Down
44 changes: 22 additions & 22 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,52 +18,52 @@ if(MSVC)
endif()

# SET(CSOURCES
# # curl_memdebug.c -not used
# # curl_nwlib.c - Not used
# # curl_strtok.c - specify later
# # curl_strtoofft.c - specify later
# # memdebug.c -not used
# # nwlib.c - Not used
# # strtok.c - specify later
# # strtoofft.c - specify later
# )

# # if we have Kerberos 4, right now this is never on
# #OPTION(CURL_KRB4 "Use Kerberos 4" OFF)
# IF(CURL_KRB4)
# SET(CSOURCES ${CSOURCES}
# curl_krb4.c
# curl_security.c
# krb4.c
# security.c
# )
# ENDIF(CURL_KRB4)

# #OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF)
# MARK_AS_ADVANCED(CURL_MALLOC_DEBUG)
# IF(CURL_MALLOC_DEBUG)
# SET(CSOURCES ${CSOURCES}
# curl_memdebug.c
# memdebug.c
# )
# ENDIF(CURL_MALLOC_DEBUG)

# # only build compat strtoofft if we need to
# IF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
# SET(CSOURCES ${CSOURCES}
# curl_strtoofft.c
# strtoofft.c
# )
# ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)

if(HAVE_FEATURES_H)
set_source_files_properties(
curl_cookie.c
curl_easy.c
curl_formdata.c
curl_getenv.c
curl_nonblock.c
curl_hash.c
curl_http.c
curl_if2ip.c
curl_mprintf.c
curl_multi.c
curl_sendf.c
curl_telnet.c
curl_transfer.c
curl_url.c
cookie.c
easy.c
formdata.c
getenv.c
nonblock.c
hash.c
http.c
if2ip.c
mprintf.c
multi.c
sendf.c
telnet.c
transfer.c
url.c
COMPILE_FLAGS -D_BSD_SOURCE)
endif(HAVE_FEATURES_H)

Expand Down
Loading

0 comments on commit 4a5aa66

Please sign in to comment.