* link/z80/lkmain.c (afile): allow periods in directory names
[fw/sdcc] / as / hc08 / lkmain.c
index ae5aff2fa9000276cf832be2c3b93ce566ae4834..fd732aa869aa240a3ef9f20580a944f75819698f 100644 (file)
@@ -762,6 +762,8 @@ parse()
        char fid[NINPUT];
 
        while ((c = getnb()) != 0) {
+               if ( c == ';')
+                       return(0);
                if ( c == '-') {
                        while (ctype[c=get()] & LETTER) {
                                switch(c) {
@@ -877,6 +879,8 @@ parse()
                                        lkexit(1);
                                }
                        }
+                       if ( c == ';')
+                               return(0);
                } else
                if (ctype[c] & ILL) {
                        fprintf(stderr, "Invalid input");
@@ -1192,9 +1196,12 @@ char *ft;
        }
 
        /*Add the extension*/
-       strcat(fb, ".");
-       strcat(fb, strlen(ft)?ft:"rel");
-       
+       if (fb[i] != '.')
+       {
+               strcat(fb, ".");
+               strcat(fb, strlen(ft)?ft:"rel");
+       }
+               
        fp = fopen(fb, omode);
        if (fp==NULL)
        {