summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <Pixel>2002-08-10 22:59:40 +0000
committerPixel <Pixel>2002-08-10 22:59:40 +0000
commit89a43700b18c61d209ffb68db57e020f11a2daa9 (patch)
tree5a3fb40b511a85a5c4853dcea3edc23079d7f928
parent4b6d43a6a5146b0165d05a66c70b2a39ab8980f4 (diff)
Nighty commit
-rw-r--r--EmuPatch-FAQ.txt4
-rw-r--r--FAQ-psx.txt1
-rw-r--r--generic/Handle.cpp13
3 files changed, 13 insertions, 5 deletions
diff --git a/EmuPatch-FAQ.txt b/EmuPatch-FAQ.txt
index bd6152e..f7aa0e6 100644
--- a/EmuPatch-FAQ.txt
+++ b/EmuPatch-FAQ.txt
@@ -1,6 +1,6 @@
========================================================================
==============================================================================
-==================-< Emulateurs et Patches - F.A.Q. - v0.2a >-==================
+==================-< Emulateurs et Patches - F.A.Q. - v0.2b >-==================
==============================================================================
========================================================================
@@ -250,7 +250,7 @@ genre de documents qu'il vous faut lire maintenant.
Q17: Quel programme peut appliquer mon patch?
R: Je conseille le programme uCON64, disponible sur la page
-http://ucon64.sf.net Ce programme est un peu "rugeux", mais très efficace, car
+http://ucon64.sf.net Ce programme est un peu "rugueu", mais très efficace, car
il est capable d'appliquer tous les types de patch existant actuellement.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/FAQ-psx.txt b/FAQ-psx.txt
index 2b122bc..0bcd24f 100644
--- a/FAQ-psx.txt
+++ b/FAQ-psx.txt
@@ -23,6 +23,7 @@ A: http://www.psxdev.ip3.com/
http://badtaste.free.fr/
http://membres.lycos.fr/fennec
http://www.execpc.com/%7Ehalkun/PSX
+ http://www.loser-console.org/psx/main.html
and this two *can* be useful:
diff --git a/generic/Handle.cpp b/generic/Handle.cpp
index 8b7a278..d46fc22 100644
--- a/generic/Handle.cpp
+++ b/generic/Handle.cpp
@@ -10,7 +10,7 @@
#define _(x) x
#endif
-Handle::Handle(const Handle & nh) : h(nh.h >= 0 ? dup(nh.h) : nh.h), closed(nh.closed), nonblock(nh.closed), zfile(0), z(0) {
+Handle::Handle(const Handle & nh) : h(nh.h >= 0 ? dup(nh.h) : nh.h), closed(nh.closed), nonblock(nh.closed), zfile(0), z(0), itell(0) {
// cerr << "Duplication of handle " << nh.h << " to " << h << endl;
if ((h >= 0) && (nh.z)) {
SetZ(nh.z);
@@ -232,6 +232,7 @@ void Handle::SetZ(int az) throw (GeneralException) {
ssize_t Handle::uwrite(const void * buf, size_t count) throw (GeneralException) {
if (z) {
+ itell += count;
// cerr << "Performing gzwrite of " << count << " byte for handle " << h << endl;
int err = gzwrite(zfile, buf, count);
// cerr << "gzwrite returned " << err << endl;
@@ -245,12 +246,13 @@ ssize_t Handle::uwrite(const void * buf, size_t count) throw (GeneralException)
}
return err;
} else {
- return ::write(h, buf, count);
+ itell += count = ::write(h, buf, count);
}
}
ssize_t Handle::uread(void * buf, size_t count) {
if (z) {
+ itell += count;
// cerr << "Performing gzread of " << count << " byte for handle " << h << endl;
int err = gzread(zfile, buf, count);
// cerr << "gzwrite returned " << err << endl;
@@ -264,6 +266,11 @@ ssize_t Handle::uread(void * buf, size_t count) {
}
return err;
} else {
- return ::read(h, buf, count);
+ itell += count = ::read(h, buf, count);
+ return count;
}
}
+
+off_t Handle::tell() {
+ return itell;
+}