~atcurtis/drizzle/experimental1

« back to all changes in this revision

Viewing changes to mysys/mf_dirname.c

  • Committer: Antony Curtis
  • Date: 2008-07-28 20:18:02 UTC
  • mfrom: (134.1.85 drizzle)
  • Revision ID: atcurtis@dhcp-172-29-58-124.smo.corp.google.com-20080728201802-r5jp6hh8y3905u44
MergeĀ fromĀ main

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
size_t dirname_part(char *to, const char *name, size_t *to_res_length)
68
68
{
69
69
  size_t length;
70
 
  DBUG_ENTER("dirname_part");
71
 
  DBUG_PRINT("enter",("'%s'",name));
72
70
 
73
71
  length=dirname_length(name);
74
72
  *to_res_length= (size_t) (convert_dirname(to, name, name+length) - to);
75
 
  DBUG_RETURN(length);
 
73
  return(length);
76
74
} /* dirname */
77
75
 
78
76
 
112
110
#ifdef BACKSLASH_MBTAIL
113
111
  CHARSET_INFO *fs= fs_character_set();
114
112
#endif
115
 
  DBUG_ENTER("convert_dirname");
116
113
 
117
114
  /* We use -2 here, becasue we need place for the last FN_LIBCHAR */
118
115
  if (!from_end || (from_end - from) > FN_REFLEN-2)
161
158
    *to++=FN_LIBCHAR;
162
159
    *to=0;
163
160
  }
164
 
  DBUG_RETURN(to);                              /* Pointer to end of dir */
 
161
  return(to);                              /* Pointer to end of dir */
165
162
} /* convert_dirname */