[Genabel-commits] r1454 - pkg/filevector/fvfutil
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Dec 8 22:58:39 CET 2013
Author: lckarssen
Date: 2013-12-08 22:58:38 +0100 (Sun, 08 Dec 2013)
New Revision: 1454
Modified:
pkg/filevector/fvfutil/convert.cpp
pkg/filevector/fvfutil/fv2text.cpp
pkg/filevector/fvfutil/mergevars.cpp
pkg/filevector/fvfutil/text2fvf.h
pkg/filevector/fvfutil/text2fvf_main.cpp
pkg/filevector/fvfutil/transpose_main.cpp
pkg/filevector/fvfutil/usage.cpp
Log:
In filevector/fvfutil/*: fixed code layout.
- remove spaces at end of line
- replace tabs with space
- insert spaces after commas and around operators
- split long lines into parts.
- inserted a few {} in if-statements
Now the code is more in line with our coding standards (and we should less cpplint errors/warnings in Jenkins).
No functional changes!
Modified: pkg/filevector/fvfutil/convert.cpp
===================================================================
--- pkg/filevector/fvfutil/convert.cpp 2013-12-06 10:17:37 UTC (rev 1453)
+++ pkg/filevector/fvfutil/convert.cpp 2013-12-08 21:58:38 UTC (rev 1454)
@@ -1,5 +1,6 @@
/*
-* This is utility to convert old format fvf files: split into data and metadata files.
+* This is utility to convert old format fvf files: split into data and
+* metadata files.
*/
#include <iostream>
@@ -13,77 +14,90 @@
int main(int argc, char * argv[])
{
- if ( argc<2 )
- {
- cout << "Please provide name of the file to convert"<< endl;
- exit ( 1 );
- }
+ if ( argc < 2 )
+ {
+ cout << "Please provide name of the file to convert" << endl;
+ exit(1);
+ }
string filename = argv[1];
- if(filename.find(".fvf")!=filename.length()-4)
- errorLog << "filename should have .fvf extention" << errorExit;
+ if(filename.find(".fvf") != filename.length() - 4)
+ errorLog << "filename should have .fvf extention" << errorExit;
- string dataFilename = filename.substr(0,filename.length()-4) + FILEVECTOR_DATA_FILE_SUFFIX;
- string indexFilename = filename.substr(0,filename.length()-4) + FILEVECTOR_INDEX_FILE_SUFFIX;
+ string dataFilename = filename.substr(0, filename.length() - 4) +
+ FILEVECTOR_DATA_FILE_SUFFIX;
+ string indexFilename = filename.substr(0, filename.length() - 4) +
+ FILEVECTOR_INDEX_FILE_SUFFIX;
dbg << "data:" << dataFilename << ", index:" << indexFilename << endl;
FileHeader data_type;
- struct stat filestatus;
+ struct stat filestatus;
- stat( filename.c_str() , &filestatus);
+ stat( filename.c_str() , &filestatus);
- if ( (unsigned int) filestatus.st_size < sizeof(data_type) )
- errorLog << "File " << filename <<" is too short to contain an FVF-object." << endl << errorExit;
+ if ( (unsigned int) filestatus.st_size < sizeof(data_type) )
+ errorLog << "File " << filename
+ << " is too short to contain an FVF-object."
+ << endl << errorExit;
- fstream dataFile;
- ofstream new_data_file;
- ofstream new_index_file;
+ fstream dataFile;
+ ofstream new_data_file;
+ ofstream new_index_file;
- dataFile.open(filename.c_str(), ios::out | ios::in | ios::binary);
- if (dataFile.fail()) {
- errorLog << "Opening file "<< filename << "for write & read failed" << errorExit;
- }
+ dataFile.open(filename.c_str(), ios::out | ios::in | ios::binary);
+ if (dataFile.fail()) {
+ errorLog << "Opening file " << filename
+ << "for write & read failed" << errorExit;
+ }
- dataFile.read((char*)&data_type,sizeof(data_type));
- if (dataFile.fail()) {
- errorLog << "Failed to read datainfo from file " << filename << errorExit;
- }
+ dataFile.read((char*)&data_type, sizeof(data_type));
+ if (dataFile.fail()) {
+ errorLog << "Failed to read datainfo from file "
+ << filename << errorExit;
+ }
- unsigned long headerSize = sizeof(data_type) + sizeof(FixedChar)*(data_type.numVariables+data_type.numObservations);
+ unsigned long headerSize = sizeof(data_type) +
+ sizeof(FixedChar) * (data_type.numVariables + data_type.numObservations);
new_data_file.open(dataFilename.c_str(), ios::out | ios::binary);
if (new_data_file.fail())
- errorLog << "Creating new data file " << dataFilename << " for write failed" << endl << errorExit;
+ {
+ errorLog << "Creating new data file " << dataFilename
+ << " for write failed" << endl << errorExit;
+ }
new_index_file.open(indexFilename.c_str(), ios::out | ios::binary);
if (new_index_file.fail())
- errorLog << "Creating new index file "<<indexFilename<<" for write failed"<< endl<< errorExit;
+ {
+ errorLog << "Creating new index file " << indexFilename
+ << " for write failed" << endl << errorExit;
+ }
- //copy header
+ //copy header
int buf_len = headerSize;
char * buffer = new (nothrow) char [buf_len];
if (!buffer)
- errorLog << "failed to get memory for buffer " << endl << errorExit;
-
- dataFile.seekg( 0 );
- dataFile.read(buffer,buf_len);
- new_index_file.write(buffer,buf_len);
+ errorLog << "failed to get memory for buffer " << endl << errorExit;
- dbg << "index copied, copying data..." << endl;
+ dataFile.seekg( 0 );
+ dataFile.read(buffer,buf_len);
+ new_index_file.write(buffer,buf_len);
- //copy data
- while(!dataFile.eof())
- {
- dataFile.read(buffer,buf_len);
- new_data_file.write(buffer,dataFile.gcount());
- }
+ dbg << "index copied, copying data..." << endl;
- dbg << "DONE" << endl;
+ //copy data
+ while(!dataFile.eof())
+ {
+ dataFile.read(buffer, buf_len);
+ new_data_file.write(buffer, dataFile.gcount());
+ }
- dataFile.close();
- new_data_file.close();
- new_index_file.close();
- delete buffer;
+ dbg << "DONE" << endl;
+ dataFile.close();
+ new_data_file.close();
+ new_index_file.close();
+ delete buffer;
+
}
Modified: pkg/filevector/fvfutil/fv2text.cpp
===================================================================
--- pkg/filevector/fvfutil/fv2text.cpp 2013-12-06 10:17:37 UTC (rev 1453)
+++ pkg/filevector/fvfutil/fv2text.cpp 2013-12-08 21:58:38 UTC (rev 1454)
@@ -12,7 +12,7 @@
-void info()
+void info()
{
cout << "fv2text converts .fv* files to a text file" << endl;
cout << "Usage: fv2text inputfile outfile.txt [--RMatrix]" << endl;
@@ -23,21 +23,21 @@
char s[20];
for(int i=0;i<length;i++){
- sprintf(s,"%x ", ((unsigned char*)data)[i]);
- ret += string(s);
- }
+ sprintf(s,"%x ", ((unsigned char*)data)[i]);
+ ret += string(s);
+ }
- return ret;
+ return ret;
}*/
int main(int argc, char* argv[])
{
argc--;
- if (argc<2)
+ if (argc<2)
{
info();
- return 0;
+ return 0;
}
string inputFileName = string(argv[1]);
@@ -46,7 +46,7 @@
bool isRMatrix;
if (argc >= 3) {
- isRMatrix = (strcmp(argv[3], "--RMatrix") == 0);
+ isRMatrix = (strcmp(argv[3], "--RMatrix") == 0);
}
cout << "Input file is '" << inputFileName << "'." << endl;
@@ -59,23 +59,23 @@
unsigned long row, col;
if (!isRMatrix) {
- out << "X ";
+ out << "X ";
}
- for (col=0; col<fv.getNumObservations(); col++){
- out << fv.readObservationName(col).name << " ";
+ for (col = 0; col < fv.getNumObservations(); col++){
+ out << fv.readObservationName(col).name << " ";
}
out << endl;
- for (row=0; row<fv.getNumVariables(); row++){
- out << fv.readVariableName(row).name << " ";
- for (col=0; col<fv.getNumObservations(); col++){
- char data[2000];
- fv.readElement(row, col, data);
- string elem = bufToString(fv.getElementType(), data,string("NAN"));
- out << elem << " ";
- }
- out << endl;
+ for (row = 0; row < fv.getNumVariables(); row++){
+ out << fv.readVariableName(row).name << " ";
+ for (col = 0; col < fv.getNumObservations(); col++){
+ char data[2000];
+ fv.readElement(row, col, data);
+ string elem = bufToString(fv.getElementType(), data, string("NAN"));
+ out << elem << " ";
+ }
+ out << endl;
}
}
Modified: pkg/filevector/fvfutil/mergevars.cpp
===================================================================
--- pkg/filevector/fvfutil/mergevars.cpp 2013-12-06 10:17:37 UTC (rev 1453)
+++ pkg/filevector/fvfutil/mergevars.cpp 2013-12-08 21:58:38 UTC (rev 1454)
@@ -2,72 +2,95 @@
int main(int argc, char * argv[])
{
- print_mergevars_welcome();
+ print_mergevars_welcome();
- if (argc < 4) print_mergevars_usage(argv[0]);
+ if (argc < 4) print_mergevars_usage(argv[0]);
- char * ifname1 = argv[1], * ifname2 = argv[2], * ofname = argv[3];
- unsigned long cachesize = 64;
- if (argc>4) cachesize = atoi(argv[4]);
- if (cachesize < 0) errorLog << "cache size must be positive long integer" << endl << endl << errorExit;
- dbg << "Options in effect:\n";
- dbg << "\tINFILE1 = " << ifname1 << "\n";
- dbg << "\tINFILE2 = " << ifname2 << "\n";
- dbg << "\tOUTFILE = " << ofname << "\n";
- dbg << "\tcachesize = " << cachesize << " Mb\n\n";
+ char * ifname1 = argv[1], * ifname2 = argv[2], * ofname = argv[3];
+ unsigned long cachesize = 64;
+ if (argc > 4) cachesize = atoi(argv[4]);
+ if (cachesize < 0)
+ {
+ errorLog << "cache size must be positive long integer"
+ << endl << endl << errorExit;
+ }
+ dbg << "Options in effect:\n";
+ dbg << "\tINFILE1 = " << ifname1 << "\n";
+ dbg << "\tINFILE2 = " << ifname2 << "\n";
+ dbg << "\tOUTFILE = " << ofname << "\n";
+ dbg << "\tcachesize = " << cachesize << " Mb\n\n";
- FileVector indata1(ifname1, cachesize);
- FileVector indata2(ifname2, cachesize);
+ FileVector indata1(ifname1, cachesize);
+ FileVector indata2(ifname2, cachesize);
-// sanity checks: can we merge these files?
-// are dimensions compatible?
- if (indata1.data_type.nobservations != indata2.data_type.nobservations)
- errorLog << "can not merge files with different number of observations" << endl << endl << errorExit;
- else
- errorLog << "file dimensions are compatible\n";
-// are observation names the same?
- unsigned long cmpfail = 0, i = 0;
- while (!cmpfail && i<indata1.data_type.nobservations) {
- cmpfail = strcmp(indata1.observationNames[i].name,indata2.observationNames[i].name);
- i++;
- }
- if (cmpfail){
- msg << "observation names are not the same in files '" << ifname1;
- msg << "' and '" << ifname2 << "', observation # " << i <<", names are '";
- msg << indata1.observationNames[i-1].name;
- msg << "' and '" << indata2.observationNames[i-1].name;
- msg << "' (only first shown); name will be taken from the first file\n";
- } else {
- msg << "observation names are the same in files '" << ifname1 << "' and '"<< ifname2 << "'\n\n";
- }
- unsigned long out_nvars = indata1.data_type.numVariables + indata2.data_type.numVariables;
- unsigned long out_nobs = indata1.data_type.nobservations;
- dbg << "initalizing FVF-file '" << ofname << "'...\n";
- initializeEmptyFile(ofname, out_nvars, out_nobs, FLOAT, true);
- dbg << "writing out the data ... \n";
+ // sanity checks: can we merge these files?
+ // are dimensions compatible?
+ if (indata1.data_type.nobservations != indata2.data_type.nobservations)
+ {
+ errorLog << "can not merge files with different number of observations"
+ << endl << endl << errorExit;
+ }
+ else
+ {
+ errorLog << "file dimensions are compatible\n";
+ }
+ // are observation names the same?
+ unsigned long cmpfail = 0, i = 0;
+ while (!cmpfail && i<indata1.data_type.nobservations) {
+ cmpfail = strcmp(indata1.observationNames[i].name,
+ indata2.observationNames[i].name);
+ i++;
+ }
+ if (cmpfail){
+ msg << "observation names are not the same in files '" << ifname1;
+ msg << "' and '" << ifname2 << "', observation # " << i
+ << ", names are '";
+ msg << indata1.observationNames[i-1].name;
+ msg << "' and '" << indata2.observationNames[i-1].name;
+ msg << "' (only first shown); name will be taken from the first file\n";
+ } else {
+ msg << "observation names are the same in files '" << ifname1
+ << "' and '"<< ifname2 << "'\n\n";
+ }
+ unsigned long out_nvars = indata1.data_type.numVariables +
+ indata2.data_type.numVariables;
+ unsigned long out_nobs = indata1.data_type.nobservations;
+ dbg << "initalizing FVF-file '" << ofname << "'...\n";
+ initializeEmptyFile(ofname, out_nvars, out_nobs, FLOAT, true);
+ dbg << "writing out the data ... \n";
- FileVector outdata(ofname, cachesize);
+ FileVector outdata(ofname, cachesize);
-// copy observation names from the first object
- for (i=0;i<indata1.data_type.nobservations;i++)
- outdata.observationNames[i] = indata1.observationNames[i];
+ // copy observation names from the first object
+ for (i = 0; i < indata1.data_type.nobservations; i++)
+ {
+ outdata.observationNames[i] = indata1.observationNames[i];
+ }
-// copy var names and data
- float * tmpdat = new (nothrow) float [outdata.data_type.nobservations];
- if (!tmpdat) errorLog << "can not allocate memory for tmpdat" << endl << endl << errorExit;
- for (unsigned long i=0;i<indata1.data_type.numVariables;i++)
- {
- outdata.variableNames[i] = indata1.variableNames[i];
- indata1.readVariable(i,tmpdat);
- outdata.writeVariable(i,tmpdat);
- }
+ // copy var names and data
+ float * tmpdat = new (nothrow) float [outdata.data_type.nobservations];
+ if (!tmpdat)
+ {
+ errorLog << "can not allocate memory for tmpdat"
+ << endl << endl << errorExit;
+ }
- for (i=indata1.data_type.numVariables;i<(indata1.data_type.numVariables+indata2.data_type.numVariables);i++)
- {
- outdata.variableNames[i] = indata2.variableNames[i-indata1.data_type.numVariables];
- indata2.readVariable(i-indata1.data_type.numVariables,tmpdat);
- outdata.writeVariable(i,tmpdat);
- }
+ for (unsigned long i = 0; i < indata1.data_type.numVariables; i++)
+ {
+ outdata.variableNames[i] = indata1.variableNames[i];
+ indata1.readVariable(i,tmpdat);
+ outdata.writeVariable(i,tmpdat);
+ }
- return(1);
+ for (i = indata1.data_type.numVariables;
+ i < (indata1.data_type.numVariables + indata2.data_type.numVariables);
+ i++)
+ {
+ outdata.variableNames[i] =
+ indata2.variableNames[i-indata1.data_type.numVariables];
+ indata2.readVariable(i-indata1.data_type.numVariables, tmpdat);
+ outdata.writeVariable(i, tmpdat);
+ }
+
+ return(1);
}
Modified: pkg/filevector/fvfutil/text2fvf.h
===================================================================
--- pkg/filevector/fvfutil/text2fvf.h 2013-12-06 10:17:37 UTC (rev 1453)
+++ pkg/filevector/fvfutil/text2fvf.h 2013-12-08 21:58:38 UTC (rev 1454)
@@ -11,8 +11,12 @@
#define T2F_AUTHORS "Yurii Aulchenko"
void text2fvf(
- string program_name, string infilename, string outfilename, string rownamesfilename, string colnamesfilename,
- int rownames, int colnames, unsigned long skiprows, unsigned long skipcols, int transpose, int Rmatrix, unsigned short int type, bool quiet, string nanString
+ string program_name, string infilename, string outfilename,
+ string rownamesfilename, string colnamesfilename,
+ int rownames, int colnames,
+ unsigned long skiprows, unsigned long skipcols,
+ int transpose, int Rmatrix, unsigned short int type,
+ bool quiet, string nanString
);
Modified: pkg/filevector/fvfutil/text2fvf_main.cpp
===================================================================
--- pkg/filevector/fvfutil/text2fvf_main.cpp 2013-12-06 10:17:37 UTC (rev 1453)
+++ pkg/filevector/fvfutil/text2fvf_main.cpp 2013-12-08 21:58:38 UTC (rev 1454)
@@ -69,10 +69,10 @@
colnamesfilename = string(optarg);
break;
case 't':
- transpose=1;
+ transpose = 1;
break;
case 'R':
- Rmatrix=1;
+ Rmatrix = 1;
break;
case 'd':
cout << "optarg:" << optarg << flush;
@@ -100,13 +100,14 @@
print_text2fvf_usage(program_name);
}
- string Pname = program_name, Iname = infilename, Oname = outfilename, RFname = rownamesfilename, CFname = colnamesfilename;
+ string Pname = program_name, Iname = infilename, Oname = outfilename,
+ RFname = rownamesfilename, CFname = colnamesfilename;
text2fvf(Pname, Iname, Oname,
- RFname, CFname,
- rownames, colnames,
- skiprows, skipcols,
- transpose, Rmatrix, dataType, !!quiet, nanString);
+ RFname, CFname,
+ rownames, colnames,
+ skiprows, skipcols,
+ transpose, Rmatrix, dataType, !!quiet, nanString);
return(0);
}
Modified: pkg/filevector/fvfutil/transpose_main.cpp
===================================================================
--- pkg/filevector/fvfutil/transpose_main.cpp 2013-12-06 10:17:37 UTC (rev 1453)
+++ pkg/filevector/fvfutil/transpose_main.cpp 2013-12-08 21:58:38 UTC (rev 1454)
@@ -1,6 +1,6 @@
/*
-* This is utility to transpose FileVector files in binary format, so there will not be need in
-advanced text tools behaviour.
+* This is utility to transpose FileVector files in binary format, so there
+* will not be need in advanced text tools behaviour.
*/
#include <iostream>
@@ -15,14 +15,13 @@
int main(int argc, char * argv[])
{
- if ( argc<2 )
- {
- cout << "Please provide name of the file to transpose"<< endl;
- exit ( 1 );
- }
+ if (argc < 2)
+ {
+ cout << "Please provide name of the file to transpose" << endl;
+ exit(1);
+ }
string filename = argv[1];
Transposer tr;
tr.process(filename);
}
-
Modified: pkg/filevector/fvfutil/usage.cpp
===================================================================
--- pkg/filevector/fvfutil/usage.cpp 2013-12-06 10:17:37 UTC (rev 1453)
+++ pkg/filevector/fvfutil/usage.cpp 2013-12-08 21:58:38 UTC (rev 1454)
@@ -4,65 +4,97 @@
void print_text2fvf_usage(char * progname)
{
- cout << "USAGE: " << progname << " -i INFILE -o OUTFILE [-r N2] [--colnames[=CFILE]] [-t] [-datatype=TYPE]" << endl;
- cout << endl;
- cout << "\t--infile=INFILE : the name of the input file containing matrix in text format" << endl;
- cout << "\t--outfile=OUTFILE : name of the output file which will containing matrix in FVF format" << endl;
- cout << "\t--skipcols=N1 : skip N1 first columns when reading from the input text file" << endl;
- cout << "\t--rownames=N2 : row names are provided in the N2-th column of the text file" << endl;
- cout << "\t--colnames[=CFILE] : column names are provided either as the first line of the text" << endl;
- cout << "\t matrix text file (if no arguments supplied) or in a separate" << endl;
- cout << "\t text file CFILE" << endl;
- cout << "\t--transpose : should the matrix be transposed" << endl;
- cout << "\t--datatype=TYPE : specify destination data type, default is DOUBLE" << endl;
+ cout << "USAGE: " << progname << " -i INFILE -o OUTFILE [-r N2] "
+ << "[--colnames[=CFILE]] [-t] [-datatype=TYPE]" << endl;
+ cout << endl;
+ cout << "\t--infile=INFILE : the name of the input file "
+ << "containing matrix in text format" << endl;
+ cout << "\t--outfile=OUTFILE : name of the output file which "
+ << "will containing matrix in FVF format" << endl;
+ cout << "\t--skipcols=N1 : skip N1 first columns when reading "
+ << "from the input text file" << endl;
+ cout << "\t--rownames=N2 : row names are provided in the N2-th "
+ << "column of the text file" << endl;
+ cout << "\t--colnames[=CFILE] : column names are provided either as "
+ << "the first line of the text" << endl;
+ cout << "\t matrix text file "
+ << "(if no arguments supplied) or in a separate" << endl;
+ cout << "\t text file CFILE" << endl;
+ cout << "\t--transpose : should the matrix be transposed" << endl;
+ cout << "\t--datatype=TYPE : specify destination data type, "
+ << "default is DOUBLE" << endl;
- cout << endl;
- cout << "The program will convert text matrix to FileVector (FVF) format."<< endl;
- cout << "By default, the columns of the text matrix are considered as 'variables'"<< endl;
- cout << "for which FVF will provide fast access. If you want it other way around,"<< endl;
- cout << "please specify '-t' option."<< endl;
- cout << ""<< endl;
- cout << "EXAMPLES: " << progname << " -i test.mldose -o test.mldose.fvf -c 2 -r 1"<< endl;
- cout << " Text matrix file contains two starting columns, first of which"<< endl;
- cout << " contains subjects IDs."<< endl;
- cout << " Command will convert text matrix provided in 'test.mldose' to "<< endl;
- cout << " FVF-formated file 'test.mldose.fvf'. Columns will be stored as"<< endl;
- cout << " the fast-access FVF 'variables'"<< endl;
- cout << ""<< endl;
- cout << " " << progname << " -i test.mldose -o test.mldose.fvf -c 2 -r 1 -t"<< endl;
- cout << " Same as above, but transposing the matrix. Rows will be stores as"<< endl;
- cout << " the fast-access FVF 'variables'"<< endl;
- cout << ""<< endl;
- cout << " " << progname << " -i test.mldose -o test.mldose.fvf -c 2 -r 1 --colnames=test.snplist"<< endl;
- cout << " Same as example 1, but we tell that column names are stored in file"<< endl;
- cout << " 'test.snplist' (mind the full format used: '--colnames=CFILE')"<< endl;
- cout << ""<< endl;
- exit(0);
+ cout << endl;
+ cout << "The program will convert text matrix to FileVector (FVF) format."
+ << endl;
+ cout << "By default, the columns of the text matrix are considered "
+ << "as 'variables'" << endl;
+ cout << "for which FVF will provide fast access. If you want it "
+ << "other way around," << endl;
+ cout << "please specify '-t' option." << endl;
+ cout << "" << endl;
+ cout << "EXAMPLES: " << progname << " -i test.mldose -o test.mldose.fvf "
+ << "-c 2 -r 1" << endl;
+ cout << " Text matrix file contains two starting columns, "
+ << "first of which" << endl;
+ cout << " contains subjects IDs." << endl;
+ cout << " Command will convert text matrix provided "
+ << "in 'test.mldose' to " << endl;
+ cout << " FVF-formated file 'test.mldose.fvf'. "
+ << "Columns will be stored as" << endl;
+ cout << " the fast-access FVF 'variables'" << endl;
+ cout << "" << endl;
+ cout << " " << progname << " -i test.mldose "
+ << "-o test.mldose.fvf -c 2 -r 1 -t" << endl;
+ cout << " Same as above, but transposing the matrix. "
+ << "Rows will be stores as" << endl;
+ cout << " the fast-access FVF 'variables'" << endl;
+ cout << "" << endl;
+ cout << " " << progname << " -i test.mldose "
+ << "-o test.mldose.fvf -c 2 -r 1 --colnames=test.snplist" << endl;
+ cout << " Same as example 1, but we tell that column names "
+ << "are stored in file" << endl;
+ cout << " 'test.snplist' (mind the full format "
+ << "used: '--colnames=CFILE')" << endl;
+ cout << "" << endl;
+ exit(0);
}
+
void print_text2fvf_welcome()
{
- cout << "\ntext2fvf v. " << T2F_VERSION << " (" << T2F_RELEASEDATE << ")"<< endl;
- cout << "(C) " << T2F_AUTHORS << endl;
- cout << "based on FileVector v. " << FV_VERSION << " (" << FV_RELEASEDATE << ")"<< endl;
- cout << "(C) " << FV_AUTHORS << endl;
+ cout << "\ntext2fvf v. " << T2F_VERSION
+ << " (" << T2F_RELEASEDATE
+ << ")" << endl;
+ cout << "(C) " << T2F_AUTHORS << endl;
+ cout << "based on FileVector v. " << FV_VERSION
+ << " (" << FV_RELEASEDATE
+ << ")" << endl;
+ cout << "(C) " << FV_AUTHORS << endl;
}
+
void print_mergevars_usage(char * progname)
{
- cout << "USAGE: " << progname << " INFILE1 INFILE2 OUTFILE [cachesize]" << ""<< endl;
- cout << ""<< endl;
- cout << "\tINFILE1, INFILE2 : two files in FVF-format"<< endl;
- cout << "\tOUTFILE : name of file where merged data will be written to"<< endl;
- cout << "\tcachesize : size (Mb) of cache to be used (optional)"<< endl;
- cout << ""<< endl;
- exit(0);
+ cout << "USAGE: " << progname
+ << " INFILE1 INFILE2 OUTFILE [cachesize]" << endl;
+ cout << "" << endl;
+ cout << "\tINFILE1, INFILE2 : two files in FVF-format" << endl;
+ cout << "\tOUTFILE : name of file where merged data "
+ << "will be written to" << endl;
+ cout << "\tcachesize : size (Mb) of cache to be used "
+ << "(optional)" << endl;
+ cout << "" << endl;
+ exit(0);
}
+
void print_mergevars_welcome()
{
- cout << "\nmergevars v. " << MERGEVARS_VERSION << " (" << MERGEVARS_RELEASEDATE << ")"<< endl;
- cout << "(C) " << MERGEVARS_AUTHORS << "\n"<< endl;
- cout << "based on FileVector v. " << FV_VERSION << " (" << FV_RELEASEDATE << ")"<< endl;
- cout << "(C) " << FV_AUTHORS << "\n"<< endl;
+ cout << "\nmergevars v. " << MERGEVARS_VERSION
+ << " (" << MERGEVARS_RELEASEDATE << ")" << endl;
+ cout << "(C) " << MERGEVARS_AUTHORS << "\n" << endl;
+ cout << "based on FileVector v. " << FV_VERSION
+ << " (" << FV_RELEASEDATE << ")" << endl;
+ cout << "(C) " << FV_AUTHORS << "\n" << endl;
}
More information about the Genabel-commits
mailing list