From: westcott Date: Tue, 18 Oct 2011 15:52:07 +0000 (+0000) Subject: 1.22.0 X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=4f2c7f477a1ef2d60a1c0c84ab1ba8243af67f87 1.22.0 --- diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 769e339..2da1ed5 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -2201,8 +2201,8 @@ GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = ( "MOTHUR_FILES=\"\\\"../release\\\"\"", - "VERSION=\"\\\"1.21.0\\\"\"", - "RELEASE_DATE=\"\\\"7/25/2011\\\"\"", + "VERSION=\"\\\"1.22.0\\\"\"", + "RELEASE_DATE=\"\\\"10/12/2011\\\"\"", ); GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; diff --git a/addtargets2.cpp b/addtargets2.cpp index 57a4ef5..f3f6377 100644 --- a/addtargets2.cpp +++ b/addtargets2.cpp @@ -1,5 +1,5 @@ -//#if UCHIMES -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. +#if UCHIMES + #include "myutils.h" #include "chime.h" #include "ultra.h" @@ -35,4 +35,4 @@ void AddTargets(SeqDB &DB, const SeqData &Query, set &TargetIndexes) } } -//#endif +#endif diff --git a/alignchime.cpp b/alignchime.cpp index c97c333..d7b05a8 100644 --- a/alignchime.cpp +++ b/alignchime.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "seq.h" #include "chime.h" diff --git a/alignchimel.cpp b/alignchimel.cpp index 8f4cbd5..ae152af 100644 --- a/alignchimel.cpp +++ b/alignchimel.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "seq.h" #include "chime.h" diff --git a/alnheuristics.h b/alnheuristics.h index cd346cf..9a8d283 100644 --- a/alnheuristics.h +++ b/alnheuristics.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef alnheuristics_h #define alnheuristics_h diff --git a/alnparams.cpp b/alnparams.cpp index 41ee738..d1b9036 100644 --- a/alnparams.cpp +++ b/alnparams.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include // for FLT_MAX #include "mx.h" @@ -8,12 +6,12 @@ #define TEST 0 -void SetBLOSUM62(); +void SetBLOSUM62(); void SetNucSubstMx(double Match, double Mismatch); void ReadSubstMx(const string &FileName, Mx &Mxf); - -extern Mx g_SubstMxf; -extern float **g_SubstMx; + +extern Mx g_SubstMxf; +extern float **g_SubstMx; void AlnParams::Clear() { @@ -315,14 +313,14 @@ void AlnParams::SetPenalties(const string &OpenStr, const string &ExtStr) void AlnParams::SetMxFromCmdLine(bool IsNucleo) { if (IsNucleo) - SetNucSubstMx(opt_match, opt_mismatch); + SetNucSubstMx(opt_match, opt_mismatch); else { if (opt_matrix == "") { SubstMxName = "BLOSUM62"; - SetBLOSUM62(); - } + SetBLOSUM62(); + } else { ReadSubstMx(opt_matrix, g_SubstMxf); @@ -363,9 +361,9 @@ void AlnParams::InitFromCmdLine(bool IsNucleo) // Global if (IsNucleo) - Init4(g_SubstMx, -10.0, -1.0, -0.5, -0.5); + Init4(g_SubstMx, -10.0, -1.0, -0.5, -0.5); else - Init4(g_SubstMx, -17.0, -1.0, -0.5, -0.5); + Init4(g_SubstMx, -17.0, -1.0, -0.5, -0.5); SetPenalties(opt_gapopen, opt_gapext); } diff --git a/alnparams.h b/alnparams.h index b159179..4037912 100644 --- a/alnparams.h +++ b/alnparams.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef alnparams_h #define alnparams_h diff --git a/alpha.cpp b/alpha.cpp index 9d82f35..0efca3b 100644 --- a/alpha.cpp +++ b/alpha.cpp @@ -1,5 +1,4 @@ // Generated by /p/py/alphac.py -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. #include "alpha.h" unsigned g_CharToLetterAminoStop[256] = diff --git a/alpha.h b/alpha.h index e491c9c..e021b7f 100644 --- a/alpha.h +++ b/alpha.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef alpha_h #define alpha_h diff --git a/alpha2.cpp b/alpha2.cpp index 08f6e21..26bc1c6 100644 --- a/alpha2.cpp +++ b/alpha2.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "alpha.h" #include "timing.h" diff --git a/chainer.h b/chainer.h index 7f54131..a954dc0 100644 --- a/chainer.h +++ b/chainer.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef chainer_h #define chainer_h diff --git a/chime.h b/chime.h index f143ea1..1b0662a 100644 --- a/chime.h +++ b/chime.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef chime_h #define chime_h diff --git a/chimeraslayer.cpp b/chimeraslayer.cpp index b637000..458e89d 100644 --- a/chimeraslayer.cpp +++ b/chimeraslayer.cpp @@ -76,7 +76,7 @@ ChimeraSlayer::ChimeraSlayer(string file, string temp, bool trim, map= minBS) || (chimeraResults[0].bsb >= minBS)) { - m->mothurOut(querySeq.getName() + "\tyes"); m->mothurOutEndLine(); + m->mothurOut(toString(threadID) +"\t"+ querySeq.getName() + "\tyes"); m->mothurOutEndLine(); outAcc << querySeq.getName() << endl; if (templateFileName == "self") { chimericSeqs.insert(querySeq.getName()); } diff --git a/chimeraslayercommand.cpp b/chimeraslayercommand.cpp index 629eca9..f15581f 100644 --- a/chimeraslayercommand.cpp +++ b/chimeraslayercommand.cpp @@ -532,6 +532,11 @@ ChimeraSlayerCommand::ChimeraSlayerCommand(string option) { if (hasName && (templatefile != "self")) { m->mothurOut("You have provided a namefile and the reference parameter is not set to self. I am not sure what reference you are trying to use, aborting."); m->mothurOutEndLine(); abort=true; } if (hasGroup && (templatefile != "self")) { m->mothurOut("You have provided a group file and the reference parameter is not set to self. I am not sure what reference you are trying to use, aborting."); m->mothurOutEndLine(); abort=true; } + //until we resolve the issue 10-18-11 +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#else + processors=1; +#endif } } catch(exception& e) { @@ -561,7 +566,6 @@ int ChimeraSlayerCommand::execute(){ map > fileToPriority; map >::iterator itFile; map fileGroup; - map priority; fileToPriority[fastaFileNames[s]] = priority; //default fileGroup[fastaFileNames[s]] = "noGroup"; SequenceParser* parser = NULL; @@ -582,11 +586,15 @@ int ChimeraSlayerCommand::execute(){ priority = sortFastaFile(fastaFileNames[s], nameFile); m->mothurOut("Done."); m->mothurOutEndLine(); + fileToPriority.clear(); + fileGroup.clear(); fileToPriority[fastaFileNames[s]] = priority; + fileGroup[fastaFileNames[s]] = "noGroup"; if (m->control_pressed) { for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]); } return 0; } }else if ((templatefile == "self") && (groupFile != "")) { fileGroup.clear(); fileToPriority.clear(); + if (processors != 1) { m->mothurOut("When using template=self, mothur can only use 1 processor, continuing."); m->mothurOutEndLine(); processors = 1; } string nameFile = ""; if (nameFileNames.size() != 0) { //you provided a namefile and we don't need to create one nameFile = nameFileNames[s]; @@ -978,7 +986,7 @@ int ChimeraSlayerCommand::deconvoluteResults(SequenceParser* parser, string outp if (print) { out << name << '\t'; - cout << name<< endl; + namesInFile.insert(name); //output parent1's name @@ -1406,7 +1414,7 @@ int ChimeraSlayerCommand::createProcesses(string outputFileName, string filename pDataArray.push_back(tempslayer); processIDS.push_back(i); - //MySeqSumThreadFunction is in header. It must be global or static to work with the threads. + //MySlayerThreadFunction is in header. It must be global or static to work with the threads. //default security attributes, thread function name, argument to thread function, use default creation flags, returns the thread identifier hThreadArray[i] = CreateThread(NULL, 0, MySlayerThreadFunction, pDataArray[i], 0, &dwThreadIdArray[i]); } diff --git a/chimeraslayercommand.h b/chimeraslayercommand.h index 9a37a5b..815cb36 100644 --- a/chimeraslayercommand.h +++ b/chimeraslayercommand.h @@ -54,7 +54,7 @@ private: int setupChimera(string, map&); int MPIExecute(string, string, string, string); int deconvoluteResults(SequenceParser*, string, string, string); - + map priority; #ifdef USE_MPI diff --git a/chimerauchimecommand.cpp b/chimerauchimecommand.cpp index c035b01..2b24fd8 100644 --- a/chimerauchimecommand.cpp +++ b/chimerauchimecommand.cpp @@ -9,7 +9,7 @@ #include "chimerauchimecommand.h" #include "deconvolutecommand.h" -#include "uc.h" +//#include "uc.h" #include "sequence.hpp" #include "referencedb.h" @@ -453,7 +453,25 @@ ChimeraUchimeCommand::ChimeraUchimeCommand(string option) { if (hasName && (templatefile != "self")) { m->mothurOut("You have provided a namefile and the reference parameter is not set to self. I am not sure what reference you are trying to use, aborting."); m->mothurOutEndLine(); abort=true; } if (hasGroup && (templatefile != "self")) { m->mothurOut("You have provided a group file and the reference parameter is not set to self. I am not sure what reference you are trying to use, aborting."); m->mothurOutEndLine(); abort=true; } - + + //look for uchime exe + path = m->argv; + string tempPath = path; + for (int i = 0; i < path.length(); i++) { tempPath[i] = tolower(path[i]); } + path = path.substr(0, (tempPath.find_last_of('m'))); + + string uchimeCommand; +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) + uchimeCommand = path + "uchime"; // format the database, -o option gives us the ability +#else + uchimeCommand = path + "uchime.exe"; +#endif + + //test to make sure uchime exists + ifstream in; + uchimeCommand = m->getFullPathName(uchimeCommand); + int ableToOpen = m->openInputFile(uchimeCommand, in, "no error"); in.close(); + if(ableToOpen == 1) { m->mothurOut("[ERROR]: " + uchimeCommand + " file does not exist. mothur requires the uchime executable."); m->mothurOutEndLine(); abort = true; } } } catch(exception& e) { @@ -964,11 +982,23 @@ int ChimeraUchimeCommand::driverGroups(SequenceParser& parser, string outputFNam int ChimeraUchimeCommand::driver(string outputFName, string filename, string accnos, string alns, int& numChimeras){ try { - + //to allow for spaces in the path + outputFName = "\"" + outputFName + "\""; + filename = "\"" + filename + "\""; + alns = "\"" + alns + "\""; + vector cPara; - - char* tempUchime = new char[8]; - strcpy(tempUchime, "./uchime "); + + char* tempUchime; +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) + tempUchime= new char[10]; + *tempUchime = '\0'; + strncat(tempUchime, "./uchime ", 9); +#else + tempUchime= new char[8]; + *tempUchime = '\0'; + strncat(tempUchime, "uchime ", 7); +#endif cPara.push_back(tempUchime); char* tempIn = new char[8]; @@ -1190,15 +1220,23 @@ int ChimeraUchimeCommand::driver(string outputFName, string filename, string acc char** uchimeParameters; uchimeParameters = new char*[cPara.size()]; - for (int i = 0; i < cPara.size(); i++) { uchimeParameters[i] = cPara[i]; } - int numArgs = cPara.size(); + string commandString = ""; + for (int i = 0; i < cPara.size(); i++) { uchimeParameters[i] = cPara[i]; commandString += toString(cPara[i]) + " "; } + //int numArgs = cPara.size(); - uchime_main(numArgs, uchimeParameters); + //uchime_main(numArgs, uchimeParameters); + //cout << "commandString = " << commandString << endl; + system(commandString.c_str()); //free memory - for(int i = 0; i < cPara.size(); i++) { delete[] cPara[i]; } + for(int i = 0; i < cPara.size(); i++) { delete cPara[i]; } delete[] uchimeParameters; + //remove "" from filenames + outputFName = outputFName.substr(1, outputFName.length()-2); + filename = filename.substr(1, filename.length()-2); + alns = alns.substr(1, alns.length()-2); + if (m->control_pressed) { return 0; } //create accnos file from uchime results diff --git a/classifyseqscommand.cpp b/classifyseqscommand.cpp index 3b7b4a8..af6d914 100644 --- a/classifyseqscommand.cpp +++ b/classifyseqscommand.cpp @@ -376,12 +376,16 @@ ClassifySeqsCommand::ClassifySeqsCommand(string option) { temp = validParameter.validFile(parameters, "ksize", false); if (temp == "not found"){ temp = "8"; } convert(temp, kmerSize); + temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found"){ temp = m->getProcessors(); } + m->setProcessors(temp); + convert(temp, processors); + temp = validParameter.validFile(parameters, "save", false); if (temp == "not found"){ temp = "f"; } save = m->isTrue(temp); //this is so the threads can quickly load the reference data #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) #else - if (processors != 1) { save = true; } + if ((processors != 1) && (rdb->referenceSeqs.size() == 0)) { save = true; } #endif rdb->save = save; if (save) { //clear out old references @@ -416,10 +420,6 @@ ClassifySeqsCommand::ClassifySeqsCommand(string option) { }else if (taxonomyFileName == "not open") { abort = true; } else { if (save) { rdb->setSavedTaxonomy(taxonomyFileName); } } - temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found"){ temp = m->getProcessors(); } - m->setProcessors(temp); - convert(temp, processors); - search = validParameter.validFile(parameters, "search", false); if (search == "not found"){ search = "kmer"; } method = validParameter.validFile(parameters, "method", false); if (method == "not found"){ method = "bayesian"; } diff --git a/diagbox.h b/diagbox.h index 2491a58..0c5846c 100644 --- a/diagbox.h +++ b/diagbox.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef diagbox_h #define diagbox_h @@ -186,10 +184,10 @@ Don't have proof.. } }; -typedef const char *(*NWDIAG)(const byte *A, unsigned LA, const byte *B, unsigned LB, - unsigned DiagLo, unsigned DiagHi, bool LeftTerm, bool RightTerm); - -const char *NWBandWrap(NWDIAG NW, const byte *A, unsigned LA, const byte *B, unsigned LB, - unsigned DiagLo, unsigned DiagHi, bool LeftTerm, bool RightTerm); +typedef const char *(*NWDIAG)(const byte *A, unsigned LA, const byte *B, unsigned LB, + unsigned DiagLo, unsigned DiagHi, bool LeftTerm, bool RightTerm); + +const char *NWBandWrap(NWDIAG NW, const byte *A, unsigned LA, const byte *B, unsigned LB, + unsigned DiagLo, unsigned DiagHi, bool LeftTerm, bool RightTerm); #endif // diagbox_h diff --git a/dp.h b/dp.h index d8581fb..c771538 100644 --- a/dp.h +++ b/dp.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef dp_h #define dp_h diff --git a/evalue.h b/evalue.h index fe324f8..c9308db 100644 --- a/evalue.h +++ b/evalue.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef evalue_h #define evalue_h diff --git a/fractid.cpp b/fractid.cpp index ad4c157..f298877 100644 --- a/fractid.cpp +++ b/fractid.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "alpha.h" diff --git a/getoturepcommand.cpp b/getoturepcommand.cpp index 378e918..9742bcb 100644 --- a/getoturepcommand.cpp +++ b/getoturepcommand.cpp @@ -232,10 +232,10 @@ GetOTURepCommand::GetOTURepCommand(string option) { if ((phylipfile == "") && (columnfile == "")) { //is there are current file available for either of these? //give priority to column, then phylip columnfile = m->getColumnFile(); - if (columnfile != "") { m->mothurOut("Using " + columnfile + " as input file for the column parameter."); m->mothurOutEndLine(); } + if (columnfile != "") { distFile = columnfile; format = "column"; m->mothurOut("Using " + columnfile + " as input file for the column parameter."); m->mothurOutEndLine(); } else { phylipfile = m->getPhylipFile(); - if (phylipfile != "") { m->mothurOut("Using " + phylipfile + " as input file for the phylip parameter."); m->mothurOutEndLine(); } + if (phylipfile != "") { distFile = phylipfile; format = "phylip"; m->mothurOut("Using " + phylipfile + " as input file for the phylip parameter."); m->mothurOutEndLine(); } else { m->mothurOut("No valid current files. You must provide a phylip or column file before you can use the get.oturep command."); m->mothurOutEndLine(); abort = true; diff --git a/getparents.cpp b/getparents.cpp index 26a2cd1..d82f902 100644 --- a/getparents.cpp +++ b/getparents.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "chime.h" #include "ultra.h" diff --git a/globalalign2.cpp b/globalalign2.cpp index 10f8032..2adfb71 100644 --- a/globalalign2.cpp +++ b/globalalign2.cpp @@ -1,11 +1,11 @@ -//#if UCHIMES -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. -#include "dp.h" -#include "seq.h" - -static AlnParams g_AP; -static bool g_APInitDone = false; - +#if UCHIMES + +#include "dp.h" +#include "seq.h" + +static AlnParams g_AP; +static bool g_APInitDone = false; + bool GlobalAlign(const SeqData &Query, const SeqData &Target, PathData &PD) { if (!g_APInitDone) @@ -42,4 +42,4 @@ bool GlobalAlign(const SeqData &Query, const SeqData &Target, const AlnParams &/ return true; } -//#endif // UCHIMES +#endif // UCHIMES diff --git a/help.h b/help.h index 1534cd1..9d7a89f 100644 --- a/help.h +++ b/help.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - "\n" "Usage\n" "-----\n" diff --git a/hsp.h b/hsp.h index 7f003bf..339256f 100644 --- a/hsp.h +++ b/hsp.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef hsp_h #define hsp_h 1 diff --git a/hspfinder.h b/hspfinder.h index dc287e9..2b8e9d8 100644 --- a/hspfinder.h +++ b/hspfinder.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef hspfinder_h #define hspfinder_h diff --git a/listseqscommand.cpp b/listseqscommand.cpp index ef15158..833ac95 100644 --- a/listseqscommand.cpp +++ b/listseqscommand.cpp @@ -313,13 +313,7 @@ int ListSeqsCommand::readList(){ if (m->control_pressed) { in.close(); return 0; } - while (binnames.find_first_of(',') != -1) { - string name = binnames.substr(0,binnames.find_first_of(',')); - binnames = binnames.substr(binnames.find_first_of(',')+1, binnames.length()); - names.push_back(name); - } - - names.push_back(binnames); + m->splitAtComma(binnames, names); } } in.close(); @@ -349,14 +343,7 @@ int ListSeqsCommand::readName(){ in >> secondCol; //parse second column saving each name - while (secondCol.find_first_of(',') != -1) { - name = secondCol.substr(0,secondCol.find_first_of(',')); - secondCol = secondCol.substr(secondCol.find_first_of(',')+1, secondCol.length()); - names.push_back(name); - } - - //get name after last , - names.push_back(secondCol); + m->splitAtComma(secondCol, names); m->gobble(in); } diff --git a/make3way.cpp b/make3way.cpp index dbadd1a..ce88f86 100644 --- a/make3way.cpp +++ b/make3way.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "sfasta.h" #include "path.h" diff --git a/makefile b/makefile index 3f64312..35857e0 100644 --- a/makefile +++ b/makefile @@ -14,12 +14,12 @@ USEMPI ?= no USEREADLINE ?= yes CYGWIN_BUILD ?= no USECOMPRESSION ?= no -MOTHUR_FILES="\"/Users/Sarahswork/desktop/release\"" -RELEASE_DATE = "\"7/25/2011\"" -VERSION = "\"1.21.0\"" +MOTHUR_FILES="\"Enter_your_default_path_here\"" +RELEASE_DATE = "\"10/18/2011\"" +VERSION = "\"1.22.0\"" # Optimize to level 3: -CXXFLAGS += -03 -g +CXXFLAGS += -O3 ifeq ($(strip $(64BIT_VERSION)),yes) #if you are using centos uncomment the following lines @@ -90,11 +90,14 @@ endif OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp)) OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c)) -mothur : $(OBJECTS) +mothur : $(OBJECTS) uchime $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS) strip mothur +uchime: + cd uchime_src && ./mk && mv uchime .. && cd .. + install : mothur # cp mothur ../Release/mothur @@ -108,4 +111,5 @@ install : mothur clean : @rm -f $(OBJECTS) + @rm -f uchime diff --git a/mx.cpp b/mx.cpp index 9e61d1b..48c347e 100644 --- a/mx.cpp +++ b/mx.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "mx.h" #include "seqdb.h" diff --git a/mx.h b/mx.h index 2462937..1438900 100644 --- a/mx.h +++ b/mx.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef mx_h #define mx_h diff --git a/myopts.h b/myopts.h index 812dd8b..ba901ea 100644 --- a/myopts.h +++ b/myopts.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef MY_VERSION #define MY_VERSION "4.2" #endif diff --git a/myutils.cpp b/myutils.cpp index 78bf543..6e10a85 100755 --- a/myutils.cpp +++ b/myutils.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include #include #include @@ -13,19 +11,19 @@ #include #include -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#ifdef _MSC_VER +#include +#include +#include +#include +#include +#else #include #include #include #include #include #include -#else -//#include -#include -#include -#include -#include #endif #include "myutils.h" @@ -141,24 +139,14 @@ bool myisatty(int fd) return isatty(fd) != 0; } -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -#else -//#ifdef BIT_VERSION -//#include -//int fseeko(FILE *stream, off_t offset, int whence) -//// { -// off_t FilePos = _fseeki64(stream, offset, whence); -// return (FilePos == -1L) ? -1 : 0; -// } -//#define ftello(fm) (off_t) _ftelli64(fm) -//#else +#ifdef _MSC_VER +#include int fseeko(FILE *stream, off_t offset, int whence) -{ - off_t FilePos = fseek(stream, offset, whence); + { + off_t FilePos = _fseeki64(stream, offset, whence); return (FilePos == -1L) ? -1 : 0; -} -#define ftello(fm) (off_t) ftell(fm) -//#endif + } +#define ftello(fm) (off_t) _ftelli64(fm) #endif void LogStdioFileState(FILE *f) @@ -178,16 +166,9 @@ void LogStdioFileState(FILE *f) Log("fpos %ld (retval %d)\n", (long) fpos, fgetpos_retval); // Log("eof %d\n", _eof(fd)); #endif -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -#else -#ifdef BIT_VERSION +#ifdef _MSC_VER __int64 pos64 = _ftelli64(f); Log("_ftelli64 %lld\n", pos64); -#else - __int32 pos32 = ftell(f); - Log("ftell %lld\n", pos32); - -#endif #endif } @@ -513,8 +494,7 @@ off_t GetStdioFilePos(FILE *f) off_t GetStdioFileSize(FILE *f) { off_t CurrentPos = GetStdioFilePos(f); - off_t zeroPos = 0; - int Ok = fseeko(f, zeroPos, SEEK_END); + int Ok = fseeko(f, 0, SEEK_END); if (Ok < 0) Die("fseek in GetFileSize"); @@ -614,11 +594,10 @@ void Die(const char *Format, ...) fprintf(stderr, "\n---Fatal error---\n%s\n", szStr); Log("\n---Fatal error---\n%s\n", szStr); -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -#else - //if (IsDebuggerPresent()) - // __debugbreak(); - //_CrtSetDbgFlag(0); +#ifdef _MSC_VER + if (IsDebuggerPresent()) + __debugbreak(); + _CrtSetDbgFlag(0); #endif exit(1); @@ -643,7 +622,20 @@ void Warning(const char *Format, ...) } } -#if defined linux || __linux__ +#ifdef _MSC_VER +double GetMemUseBytes() + { + HANDLE hProc = GetCurrentProcess(); + PROCESS_MEMORY_COUNTERS PMC; + BOOL bOk = GetProcessMemoryInfo(hProc, &PMC, sizeof(PMC)); + if (!bOk) + return 1000000; + double Bytes = (double) PMC.WorkingSetSize; + if (Bytes > g_PeakMemUseBytes) + g_PeakMemUseBytes = Bytes; + return Bytes; + } +#elif linux || __linux__ double GetMemUseBytes() { static char statm[64]; @@ -674,7 +666,7 @@ double GetMemUseBytes() g_PeakMemUseBytes = Bytes; return Bytes; } -#elif defined(__APPLE__) || (__MACH__) +#elif defined(__MACH__) #include #include #include @@ -715,9 +707,9 @@ double GetMemUseBytes() } #else double GetMemUseBytes() -{ + { return 0; -} + } #endif double GetPeakMemUseBytes() @@ -955,7 +947,7 @@ void ProgressExit() // Skip exit(), which can be very slow in DEBUG build // VERY DANGEROUS practice, because it skips global destructors. // But if you know the rules, you can break 'em, right? - //ExitProcess(0); + ExitProcess(0); #endif } @@ -1207,8 +1199,7 @@ static void AddOpt(const OptInfo &Opt) g_Opts.insert(Opt); } -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -#else +#ifdef _MSC_VER #pragma warning(disable: 4505) // unreferenced local function #endif @@ -1532,7 +1523,6 @@ static void GetArgsFromFile(const string &FileName, vector &Args) void MyCmdLine(int argc, char **argv) { - g_Opts.clear(); g_Argv.clear(); static unsigned RecurseDepth = 0; ++RecurseDepth; @@ -1563,9 +1553,9 @@ void MyCmdLine(int argc, char **argv) if (RecurseDepth == 0) g_Argv.clear(); - for (int i = 0; i < argc; ++i) + for (int i = 0; i < argc; ++i) { g_Argv.push_back(string(argv[i])); - + } int i = 1; for (;;) @@ -1573,7 +1563,7 @@ void MyCmdLine(int argc, char **argv) if (i >= argc) break; const string &Arg = g_Argv[i]; - + if (Arg.empty()) continue; else if (Arg == "file:" && i + 1 < argc) diff --git a/myutils.h b/myutils.h index 6374c8b..b63ad3c 100644 --- a/myutils.h +++ b/myutils.h @@ -1,10 +1,8 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef myutils_h #define myutils_h #define RCE_MALLOC 0 - + #include #include #include @@ -16,32 +14,30 @@ #include #include -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -#else +#ifndef _MSC_VER #include #endif using namespace std; -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -#else -//#include +#ifdef _MSC_VER +#include #pragma warning(disable: 4996) // deprecated functions #define _CRT_SECURE_NO_DEPRECATE 1 #endif -//#if defined(_DEBUG) && !defined(DEBUG) +#if defined(_DEBUG) && !defined(DEBUG) #define DEBUG 1 -//#endif +#endif -//#if defined(DEBUG) && !defined(_DEBUG) +#if defined(DEBUG) && !defined(_DEBUG) #define _DEBUG 1 -//#endif +#endif -//#ifndef NDEBUG +#ifndef NDEBUG #define DEBUG 1 #define _DEBUG 1 -//#endif +#endif typedef unsigned char byte; typedef unsigned short uint16; @@ -51,10 +47,10 @@ typedef double float32; typedef signed char int8; typedef unsigned char uint8; -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#ifdef _MSC_VER -typedef long long int64; -typedef unsigned long long uint64; +typedef __int64 int64; +typedef unsigned __int64 uint64; #define INT64_PRINTF "lld" #define UINT64_PRINTF "llu" @@ -68,7 +64,6 @@ typedef unsigned long long uint64; #define SIZE_T_PRINTFX "x" #define OFF64_T_PRINTFX "llx" - #elif defined(__x86_64__) typedef long int64; @@ -88,8 +83,8 @@ typedef unsigned long uint64; #else -typedef __int64 int64; -typedef unsigned __int64 uint64; +typedef long long int64; +typedef unsigned long long uint64; #define INT64_PRINTF "lld" #define UINT64_PRINTF "llu" @@ -102,7 +97,6 @@ typedef unsigned __int64 uint64; #define SIZE_T_PRINTFX "x" #define OFF64_T_PRINTFX "llx" - #endif #define d64 INT64_PRINTF @@ -164,8 +158,7 @@ void myfree(void *p); bool myisatty(int fd); -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -#else +#ifdef _MSC_VER #define off_t __int64 #endif @@ -274,8 +267,8 @@ void GetCmdLine(string &s); extern const char *SVN_VERSION; extern const char *SVN_MODS; -extern bool opt_quiet; -extern bool opt_version; -extern FILE *g_fLog; +extern bool opt_quiet; +extern bool opt_version; +extern FILE *g_fLog; #endif // myutils_h diff --git a/orf.h b/orf.h index 06f73a1..90b29d1 100644 --- a/orf.h +++ b/orf.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef orf_h #define orf_h diff --git a/out.h b/out.h index 595e08c..4ca50c7 100644 --- a/out.h +++ b/out.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef out_h #define out_h diff --git a/path.cpp b/path.cpp index 555830a..9340344 100644 --- a/path.cpp +++ b/path.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "path.h" #include "timing.h" diff --git a/path.h b/path.h index b04ab74..f63be7e 100644 --- a/path.h +++ b/path.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef path_h #define path_h diff --git a/phylosummary.cpp b/phylosummary.cpp index 47591f6..b645bac 100644 --- a/phylosummary.cpp +++ b/phylosummary.cpp @@ -148,7 +148,7 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){ //find out the sequences group string group = groupmap->getGroup(seqName); - if (group == "not found") { m->mothurOut(seqName + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } + if (group == "not found") { m->mothurOut("[WARNING]: " + seqName + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } //do you have a count for this group? map::iterator itGroup = tree[childPointer->second].groupCount.find(group); @@ -183,7 +183,7 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){ //find out the sequences group string group = groupmap->getGroup(seqName); - if (group == "not found") { m->mothurOut(seqName + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } + if (group == "not found") { m->mothurOut("[WARNING]: " + seqName + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } //do you have a count for this group? map::iterator itGroup = tree[index].groupCount.find(group); @@ -254,7 +254,7 @@ int PhyloSummary::addSeqToTree(string seqTaxonomy, vector names){ //find out the sequences group string group = groupmap->getGroup(names[k]); - if (group == "not found") { m->mothurOut(names[k] + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } + if (group == "not found") { m->mothurOut("[WARNING]: " + names[k] + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } else { containsGroup[group] = true; } @@ -296,7 +296,7 @@ int PhyloSummary::addSeqToTree(string seqTaxonomy, vector names){ //find out the sequences group string group = groupmap->getGroup(names[k]); - if (group == "not found") { m->mothurOut(names[k] + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } + if (group == "not found") { m->mothurOut("[WARNING]: " + names[k] + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine(); } else { containsGroup[group] = true; } diff --git a/searchchime.cpp b/searchchime.cpp index a1c981a..c00a9c4 100644 --- a/searchchime.cpp +++ b/searchchime.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "ultra.h" #include "chime.h" diff --git a/seq.h b/seq.h index 83ba30f..9014641 100644 --- a/seq.h +++ b/seq.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef seq_h #define seq_h diff --git a/seqdb.cpp b/seqdb.cpp index be3373a..03de189 100644 --- a/seqdb.cpp +++ b/seqdb.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "seqdb.h" #include "alpha.h" diff --git a/seqdb.h b/seqdb.h index 6907015..e4af984 100644 --- a/seqdb.h +++ b/seqdb.h @@ -1,11 +1,8 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef seqdb_h #define seqdb_h #include #include -#include "myutils.h" struct SeqData; diff --git a/sequenceparser.cpp b/sequenceparser.cpp index 76c90c3..105e0a9 100644 --- a/sequenceparser.cpp +++ b/sequenceparser.cpp @@ -7,7 +7,7 @@ * */ -#include "sequenceParser.h" +#include "sequenceparser.h" /************************************************************/ diff --git a/setnucmx.cpp b/setnucmx.cpp index 123791d..030ff5a 100644 --- a/setnucmx.cpp +++ b/setnucmx.cpp @@ -1,13 +1,11 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - -#include "myutils.h" -#include "mx.h" - -Mx g_SubstMxf; -float **g_SubstMx; - -static const char Alphabet[] = "ACGTU"; - +#include "myutils.h" +#include "mx.h" + +Mx g_SubstMxf; +float **g_SubstMx; + +static const char Alphabet[] = "ACGTU"; + void SetNucSubstMx(double Match, double Mismatch) { static bool Done = false; diff --git a/sfasta.cpp b/sfasta.cpp index 9559040..918d4f8 100644 --- a/sfasta.cpp +++ b/sfasta.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "sfasta.h" #include "orf.h" #include "alpha.h" @@ -227,9 +225,8 @@ const byte *SFasta::GetNextSeqLo() if (!WarningDone) { if (isgap(c)) - //Warning("Ignoring gaps in FASTA file '%s'", - //m_FileName.c_str()); - ; + Warning("Ignoring gaps in FASTA file '%s'", + m_FileName.c_str()); else if (isprint(c)) Warning("Invalid FASTA file '%s', non-letter '%c' in sequence >%s", m_FileName.c_str(), c, Label); diff --git a/sfasta.h b/sfasta.h index 79ab961..ed2f2ff 100644 --- a/sfasta.h +++ b/sfasta.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef sfasta_h #define sfasta_h diff --git a/timing.h b/timing.h index 4db7847..0a80aee 100644 --- a/timing.h +++ b/timing.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #define TIMING 0 #ifndef timing_h #define timing_h @@ -11,10 +9,10 @@ #define BG_TIMING 0 #endif -//#if UCHIMES +#if UCHIMES #undef TIMING #define TIMING 0 -//#endif +#endif #if TIMING @@ -59,29 +57,30 @@ const unsigned AllocerCount = #undef A ; -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) -typedef uint64_t TICKS; -__inline__ uint64_t GetClockTicks() -{ - uint32_t lo, hi; - /* We cannot use "=A", since this would use %rax on x86_64 */ - __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); - return (uint64_t)hi << 32 | lo; -} - +#ifdef _MSC_VER -#else // ifdef _MSC_VER typedef unsigned __int64 TICKS; #pragma warning(disable:4035) inline TICKS GetClockTicks() -{ - _asm { + _asm + { _emit 0x0f _emit 0x31 + } + } + +#else // ifdef _MSC_VER + +typedef uint64_t TICKS; +__inline__ uint64_t GetClockTicks() + { + uint32_t lo, hi; + /* We cannot use "=A", since this would use %rax on x86_64 */ + __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); + return (uint64_t)hi << 32 | lo; } -} #endif // ifdef _MSC_VER diff --git a/tracebackbit.cpp b/tracebackbit.cpp index d58b900..94159cd 100644 --- a/tracebackbit.cpp +++ b/tracebackbit.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "dp.h" #define TRACE 0 diff --git a/uc.h b/uc.h index 8edef83..3f6018a 100644 --- a/uc.h +++ b/uc.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef uc_h #define uc_h @@ -9,7 +7,7 @@ struct AlnData; -int uchime_main(int, char**); +int uchime_main(int, char**); class UCFile { @@ -29,9 +27,6 @@ public: vector m_SeedLos; public: - /* some function prototypes */ - - UCFile(); void Clear(bool ctor = false); void Close(); diff --git a/uchime_main.cpp b/uchime_main.cpp index 18bd8bb..77266c0 100644 --- a/uchime_main.cpp +++ b/uchime_main.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "chime.h" #include "seqdb.h" @@ -8,7 +6,6 @@ #include "hspfinder.h" #include #include -#include "mothurout.h" bool SearchChime(Ultra &U, const SeqData &QSD, float QAb, const AlnParams &AP, const AlnHeuristics &AH, HSPFinder &HF, @@ -21,16 +18,16 @@ bool g_UchimeDeNovo = false; void Usage() { - //printf("\n"); - //printf("UCHIME %s by Robert C. Edgar\n", MY_VERSION); - //printf("http://www.drive5.com/uchime\n"); - //printf("\n"); - //printf("This software is donated to the public domain\n"); - //printf("\n"); - - //printf( -//#include "help.h" - //); + printf("\n"); + printf("UCHIME %s by Robert C. Edgar\n", MY_VERSION); + printf("http://www.drive5.com/uchime\n"); + printf("\n"); + printf("This software is donated to the public domain\n"); + printf("\n"); + + printf( +#include "help.h" + ); } void SetBLOSUM62() @@ -92,8 +89,6 @@ float GetAbFromLabel(const string &Label) int uchime_main(int argc, char *argv[]) { - MothurOut* m; - m = MothurOut::getInstance(); MyCmdLine(argc, argv); @@ -109,7 +104,11 @@ int uchime_main(int argc, char *argv[]) return 0; } - + printf("uchime v" MY_VERSION ".%s\n", SVN_VERSION); + printf("by Robert C. Edgar\n"); + printf("http://drive5.com/uchime\n"); + printf("This code is donated to the public domain.\n"); + printf("\n"); if (!optset_w) opt_w = 8; @@ -174,9 +173,6 @@ int uchime_main(int argc, char *argv[]) unsigned HitCount = 0; for (unsigned i = 0; i < QuerySeqCount; ++i) { - - if (m->control_pressed) { break; } - unsigned QuerySeqIndex = Order[i]; SeqData QSD; @@ -201,13 +197,7 @@ int uchime_main(int argc, char *argv[]) WriteChimeHit(g_fUChime, Hit); - //ProgressStep(i, QuerySeqCount, "%u/%u chimeras found (%.1f%%)", HitCount, i, Pct(HitCount, i+1)); - //report progress - if((i+1) % 100 == 0){ m->mothurOut("Processing sequence: " + toString(i+1) + ", " + toString(HitCount) + " chimeras found."); m->mothurOutEndLine(); } - } - if (!m->control_pressed) { - //report progress - if((QuerySeqCount) % 100 != 0){ m->mothurOut("Processing sequence: " + toString(QuerySeqCount) + ", " + toString(HitCount) + " chimeras found."); m->mothurOutEndLine(); } + ProgressStep(i, QuerySeqCount, "%u/%u chimeras found (%.1f%%)", HitCount, i, Pct(HitCount, i+1)); } Log("\n"); diff --git a/unifracunweightedcommand.cpp b/unifracunweightedcommand.cpp index cc175e1..c09301f 100644 --- a/unifracunweightedcommand.cpp +++ b/unifracunweightedcommand.cpp @@ -282,10 +282,11 @@ int UnifracUnweightedCommand::execute() { m->openOutputFile(sumFile, outSum); util = new SharedUtil(); - vector Groups = m->getGroups(); + Groups = m->getGroups(); vector namesGroups = tmap->getNamesOfGroups(); util->setGroups(Groups, namesGroups, allGroups, numGroups, "unweighted"); //sets the groups the user wants to analyze util->getCombos(groupComb, Groups, numComp); + m->setGroups(Groups); delete util; if (numGroups == 1) { numComp++; groupComb.push_back(allGroups); } diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index a0d710e..bc9d0c5 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -277,10 +277,11 @@ int UnifracWeightedCommand::execute() { util = new SharedUtil(); string s; //to make work with setgroups - vector Groups = m->getGroups(); + Groups = m->getGroups(); vector nameGroups = tmap->getNamesOfGroups(); util->setGroups(Groups, nameGroups, s, numGroups, "weighted"); //sets the groups the user wants to analyze util->getCombos(groupComb, Groups, numComp); + m->setGroups(Groups); delete util; weighted = new Weighted(tmap, includeRoot); diff --git a/usort.cpp b/usort.cpp index 33f102e..922dcb4 100644 --- a/usort.cpp +++ b/usort.cpp @@ -1,5 +1,5 @@ -//#if UCHIMES -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. +#if UCHIMES + #include "myutils.h" #include "seqdb.h" #include "seq.h" @@ -83,4 +83,4 @@ void USort(const SeqData &Query, const SeqDB &DB, vector &WordCounts, SortDescending(WordCounts, Order); } -//#endif // UCHIMES +#endif // UCHIMES diff --git a/viterbifast.cpp b/viterbifast.cpp index 3f3fc97..2b20174 100644 --- a/viterbifast.cpp +++ b/viterbifast.cpp @@ -1,11 +1,9 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "dp.h" #include "out.h" #include "evalue.h" #define CMP_SIMPLE 0 - + #if SAVE_FAST static Mx g_MxDPM; static Mx g_MxDPD; @@ -68,21 +66,21 @@ static void AllocSave(unsigned LA, unsigned LB) g_DPDSimple = g_DPDSimpleMx->GetData(); g_DPISimple = g_DPISimpleMx->GetData(); #endif - g_MxDPM.Alloc("FastM", LA+1, LB+1); - g_MxDPD.Alloc("FastD", LA+1, LB+1); - g_MxDPI.Alloc("FastI", LA+1, LB+1); - - g_MxTBM.Alloc("FastTBM", LA+1, LB+1); - g_MxTBD.Alloc("FastTBD", LA+1, LB+1); - g_MxTBI.Alloc("FastTBI", LA+1, LB+1); - - g_DPM = g_MxDPM.GetData(); - g_DPD = g_MxDPD.GetData(); - g_DPI = g_MxDPI.GetData(); - - g_TBM = g_MxTBM.GetData(); - g_TBD = g_MxTBD.GetData(); - g_TBI = g_MxTBI.GetData(); + g_MxDPM.Alloc("FastM", LA+1, LB+1); + g_MxDPD.Alloc("FastD", LA+1, LB+1); + g_MxDPI.Alloc("FastI", LA+1, LB+1); + + g_MxTBM.Alloc("FastTBM", LA+1, LB+1); + g_MxTBD.Alloc("FastTBD", LA+1, LB+1); + g_MxTBI.Alloc("FastTBI", LA+1, LB+1); + + g_DPM = g_MxDPM.GetData(); + g_DPD = g_MxDPD.GetData(); + g_DPI = g_MxDPI.GetData(); + + g_TBM = g_MxTBM.GetData(); + g_TBD = g_MxTBD.GetData(); + g_TBI = g_MxTBI.GetData(); } static void SAVE_DPM(unsigned i, unsigned j, float x) diff --git a/windex.h b/windex.h index b1e002d..0b324ca 100644 --- a/windex.h +++ b/windex.h @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #ifndef windex_h #define windex_h diff --git a/writechhit.cpp b/writechhit.cpp index 85ec26d..ea67061 100644 --- a/writechhit.cpp +++ b/writechhit.cpp @@ -1,5 +1,3 @@ -//uchime by Robert C. Edgar http://drive5.com/uchime This code is donated to the public domain. - #include "myutils.h" #include "chime.h"