diff options
author | pixel <pixel> | 2003-11-25 01:55:45 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-11-25 01:55:45 +0000 |
commit | d9b7d14e9332542ae2ba1991849b061b555c1113 (patch) | |
tree | 2a4de2965a9edefd100d3678a2ad14b80e40a04e /lib | |
parent | df3bb461770d7667a082398b49eb08a602f82e9b (diff) |
Blaah
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cdreader.cpp | 9 | ||||
-rw-r--r-- | lib/cdutils.cpp | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/cdreader.cpp b/lib/cdreader.cpp index 33ba1b2..d3d315f 100644 --- a/lib/cdreader.cpp +++ b/lib/cdreader.cpp @@ -126,15 +126,16 @@ void cdreader::getsector(void *buf, int sec) throw (GeneralException) { #if defined (_MSC_VER) || defined (__MINGW32__) cdreader::cdreader(const String & no) throw (GeneralException) : Handle(-1), n(no), sector(0) { - if (!(hF = cdabstract::OpenIOCTLFile(no[0]))) + if (!(hFile = cdabstract::OpenIOCTLFile(no[0]))) throw GeneralException("Error opening device " + no); } -cdreader::cdreader(const cdreader & i) : Handle(i), n(i.n), hF(i.hF) { +cdreader::cdreader(const cdreader & i) : Handle(i), n(i.n) { + hFile = i.hFile; } void cdreader::close() throw (GeneralException) { - CloseHandle(hF); + CloseHandle(hFile); } typedef enum _TRACK_MODE_TYPE {
@@ -163,7 +164,7 @@ void cdreader::getsector(void *buf, int sec) throw (GeneralException) { while (!done) {
SetLastError(0);
- bStat = DeviceIoControl(hF, IOCTL_CDROM_RAW_READ,
+ bStat = DeviceIoControl(hFile, IOCTL_CDROM_RAW_READ,
&rawIOCTL, sizeof(RAW_READ_INFO),
buf, 2352, &dwRet, NULL);
if (!bStat) {
diff --git a/lib/cdutils.cpp b/lib/cdutils.cpp index 4082267..413f95d 100644 --- a/lib/cdutils.cpp +++ b/lib/cdutils.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cdutils.cpp,v 1.14 2003-11-23 14:43:06 pixel Exp $ */ +/* $Id: cdutils.cpp,v 1.15 2003-11-25 01:55:45 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -46,7 +46,7 @@ unsigned char cdutils::to_BCD(unsigned char x) { return ((x / 10) << 4) | (x % 10); } -int cdutils::is_valid_BCD(unsigned char x) { +bool cdutils::is_valid_BCD(unsigned char x) { return (((x & 15) < 10) && ((x >> 4) < 10)); } @@ -337,7 +337,7 @@ int cdutils::show_entry(struct DirEntry * dir) { return 1; } - strncpy(pbuf, (char *) &(dir->id), dir->N); + strncpy(pbuf, dir->id, dir->N); pbuf[dir->N] = 0; if ((dir->N == 1) && (pbuf[0] == 0)) { strcpy(pbuf, "."); |