Cleanup
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@391 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bd6fb3ab4a
commit
9cfba9a811
2 changed files with 8 additions and 0 deletions
|
|
@ -143,6 +143,7 @@ Swig_read_file(FILE *f) {
|
||||||
* Opens a file and returns it as a string.
|
* Opens a file and returns it as a string.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
static int readbytes = 0;
|
||||||
DOHString *
|
DOHString *
|
||||||
Swig_include(const DOHString_or_char *name) {
|
Swig_include(const DOHString_or_char *name) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
@ -156,9 +157,15 @@ Swig_include(const DOHString_or_char *name) {
|
||||||
Seek(str,0,SEEK_SET);
|
Seek(str,0,SEEK_SET);
|
||||||
Setfile(str,lastpath);
|
Setfile(str,lastpath);
|
||||||
Setline(str,1);
|
Setline(str,1);
|
||||||
|
readbytes += Len(str);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
Swig_bytes_read() {
|
||||||
|
return readbytes;
|
||||||
|
}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Swig_insert_file()
|
* Swig_insert_file()
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ extern FILE *Swig_open(const DOHString_or_char *name);
|
||||||
extern DOHString *Swig_read_file(FILE *f);
|
extern DOHString *Swig_read_file(FILE *f);
|
||||||
extern DOHString *Swig_include(const DOHString_or_char *name);
|
extern DOHString *Swig_include(const DOHString_or_char *name);
|
||||||
extern int Swig_insert_file(const DOHString_or_char *name, DOHFile *outfile);
|
extern int Swig_insert_file(const DOHString_or_char *name, DOHFile *outfile);
|
||||||
|
extern int Swig_bytes_read();
|
||||||
|
|
||||||
#define SWIG_FILE_DELIMETER "/"
|
#define SWIG_FILE_DELIMETER "/"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue