From fc5954990281770cc2a385d272fbf6dced1f5870 Mon Sep 17 00:00:00 2001 From: GerdtR Date: Thu, 16 Jun 2016 15:08:19 +0000 Subject: [PATCH] Improved in KolibriOS. git-svn-id: svn://kolibrios.org@6447 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/cmm/main.cpp | 68 +++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 30 deletions(-) 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