Back to index

php5  5.3.10
simplestring.h
Go to the documentation of this file.
00001 /*
00002   This file is part of libXMLRPC - a C library for xml-encoded function calls.
00003 
00004   Author: Dan Libby (dan@libby.com)
00005   Epinions.com may be contacted at feedback@epinions-inc.com
00006 */
00007 
00008 /*  
00009   Copyright 2000 Epinions, Inc. 
00010 
00011   Subject to the following 3 conditions, Epinions, Inc.  permits you, free 
00012   of charge, to (a) use, copy, distribute, modify, perform and display this 
00013   software and associated documentation files (the "Software"), and (b) 
00014   permit others to whom the Software is furnished to do so as well.  
00015 
00016   1) The above copyright notice and this permission notice shall be included 
00017   without modification in all copies or substantial portions of the 
00018   Software.  
00019 
00020   2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF 
00021   ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY 
00022   IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR 
00023   PURPOSE OR NONINFRINGEMENT.  
00024 
00025   3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, 
00026   SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT 
00027   OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING 
00028   NEGLIGENCE), EVEN IF EPINIONS, INC.  IS AWARE OF THE POSSIBILITY OF SUCH 
00029   DAMAGES.    
00030 
00031 */
00032 
00033 #ifndef __SIMPLESTRING_H__
00034  #define __SIMPLESTRING_H__
00035 
00036 /*-********************************
00037 * begin simplestring header stuff *
00038 **********************************/
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044    /****s* struct/simplestring
00045  * NAME
00046  *  simplestring
00047  * NOTES
00048  *   represents a string efficiently for fast appending, etc.
00049  * SOURCE
00050  */
00051 typedef struct _simplestring {
00052    char* str;         /* string buf               */
00053    int len;           /* length of string/buf     */
00054    int size;          /* size of allocated buffer */
00055 } simplestring;
00056 /******/
00057 
00058 #ifndef NULL
00059  #define NULL 0
00060 #endif
00061 
00062 void simplestring_init(simplestring* string);
00063 void simplestring_clear(simplestring* string);
00064 void simplestring_free(simplestring* string);
00065 void simplestring_add(simplestring* string, const char* add);
00066 void simplestring_addn(simplestring* string, const char* add, int add_len);
00067 
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071 
00072 /*-******************************
00073 * end simplestring header stuff *
00074 ********************************/
00075 
00076 #endif /* __SIMPLESTRING_H__ */