Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix missing parts for Windows compatibility

  • Loading branch information...
commit 65c5a71b95770c69949e394c79911af92cc6172e 1 parent 7853c7a
@olabini olabini authored
View
3  docs/release_todo
@@ -1,7 +1,4 @@
-- add scripts for windows and try them
-- check in "use" so that filename checking happens against windows too
-- implement a -S syntax
- package everything into a small ball
- upload final version
- upload ioke doks.
View
2  lib/ioke/dokgen/htmlGenerator/CellFrame.ik_template
@@ -39,7 +39,7 @@
}
-->
</style>
- <base target=\"docwin\" href=\"index.html\"/>
+ <base target=\"docwin\"/>
</head>
<body>
<div class=\"banner\">Cells</div>
View
2  lib/ioke/dokgen/htmlGenerator/FileFrame.ik_template
@@ -39,7 +39,7 @@
}
-->
</style>
- <base target=\"docwin\" href=\"index.html\"/>
+ <base target=\"docwin\"/>
</head>
<body>
<div class=\"banner\">Files</div>
View
2  lib/ioke/dokgen/htmlGenerator/KindFrame.ik_template
@@ -39,7 +39,7 @@
}
-->
</style>
- <base target=\"docwin\" href=\"index.html\"/>
+ <base target=\"docwin\"/>
</head>
<body>
<div class=\"banner\">Kinds</div>
View
13 src/main/ioke/lang/Main.java
@@ -125,8 +125,17 @@ public static void main(String[] args) throws Throwable {
r.addArgument(args[i]);
}
}
- ((IokeSystem)r.system.data).setCurrentProgram(args[start]);
- r.evaluateFile(args[start], message, context);
+ String file = args[start];
+ if(file.startsWith("\"")) {
+ file = file.substring(1, file.length());
+ }
+
+ if(file.length() > 1 && file.charAt(file.length()-1) == '"') {
+ file = file.substring(0, file.length()-1);
+ }
+
+ ((IokeSystem)r.system.data).setCurrentProgram(file);
+ r.evaluateFile(file, message, context);
} else {
if(scripts.size() == 0) {
r.evaluateString("use(\"builtin/iik\"). IIk mainLoop", message, context);
View
4 src/main/ioke/lang/Runtime.java
@@ -467,13 +467,11 @@ public Object evaluateFile(File f, IokeObject message, IokeObject context) throw
public Object evaluateFile(String filename, IokeObject message, IokeObject context) throws ControlFlow {
try {
((IokeSystem)system.data).pushCurrentFile(filename);
- if(filename.startsWith("/") || (filename.length() > 2 && filename.charAt(1) == '\\')) {
+ if(IokeSystem.isAbsoluteFileName(filename)) {
return evaluateStream(new FileReader(new File(filename)), message, context);
} else {
return evaluateStream(new FileReader(new File(((IokeSystem)system.data).getCurrentWorkingDirectory(), filename)), message, context);
}
-
-
} catch(Exception e) {
reportJavaException(e, message, context);
return null;
Please sign in to comment.
Something went wrong with that request. Please try again.