acl/lib_acl/include/stdlib/acl_argv.h

214 lines
6.2 KiB
C
Raw Normal View History

2014-11-19 00:25:21 +08:00
#ifndef ACL_ARGV_INCLUDE_H
#define ACL_ARGV_INCLUDE_H
# ifdef __cplusplus
extern "C" {
# endif
#include "acl_define.h"
#include <stdarg.h>
2015-11-09 22:11:21 +08:00
#include "acl_dbuf_pool.h"
2014-11-19 00:25:21 +08:00
#include "acl_iterator.h"
/**
* External interface.
*/
typedef struct ACL_ARGV {
int len; /**< number of array elements */
int argc; /**< array elements in use */
char **argv; /**< string array */
/* <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD><EFBFBD><EFBFBD> */
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD> (<28>ڲ<EFBFBD><DAB2><EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>) */
void (*push_back)(struct ACL_ARGV*, const char*);
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD> (<28>ڲ<EFBFBD><DAB2><EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>)*/
void (*push_front)(struct ACL_ARGV*, const char*);
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_myfree <20>ͷ<EFBFBD>) */
char *(*pop_back)(struct ACL_ARGV*);
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_myfree <20>ͷ<EFBFBD>) */
char *(*pop_front)(struct ACL_ARGV*);
/* for acl_iterator */
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD> */
void *(*iter_head)(ACL_ITER*, struct ACL_ARGV*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
void *(*iter_next)(ACL_ITER*, struct ACL_ARGV*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD> */
void *(*iter_tail)(ACL_ITER*, struct ACL_ARGV*);
/* ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
void *(*iter_prev)(ACL_ITER*, struct ACL_ARGV*);
/* private */
2015-11-09 22:11:21 +08:00
ACL_DBUF_POOL *dbuf;
2014-11-19 00:25:21 +08:00
} ACL_ARGV;
/* in acl_argv.c */
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param size {int} <EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>ʼ<EFBFBD><EFBFBD>С
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_alloc(int size);
2015-11-09 22:11:21 +08:00
ACL_API ACL_ARGV *acl_argv_alloc2(int size, ACL_DBUF_POOL *dbuf);
2014-11-19 00:25:21 +08:00
/**
* <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>NULL<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param ... <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ΪNULL, <EFBFBD><EFBFBD>ʽ<EFBFBD>{s1}, {s2}, ..., NULL
*/
ACL_API void acl_argv_add(ACL_ARGV *argvp,...);
/**
* <EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<EFBFBD>ͷžɵ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV *} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param idx {int} ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD>ӦԽ<EFBFBD><EFBFBD>
* @param value {const char *} <EFBFBD><EFBFBD> NULL <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> -1 <EFBFBD><EFBFBD>ʾ<EFBFBD>±<EFBFBD>Խ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> value Ϊ NULL<EFBFBD><EFBFBD>0 <EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD>
*/
ACL_API int acl_argv_set(ACL_ARGV *argvp, int idx, const char *value);
2014-11-19 00:25:21 +08:00
/**
* <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param ap {va_list} <EFBFBD>ɶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵı<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
*/
ACL_API void acl_argv_addv(ACL_ARGV *argvp, va_list ap);
/**
* <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶγ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
2015-11-09 22:11:21 +08:00
* @param ... һ<EFBFBD><EFBFBD><EFBFBD>г<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD>: {s1}, {len1}, {s2}, {len2}, ... NULL
2014-11-19 00:25:21 +08:00
*/
ACL_API void acl_argv_addn(ACL_ARGV *argvp,...);
/**
* <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶγ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param ap {va_list} һ<EFBFBD><EFBFBD><EFBFBD>г<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵı<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
*/
ACL_API void acl_argv_addnv(ACL_ARGV *argvp, va_list ap);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
ACL_API void acl_argv_terminate(ACL_ARGV *argvp);
/**
* <EFBFBD>ͷ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
ACL_API ACL_ARGV *acl_argv_free(ACL_ARGV *argvp);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param idx {int} <EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>
* @return {char*} NULL: <EFBFBD>±<EFBFBD>Խ<EFBFBD>!= NULL: <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
*/
ACL_API char *acl_argv_index(ACL_ARGV *argvp, int idx);
/**
* <EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ǰ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {int}
*/
ACL_API int acl_argv_size(ACL_ARGV *argvp);
/* in acl_argv_split.c */
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_split(const char *str, const char *delim);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD>ͬʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
2015-11-09 22:11:21 +08:00
* @param dbuf {ACL_DBUF_POOL*} <EFBFBD>ڴ<EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD>󣬿<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* ȱʡ<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_split3(const char *str, const char *delim,
2015-11-09 22:11:21 +08:00
ACL_DBUF_POOL *dbuf);
2014-11-19 00:25:21 +08:00
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param n {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_splitn(const char *str, const char *delim, size_t n);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* ͬʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param n {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2015-11-09 22:11:21 +08:00
* @param dbuf {ACL_DBUF_POOL*} <EFBFBD>ڴ<EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD>󣬿<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
* ȱʡ<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_splitn4(const char *str, const char *delim,
2015-11-09 22:11:21 +08:00
size_t n, ACL_DBUF_POOL *dbuf);
2014-11-19 00:25:21 +08:00
/**
* Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_split_append(ACL_ARGV *argvp, const char *str,
const char *delim);
/**
* Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>޶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param argvp {ACL_ARGV*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param n {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_splitn_append(ACL_ARGV *argvp, const char *str,
const char *delim, size_t n);
2016-04-14 22:39:11 +08:00
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "" <EFBFBD><EFBFBD> '' <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>
* <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_quote_split(const char *str, const char *delim);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "" <EFBFBD><EFBFBD> '' <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>
* <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param str {const char*} Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param delim {const char*} <EFBFBD>ָ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param dbuf {ACL_DBUF_POOL*} <EFBFBD>ڴ<EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD>󣬿<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* ȱʡ<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
* @return {ACL_ARGV*}
*/
ACL_API ACL_ARGV *acl_argv_quote_split4(const char *str, const char *delim,
ACL_DBUF_POOL *dbuf);
2014-11-19 00:25:21 +08:00
#define ACL_ARGV_END ((char *) 0)
# ifdef __cplusplus
}
# endif
#endif