Mercurial > hg > audiodb
comparison audioDB.cpp @ 26:6d55ff3a21b1
Cosmetic error message string fix.
author | mas01cr |
---|---|
date | Thu, 16 Aug 2007 11:19:35 +0000 |
parents | 95f1f4a42257 |
children | 0357114be285 |
comparison
equal
deleted
inserted
replaced
25:eb6ae4d6a9bd | 26:6d55ff3a21b1 |
---|---|
470 | 470 |
471 // initTables - memory map files passed as arguments | 471 // initTables - memory map files passed as arguments |
472 // Precondition: database has already been created | 472 // Precondition: database has already been created |
473 void audioDB::initTables(const char* dbName, const char* inFile=0){ | 473 void audioDB::initTables(const char* dbName, const char* inFile=0){ |
474 if ((dbfid = open (dbName, O_RDWR)) < 0) | 474 if ((dbfid = open (dbName, O_RDWR)) < 0) |
475 error("Can't open database file:", dbName); | 475 error("Can't open database file", dbName); |
476 | 476 |
477 // open the input file | 477 // open the input file |
478 if (inFile && (infid = open (inFile, O_RDONLY)) < 0) | 478 if (inFile && (infid = open (inFile, O_RDONLY)) < 0) |
479 error("can't open input file for reading", inFile); | 479 error("can't open input file for reading", inFile); |
480 | 480 |
664 } | 664 } |
665 | 665 |
666 void audioDB::batchinsert(const char* dbName, const char* inFile){ | 666 void audioDB::batchinsert(const char* dbName, const char* inFile){ |
667 | 667 |
668 if ((dbfid = open (dbName, O_RDWR)) < 0) | 668 if ((dbfid = open (dbName, O_RDWR)) < 0) |
669 error("Can't open database file:", dbName); | 669 error("Can't open database file", dbName); |
670 | 670 |
671 if(!key) | 671 if(!key) |
672 key=inFile; | 672 key=inFile; |
673 ifstream *filesIn = 0; | 673 ifstream *filesIn = 0; |
674 ifstream *keysIn = 0; | 674 ifstream *keysIn = 0; |