From 516cdec4894096305f5002b922ba02d49cb3e816 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 2 Oct 2009 09:28:00 +0000 Subject: Optimised auto dependency generation Added control c handler in windows Now throw string exceptions instead of integer exceptions. --- tools/mhmake/src/functions.cpp | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'tools/mhmake/src/functions.cpp') diff --git a/tools/mhmake/src/functions.cpp b/tools/mhmake/src/functions.cpp index 2d93f59cd..5b59044c7 100644 --- a/tools/mhmake/src/functions.cpp +++ b/tools/mhmake/src/functions.cpp @@ -83,8 +83,7 @@ string mhmakefileparser::f_filter(const string & Arg) const int ipos=Arg.find(','); #ifdef _DEBUG if (ipos==string::npos) { - cerr << "filter func should have 2 arguments: "<second; @@ -205,8 +202,7 @@ string mhmakefileparser::f_subst(const string & Arg) const pTmp=NextCharItem(pTmp,FromString,','); #ifdef _DEBUG if (!*pTmp) { - cerr << "Wrong number of arguments in function subst" << endl; - throw(1); + throw string("Wrong number of arguments in function subst"); } #endif @@ -242,8 +238,7 @@ string mhmakefileparser::f_patsubst(const string & Arg) const pTmp=NextCharItem(pTmp,FromString,','); #ifdef _DEBUG if (!*pTmp) { - cerr << "Wrong number of arguments in function subst" << endl; - throw(1); + throw string("Wrong number of arguments in function subst"); } #endif @@ -408,8 +403,7 @@ string mhmakefileparser::f_filesindirs(const string & Arg) const pTmp=NextCharItem(pTmp,strFiles,','); #ifdef _DEBUG if (!*pTmp) { - cerr << "Wrong number of arguments in function filesindirs" << endl; - throw(1); + throw string("Wrong number of arguments in function filesindirs"); } #endif string strDirs; @@ -541,8 +535,7 @@ string mhmakefileparser::f_addprefix(const string & Arg) const pTmp=NextCharItem(pTmp,PreFix,','); #ifdef _DEBUG if (!*pTmp) { - cerr << "Wrong number of arguments in function addprefix" << endl; - throw(1); + throw ("Wrong number of arguments in function addprefix"); } #endif string FileNames; @@ -564,8 +557,7 @@ string mhmakefileparser::f_addsuffix(const string & Arg) const pTmp=NextCharItem(pTmp,SufFix,','); #ifdef _DEBUG if (!*pTmp) { - cerr << "Wrong number of arguments in function addsuffix" << endl; - throw(1); + throw string("Wrong number of arguments in function addsuffix"); } #endif string FileNames; @@ -588,8 +580,7 @@ string mhmakefileparser::f_word(const string & Arg) const if (!WordNbr) { if (!WordNbr) { - cerr << "Expecting a number bigger then 0 for the word function"<