Skip to content

Commit

Permalink
Clean up the documentation surrounding the APR_INCOMPLETE status code,
Browse files Browse the repository at this point in the history
* include/apr_file_info.h
  (apr_stat, apr_dir_read): Note that APR_INCOMPLETE can be returned, and
   that if it is you can use the finfo->valid bitfield to determine which
   parts of the finfo are filled in.  Also break some overly long lines.

* include/apr_errno.h
  (APR_STATUS_IS_INCOMPLETE): Update docs since this is no longer specific
   to the xlate code.

* CHANGES: Note change.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@356615 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Garrett Rooney committed Dec 13, 2005
1 parent c432f36 commit 90ae530
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Changes for APR 1.3.0

*) Documented that apr_stat and apr_dir_read can return APR_INCOMPLETE,
and how to determine which parts of the resulting apr_finfo_t can be
used in such a case.
[Garrett Rooney]

*) Cause apr_file_write_full on win32 to consider the timeout value set by
apr_file_pipe_timeout_set. PR 30182
[<eholyat olf.com>]
Expand Down
4 changes: 2 additions & 2 deletions include/apr_errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
*/
#define APR_STATUS_IS_TIMEUP(s) ((s) == APR_TIMEUP)
/**
* The character conversion stopped because of an incomplete character or
* shift sequence at the end of the input buffer.
* The operation was incomplete although some processing was performed
* and the results are partially valid.
* @warning
* always use this test, as platform-specific variances may meet this
* more than one error code
Expand Down
14 changes: 12 additions & 2 deletions include/apr_file_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,13 @@ struct apr_finfo_t {
* @param finfo Where to store the information about the file, which is
* never touched if the call fails.
* @param fname The name of the file to stat.
* @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
* @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_
values
* @param pool the pool to use to allocate the new file.
*
* @note If @c APR_INCOMPLETE is returned all the fields in @a finfo may
* not be filled in, and you need to check the @c finfo->valid bitmask
* to verify that what you're looking for is there.
*/
APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
apr_int32_t wanted, apr_pool_t *pool);
Expand Down Expand Up @@ -255,9 +260,14 @@ APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir);
/**
* Read the next entry from the specified directory.
* @param finfo the file info structure and filled in by apr_dir_read
* @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
* @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_
values
* @param thedir the directory descriptor returned from apr_dir_open
* @remark No ordering is guaranteed for the entries read.
*
* @note If @c APR_INCOMPLETE is returned all the fields in @a finfo may
* not be filled in, and you need to check the @c finfo->valid bitmask
* to verify that what you're looking for is there.
*/
APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
apr_dir_t *thedir);
Expand Down

0 comments on commit 90ae530

Please sign in to comment.