customised ccache support: read the CCACHE_OUTFILES env variable and if exists, the names of all generated files are written to the filename specified in the env variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
04a1d9182f
commit
6fb0f48935
27 changed files with 111 additions and 83 deletions
|
|
@ -92,12 +92,12 @@ DohEncoding(name, fn) Register a format encoding for Printf
|
|||
|
||||
Currently Available datatypes
|
||||
------------------------------
|
||||
NewString(char *initial) Strings
|
||||
NewHash() Hash
|
||||
NewList() List
|
||||
NewVoid(void *ptr, void (*del)(void *)) Void
|
||||
NewFile(char *file, char *mode) File
|
||||
NewCallable(DOH *(*func)(DOH *, DOH *)) Callable object
|
||||
NewString(char *initial) Strings
|
||||
NewHash() Hash
|
||||
NewList() List
|
||||
NewVoid(void *ptr, void (*del)(void *)) Void
|
||||
NewFile(char *filename, char *mode, List *newfiles) File
|
||||
NewCallable(DOH *(*func)(DOH *, DOH *)) Callable object
|
||||
|
||||
|
||||
Odds and ends:
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ extern char *DohStrchr(const DOHString_or_char *s1, int ch);
|
|||
* Files
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
extern DOHFile *DohNewFile(DOH *file, const char *mode);
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -228,15 +228,16 @@ static DohObjInfo DohFileType = {
|
|||
* NewFile()
|
||||
*
|
||||
* Create a new file from a given filename and mode.
|
||||
* If newfiles is non-zero, the filename is added to the list of new files.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
DOH *DohNewFile(DOH *fn, const char *mode) {
|
||||
DOH *DohNewFile(DOH *filename, const char *mode, DOHList *newfiles) {
|
||||
DohFile *f;
|
||||
FILE *file;
|
||||
char *filename;
|
||||
char *filen;
|
||||
|
||||
filename = Char(fn);
|
||||
file = fopen(filename, mode);
|
||||
filen = Char(filename);
|
||||
file = fopen(filen, mode);
|
||||
if (!file)
|
||||
return 0;
|
||||
|
||||
|
|
@ -245,6 +246,8 @@ DOH *DohNewFile(DOH *fn, const char *mode) {
|
|||
fclose(file);
|
||||
return 0;
|
||||
}
|
||||
if (newfiles)
|
||||
Append(newfiles, filename);
|
||||
f->filep = file;
|
||||
f->fd = 0;
|
||||
f->closeondel = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue