last tweaks for 38 (hopefully)

This commit is contained in:
benfry
2002-07-31 21:42:06 +00:00
parent 5837452bb9
commit 07d8a7a702
12 changed files with 94 additions and 25 deletions
+14 -12
View File
@@ -133,22 +133,24 @@ public class KjcEngine extends PdeEngine {
(3.)
(.3 * 6)
(.30*7)
float f = 0.3;
fill(0.3, 0.2, 0.1);
next to white space \s or math ops +-/*()
next to white space \s or math ops +-/*()
or , on either side,
followed by ; (might as well on either side)
*/
program = substipoot(program, "([\\s\\+\\-\\/\\*\\(\\)])(\\d+\\.\\d*)([\\s\\+\\-\\/\\*\\(\\)])", "$1$2f$3");
program = substipoot(program, "([\\s\\+\\-\\/\\*\\(\\)])(\\d*\\.\\d+)([\\s\\+\\-\\/\\*\\(\\)])", "$1$2f$3");
// allow 3. to work (also allows x.x too)
program = substipoot(program, "(\\d+\\.\\d*)(\\D)", "$1f$2");
program = substipoot(program, "(\\d+\\.\\d*)ff", "$1f");
/*
// allow 3. to work (also allows x.x too)
program = substipoot(program, "(\\d+\\.\\d*)(\\D)", "$1f$2");
program = substipoot(program, "(\\d+\\.\\d*)ff", "$1f");
// allow .3 to work (also allows x.x)
program = substipoot(program, "(\\d*\\.\\d+)(\\D)", "$1f$2");
program = substipoot(program, "(\\d*\\.\\d+)ff", "$1f");
// allow .3 to work (also allows x.x)
program = substipoot(program, "(\\d*\\.\\d+)(\\D)", "$1f$2");
program = substipoot(program, "(\\d*\\.\\d+)ff", "$1f");
*/
program = substipoot(program, "([\\s\\,\\;\\+\\-\\/\\*\\(\\)])(\\d+\\.\\d*)([\\s\\,\\;\\+\\-\\/\\*\\(\\)])", "$1$2f$3");
program = substipoot(program, "([\\s\\,\\;\\+\\-\\/\\*\\(\\)])(\\d*\\.\\d+)([\\s\\,\\;\\+\\-\\/\\*\\(\\)])", "$1$2f$3");
}
// allow int(3.75) instead of just (int)3.75
+2
View File
@@ -339,6 +339,8 @@ public class PdeEditor extends Panel {
public void doRun(boolean presentation) {
//System.out.println(System.getProperty("java.class.path"));
//doStop();
doClose();
running = true;
+59 -3
View File
@@ -55,6 +55,9 @@ public class PdeEditorConsole extends Component {
static PrintStream consoleOut;
static PrintStream consoleErr;
static OutputStream stdoutFile;
static OutputStream stderrFile;
public PdeEditorConsole(PdeEditor editor) {
this.editor = editor;
@@ -65,8 +68,30 @@ public class PdeEditorConsole extends Component {
systemOut = System.out;
systemErr = System.err;
consoleOut = new PrintStream(new PdeEditorConsoleStream(this, false));
consoleErr = new PrintStream(new PdeEditorConsoleStream(this, true));
if (PdeBase.getBoolean("editor.console.out.enabled", false)) {
String outFileName =
PdeBase.get("editor.console.out.file", "lib/stdout.txt");
try {
stdoutFile = new FileOutputStream(outFileName);
} catch (IOException e) {
e.printStackTrace();
}
}
if (PdeBase.getBoolean("editor.console.err.enabled", false)) {
String errFileName =
PdeBase.get("editor.console.err.file", "lib/stderr.txt");
try {
stderrFile = new FileOutputStream(errFileName);
} catch (IOException e) {
e.printStackTrace();
}
}
consoleOut =
new PrintStream(new PdeEditorConsoleStream(this, false, stdoutFile));
consoleErr =
new PrintStream(new PdeEditorConsoleStream(this, true, stderrFile));
System.setOut(consoleOut);
System.setErr(consoleErr);
@@ -95,6 +120,7 @@ public class PdeEditorConsole extends Component {
public void paint(Graphics screen) {
//systemOut.println("paint()");
if (bgColor == null) {
bgColor = PdeBase.getColor("editor.console.bgcolor",
new Color(26, 26, 26));
fgColorOut = PdeBase.getColor("editor.console.fgcolor.output",
@@ -251,10 +277,13 @@ class PdeEditorConsoleStream extends OutputStream {
PdeEditorConsole parent;
boolean err; // whether stderr or stdout
byte single[] = new byte[1];
OutputStream echo;
public PdeEditorConsoleStream(PdeEditorConsole parent, boolean err) {
public PdeEditorConsoleStream(PdeEditorConsole parent,
boolean err, OutputStream echo) {
this.parent = parent;
this.err = err;
this.echo = echo;
}
public void close() { }
@@ -263,10 +292,28 @@ class PdeEditorConsoleStream extends OutputStream {
public void write(byte b[]) { // appears never to be used
parent.write(b, 0, b.length, err);
if (echo != null) {
try {
echo.write(b); //, 0, b.length);
echo.flush();
} catch (IOException e) {
e.printStackTrace();
echo = null;
}
}
}
public void write(byte b[], int offset, int length) {
parent.write(b, offset, length, err);
if (echo != null) {
try {
echo.write(b, offset, length);
echo.flush();
} catch (IOException e) {
e.printStackTrace();
echo = null;
}
}
/*
//System.out.println("leech2:");
if (length >= 1) {
@@ -295,6 +342,15 @@ class PdeEditorConsoleStream extends OutputStream {
public void write(int b) {
single[0] = (byte)b;
parent.write(single, 0, 1, err);
if (echo != null) {
try {
echo.write(b);
echo.flush();
} catch (IOException e) {
e.printStackTrace();
echo = null;
}
}
//parent.message(String.valueOf((char)b), err);
}
}
+1
View File
@@ -55,6 +55,7 @@ rm -rf processing/lib/export/CVS
# get platform-specific goodies from the dist dir
cp dist/Proce55ing.exe processing/
cp dist/run.bat processing/
cp dist/lib/pde_windows.properties processing/lib/
# convert notes.txt to windows LFs
Binary file not shown.
Vendored Executable
+2
View File
@@ -0,0 +1,2 @@
@echo off
.\java\bin\java -cp lib;lib\build;lib\pde.jar;lib\kjc.jar;lib\oro.jar;java\lib\ext\comm.jar
+3
View File
@@ -6,4 +6,7 @@ launcher.plg
launcher.exe
launcher.ilk
launcher.aps
Proce55ing.ilk
Proce55ing.exe
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

+4 -4
View File
@@ -101,7 +101,7 @@ BOOL CLauncherApp::InitInstance()
char *cp = (char *)malloc(8 * strlen(loaddir) + 200);
// put quotes around contents of cp,
// because %s might have spaces in it.
sprintf(cp,
"-cp \""
"%s\\lib;"
@@ -109,7 +109,7 @@ BOOL CLauncherApp::InitInstance()
"%s\\lib\\pde.jar;"
"%s\\lib\\kjc.jar;"
"%s\\lib\\oro.jar;"
"%s\\lib\\java\\ext\\comm.jar"
"%s\\java\\lib\\ext\\comm.jar"
"\" ",
loaddir, loaddir, loaddir, loaddir, loaddir, loaddir);
@@ -136,8 +136,8 @@ BOOL CLauncherApp::InitInstance()
strcpy(executable, loaddir);
// copy in the path for jrew, relative to launcher.exe
//strcat(executable, "\\bin\\jrew");
strcat(executable, "\\java\\bin\\java");
strcat(executable, "\\java\\bin\\javaw");
//AfxMessageBox(executable);
// code to add the lib directory to the path, in case that's needed
+1 -1
View File
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"launcher.exe" /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Proce55ing.exe" /pdbtype:sept
!ENDIF
Binary file not shown.
+8 -5
View File
@@ -43,13 +43,15 @@ X use osx utilities to setfileinfo for .jar files etc
o try to build macutils under osx
X bug where pde.properties was being replaced for sketch.properties
X changed pde.properties_PLATFORM -> pde_PLATFORM.properties
X f subst problems: include , and ; as allowable
X float f = 0.3; and fill(0.3, 0.2, 0.1);
X windows needs to work from the .exe
X also included run.bat just in case
before 39 goes out
_ f subst problems: include , and ; as allowable
_ float f = 0.3; and fill(0.3, 0.2, 0.1);
_ make win/linux write stderr to stderr.txt like the mac
_ this will be useful until i implement scrollbar
0039
a _ make win/linux write stderr to stderr.txt like the mac
a _ this will be useful until i implement scrollbar
bagel
a _ serial
@@ -96,6 +98,7 @@ a _ include release number, platform, and a copy of the code
a _ need comprehensive set of tests for 'f' substitution scenarios
web / docs
a _ check on linefeeds and other errors with bbs on web site
a _ online discussion/talk system (gets people using the site too)
a _ online signup cgi for people to add themselves to the list
a _ see about setting up simple bug tracker/feature system