On 3/19/07, Paul Cochrane via RT <[EMAIL PROTECTED]> wrote:
On Sun Mar 18 23:49:11 2007, codermattie wrote:
> this is the third patch in the series of src/library.c re-factors.
>
> This patch is compile and test-suite tested on linux-i686. it does
> include a minor change
> on win32 that I was not able to test.
>
> I have created a few new path utility functions. These will remain
> static
> until a more comprehensive look at the API presented justifies
> hoisting
> them into their own file for global use in parrot.
>
> This patch is based upon [PATCH] 2 , rt #41900
>
> * path_seperator characters are gathered into a static char.
>
> * path_finalize: convert the string_from_const_cstring to string_chr
>
> * cnv_win32_filesep:
>
> a minor change, replace the explicit path seperators with the new
> static chars.
>
> WARNING: I was not able to test this on win32.
>
> * path_garuntee_trailing_seperator:
>
> introduce a new function that garuntees that the string has a
> trailing path seperator,
> modifying the string if necessary.
>
> * path_append
>
> introduce a new function that appends a path component, ensuring
> there is a path
> seperator.
>
> * path_concat
>
> concatenate two path components with a path seperator returning a
> new string.
>
> * Parrot_locate_runtime_file_str
>
> greatly simplify the locate_runtime_file_str code with the new path
> utility
> functions.
Applied in r17630. Thanks! I'll close this ticket when I get
confirmation from the Win32 people that it works correctly.
although the code looks sane, we do have a reasonable expectation that
functions and variables will be spelled correctly. unless i'm missing
something, "seperator" is correctly spelled as "separator", and
"garuntee" is correctly spelled is "guarantee". also in the comments,
"arguement" is correctly spelled "argument".
please provide a patch correcting these errors, and watch your
spelling in the future!
~jerry