migrated fs/path.c to cmn/path.c
This commit is contained in:
@ -13,9 +13,9 @@ pkginclude_HEADERS = \
|
||||
main.h \
|
||||
map.h \
|
||||
mem.h \
|
||||
misc.h \
|
||||
oht.h \
|
||||
opt.h \
|
||||
path.h \
|
||||
pio.h \
|
||||
pma.h \
|
||||
rbt.h \
|
||||
|
@ -52,7 +52,7 @@ CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__pkginclude_HEADERS_DIST = alg.h chr.h dll.h env.h fio.h fma.h \
|
||||
gdl.h htb.h lda.h main.h map.h mem.h misc.h oht.h opt.h pio.h \
|
||||
gdl.h htb.h lda.h main.h map.h mem.h oht.h opt.h path.h pio.h \
|
||||
pma.h rbt.h rex.h sio.h sll.h stdio.h str.h time.h tio.h tre.h \
|
||||
xma.h Mmgr.hpp StdMmgr.hpp Mmged.hpp
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
@ -224,7 +224,7 @@ top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
pkginclude_HEADERS = alg.h chr.h dll.h env.h fio.h fma.h gdl.h htb.h \
|
||||
lda.h main.h map.h mem.h misc.h oht.h opt.h pio.h pma.h rbt.h \
|
||||
lda.h main.h map.h mem.h oht.h opt.h path.h pio.h pma.h rbt.h \
|
||||
rex.h sio.h sll.h stdio.h str.h time.h tio.h tre.h xma.h \
|
||||
$(am__append_1)
|
||||
all: all-am
|
||||
|
@ -18,8 +18,12 @@
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _QSE_CMN_MISC_H_
|
||||
#define _QSE_CMN_MISC_H_
|
||||
#ifndef _QSE_CMN_PATH_H_
|
||||
#define _QSE_CMN_PATH_H_
|
||||
|
||||
/** @file
|
||||
* This file provides functions for simple path name manipulation.
|
||||
*/
|
||||
|
||||
#include <qse/types.h>
|
||||
#include <qse/macros.h>
|
||||
@ -42,6 +46,24 @@ const qse_wchar_t* qse_wcsbasename (
|
||||
const qse_wchar_t* path
|
||||
);
|
||||
|
||||
/*
|
||||
* The qse_canonpath() function deletes unnecessary path segments
|
||||
* from a path name 'path' and stores it to a memory buffer pointed
|
||||
* to by 'canon'. It null-terminates the canonical path in 'canon' and
|
||||
* returns the number of characters excluding the terminating null.
|
||||
* The caller must ensure that it is large enough before calling this
|
||||
* because this function does not check the size of the memory buffer.
|
||||
* Since the canonical path cannot be larger than the original path,
|
||||
* you can simply ensure this by providing a memory buffer as long as
|
||||
* the number of characters and a terminating null in the original path.
|
||||
*
|
||||
* @return the number of characters in the resulting canonical path.
|
||||
*/
|
||||
qse_size_t qse_canonpath (
|
||||
const qse_char_t* path,
|
||||
qse_char_t* canon
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -111,6 +111,26 @@ int qse_sed_compstd (
|
||||
qse_size_t* count /**< number of input scripts opened */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sed_compstdfile() function compiles a sed script from
|
||||
* a single file @a infile.
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int qse_sed_compstdfile (
|
||||
qse_sed_t* sed,
|
||||
const qse_char_t* infile
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sed_compstdmem() function compiles a sed script stored
|
||||
* in a null-terminated string pointed to by @a str.
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int qse_sed_compstdmem (
|
||||
qse_sed_t* sed,
|
||||
const qse_char_t* str
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sed_execstd() function executes a compiled script
|
||||
* over input streams @a in and an output stream @a out.
|
||||
|
Reference in New Issue
Block a user