diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2019-07-25 19:30:27 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2019-07-31 00:08:49 +0100 |
commit | 98f29f8ad971da6e5d700f01b179c7ad87d5e0d4 (patch) | |
tree | e33c9fd07e828332ba1713fcca8ccbc7429ce061 | |
parent | 753c50afd718851c6909b55d6a852728e56e81d7 (diff) | |
download | swig-98f29f8ad971da6e5d700f01b179c7ad87d5e0d4.tar.gz |
Remove deprecated DohClose in DOH
-rw-r--r-- | Source/DOH/base.c | 19 | ||||
-rw-r--r-- | Source/DOH/doh.h | 7 | ||||
-rw-r--r-- | Source/DOH/dohint.h | 1 | ||||
-rw-r--r-- | Source/DOH/file.c | 22 | ||||
-rw-r--r-- | Source/DOH/string.c | 1 |
5 files changed, 0 insertions, 50 deletions
diff --git a/Source/DOH/base.c b/Source/DOH/base.c index 12351dd09..f5e418893 100644 --- a/Source/DOH/base.c +++ b/Source/DOH/base.c @@ -756,25 +756,6 @@ int DohUngetc(int ch, DOH *obj) { } /* ----------------------------------------------------------------------------- - * DohClose() - * ----------------------------------------------------------------------------- */ - -/* -int DohClose(DOH *obj) { - DohBase *b = (DohBase *) obj; - DohObjInfo *objinfo; - if (DohCheck(obj)) { - objinfo = b->type; - if (objinfo->doh_file->doh_close) { - return (objinfo->doh_file->doh_close) (b); - } - return 0; - } - return fclose((FILE *) obj); -} -*/ - -/* ----------------------------------------------------------------------------- * DohIsString() * ----------------------------------------------------------------------------- */ diff --git a/Source/DOH/doh.h b/Source/DOH/doh.h index 5a9bae2b3..7cc279ebc 100644 --- a/Source/DOH/doh.h +++ b/Source/DOH/doh.h @@ -103,7 +103,6 @@ #define DohNewFileFromFile DOH_NAMESPACE(NewFileFromFile) #define DohNewFileFromFd DOH_NAMESPACE(NewFileFromFd) #define DohFileErrorDisplay DOH_NAMESPACE(FileErrorDisplay) -#define DohClose DOH_NAMESPACE(Close) #define DohCopyto DOH_NAMESPACE(Copyto) #define DohNewList DOH_NAMESPACE(NewList) #define DohNewHash DOH_NAMESPACE(NewHash) @@ -307,10 +306,6 @@ extern DOHFile *DohNewFile(DOH *filename, const char *mode, DOHList *outfiles); extern DOHFile *DohNewFileFromFile(FILE *f); extern DOHFile *DohNewFileFromFd(int fd); extern void DohFileErrorDisplay(DOHString * filename); -/* - Deprecated, just use DohDelete -extern int DohClose(DOH *file); -*/ extern int DohCopyto(DOHFile * input, DOHFile * output); @@ -392,7 +387,6 @@ extern void DohMemoryDebug(void); /* #define StringChar DohStringChar */ /* #define StringEqual DohStringEqual */ -#define Close DohClose #define vPrintf DohvPrintf #define GetInt DohGetInt #define GetDouble DohGetDouble @@ -424,7 +418,6 @@ extern void DohMemoryDebug(void); #define NewFileFromFile DohNewFileFromFile #define NewFileFromFd DohNewFileFromFd #define FileErrorDisplay DohFileErrorDisplay -#define Close DohClose #define NewVoid DohNewVoid #define Keys DohKeys #define Strcmp DohStrcmp diff --git a/Source/DOH/dohint.h b/Source/DOH/dohint.h index c073bd95b..87def9d3d 100644 --- a/Source/DOH/dohint.h +++ b/Source/DOH/dohint.h @@ -49,7 +49,6 @@ typedef struct { int (*doh_ungetc) (DOH *obj, int ch); /* Unget character */ int (*doh_seek) (DOH *obj, long offset, int whence); /* Seek */ long (*doh_tell) (DOH *obj); /* Tell */ - int (*doh_close) (DOH *obj); /* Close */ } DohFileMethods; /* String methods */ diff --git a/Source/DOH/file.c b/Source/DOH/file.c index 5c56771d0..9fb661a36 100644 --- a/Source/DOH/file.c +++ b/Source/DOH/file.c @@ -166,27 +166,6 @@ static int File_ungetc(DOH *fo, int ch) { return -1; } -/* ----------------------------------------------------------------------------- - * File_close() - * - * Close the file - * ----------------------------------------------------------------------------- */ - -static int File_close(DOH *fo) { - int ret = 0; - DohFile *f = (DohFile *) ObjData(fo); - if (f->filep) { - ret = fclose(f->filep); - f->filep = 0; - } else if (f->fd) { -#ifdef DOH_INTFILE - ret = close(f->fd); - f->fd = 0; -#endif - } - return ret; -} - static DohFileMethods FileFileMethods = { File_read, File_write, @@ -195,7 +174,6 @@ static DohFileMethods FileFileMethods = { File_ungetc, File_seek, File_tell, - File_close, /* close */ }; static DohObjInfo DohFileType = { diff --git a/Source/DOH/string.c b/Source/DOH/string.c index 94d2737fa..6c6728578 100644 --- a/Source/DOH/string.c +++ b/Source/DOH/string.c @@ -987,7 +987,6 @@ static DohFileMethods StringFileMethods = { String_ungetc, String_seek, String_tell, - 0, /* close */ }; static DohStringMethods StringStringMethods = { |