⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tf.h

📁 T-kernel 的extension源代码
💻 H
字号:
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	tf.h * *	Definitions of TRON code framework library */#ifndef __EXTENSION_TF_H__#define __EXTENSION_TF_H__#include <basic.h>#include "typedef.h"#include <tlang.h>#include <wtstring.h>#ifdef __cplusplusextern "C" {#endif/* ------------------------------------------------------------ *//* Attributes of character string (not passed to decoder/encoder) */#define TF_ATTR_START		0x01000000U	/* Start anew at the beginning *//* Passed only to callback function of encoder */#define TF_ATTR_DST_START	0x02000000U	/* Character string starts at destination. */#define TF_ATTR_DST_END		0x04000000U	/* Character string ends at destination. *//* Attributes of character string src (interpreted by decoder) */#define TF_ATTR_CONT		0x00010000U	/* Not terminate at the end */#define TF_ATTR_IGNORE_FUSEN	0x00020000U	/* Ignore all tags. *//* Attributes of character string dst (interpreted by encoder) */#define TF_ATTR_SUPPRESS_FUSEN	0x00000100U	/* Inhibit tags. */#define TF_ATTR_MIME_STRUCTURED_FIELD 0x00000200U /* Structured field						    (Valid only with MIME_HEADER) *//* Attributes of character (can be stored in TFIC) */#define TF_ATTR_HAN 		0x00000001U	/* Modified single-width */#define TF_ATTR_CONTROL 	0x00000002U	/* Control character */#define TF_ATTR_MASK_PROFILE	0x00ffff00U	/* Interpreted by encoder/decoder */#define TF_ATTR_MASK_TFIC	0x000000ffU	/* Stored in TFIC *//* ------------------------------------------------------------ *//* ID type */#define TF_ID_PROFSET_CONVERTFROM	0x01000000#define TF_ID_PROFSET_CONVERTTO		0x02000000#define TF_ID_OPT_CONVERT		0x03000000#define TF_ID_OPT_DEFAULT		0x04000000#define TF_ID_CHARSET			0x05000000#define TF_ID_SETOFCHARSET		0x06000000#define TF_ID_OPT_PTR			0x07000000#define TF_ID_PROPERTY			0x08000000#define	TF_ID_DECODER_CONVERTFROM	0x09000000#define	TF_ID_DECODER_CONVERTTO		0x0a000000#define	TF_ID_CHARSET_CONVERTFROM	0x0b000000#define	TF_ID_CHARSET_CONVERTTO		0x0c000000#define	TF_ID_ENCODER_CONVERTFROM	0x0d000000#define	TF_ID_ENCODER_CONVERTTO		0x0e000000/* ------------------------------------------------------------ *//* Profile */typedef struct tf_profile TF_PROFILE; /* ------------------------------------------------------------ *//* Processing environment*/typedef struct tf_ctx *TF_CTX;/* ------------------------------------------------------------ *//* External function */IMPORT ER  tf_init();IMPORT ER  tf_set_options (TF_CTX ctx, W optid, W value);IMPORT ER  tf_set_options_ptr(TF_CTX ctx, W optid, void *ptr);IMPORT ER  tf_open_ctx(TF_CTX *ctxp);IMPORT ER  tf_close_ctx(TF_CTX ctx);IMPORT ER  tf_set_profile(TF_CTX ctx, W profsetid);IMPORT ER  tf_set_profile_ptr(TF_CTX ctx, TF_PROFILE *decoder, TF_PROFILE *processor, TF_PROFILE *encoder);IMPORT WER tf_tcstostr(TF_CTX ctx, const TC *src, W slen, TLANG lang, UW attr, UB *dst, W *dlenp);IMPORT WER tf_strtotcs(TF_CTX ctx, const UB *src, W slen, UW attr, TC *dst, W *dlenp);IMPORT WER tf_strtostr(TF_CTX ctx, const UB *src, W slen, UW attr, UB *dst, W *dlenp);IMPORT WER tf_to_id (W idtype, const B *keyword);IMPORT WER tf_id_to_idtype (W id);IMPORT B   *tf_id_to_str (W id);IMPORT ER  tf_id_property(W object_id, W property_id, void *valuep);IMPORT ER  tf_init_charset(TF_CTX ctx);IMPORT WER tf_query_charset_tcs(TF_CTX ctx, const TC *src, W slen, TLANG lang, UW attr, W charsetid);IMPORT WER tf_aggregate_charset_tcs(TF_CTX ctx, const TC *src, W slen, TLANG lang, UW attr);IMPORT WER tf_query_charset(TF_CTX ctx, W charsetid);#ifdef __cplusplus}#endif#endif /* __EXTENSION_TF_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -