summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <Pixel>2002-05-12 00:58:38 +0000
committerPixel <Pixel>2002-05-12 00:58:38 +0000
commit84e4d27b5cb96e6d47ef17c34265f407ad9cd385 (patch)
tree7c0ec0df541ea55142c8ebb2fe896caa5e370fe9
parentf203ea857d735eec248e1ffbfbf65d2c37005c6e (diff)
Dayly commit
-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)