diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-26 03:01:41 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-26 03:01:41 +0000 |
commit | 0e6dcc7ab24e6e5b8ee3b9a532c0318eb5155e2e (patch) | |
tree | 10e9d00b89f6bb5b0d275ee4dbd6e35fe886b2ef /include | |
parent | c5b7d11e59cf8953d18ed6aba2c4df2b1eb29fd4 (diff) |
merge revision(s) 32826,34732: [Backport #6681]
* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
(rb_enc_path_last_separator, rb_enc_path_end)
(ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
path handling functions.
* file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
(rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
(rb_file_join): should respect the encodings of arguments than
file system encoding. [ruby-dev:45145] [Bug #5919]
* dir.c (check_dirname, ruby_glob0): ditto.
* ext/pathname/pathname.c (path_sub_ext): ditto.
* util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
[Bug #5153] [ruby-core:38736]
* io.c (argf_next_argv): remove the call of above function.
* ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
extension module because this is only for testsing ruby_add_suffix().
* LEGAL: remove the mention about a part of util.c, because now we
removed the part.
* io.c (argf_next_argv): now the new filename is not guranteed to
use, so should check the return value of rename(2).
* test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
now we expect same result with other platforms on no_safe_rename
platforms (=Windows).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/encoding.h | 6 | ||||
-rw-r--r-- | include/ruby/intern.h | 6 | ||||
-rw-r--r-- | include/ruby/util.h | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 058462fd24..cced3d2688 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -211,6 +211,12 @@ void rb_enc_set_default_external(VALUE encoding); void rb_enc_set_default_internal(VALUE encoding); VALUE rb_locale_charmap(VALUE klass); long rb_memsearch(const void*,long,const void*,long,rb_encoding*); +char *rb_enc_path_next(const char *,const char *,rb_encoding*); +char *rb_enc_path_skip_prefix(const char *,const char *,rb_encoding*); +char *rb_enc_path_last_separator(const char *,const char *,rb_encoding*); +char *rb_enc_path_end(const char *,const char *,rb_encoding*); +const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc); +const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc); RUBY_EXTERN VALUE rb_cEncoding; #define ENC_DUMMY_FLAG (1<<24) diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 6dec838e75..927b536678 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -402,15 +402,9 @@ int rb_find_file_ext_safe(VALUE*, const char* const*, int); VALUE rb_find_file_safe(VALUE, int); int rb_find_file_ext(VALUE*, const char* const*); VALUE rb_find_file(VALUE); -char *rb_path_next(const char *); -char *rb_path_skip_prefix(const char *); -char *rb_path_last_separator(const char *); -char *rb_path_end(const char *); VALUE rb_file_directory_p(VALUE,VALUE); VALUE rb_str_encode_ospath(VALUE); int rb_is_absolute_path(const char *); -const char *ruby_find_basename(const char *name, long *baselen, long *alllen); -const char *ruby_find_extname(const char *name, long *len); /* gc.c */ void ruby_set_stack_size(size_t); NORETURN(void rb_memerror(void)); diff --git a/include/ruby/util.h b/include/ruby/util.h index 40f044d3cb..e82f537728 100644 --- a/include/ruby/util.h +++ b/include/ruby/util.h @@ -54,10 +54,6 @@ unsigned long ruby_scan_oct(const char *, size_t, size_t *); #define scan_hex(s,l,e) ((int)ruby_scan_hex((s),(l),(e))) unsigned long ruby_scan_hex(const char *, size_t, size_t *); -#if defined(__CYGWIN32__) || defined(_WIN32) -void ruby_add_suffix(VALUE str, const char *suffix); -#endif - void ruby_qsort(void *, const size_t, const size_t, int (*)(const void *, const void *, void *), void *); |