diff options
author | monty@mysql.com <> | 2004-03-16 22:41:30 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2004-03-16 22:41:30 +0200 |
commit | 350b4335696fc88efa2bbf2139d2f8bf9aa5701c (patch) | |
tree | af285d8080c003d1ecb1479ec43c9b6996fd567f /mysys/mf_pack.c | |
parent | 861bf3c8c031ea80076acb7f7466bda73b23213c (diff) | |
parent | 325f6615254c871d71d9d71bb5910a61d9a61ea2 (diff) | |
download | mariadb-git-350b4335696fc88efa2bbf2139d2f8bf9aa5701c.tar.gz |
merge with 4.0
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r-- | mysys/mf_pack.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index 638bbaf7baf..2d0a5ea282b 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -347,11 +347,25 @@ static my_string NEAR_F expand_tilde(my_string *path) return (my_string) 0; } - /* fix filename so it can be used by open, create .. */ - /* to may be == from */ - /* Returns to */ -my_string unpack_filename(my_string to, const char *from) +/* + Fix filename so it can be used by open, create + + SYNOPSIS + unpack_filename() + to Store result here. Must be at least of size FN_REFLEN. + from Filename in unix format (with ~) + + RETURN + # length of to + + NOTES + to may be == from + ~ will only be expanded if total length < FN_REFLEN +*/ + + +uint unpack_filename(my_string to, const char *from) { uint length,n_length; char buff[FN_REFLEN]; @@ -362,17 +376,17 @@ my_string unpack_filename(my_string to, const char *from) if (n_length+strlen(from+length) < FN_REFLEN) { (void) strmov(buff+n_length,from+length); - (void) system_filename(to,buff); /* Fix to usably filename */ + length= system_filename(to,buff); /* Fix to usably filename */ } else - (void) system_filename(to,from); /* Fix to usably filename */ - DBUG_RETURN(to); + length= system_filename(to,from); /* Fix to usably filename */ + DBUG_RETURN(length); } /* unpack_filename */ /* Convert filename (unix standard) to system standard */ /* Used before system command's like open(), create() .. */ - /* Returns to */ + /* Returns length of to */ uint system_filename(my_string to, const char *from) { |