~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_fn_ext.c

  • Committer: Brian Aker
  • Date: 2008-07-08 16:17:31 UTC
  • Revision ID: brian@tangent.org-20080708161731-io36j7igglok79py
DATE cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include "config.h"
17
 
 
18
 
#include "drizzled/internal/my_sys.h"
19
 
#include "drizzled/internal/m_string.h"
20
 
 
21
 
namespace drizzled
22
 
{
23
 
namespace internal
24
 
{
 
16
 
 
17
#include "mysys_priv.h"
 
18
#include <m_string.h>
25
19
 
26
20
/*
27
21
  Return a pointer to the extension of the filename.
42
36
char *fn_ext(const char *name)
43
37
{
44
38
  register const char *pos, *gpos;
 
39
  DBUG_ENTER("fn_ext");
 
40
  DBUG_PRINT("mfunkt",("name: '%s'",name));
45
41
 
46
 
#if defined(FN_DEVCHAR)
 
42
#if defined(FN_DEVCHAR) || defined(FN_C_AFTER_DIR) || defined(BASKSLASH_MBTAIL)
47
43
  {
48
44
    char buff[FN_REFLEN];
49
45
    size_t res_length;
54
50
    gpos= name;
55
51
#endif
56
52
  pos=strchr(gpos,FN_EXTCHAR);
57
 
  return((char*) (pos ? pos : strchr(gpos, '\0')));
 
53
  DBUG_RETURN((char*) (pos ? pos : strend(gpos)));
58
54
} /* fn_ext */
59
 
 
60
 
} /* namespace internal */
61
 
} /* namespace drizzled */