2005-09-18 08:10:50 +00:00
|
|
|
/*
|
2005-12-05 15:11:29 +00:00
|
|
|
* $Id: name.h,v 1.3 2005-12-05 15:11:29 bacon Exp $
|
2005-09-18 08:10:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _XP_LSP_NAME_H_
|
|
|
|
#define _XP_LSP_NAME_H_
|
|
|
|
|
2005-09-18 10:23:19 +00:00
|
|
|
#include <xp/types.h>
|
|
|
|
#include <xp/macros.h>
|
2005-09-18 08:10:50 +00:00
|
|
|
|
|
|
|
struct xp_lsp_name_t
|
|
|
|
{
|
2005-09-18 10:23:19 +00:00
|
|
|
xp_word_t capacity;
|
|
|
|
xp_word_t size;
|
|
|
|
xp_char_t* buffer;
|
|
|
|
xp_char_t static_buffer[128];
|
2005-12-05 15:11:29 +00:00
|
|
|
xp_bool_t __dynamic;
|
2005-09-18 08:10:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct xp_lsp_name_t xp_lsp_name_t;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
xp_lsp_name_t* xp_lsp_name_open (
|
|
|
|
xp_lsp_name_t* name, xp_word_t capacity);
|
|
|
|
void xp_lsp_name_close (xp_lsp_name_t* name);
|
|
|
|
|
|
|
|
int xp_lsp_name_addc (xp_lsp_name_t* name, xp_cint_t c);
|
|
|
|
int xp_lsp_name_adds (xp_lsp_name_t* name, const xp_char_t* s);
|
|
|
|
void xp_lsp_name_clear (xp_lsp_name_t* name);
|
|
|
|
xp_char_t* xp_lsp_name_yield (xp_lsp_name_t* name, xp_word_t capacity);
|
2005-09-18 10:23:19 +00:00
|
|
|
int xp_lsp_name_compare (xp_lsp_name_t* name, const xp_char_t* str);
|
2005-09-18 08:10:50 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|