Remove deprecated DohClose in DOH
This commit is contained in:
parent
753c50afd7
commit
98f29f8ad9
5 changed files with 0 additions and 50 deletions
|
|
@ -755,25 +755,6 @@ int DohUngetc(int ch, DOH *obj) {
|
|||
return ungetc(ch, (FILE *) b);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* 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()
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -987,7 +987,6 @@ static DohFileMethods StringFileMethods = {
|
|||
String_ungetc,
|
||||
String_seek,
|
||||
String_tell,
|
||||
0, /* close */
|
||||
};
|
||||
|
||||
static DohStringMethods StringStringMethods = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue