[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] #3404: string function to normalize eol-style

From: B. Smith-Mannschott <bsmith.occs_at_gmail.com>
Date: Sun, 19 Apr 2009 19:55:26 +0200

I've been reworking my patch for #3404 and the first piece is ready
for review, so I though I'd post it.

[[[
Issue #3404: Provide string function to normalize eol-style.

* subversion/subversion/include/svn_string.h
  (svn_string_with_normalized_eol_style): new function
* subversion/libsvn_subr/svn_string.c
  (svn_string_with_normalized_eol_style): new function
]]]

Changes relative the corresponding part of my original patch:

* The static function svn_stringbuf_normalize_eol_style has been
folded into svn_string_with_normalized_eol_style(). This allows some
improvements:

- svn_stringbuf_normalize_eol_style no longer mistakenly uses the
public naming convention because it doesn't exist anymore.
- The use of a stringbuf intermediary between the two functions evaporates.
- We don't do as much needless copying. Previously we copied three
times, including the actual normalisation. Now we copy only once or
not at all.

* svn_string_with_normalized_eol_style now handles the rarer CR
eol-style convention in addition to LF and CRLF.

* svn_string_with_normalized_eol_style will now just return the
original svn_string_t if it requires no modification, saving some
work.

// Ben

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1809905

Received on 2009-04-19 19:56:45 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.