Files
qse/qse/lib/awk/misc.h

95 lines
2.3 KiB
C
Raw Normal View History

/*
2012-08-16 03:47:55 +00:00
* $Id$
*
2013-12-31 10:24:12 +00:00
Copyright 2006-2014 Chung, Hyung-Hwan.
2009-09-16 04:01:02 +00:00
This file is part of QSE.
2009-09-16 04:01:02 +00:00
QSE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
2009-09-16 04:01:02 +00:00
QSE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
2009-09-16 04:01:02 +00:00
You should have received a copy of the GNU Lesser General Public
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
2008-12-21 21:35:07 +00:00
#ifndef _QSE_LIB_AWK_MISC_H_
#define _QSE_LIB_AWK_MISC_H_
#ifdef __cplusplus
extern "C" {
#endif
qse_char_t* qse_awk_rtx_strtok (
qse_awk_rtx_t* rtx, const qse_char_t* s,
2014-07-08 14:30:42 +00:00
const qse_char_t* delim, qse_cstr_t* tok);
qse_char_t* qse_awk_rtx_strxtok (
qse_awk_rtx_t* rtx, const qse_char_t* s, qse_size_t len,
2014-07-08 14:30:42 +00:00
const qse_char_t* delim, qse_cstr_t* tok);
qse_char_t* qse_awk_rtx_strntok (
qse_awk_rtx_t* rtx, const qse_char_t* s,
2014-07-08 14:30:42 +00:00
const qse_char_t* delim, qse_size_t delim_len, qse_cstr_t* tok);
qse_char_t* qse_awk_rtx_strxntok (
qse_awk_rtx_t* rtx, const qse_char_t* s, qse_size_t len,
2014-07-08 14:30:42 +00:00
const qse_char_t* delim, qse_size_t delim_len, qse_cstr_t* tok);
qse_char_t* qse_awk_rtx_strxntokbyrex (
qse_awk_rtx_t* rtx,
const qse_char_t* str,
qse_size_t len,
const qse_char_t* substr,
qse_size_t sublen,
void* rex,
2014-07-08 14:30:42 +00:00
qse_cstr_t* tok,
qse_awk_errnum_t* errnum
);
2009-09-22 07:28:18 +00:00
qse_char_t* qse_awk_rtx_strxnfld (
qse_awk_rtx_t* rtx,
qse_char_t* str,
qse_size_t len,
qse_char_t fs,
qse_char_t lq,
qse_char_t rq,
qse_char_t ec,
2014-07-08 14:30:42 +00:00
qse_cstr_t* tok
2009-09-22 07:28:18 +00:00
);
int qse_awk_buildrex (
qse_awk_t* awk,
const qse_char_t* ptn,
qse_size_t len,
qse_awk_errnum_t* errnum,
void** code,
void** icode
);
2008-03-04 03:31:41 +00:00
2008-12-21 21:35:07 +00:00
int qse_awk_matchrex (
qse_awk_t* awk, void* code, int icase,
2014-07-08 14:30:42 +00:00
const qse_cstr_t* str, const qse_cstr_t* substr,
qse_cstr_t* match, qse_awk_errnum_t* errnum
);
2008-03-04 03:31:41 +00:00
void qse_awk_freerex (qse_awk_t* awk, void* code, void* icode);
int qse_awk_rtx_matchrex (
qse_awk_rtx_t* rtx, qse_awk_val_t* val,
2014-07-08 14:30:42 +00:00
const qse_cstr_t* str, const qse_cstr_t* substr,
qse_cstr_t* match
);
#ifdef __cplusplus
}
#endif
#endif