summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FAQ.psx1
-rw-r--r--VP/main_dump.cpp1
-rw-r--r--fileutils.cpp2
-rw-r--r--fileutils.h2
4 files changed, 4 insertions, 2 deletions
diff --git a/FAQ.psx b/FAQ.psx
index e49729a..a16fbb2 100644
--- a/FAQ.psx
+++ b/FAQ.psx
@@ -15,3 +15,4 @@ A: http://www.psxdev.ip3.com/
http://www.gamefreax.de/cgi-bin/gamefreax/tools.pl?function=showfiles&system=Playstation%201
http://phatt.hn.org/nitrous/psxutils.htm
http://www.geocities.com/SiliconValley/Pines/6131/psxprog.html
+ http://home.hiwaay.net/~jfrohwei/home.html
diff --git a/VP/main_dump.cpp b/VP/main_dump.cpp
index 47c90ac..21b5201 100644
--- a/VP/main_dump.cpp
+++ b/VP/main_dump.cpp
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <unistd.h>
#include "fileutils.h"
#include "cdutils.h"
#include "generic.h"
diff --git a/fileutils.cpp b/fileutils.cpp
index 32ca43e..62e2c0b 100644
--- a/fileutils.cpp
+++ b/fileutils.cpp
@@ -39,7 +39,7 @@ void copy(FILE * s, FILE * d, long size) {
unsigned char c;
long r;
- for (i = 0; i < size; i++) {
+ for (i = 0; (i < size) || (size < 0); i++) {
r = fread(&c, 1, 1, s);
if (r == 0) {
break;
diff --git a/fileutils.h b/fileutils.h
index 663c81e..071da66 100644
--- a/fileutils.h
+++ b/fileutils.h
@@ -26,7 +26,7 @@
#include <fcntl.h>
unsigned long filesize(FILE * f_iso);
-void copy(FILE * s, FILE * d, long size);
+void copy(FILE * s, FILE * d, long size = -1);
#if defined __linux__ || defined __CYGWIN32__
#define MKDIR(name) mkdir(name, 0777)