summaryrefslogtreecommitdiff
path: root/src/file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.cc')
-rw-r--r--src/file.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/file.cc b/src/file.cc
index 2ba20bb..49b9bb5 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.6 2005/06/19 20:04:43 deva
+ * ImgEncoder now uses the file class for output, through jpeg_mem_dest.
+ *
* Revision 1.5 2005/06/19 11:44:14 deva
* Cleaned up a log of logging.
* Fixed server queue (shouldn't happen).
@@ -61,19 +64,16 @@
#include <string.h>
#include <unistd.h>
-#include <stdio.h>
-
#include <stdlib.h>
-
File::File(char *fn, char* ext, Info *i)
{
char path[256];
info = i;
- filename = (char*)malloc(strlen(fn) + 1);
- extension = (char*)malloc(strlen(ext) + 1);
+ filename = new char[strlen(fn) + 1];
+ extension = new char[strlen(ext) + 1];
strcpy(filename, fn);
strcpy(extension, ext);
@@ -98,8 +98,8 @@ File::~File()
{
close(fd);
- free(filename);
- free(extension);
+ delete filename;
+ delete extension;
}
int File::Open()
@@ -179,4 +179,3 @@ int File::createPath(char* path)
return 0;
}
-