corrected minor bugs in windows versions of files

This commit is contained in:
Dave Goodwin
2005-08-19 03:17:16 +00:00
parent 37c3df28d6
commit eef674a644
10 changed files with 49 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
disp('building Cantera...');
diary
mex -I../../../build/include private/ctmethods.cpp ...
mex -v -I../../../build/include private/ctmethods.cpp ...
private/ctfunctions.cpp ...
private/xmlmethods.cpp private/phasemethods.cpp ...
private/thermomethods.cpp private/kineticsmethods.cpp ...
@@ -11,17 +11,17 @@ mex -I../../../build/include private/ctmethods.cpp ...
private/wallmethods.cpp private/flowdevicemethods.cpp ...
private/funcmethods.cpp ...
private/onedimmethods.cpp private/surfmethods.cpp ...
../../../build/lib/i686-pc-win32/clib.lib ...
../../../build/lib/i686-pc-win32/oneD.lib ...
../../../build/lib/i686-pc-win32/zeroD.lib ...
../../../build/lib/i686-pc-win32/transport.lib ...
../../../build/lib/i686-pc-win32/cantera.lib ...
../../../build/lib/i686-pc-win32/recipes.lib ...
../../../build/lib/i686-pc-win32/cvode.lib ...
../../../build/lib/i686-pc-win32/ctlapack.lib ...
../../../build/lib/i686-pc-win32/ctmath.lib ...
../../../build/lib/i686-pc-win32/ctblas.lib ...
../../../build/lib/i686-pc-win32/tpx.lib
../../../build/lib/i686-pc-win32/clib.lib
disp('done.');
diary off
exit;
% ../../../build/lib/i686-pc-win32/oneD.lib ...
% ../../../build/lib/i686-pc-win32/zeroD.lib ...
% ../../../build/lib/i686-pc-win32/transport.lib ...
% ../../../build/lib/i686-pc-win32/cantera.lib ...
% ../../../build/lib/i686-pc-win32/recipes.lib ...
% ../../../build/lib/i686-pc-win32/cvode.lib ...
% ../../../build/lib/i686-pc-win32/ctlapack.lib ...
% ../../../build/lib/i686-pc-win32/ctmath.lib ...
% ../../../build/lib/i686-pc-win32/ctblas.lib ...
% ../../../build/lib/i686-pc-win32/tpx.lib

View File

@@ -13,7 +13,7 @@
#include "mex.h"
#include "ctmatutils.h"
#include "mllogger.h"
#include "../../../src/global.h"
//#include "../../../src/global.h"
namespace Cantera {
void setMatlabMode(bool m);
@@ -81,7 +81,7 @@ static Cantera::ML_Logger* _logger = 0;
void initLogger() {
if (!_logger) {
_logger = new Cantera::ML_Logger;
Cantera::setLogger(_logger);
setLogWriter(_logger);
}
}
@@ -94,11 +94,11 @@ extern "C" {
// create a log writer for error messages if this is the
// first MATLAB function call
initLogger();
initLogger();
// flag specifying the class
int iclass = getInt(prhs[0]);
// Hand off to the appropriate routine, based on the
// value of the first parameter
switch (iclass) {

View File

@@ -8,7 +8,7 @@
#include <iostream>
using namespace std;
static std::string ss = "disp('";
static string ss = "disp(' ";
namespace Cantera {
@@ -18,14 +18,15 @@ namespace Cantera {
virtual ~ML_Logger() {}
virtual void write(const std::string& s) {
virtual void write(const string& s) {
char ch = s[0];
int n = 0;
while (ch != '\0') {
if (ch =='\n') {
ss += "');";
mexEvalString(ss.c_str());
ss = "disp('";
ss = "disp(' ";
}
else
ss += ch;
@@ -36,8 +37,8 @@ namespace Cantera {
}
virtual void error(const std::string& msg) {
std::string err = "error("+msg+");";
virtual void error(const string& msg) {
string err = "error("+msg+");";
mexEvalString(err.c_str());
}

View File

@@ -7,13 +7,16 @@ static std::string ss = "disp('";
namespace Cantera {
void writelog(const std::string& s) {
// debug
mexEvalString(s.c_str());
// end debug
char ch = s[0];
int n = 0;
while (ch != '\0') {
if (ch =='\n') {
ss += " ');";
mexEvalString(ss.c_str());
ss = "disp('";
ss = "disp('doda: ";
}
else
ss += ch;

View File

@@ -62,7 +62,7 @@ static PyObject *ErrorObject;
#include "methods.h"
#include "pylogger.h"
#include "../../src/global.h"
//#include "../../src/global.h"
extern "C" {
/* Initialization function for the module */

View File

@@ -36,15 +36,16 @@ namespace Cantera {
class Logger {
public:
Logger() {}
virtual ~Logger() {}
Logger() {}
virtual ~Logger() {}
/// Write a log message. The default behavior is to write to
/// the standard output. Note that no end-of-line character is
/// appended to the message, and so if one is desired it must
/// be included in the string.
virtual void write(const string& msg) {
cout << msg;
/// Write a log message. The default behavior is to write to
/// the standard output. Note that no end-of-line character is
/// appended to the message, and so if one is desired it must
/// be included in the string.
virtual void write(const string& msg) {
cout << msg;
}
/// Write an error message and quit. The default behavior is
@@ -55,7 +56,7 @@ namespace Cantera {
/// terminate the application Cantera is invoked from (MATLAB,
/// Excel, etc.) If this is not desired, then derive a class
/// and reimplement this method.
virtual void error(const string& msg) {
virtual void error(const string& msg) {
cerr << msg << endl;
exit(-1);
}

View File

@@ -57,7 +57,6 @@ namespace Cantera {
// install a default logwriter that writes to standard
// output / standard error
logwriter = new Logger();
// HTML log files
xmllog = 0;
current = 0;
@@ -111,7 +110,9 @@ namespace Cantera {
Unit* Unit::__u = 0;
static void appinit() {
if (__app == 0) __app = new Application;
if (__app == 0) {
__app = new Application;
}
}
/**
@@ -618,6 +619,7 @@ namespace Cantera {
/// test
/// @ingroup textlogs
int userInterface() {
appinit();
return app()->logwriter->env();
}

View File

@@ -22,9 +22,8 @@
//#include <vector>
//#include <math.h>
using namespace std;
#include "MultiJac.h"
using namespace std;
namespace Cantera {

View File

@@ -882,7 +882,7 @@ AC_OUTPUT(../Cantera/Makefile \
)
# )
if test "x${OS_IS_WIN}" = "x1"; then
cp -f ../config.h ../Cantera/src
#cp -f ../config.h ../Cantera/src
cd ../ext/f2c_libs
cp arith.hwin32 arith.h
cd ../../config
@@ -898,11 +898,11 @@ fi
echo
if test "x${OS_IS_WIN}" = "x0"; then
echo "Now type '${MAKE}' to build Cantera"
else
echo "Now start Visual Studio, open workspace 'win32/cantera.dsw',"
echo "and build project 'all'. When this finishes, come back here and "
echo "type 'make win' to make the Python and/or MATLAB interfaces."
fi
#else
#echo "Now start Visual Studio, open workspace 'win32/cantera.dsw',"
#echo "and build project 'all'. When this finishes, come back here and "
#echo "type 'make win' to make the Python and/or MATLAB interfaces."
#fi
echo
# $Log: configure.in,v

View File

@@ -59,7 +59,7 @@ typedef int ftnlen; // Fortran hidden string length type
// The configure script defines this if the operatiing system is Mac
// OS X, This used to add some Mac-specific directories to the default
// data file search path.
#define DARWIN 0
/* #undef DARWIN */
#define HAS_SSTREAM
/* #undef HAS_SSTREAM */