summaryrefslogtreecommitdiff
path: root/cd-tool.cpp
diff options
context:
space:
mode:
authorpixel <pixel>2003-09-05 15:28:29 +0000
committerpixel <pixel>2003-09-05 15:28:29 +0000
commit23b21e9fa28cb317a86e2e8cfb1c8548d708f32f (patch)
tree87ee5ed995a74ad792a7c86392307e10ff13d75b /cd-tool.cpp
parent4a5e6ba6ba48ced51222dbda36a3d3dd99d75ec5 (diff)
Fixed more things... I'm starting to like MSVC! THAT'S NO GOOD!
Diffstat (limited to 'cd-tool.cpp')
-rw-r--r--cd-tool.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/cd-tool.cpp b/cd-tool.cpp
index 9facf0e..cf7578b 100644
--- a/cd-tool.cpp
+++ b/cd-tool.cpp
@@ -45,10 +45,14 @@ CODE_BEGINS
public:
Appli() : cdutil(0), iso_r(0), iso_w(0), file(0) {}
virtual ~Appli() {
- delete cdutil;
- delete iso_r;
- delete iso_w;
- delete file;
+ if (cdutil)
+ delete cdutil;
+ if (iso_r)
+ delete iso_r;
+ if (iso_w)
+ delete iso_w;
+ if (file)
+ delete file;
}
private:
@@ -102,7 +106,7 @@ virtual int startup() throw (GeneralException) {
if (argc == optind) {
showhelp();
printm(M_ERROR, "Need an iso filename to work on.\n");
- throw Exit(-1);
+ exit(-1);
}
iso_name = argv[optind++];
@@ -110,7 +114,7 @@ virtual int startup() throw (GeneralException) {
if (argc == optind) {
showhelp();
printm(M_ERROR, "Need a command to execute.\n");
- throw Exit(-1);
+ exit(-1);
}
iso_r = open_iso(iso_name);
@@ -118,7 +122,7 @@ virtual int startup() throw (GeneralException) {
cdutil = new cdutils(iso_r);
if (!cdutil->get_iso_infos())
- throw Exit(-1);
+ exit(-1);
if (!strcmp(argv[optind], "infos")) {
cdutil->show_iso_infos();
@@ -140,7 +144,7 @@ virtual int startup() throw (GeneralException) {
throw Exit(-1);
}
if (!(dir.Flags & 2)) {
- printm(M_ERROR, "Path %s design a file and not a directory.\n", arg1);
+ printm(M_ERROR, "Path %s is a file and not a directory.\n", arg1);
throw Exit(-1);
}
cdutil->show_head_entry();