~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_dirname.c

  • Committer: Brian Aker
  • Date: 2008-09-05 22:16:26 UTC
  • mto: This revision was merged to the branch mainline in revision 383.
  • Revision ID: brian@tangent.org-20080905221626-nc631ypag04am60c
Big, fat, UTF-8 patch. This fixes some of the oddities around only one
charset.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  for ( ; *pos ; pos++)                         /* Find last FN_LIBCHAR */
34
34
  {
35
35
#ifdef BASKSLASH_MBTAIL
36
 
    uint32_t l;
 
36
    uint l;
37
37
    if (use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3)))
38
38
    {
39
39
      pos+= l - 1;
80
80
  SYNPOSIS
81
81
    convert_dirname()
82
82
    to                          Store result here. Must be at least of size
83
 
                                cmin(FN_REFLEN, strlen(from) + 1) to make room
 
83
                                min(FN_REFLEN, strlen(from) + 1) to make room
84
84
                                for adding FN_LIBCHAR at the end.
85
85
    from                        Original filename. May be == to
86
86
    from_end                    Pointer at end of filename (normally end \0)
91
91
    Adds a FN_LIBCHAR to end if the result string if there isn't one
92
92
    and the last isn't dev_char.
93
93
    Copies data from 'from' until ASCII(0) for until from == from_end
94
 
    If you want to use the whole 'from' string, just send NULL as the
 
94
    If you want to use the whole 'from' string, just send NullS as the
95
95
    last argument.
96
96
 
97
97
    If the result string is larger than FN_REFLEN -1, then it's cut.
130
130
      else
131
131
      {
132
132
#ifdef BACKSLASH_MBTAIL
133
 
        uint32_t l;
 
133
        uint l;
134
134
        if (use_mb(fs) && (l= my_ismbchar(fs, from, from + 3)))
135
135
        {
136
136
          memmove(to, from, l);