Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix missing parts for Windows compatibility

  • Loading branch information...
commit 65c5a71b95770c69949e394c79911af92cc6172e 1 parent 7853c7a
Ola Bini authored December 23, 2008
3  docs/release_todo
... ...
@@ -1,7 +1,4 @@
1 1
 
2  
-- add scripts for windows and try them
3  
-- check in "use" so that filename checking happens against windows too
4  
-- implement a -S syntax
5 2
 - package everything into a small ball
6 3
 - upload final version
7 4
 - upload ioke doks.
2  lib/ioke/dokgen/htmlGenerator/CellFrame.ik_template
@@ -39,7 +39,7 @@
39 39
   }
40 40
 -->
41 41
     </style>
42  
-    <base target=\"docwin\" href=\"index.html\"/>
  42
+    <base target=\"docwin\"/>
43 43
   </head>
44 44
   <body>
45 45
     <div class=\"banner\">Cells</div>
2  lib/ioke/dokgen/htmlGenerator/FileFrame.ik_template
@@ -39,7 +39,7 @@
39 39
   }
40 40
 -->
41 41
     </style>
42  
-    <base target=\"docwin\" href=\"index.html\"/>
  42
+    <base target=\"docwin\"/>
43 43
   </head>
44 44
   <body>
45 45
     <div class=\"banner\">Files</div>
2  lib/ioke/dokgen/htmlGenerator/KindFrame.ik_template
@@ -39,7 +39,7 @@
39 39
   }
40 40
 -->
41 41
     </style>
42  
-    <base target=\"docwin\" href=\"index.html\"/>
  42
+    <base target=\"docwin\"/>
43 43
   </head>
44 44
   <body>
45 45
     <div class=\"banner\">Kinds</div>
13  src/main/ioke/lang/Main.java
@@ -125,8 +125,17 @@ public static void main(String[] args) throws Throwable {
125 125
                         r.addArgument(args[i]);
126 126
                     }
127 127
                 }
128  
-                ((IokeSystem)r.system.data).setCurrentProgram(args[start]);
129  
-                r.evaluateFile(args[start], message, context);
  128
+                String file = args[start];
  129
+                if(file.startsWith("\"")) {
  130
+                    file = file.substring(1, file.length());
  131
+                }
  132
+
  133
+                if(file.length() > 1 && file.charAt(file.length()-1) == '"') {
  134
+                    file = file.substring(0, file.length()-1);
  135
+                }
  136
+
  137
+                ((IokeSystem)r.system.data).setCurrentProgram(file);
  138
+                r.evaluateFile(file, message, context);
130 139
             } else {
131 140
                 if(scripts.size() == 0) {
132 141
                     r.evaluateString("use(\"builtin/iik\"). IIk mainLoop", message, context);
4  src/main/ioke/lang/Runtime.java
@@ -467,13 +467,11 @@ public Object evaluateFile(File f, IokeObject message, IokeObject context) throw
467 467
     public Object evaluateFile(String filename, IokeObject message, IokeObject context) throws ControlFlow {
468 468
         try {
469 469
             ((IokeSystem)system.data).pushCurrentFile(filename);
470  
-            if(filename.startsWith("/") || (filename.length() > 2 && filename.charAt(1) == '\\')) {
  470
+            if(IokeSystem.isAbsoluteFileName(filename)) {
471 471
                 return evaluateStream(new FileReader(new File(filename)), message, context);
472 472
             } else {
473 473
                 return evaluateStream(new FileReader(new File(((IokeSystem)system.data).getCurrentWorkingDirectory(), filename)), message, context);
474 474
             }
475  
-
476  
-
477 475
         } catch(Exception e) {
478 476
             reportJavaException(e, message, context);
479 477
             return null;

0 notes on commit 65c5a71

Please sign in to comment.
Something went wrong with that request. Please try again.