API cleanup. Documentation

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2007-01-03 05:23:20 +00:00
commit c12550e4ad
27 changed files with 642 additions and 677 deletions

View file

@ -73,17 +73,6 @@
#define DohGetc DOH_NAMESPACE(Getc)
#define DohPutc DOH_NAMESPACE(Putc)
#define DohUngetc DOH_NAMESPACE(Ungetc)
#define DohStringPutc DOH_NAMESPACE(StringPutc)
#define DohStringGetc DOH_NAMESPACE(StringGetc)
#define DohStringUngetc DOH_NAMESPACE(StringUngetc)
#define DohStringAppend DOH_NAMESPACE(StringAppend)
#define DohStringLen DOH_NAMESPACE(StringLen)
#define DohStringChar DOH_NAMESPACE(StringChar)
#define DohStringEqual DOH_NAMESPACE(StringEqual)
#define DohGetline DOH_NAMESPACE(Getline)
#define DohSetline DOH_NAMESPACE(Setline)
#define DohGetfile DOH_NAMESPACE(Getfile)
@ -255,23 +244,6 @@ extern void DohSetfile(DOH *obj, DOH *file);
extern int DohReplace(DOHString * src, const DOHString_or_char *token, const DOHString_or_char *rep, int flags);
extern void DohChop(DOHString * src);
extern int DohString_putc(DOH *so, int ch);
extern int DohString_getc(DOH *so);
extern int DohString_ungetc(DOH *so, int ch);
extern void DohString_append(DOH *so, DOH *str);
extern int DohString_len(DOH *s1);
extern char *DohString_char(DOH *s1);
extern int DohString_equal(DOH *s1, DOH *s2);
extern int DohString_delslice(DOH *so, int sindex, int eindex);
#define DohStringPutc(ch,so) DohString_putc(so, ch)
#define DohStringGetc(so) DohString_getc(so)
#define DohStringUngetc(ch,so) DohString_ungetc(so, ch)
#define DohStringAppend(so,str) DohString_append(so, (DOH*)str)
#define DohStringLen(so) DohString_len((DOH*)so)
#define DohStringChar(so) DohString_char(so)
#define DohStringEqual(s1,s2) DohString_equal((DOH *)s1, (DOH *)s2)
/* Meta-variables */
extern DOH *DohGetmeta(DOH *, const DOH *);
extern int DohSetmeta(DOH *, const DOH *, const DOH *value);
@ -397,13 +369,13 @@ extern void DohMemoryDebug(void);
#define Putc DohPutc
#define Ungetc DohUngetc
#define StringPutc DohStringPutc
#define StringGetc DohStringGetc
#define StringUngetc DohStringUngetc
#define StringAppend DohStringAppend
#define StringLen DohStringLen
#define StringChar DohStringChar
#define StringEqual DohStringEqual
/* #define StringPutc DohStringPutc */
/* #define StringGetc DohStringGetc */
/* #define StringUngetc DohStringUngetc */
/* #define StringAppend Append */
/* #define StringLen DohStringLen */
/* #define StringChar DohStringChar */
/* #define StringEqual DohStringEqual */
#define Close DohClose
#define vPrintf DohvPrintf

View file

@ -36,9 +36,10 @@ static void *String_data(DOH *so) {
return (void *) s->str;
}
char *DohString_char(DOH *so) {
/* static char *String_char(DOH *so) {
return (char *) String_data(so);
}
*/
/* -----------------------------------------------------------------------------
* int String_dump() - Serialize a string onto out
@ -97,7 +98,7 @@ static void DelString(DOH *so) {
* DohString_len() - Length of a string
* ----------------------------------------------------------------------------- */
int DohString_len(DOH *so) {
static int String_len(DOH *so) {
String *s = (String *) ObjData(so);
return s->len;
}
@ -139,7 +140,7 @@ static int String_cmp(DOH *so1, DOH *so2) {
* int String_equal() - Say if two string are equal
* ----------------------------------------------------------------------------- */
int DohString_equal(DOH *so1, DOH *so2) {
static int String_equal(DOH *so1, DOH *so2) {
String *s1 = (String *) ObjData(so1);
String *s2 = (String *) ObjData(so2);
register int len = s1->len;
@ -509,7 +510,7 @@ static long String_tell(DOH *so) {
* int String_putc()
* ----------------------------------------------------------------------------- */
int DohString_putc(DOH *so, int ch) {
static int String_putc(DOH *so, int ch) {
String *s = (String *) ObjData(so);
register int len = s->len;
register int sp = s->sp;
@ -540,7 +541,7 @@ int DohString_putc(DOH *so, int ch) {
* int String_getc()
* ----------------------------------------------------------------------------- */
int DohString_getc(DOH *so) {
static int String_getc(DOH *so) {
int c;
String *s = (String *) ObjData(so);
if (s->sp >= s->len)
@ -556,7 +557,7 @@ int DohString_getc(DOH *so) {
* int String_ungetc()
* ----------------------------------------------------------------------------- */
int DohString_ungetc(DOH *so, int ch) {
static int String_ungetc(DOH *so, int ch) {
String *s = (String *) ObjData(so);
if (ch == EOF)
return ch;
@ -968,9 +969,9 @@ static DohListMethods StringListMethods = {
static DohFileMethods StringFileMethods = {
String_read,
String_write,
DohString_putc,
DohString_getc,
DohString_ungetc,
String_putc,
String_getc,
String_ungetc,
String_seek,
String_tell,
0, /* close */
@ -989,10 +990,10 @@ DohObjInfo DohStringType = {
String_str, /* doh_str */
String_data, /* doh_data */
String_dump, /* doh_dump */
DohString_len, /* doh_len */
String_len, /* doh_len */
String_hash, /* doh_hash */
String_cmp, /* doh_cmp */
DohString_equal, /* doh_equal */
String_equal, /* doh_equal */
0, /* doh_first */
0, /* doh_next */
String_setfile, /* doh_setfile */