mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
added some docs as per request
http://panda3d.org/phpbb2/viewtopic.php?t=5324
This commit is contained in:
parent
98d970ed2c
commit
3a14549dd7
@ -96,7 +96,7 @@ const PN_uint32 Patchfile::_HASH_MASK = (PN_uint32(1) << Patchfile::_HASH_BITS)
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Patchfile::Constructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
// Description: Create a patch file and initializes internal data
|
||||
////////////////////////////////////////////////////////////////////
|
||||
Patchfile::
|
||||
Patchfile() {
|
||||
@ -108,7 +108,7 @@ Patchfile() {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Patchfile::Constructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
// Description: Create patch file with buffer to patch
|
||||
////////////////////////////////////////////////////////////////////
|
||||
Patchfile::
|
||||
Patchfile(PT(Buffer) buffer) {
|
||||
@ -150,7 +150,7 @@ Patchfile::
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Patchfile::cleanup
|
||||
// Access: Private
|
||||
// Description:
|
||||
// Description: Closes and clean up internal data structures
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void Patchfile::
|
||||
cleanup() {
|
||||
@ -185,7 +185,7 @@ cleanup() {
|
||||
// Function: Patchfile::initiate
|
||||
// Access: Published
|
||||
// Description: Set up to apply the patch to the file (original
|
||||
// file and patch are destroyed in the process).
|
||||
// file and patch are destroyed in the process).
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int Patchfile::
|
||||
initiate(const Filename &patch_file, const Filename &file) {
|
||||
@ -264,6 +264,13 @@ read_header(const Filename &patch_file) {
|
||||
// Function: Patchfile::run
|
||||
// Access: Published
|
||||
// Description: Perform one buffer's worth of patching
|
||||
// Returns EU_ok while patching
|
||||
// Returns EU_success when done
|
||||
// If error happens will return one of:
|
||||
// EU_error_abort : Patching has not been initiated
|
||||
// EU_error_file_invalid : file is corrupted
|
||||
// EU_error_invalid_checksum : incompatible patch file
|
||||
// EU_error_write_file_rename : could not rename file
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int Patchfile::
|
||||
run() {
|
||||
@ -480,7 +487,8 @@ run() {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Patchfile::apply
|
||||
// Access: Public
|
||||
// Description:
|
||||
// Description: Patches the entire file in one call
|
||||
// returns true on success and false on error
|
||||
////////////////////////////////////////////////////////////////////
|
||||
bool Patchfile::
|
||||
apply(Filename &patch_file, Filename &file) {
|
||||
@ -1396,6 +1404,7 @@ tar_writefunc(int, const void *, size_t) {
|
||||
// For an original file of size M and a new file of
|
||||
// size N, this algorithm is O(M) in space and
|
||||
// O(M*N) (worst-case) in time.
|
||||
// return false on error
|
||||
////////////////////////////////////////////////////////////////////
|
||||
bool Patchfile::
|
||||
build(Filename file_orig, Filename file_new, Filename patch_name) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user