You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/01/03 23:21:31 UTC
svn commit: r895494 - /subversion/trunk/subversion/libsvn_diff/parse-diff.c
Author: stsp
Date: Sun Jan 3 22:21:30 2010
New Revision: 895494
URL: http://svn.apache.org/viewvc?rev=895494&view=rev
Log:
* subversion/libsvn_diff/parse-diff.c
(parse_next_hunk): Use svn_io_file_seek() instead of apr_file_seek().
(svn_diff__parse_next_patch): Remove a useless apr_file_seek() call.
Modified:
subversion/trunk/subversion/libsvn_diff/parse-diff.c
Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=895494&r1=895493&r2=895494&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Sun Jan 3 22:21:30 2010
@@ -238,7 +238,7 @@
/* Get current seek position -- APR has no ftell() :( */
pos = 0;
- apr_file_seek(patch->patch_file, APR_CUR, &pos);
+ SVN_ERR(svn_io_file_seek(patch->patch_file, APR_CUR, &pos, scratch_pool));
iterpool = svn_pool_create(scratch_pool);
do
@@ -262,7 +262,7 @@
/* Update line offset for next iteration.
* APR has no ftell() :( */
pos = 0;
- apr_file_seek(patch->patch_file, APR_CUR, &pos);
+ SVN_ERR(svn_io_file_seek(patch->patch_file, APR_CUR, &pos, iterpool));
}
if (in_hunk)
@@ -324,7 +324,8 @@
/* Rewind to the start of the line just read, so subsequent calls
* to this function or svn_diff__parse_next_patch() don't end
* up skipping the line -- it may contain a patch or hunk header. */
- apr_file_seek(patch->patch_file, APR_SET, &last_line);
+ SVN_ERR(svn_io_file_seek(patch->patch_file, APR_SET, &last_line,
+ scratch_pool));
if (hunk_seen && start < end)
{
@@ -393,7 +394,6 @@
const char *indicator;
const char *fname;
svn_stream_t *stream;
- apr_off_t pos;
svn_boolean_t eof, in_header;
svn_hunk_t *hunk;
apr_pool_t *iterpool;
@@ -408,10 +408,6 @@
/* Get the patch's filename. */
SVN_ERR(svn_io_file_name_get(&fname, patch_file, result_pool));
- /* Get current seek position -- APR has no ftell() :( */
- pos = 0;
- apr_file_seek(patch_file, APR_CUR, &pos);
-
/* Record what we already know about the patch. */
*patch = apr_pcalloc(result_pool, sizeof(**patch));
(*patch)->patch_file = patch_file;