~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_loadpath.c

  • Committer: Monty Taylor
  • Date: 2008-10-16 06:32:30 UTC
  • mto: (511.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 521.
  • Revision ID: monty@inaugust.com-20081016063230-4brxsra0qsmsg84q
Added -Wunused-macros.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "mysys_priv.h"
17
 
#include <m_string.h>
 
17
#include <mystrings/m_string.h>
18
18
 
19
19
        /* Returns full load-path for a file. to may be = path */
20
20
        /* if path is a hard-path return path */
28
28
{
29
29
  char buff[FN_REFLEN];
30
30
  int is_cur;
31
 
  DBUG_ENTER("my_load_path");
32
 
  DBUG_PRINT("enter",("path: %s  prefix: %s",path,
33
 
                      own_path_prefix ? own_path_prefix : ""));
34
31
 
35
32
  if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) ||
36
33
      test_if_hard_path(path))
37
 
    VOID(strmov(buff,path));
 
34
    my_stpcpy(buff,path);
38
35
  else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) ||
39
36
           (is_prefix(path,FN_PARENTDIR)) ||
40
37
           ! own_path_prefix)
42
39
    if (is_cur)
43
40
      is_cur=2;                                 /* Remove current dir */
44
41
    if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0)))
45
 
      VOID(strcat(buff,path+is_cur));
 
42
      strcat(buff,path+is_cur);
46
43
    else
47
 
      VOID(strmov(buff,path));                  /* Return org file name */
 
44
      my_stpcpy(buff,path);                     /* Return org file name */
48
45
  }
49
46
  else
50
 
    VOID(strxmov(buff,own_path_prefix,path,NullS));
51
 
  strmov(to,buff);
52
 
  DBUG_PRINT("exit",("to: %s",to));
53
 
  DBUG_RETURN(to);
 
47
    strxmov(buff,own_path_prefix,path,NULL);
 
48
  my_stpcpy(to,buff);
 
49
  return(to);
54
50
} /* my_load_path */