From: <tr...@us...> - 2003-02-11 14:46:09
|
Update of /cvsroot/basedb/basedb/plugins/src/normalizers In directory sc8-pr-cvs1:/tmp/cvs-serv8658 Modified Files: lowess_renorm.cc Log Message: Fixed broken pubsetbuf() with deallocated buffer Index: lowess_renorm.cc =================================================================== RCS file: /cvsroot/basedb/basedb/plugins/src/normalizers/lowess_renorm.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lowess_renorm.cc 1 Feb 2003 12:52:52 -0000 1.1 --- lowess_renorm.cc 11 Feb 2003 14:46:05 -0000 1.2 *************** *** 40,48 **** int main() { - #if !defined __GNUC__ || __GNUC__ >= 3 - char buf[4096]; - cout.rdbuf()->pubsetbuf(buf, sizeof(buf)); - #endif - BaseFileReader bfr(cin); BaseFileSection sect; --- 40,43 ---- *************** *** 59,62 **** --- 54,62 ---- cout << "BASEfile\n"; + #if !defined __GNUC__ || __GNUC__ >= 3 + char buf[4096]; + cout.rdbuf()->pubsetbuf(buf, sizeof(buf)); + #endif + while(1) { *************** *** 67,70 **** --- 67,73 ---- bfr.errText()<<"\n"; } + #if !defined __GNUC__ || __GNUC__ >= 3 + cout.rdbuf()->pubsetbuf(NULL, 0); + #endif exit(bfr.getError()); } *************** *** 76,79 **** --- 79,85 ---- !sect2.findFieldList("assays", assays)){ cerr << "lowess: Missing header columns/assayFields/assays\n"; + #if !defined __GNUC__ || __GNUC__ >= 3 + cout.rdbuf()->pubsetbuf(NULL, 0); + #endif exit(1); } *************** *** 81,84 **** --- 87,93 ---- if(assays.size() != 1){ cerr << "lowess: Not exactly one assay in 'spots' section\n"; + #if !defined __GNUC__ || __GNUC__ >= 3 + cout.rdbuf()->pubsetbuf(NULL, 0); + #endif exit(1); } *************** *** 92,95 **** --- 101,107 ---- cerr << "lowess: Missing position/reporter/assayData columns " "or intensity1/intensity2 fields\n"; + #if !defined __GNUC__ || __GNUC__ >= 3 + cout.rdbuf()->pubsetbuf(NULL, 0); + #endif exit(1); } *************** *** 107,110 **** --- 119,127 ---- cout << "\n"; } + + #if !defined __GNUC__ || __GNUC__ >= 3 + cout.rdbuf()->pubsetbuf(NULL, 0); + #endif + } |