* as/mcs51/i51mch.c (machine): fixed warning
[fw/sdcc] / as / mcs51 / asnoice.c
index b8de1bb31d2c3f595cb01c2044db70f255fcfbee..38d3233f5b95c14969c9cd8f1dae34432d2d47db 100644 (file)
@@ -9,9 +9,6 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
-//#if !defined(_MSC_VER)
-//#include <alloc.h>
-//#endif
 #include "asm.h"
 
 /* Return basic file name without path or extension */
@@ -20,7 +17,7 @@ static char* BaseFileName( int fileNumber );
 char* BaseFileName( int fileNumber )
 {
        static int prevFile = -1;
-        static char baseName[ FILSPC ];
+        static char baseName[ PATH_MAX ];
 
         char *p1, *p2;
 
@@ -35,6 +32,7 @@ char* BaseFileName( int fileNumber )
 
                /* Name starts after any colon or backslash (DOS) */
                p2 = strrchr( p1, '\\' );
+               if (p2 == NULL) p2 = strrchr( p1, '/' );
                if (p2 == NULL) p2 = strrchr( p1, ':' );
                if (p2 == NULL) p2 = p1-1;
                 strcpy( baseName, p2+1 );
@@ -87,7 +85,7 @@ void DefineNoICE_Line()
 {
         static int prevFile = -1;
         static struct area *pPrevArea = NULL;
-        static char baseName[ FILSPC ];
+        static char baseName[ PATH_MAX ];
 
         int j;
         char *p1, *p2;