From 84e4d27b5cb96e6d47ef17c34265f407ad9cd385 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 12 May 2002 00:58:38 +0000 Subject: Dayly commit --- FAQ.psx | 1 + VP/main_dump.cpp | 1 + fileutils.cpp | 2 +- fileutils.h | 2 +- 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 #include #include +#include #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 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) -- cgit v1.2.3