]> gitweb.factorcode.org Git - factor.git/commitdiff
Minor launcher fixes
authorslava <slava@factorcode.org>
Sun, 9 Apr 2006 23:14:30 +0000 (23:14 +0000)
committerslava <slava@factorcode.org>
Sun, 9 Apr 2006 23:14:30 +0000 (23:14 +0000)
TODO.FACTOR.txt
native/factor.c
native/macosx/run.m

index 6930251b8f37295c52599aff96ec875f97496d8a..16af9a48d9afdd864496be6bdec1e3a96209b95b 100644 (file)
@@ -6,6 +6,7 @@ should fix in 0.82:
 - when generating a 32-bit image on a 64-bit system, large numbers which should
   be bignums become fixnums
 - httpd fep
+- SBUF" " i/o bug
 - clicks sent twice
 - speed up ideas:
   - only do clipping for certain gadgets
index 6e4f31389b1f13817f391ddb9b3dfb58db754fd9..4ddac15031dc832c565340a0ed1193616ee994ad 100644 (file)
@@ -64,6 +64,7 @@ int main(int argc, char** argv)
        CELL literal_size = 128;
        CELL args;
        CELL i;
+       bool image_given = true;
 
        early_init();
 
@@ -88,7 +89,10 @@ int main(int argc, char** argv)
        }
 
        if(image == NULL)
+       {
+               image_given = false;
                image = default_image_path();
+       }
 
        init_factor(image,
                ds_size * 1024,
@@ -100,7 +104,7 @@ int main(int argc, char** argv)
                literal_size * 1024);
 
        args = F;
-       while(--argc > 1)
+       while(--argc > (image_given ? 1 : 0))
        {
                args = cons(tag_object(from_c_string(argv[argc])),args);
        }
index 5545dac8aea1a4a33f6ea441ad47d6801ee4565d..6e4d69ce2e85a3359948d5573a13365d304a4ea4 100644 (file)
@@ -42,7 +42,6 @@ void early_init(void)
 const char *default_image_path(void)
 {
        NSBundle *bundle = [NSBundle mainBundle];
-       NSString *path = [bundle bundlePath];
-       NSString *image = [path stringByAppendingString:@"/Contents/Resources/factor.image"];
+       NSString *image = [[bundle resourcePath] stringByAppendingString:@"/factor.image"];
        return [image cString];
 }