Better error message displayed when file cannot be opened
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c5fa9623b8
commit
bed81d66d3
22 changed files with 89 additions and 56 deletions
|
|
@ -93,6 +93,7 @@
|
|||
#define DohNewFile DOH_NAMESPACE(NewFile)
|
||||
#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)
|
||||
|
|
@ -283,6 +284,7 @@ extern char *DohStrchr(const DOHString_or_char *s1, int ch);
|
|||
extern DOHFile *DohNewFile(DOH *file, const char *mode);
|
||||
extern DOHFile *DohNewFileFromFile(FILE *f);
|
||||
extern DOHFile *DohNewFileFromFd(int fd);
|
||||
extern void DohFileErrorDisplay(DOHString *filename);
|
||||
extern int DohClose(DOH *file);
|
||||
extern int DohCopyto(DOHFile *input, DOHFile *output);
|
||||
|
||||
|
|
@ -372,6 +374,7 @@ extern void DohMemoryDebug(void);
|
|||
#define NewFile DohNewFile
|
||||
#define NewFileFromFile DohNewFileFromFile
|
||||
#define NewFileFromFd DohNewFileFromFd
|
||||
#define FileErrorDisplay DohFileErrorDisplay
|
||||
#define Close DohClose
|
||||
#define NewVoid DohNewVoid
|
||||
#define Keys DohKeys
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ char cvsroot_file_c[] = "$Header$";
|
|||
#ifdef DOH_INTFILE
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
typedef struct {
|
||||
FILE *filep;
|
||||
|
|
@ -291,3 +292,16 @@ DohNewFileFromFd(int fd)
|
|||
f->closeondel = 0;
|
||||
return DohObjMalloc(&DohFileType,f);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* FileErrorDisplay()
|
||||
*
|
||||
* Display cause of one the NewFile functions failing.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
DohFileErrorDisplay(DOHString *filename)
|
||||
{
|
||||
Printf(stderr, "Unable to open file %s: %s\n", filename, strerror(errno));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ int ALLEGROCL :: top(Node *n) {
|
|||
|
||||
f_null=NewFile(devnull, "w+");
|
||||
if (!f_null) {
|
||||
perror("Failed to open /dev/null");
|
||||
FileErrorDisplay(devnull);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(devnull);
|
||||
|
|
@ -266,7 +266,7 @@ int ALLEGROCL :: top(Node *n) {
|
|||
|
||||
f_cl=NewFile(output_filename, "w");
|
||||
if (!f_cl) {
|
||||
Printf(stderr, "Unable to open %s for writing\n", output_filename);
|
||||
FileErrorDisplay(output_filename);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ CHICKEN::top(Node *n)
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
@ -268,7 +268,7 @@ CHICKEN::top(Node *n)
|
|||
|
||||
Printf(chicken_filename,"%s%s.scm", SWIG_output_directory(), module);
|
||||
if ((f_scm = NewFile(chicken_filename,"w")) == 0) {
|
||||
Printf(stderr,"Unable to open %s\n", chicken_filename);
|
||||
FileErrorDisplay(chicken_filename);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ int CLISP :: top(Node *n) {
|
|||
|
||||
f_cl=NewFile(output_filename, "w+");
|
||||
if (!f_cl) {
|
||||
Printf(stderr, "Unable to open %s for writing\n", output_filename);
|
||||
FileErrorDisplay(output_filename);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ class CSHARP : public Language {
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"Unable to open %s\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
@ -280,7 +280,7 @@ class CSHARP : public Language {
|
|||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), imclass_name);
|
||||
File *f_im = NewFile(filen,"w");
|
||||
if(!f_im) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -321,7 +321,7 @@ class CSHARP : public Language {
|
|||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), module_class_name);
|
||||
File *f_module = NewFile(filen,"w");
|
||||
if(!f_module) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -922,7 +922,7 @@ class CSHARP : public Language {
|
|||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), symname);
|
||||
File *f_enum = NewFile(filen,"w");
|
||||
if(!f_enum) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -1412,7 +1412,7 @@ class CSHARP : public Language {
|
|||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), proxy_class_name);
|
||||
f_proxy = NewFile(filen,"w");
|
||||
if(!f_proxy) {
|
||||
Printf(stderr, "Unable to create proxy class file: %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -2359,7 +2359,7 @@ class CSHARP : public Language {
|
|||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), classname);
|
||||
File *f_swigtype = NewFile(filen,"w");
|
||||
if(!f_swigtype) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
|
|||
|
|
@ -200,6 +200,10 @@ public:
|
|||
else if (strcmp (argv[i], "-procdoc") == 0) {
|
||||
if (argv[i + 1]) {
|
||||
procdoc = NewFile(argv[i + 1], (char *) "w");
|
||||
if (!procdoc) {
|
||||
FileErrorDisplay(argv[i + 1]);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Swig_mark_arg (i);
|
||||
Swig_mark_arg (i + 1);
|
||||
i++;
|
||||
|
|
@ -338,7 +342,7 @@ public:
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
@ -543,7 +547,7 @@ public:
|
|||
Delete(primitive_name);
|
||||
File *scmstubfile = NewFile(fname, (char *) "w");
|
||||
if (!scmstubfile) {
|
||||
Printf(stderr,"*** Can't open '%s' for writing\n", fname);
|
||||
FileErrorDisplay(fname);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(fname);
|
||||
|
|
@ -575,7 +579,7 @@ public:
|
|||
module_name);
|
||||
File *goopsfile = NewFile(fname, (char *)"w");
|
||||
if (!goopsfile) {
|
||||
Printf(stderr,"*** Can't open '%s' for writing\n", fname);
|
||||
FileErrorDisplay(fname);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(fname);
|
||||
|
|
|
|||
|
|
@ -283,14 +283,14 @@ class JAVA : public Language {
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"Unable to open %s\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (directorsEnabled()) {
|
||||
f_runtime_h = NewFile(outfile_h,"w");
|
||||
if (!f_runtime_h) {
|
||||
Printf(stderr,"Unable to open %s\n", outfile_h);
|
||||
FileErrorDisplay(outfile_h);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
@ -404,7 +404,7 @@ class JAVA : public Language {
|
|||
String *filen = NewStringf("%s%s.java", SWIG_output_directory(), imclass_name);
|
||||
File *f_im = NewFile(filen,"w");
|
||||
if(!f_im) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -455,7 +455,7 @@ class JAVA : public Language {
|
|||
String *filen = NewStringf("%s%s.java", SWIG_output_directory(), module_class_name);
|
||||
File *f_module = NewFile(filen,"w");
|
||||
if(!f_module) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -502,7 +502,7 @@ class JAVA : public Language {
|
|||
String *filen = NewStringf("%s%sConstants.java", SWIG_output_directory(), module_class_name);
|
||||
File *f_module = NewFile(filen,"w");
|
||||
if(!f_module) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -1133,7 +1133,7 @@ class JAVA : public Language {
|
|||
String *filen = NewStringf("%s%s.java", SWIG_output_directory(), symname);
|
||||
File *f_enum = NewFile(filen,"w");
|
||||
if(!f_enum) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -1672,7 +1672,7 @@ class JAVA : public Language {
|
|||
String *filen = NewStringf("%s%s.java", SWIG_output_directory(), proxy_class_name);
|
||||
f_proxy = NewFile(filen,"w");
|
||||
if(!f_proxy) {
|
||||
Printf(stderr, "Unable to create proxy class file: %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
@ -2510,7 +2510,7 @@ class JAVA : public Language {
|
|||
String *filen = NewStringf("%s%s.java", SWIG_output_directory(), classname);
|
||||
File *f_swigtype = NewFile(filen,"w");
|
||||
if(!f_swigtype) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ NEW LANGUAGE NOTE:END ************************************************/
|
|||
/* Open the output file */
|
||||
f_runtime = NewFile(outfile, "w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr, "*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ static void SWIG_dump_runtime() {
|
|||
|
||||
runtime = NewFile(outfile, "w");
|
||||
if (!runtime) {
|
||||
Printf(stderr, "*** Unable to open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -841,11 +841,19 @@ int SWIG_main(int argc, char *argv[], Language *l) {
|
|||
} else {
|
||||
outfile = NewString(outfile_name);
|
||||
}
|
||||
if (dependencies_file && Len(dependencies_file) != 0)
|
||||
if (dependencies_file && Len(dependencies_file) != 0) {
|
||||
f_dependencies_file = NewFile(dependencies_file,"w");
|
||||
else if (!depend_only) {
|
||||
if (!f_dependencies_file) {
|
||||
FileErrorDisplay(dependencies_file);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
} else if (!depend_only) {
|
||||
String *filename = NewStringf("%s_wrap.%s", Swig_file_basename(input_file), depends_extension);
|
||||
f_dependencies_file = NewFile(filename,"w");
|
||||
if (!f_dependencies_file) {
|
||||
FileErrorDisplay(filename);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
f_dependencies_file = stdout;
|
||||
|
|
|
|||
|
|
@ -575,8 +575,8 @@ MODULA3 ():
|
|||
File *openWriteFile (String * name)
|
||||
{
|
||||
File *file = NewFile (name, "w");
|
||||
if (file == NIL) {
|
||||
Printf (stderr, "Unable to open <%s> for writing.\n", name);
|
||||
if (!file) {
|
||||
FileErrorDisplay (name);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
Delete (name);
|
||||
|
|
@ -967,7 +967,7 @@ MODULA3 ():
|
|||
|
||||
f_runtime = NewFile (outfile, "w");
|
||||
if (!f_runtime) {
|
||||
Printf (stderr, "Unable to open %s\n", outfile);
|
||||
FileErrorDisplay (outfile);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString ("");
|
||||
|
|
@ -2575,7 +2575,7 @@ MODULA3 ():
|
|||
NewStringf ("%s%s.m3", Swig_file_dirname (outfile), proxy_class_name);
|
||||
f_proxy = NewFile (filen, "w");
|
||||
if (!f_proxy) {
|
||||
Printf (stderr, "Unable to create proxy class file: %s\n", filen);
|
||||
FileErrorDisplay (filen);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
Delete (filen);
|
||||
|
|
@ -4012,6 +4012,10 @@ MODULA3 ():
|
|||
String *filen =
|
||||
NewStringf ("%s%s.m3", Swig_file_dirname (outfile), classname);
|
||||
File *f_swigtype = NewFile (filen, "w");
|
||||
if (!f_swigtype) {
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
String *swigtype = NewString ("");
|
||||
|
||||
// Emit banner name
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public:
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ public:
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
@ -320,12 +320,12 @@ public:
|
|||
|
||||
String *mlfilen = NewStringf("%s%s", SWIG_output_directory(),mlfile);
|
||||
if ((f_mlout = NewFile(mlfilen,"w")) == 0) {
|
||||
Printf(stderr,"Unable to open %s\n", mlfilen);
|
||||
FileErrorDisplay(mlfilen);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
String *mlifilen = NewStringf("%s%s", SWIG_output_directory(),mlifile);
|
||||
if ((f_mliout = NewFile(mlifilen,"w")) == 0) {
|
||||
Printf(stderr,"Unable to open %s\n", mlifilen);
|
||||
FileErrorDisplay(mlifilen);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ public:
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
@ -245,7 +245,7 @@ public:
|
|||
}
|
||||
String *filen = NewStringf("%s%s", SWIG_output_directory(),pmfile);
|
||||
if ((f_pm = NewFile(filen,"w")) == 0) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ public:
|
|||
/* Write out Makefile.in */
|
||||
f_extra = NewFile(makefilein, "w");
|
||||
if (!f_extra) {
|
||||
Printf(stderr,"Unable to open %s\n",makefilein);
|
||||
FileErrorDisplay(makefilein);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ public:
|
|||
// the php folk!
|
||||
f_extra = NewFile(configm4, "w");
|
||||
if (!f_extra) {
|
||||
Printf(stderr, "Unable to open %s\n",configm4);
|
||||
FileErrorDisplay(configm4);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -504,7 +504,7 @@ public:
|
|||
/* CREDITS */
|
||||
f_extra = NewFile(credits, "w");
|
||||
if (!f_extra) {
|
||||
Printf(stderr,"Unable to open %s\n",credits);
|
||||
FileErrorDisplay(credits);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Printf(f_extra, "%s\n", module);
|
||||
|
|
@ -526,7 +526,7 @@ public:
|
|||
/* main output file */
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -576,7 +576,7 @@ public:
|
|||
|
||||
f_phpcode = NewFile(filen, "w");
|
||||
if (!f_phpcode) {
|
||||
Printf(stderr, "*** Can't open '%s'\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -650,7 +650,7 @@ public:
|
|||
Printv(filen, SWIG_output_directory(), "php_", module, ".h", NIL);
|
||||
f_h = NewFile(filen, "w");
|
||||
if (!f_h) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public:
|
|||
/* Open the output file */
|
||||
f_runtime = NewFile(outfile, "w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr, "*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ public:
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ public:
|
|||
if (!no_header_file) {
|
||||
f_runtime_h = NewFile(outfile_h,"w");
|
||||
if (!f_runtime_h) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile_h);
|
||||
FileErrorDisplay(outfile_h);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -305,7 +305,7 @@ public:
|
|||
if (interface) module = interface;
|
||||
else Insert(module,0,"_");
|
||||
if ((f_shadow_py = NewFile(filen,"w")) == 0) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
Delete(filen); filen = NULL;
|
||||
|
|
|
|||
|
|
@ -373,14 +373,14 @@ public:
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (directorsEnabled()) {
|
||||
f_runtime_h = NewFile(outfile_h,"w");
|
||||
if (!f_runtime_h) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile_h);
|
||||
FileErrorDisplay(outfile_h);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
out = NewFile(outfile,"w");
|
||||
if (!out)
|
||||
{
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ public:
|
|||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
f_init = NewString("");
|
||||
|
|
@ -175,7 +175,7 @@ public:
|
|||
Insert( module,0,"_" );
|
||||
|
||||
if ((f_shadow = NewFile(filen,"w")) == 0) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
FileErrorDisplay(filen);
|
||||
SWIG_exit (EXIT_FAILURE);
|
||||
}
|
||||
f_shadow_stubs = NewString("");
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ int UFFI :: top(Node *n) {
|
|||
|
||||
f_null=NewFile(devnull, "w+");
|
||||
if (!f_null) {
|
||||
perror("Failed to open /dev/null");
|
||||
FileErrorDisplay(devnull);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Delete(devnull);
|
||||
|
|
@ -244,7 +244,7 @@ int UFFI :: top(Node *n) {
|
|||
|
||||
f_cl=NewFile(output_filename, "w");
|
||||
if (!f_cl) {
|
||||
Printf(stderr, "Unable to open %s for writing\n", output_filename);
|
||||
FileErrorDisplay(output_filename);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public:
|
|||
out = NewFile(outfile,"w");
|
||||
if (!out)
|
||||
{
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
continue;
|
||||
|
|
@ -106,7 +106,7 @@ public:
|
|||
out = NewFile(outfile,"w");
|
||||
if (!out)
|
||||
{
|
||||
Printf(stderr,"*** Can't open '%s'\n", outfile);
|
||||
FileErrorDisplay(outfile);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
@ -367,7 +367,7 @@ void Swig_print_xml(DOH *obj, String* filename)
|
|||
else {
|
||||
out = NewFile(filename, "w");
|
||||
if (!out) {
|
||||
Printf(stderr,"*** Can't open '%s'\n", filename);
|
||||
FileErrorDisplay(filename);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue