diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-15 08:26:38 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-15 08:26:38 -0300 |
commit | 6420d6dc4a819cf5304b69d9270da0fcdbfb60ba (patch) | |
tree | 7448b8d48b397207357910233d7213495e18b77d /mysys/mf_pack.c | |
parent | bdab1de458317c2dc7074eb54cec908ca320272e (diff) | |
download | mariadb-git-6420d6dc4a819cf5304b69d9270da0fcdbfb60ba.tar.gz |
WL#5486: Remove code for unsupported platforms
Remove VMS specific code.
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r-- | mysys/mf_pack.c | 75 |
1 files changed, 3 insertions, 72 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index ce148b7dd69..e418d329db8 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -18,11 +18,6 @@ #ifdef HAVE_PWD_H #include <pwd.h> #endif -#ifdef VMS -#include <rms.h> -#include <iodef.h> -#include <descrip.h> -#endif /* VMS */ static char * expand_tilde(char **path); @@ -300,8 +295,7 @@ size_t normalize_dirname(char *to, const char *from) /* Despite the name, this actually converts the name to the system's - format (TODO: rip out the non-working VMS stuff and name this - properly). + format (TODO: name this properly). */ (void) intern_filename(buff, from); length= strlen(buff); /* Fix that '/' is last */ @@ -443,73 +437,10 @@ size_t unpack_filename(char * to, const char *from) /* Used before system command's like open(), create() .. */ /* Returns used length of to; total length should be FN_REFLEN */ -size_t system_filename(char * to, const char *from) +size_t system_filename(char *to, const char *from) { -#ifndef FN_C_BEFORE_DIR return (size_t) (strmake(to,from,FN_REFLEN-1)-to); -#else /* VMS */ - - /* change 'dev:lib/xxx' to 'dev:[lib]xxx' */ - /* change 'dev:xxx' to 'dev:xxx' */ - /* change './xxx' to 'xxx' */ - /* change './lib/' or lib/ to '[.lib]' */ - /* change '/x/y/z to '[x.y]x' */ - /* change 'dev:/x' to 'dev:[000000]x' */ - - int libchar_found; - size_t length; - char * to_pos,from_pos,pos; - char buff[FN_REFLEN]; - DBUG_ENTER("system_filename"); - - libchar_found=0; - (void) strmov(buff,from); /* If to == from */ - from_pos= buff; - if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skip device part */ - { - pos++; - to_pos=strnmov(to,from_pos,(size_t) (pos-from_pos)); - from_pos=pos; - } - else - to_pos=to; - - if (from_pos[0] == FN_CURLIB && from_pos[1] == FN_LIBCHAR) - from_pos+=2; /* Skip './' */ - if (strchr(from_pos,FN_LIBCHAR)) - { - *(to_pos++) = FN_C_BEFORE_DIR; - if (strinstr(from_pos,FN_ROOTDIR) == 1) - { - from_pos+=strlen(FN_ROOTDIR); /* Actually +1 but... */ - if (! strchr(from_pos,FN_LIBCHAR)) - { /* No dir, use [000000] */ - to_pos=strmov(to_pos,FN_C_ROOT_DIR); - libchar_found++; - } - } - else - *(to_pos++)=FN_C_DIR_SEP; /* '.' gives current dir */ - - while ((pos=strchr(from_pos,FN_LIBCHAR))) - { - if (libchar_found++) - *(to_pos++)=FN_C_DIR_SEP; /* Add '.' between dirs */ - if (strinstr(from_pos,FN_PARENTDIR) == 1 && - from_pos+strlen(FN_PARENTDIR) == pos) - to_pos=strmov(to_pos,FN_C_PARENT_DIR); /* Found '../' */ - else - to_pos=strnmov(to_pos,from_pos,(size_t) (pos-from_pos)); - from_pos=pos+1; - } - *(to_pos++)=FN_C_AFTER_DIR; - } - length= (size_t) (strmov(to_pos,from_pos)-to); - DBUG_PRINT("exit",("name: '%s'",to)); - DBUG_RETURN(length); -#endif -} /* system_filename */ - +} /* Fix a filename to intern (UNIX format) */ |