diff --git a/programs/develop/cmm/main.cpp b/programs/develop/cmm/main.cpp index 4efa7f30d5..486e6c3da3 100644 --- a/programs/develop/cmm/main.cpp +++ b/programs/develop/cmm/main.cpp @@ -1,9 +1,18 @@ #define _MAIN_ #ifdef _UNIX_ -#define DIV_PATH ':' -#else +#define DIV_PATH ':' //делитель путей в переменной окружения PATH +#define DIV_FOLD '/' //этим символом разделяются папки в пути к файлу +#endif + +#ifdef _WIN32_ #define DIV_PATH ';' +#define DIV_FOLD '\\' +#endif + +#ifdef _KOS_ +#define DIV_PATH ';' +#define DIV_FOLD '/' #endif #include @@ -25,7 +34,6 @@ char *winstub=NULL; FILE *hout=NULL; char *namestartupfile="startup.h--"; - char outext[4]="com"; short extflag=TRUE;//расширение можно присвоить //int scrsize; @@ -232,6 +240,7 @@ int main(int argc,char *argv[]) { int count; unsigned char pari=FALSE; + char *buffer; printf("\nSPHINX C-- Compiler Version %d.%d%s %s\r\n",ver1,ver2,betta,__DATE__); @@ -243,7 +252,7 @@ unsigned char pari=FALSE; outputdata=output; postbuf=(postinfo *)MALLOC(MAXPOSTS*sizeof(postinfo)); strcpy((char *)string,argv[0]); - rawext=strrchr((char *)string,'\\'); + rawext=strrchr((char *)string,DIV_FOLD); if(rawext!=NULL){ rawext[0]=0; @@ -256,7 +265,8 @@ unsigned char pari=FALSE; LoadIni("c--.ini"); for(count=1;count