summaryrefslogtreecommitdiff
path: root/filesystem/dfs/include/dfs_util.h
blob: 948abe09cce8b90c1d1d5bba6caf4cf6970dff05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
+------------------------------------------------------------------------------
| Project   : Device Filesystem
+------------------------------------------------------------------------------
| Copyright 2004, 2005  www.fayfayspace.org.
| All rights reserved.
|------------------------------------------------------------------------------
| File      : dfs_util.h, some misc definitions of Device FileSystem
|------------------------------------------------------------------------------
| Chang Logs:
| Date           Author       Notes
| 2005-01-26     ffxz         The first version
+------------------------------------------------------------------------------
*/

#ifndef __DFS_UTIL_H__
#define __DFS_UTIL_H__

#include <dfs_def.h>

int dir_name(const char* path, char* dirname, int len);
int file_name(const char* path, char* filename, int len);

int next_dir_name(const char* path, int pos, char* next);
void build_fullpath(const char *directory, const char *filename, char *fullpath);
int str_is_prefix(const char* prefix, const char* str);

#if !defined(RT_USING_MINILIBC) && !defined(RT_USING_NEWLIB)
char *strrchr(const char *t, int c);
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION / 10000 < 35)
int strncasecmp(const char* s1, const char* s2, rt_size_t len);
#endif /* end of __ARMCC_VERSION */
#endif

#endif