Minor tweaks to fix output path problems

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@921 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-10-14 16:08:27 +00:00
commit 9b5bda1ce1
2 changed files with 12 additions and 3 deletions

View file

@ -362,11 +362,21 @@ int SWIG_main(int argc, char *argv[], Language *l) {
}
if (!outfile_name) {
char *cc = infilename + strlen(infilename);
while (cc != infilename) {
if (*cc == '/') {
cc++;
break;
}
cc--;
}
sprintf(fn_runtime,"%s_wrap.c",infilename);
strcpy(infile,infilename);
strcpy(output_dir,"");
outfile_name = fn_runtime;
} else {
sprintf(fn_runtime,"%s",outfile_name);
}
{
// Try to identify the output directory
char *cc = outfile_name;
char *lastc = outfile_name;

View file

@ -19,8 +19,7 @@ static char cvsroot[] = "$Header$";
static List *directories = 0; /* List of include directories */
static String *lastpath = 0; /* Last file that was included */
static int bytes_read = 0; /* Bytes read */
static int bytes_read = 0; /* Bytes read */
static String *swiglib = 0; /* Location of SWIG library */
/* -----------------------------------------------------------------------------