From 592f776f76bd49f80ba9912d21022f6f81c0ae3a Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 15 Feb 2021 12:35:22 +0100 Subject: [PATCH 1/3] downloader: Fix missing includes in virtualFileHTTP.cxx --- panda/src/downloader/virtualFileHTTP.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panda/src/downloader/virtualFileHTTP.cxx b/panda/src/downloader/virtualFileHTTP.cxx index dcb9036d87..8e392c3d16 100644 --- a/panda/src/downloader/virtualFileHTTP.cxx +++ b/panda/src/downloader/virtualFileHTTP.cxx @@ -13,9 +13,12 @@ #include "virtualFileHTTP.h" #include "virtualFileMountHTTP.h" +#include "ramfile.h" #include "stringStream.h" #include "zStream.h" +#include + #ifdef HAVE_OPENSSL using std::istream; From a704d2c2283cd592f1e2f586b187c952984e3ab0 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 15 Feb 2021 12:46:29 +0100 Subject: [PATCH 2/3] display: Fix typos in docstrings [skip ci] --- panda/src/display/graphicsEngine.cxx | 4 ++-- panda/src/display/graphicsOutput.cxx | 2 +- panda/src/display/graphicsWindow.I | 4 ++-- panda/src/display/graphicsWindow.cxx | 2 +- panda/src/display/subprocessWindow.cxx | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index b900dc26e6..ef24abd226 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -191,7 +191,7 @@ GraphicsEngine:: /** * Specifies how future objects created via make_gsg(), make_buffer(), and - * make_window() will be threaded. This does not affect any already-created + * make_output() will be threaded. This does not affect any already-created * objects. */ void GraphicsEngine:: @@ -2095,7 +2095,7 @@ do_draw(GraphicsOutput *win, GraphicsStateGuardian *gsg, DisplayRegion *dr, Thre } /** - * An internal function called by make_window() and make_buffer() and similar + * An internal function called by make_output() and make_buffer() and similar * functions to add the newly-created GraphicsOutput object to the engine's * list of windows, and to request that the window be opened. */ diff --git a/panda/src/display/graphicsOutput.cxx b/panda/src/display/graphicsOutput.cxx index 850faca771..529a053d00 100644 --- a/panda/src/display/graphicsOutput.cxx +++ b/panda/src/display/graphicsOutput.cxx @@ -63,7 +63,7 @@ static CubeFaceDef cube_faces[6] = { /** * Normally, the GraphicsOutput constructor is not called directly; these are - * created instead via the GraphicsEngine::make_window() function. + * created instead via the GraphicsEngine::make_output() function. */ GraphicsOutput:: GraphicsOutput(GraphicsEngine *engine, GraphicsPipe *pipe, diff --git a/panda/src/display/graphicsWindow.I b/panda/src/display/graphicsWindow.I index 186da942ad..08d9d4e615 100644 --- a/panda/src/display/graphicsWindow.I +++ b/panda/src/display/graphicsWindow.I @@ -14,7 +14,7 @@ /** * Returns true if the window has not yet been opened, or has been fully * closed, false if it is open. The window is not opened immediately after - * GraphicsEngine::make_window() is called; nor is it closed immediately after + * GraphicsEngine::make_output() is called; nor is it closed immediately after * GraphicsEngine::remove_window() is called. Either operation may take a * frame or two. */ @@ -34,7 +34,7 @@ is_fullscreen() const { /** * If this flag is false, the window is redrawn only after it has received a - * recent "unexpose" or "draw" event from the underlying windowing systme. If + * recent "unexpose" or "draw" event from the underlying windowing system. If * this flag is true, the window is redrawn every frame regardless. Setting * this false may prevent the window from redrawing unnecessarily when it is * hidden, and may play nicer with other windows on the desktop, but may diff --git a/panda/src/display/graphicsWindow.cxx b/panda/src/display/graphicsWindow.cxx index ee686528da..ad27b2ac46 100644 --- a/panda/src/display/graphicsWindow.cxx +++ b/panda/src/display/graphicsWindow.cxx @@ -27,7 +27,7 @@ TypeHandle GraphicsWindow::_type_handle; /** * Normally, the GraphicsWindow constructor is not called directly; these are - * created instead via the GraphicsEngine::make_window() function. + * created instead via the GraphicsEngine::make_output() function. */ GraphicsWindow:: GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe, diff --git a/panda/src/display/subprocessWindow.cxx b/panda/src/display/subprocessWindow.cxx index 21e4b634c2..020dbde898 100644 --- a/panda/src/display/subprocessWindow.cxx +++ b/panda/src/display/subprocessWindow.cxx @@ -27,7 +27,7 @@ TypeHandle SubprocessWindow::_type_handle; /** * Normally, the SubprocessWindow constructor is not called directly; these - * are created instead via the GraphicsEngine::make_window() function. + * are created instead via the GraphicsEngine::make_output() function. */ SubprocessWindow:: SubprocessWindow(GraphicsEngine *engine, GraphicsPipe *pipe, From 6374a7f240582cebb3860f506090cbf0c3a4ec16 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 15 Feb 2021 14:13:11 +0100 Subject: [PATCH 3/3] express: Fix up Patchfile docstrings [skip ci] --- panda/src/express/patchfile.cxx | 55 +++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/panda/src/express/patchfile.cxx b/panda/src/express/patchfile.cxx index c7e212c260..a35cb3da5e 100644 --- a/panda/src/express/patchfile.cxx +++ b/panda/src/express/patchfile.cxx @@ -47,25 +47,39 @@ using std::string; // USE_MD5_FOR_HASHTABLE_INDEX_VALUES /* - * Patch File Format IF THIS CHANGES, UPDATE installerApplyPatch.cxx IN THE - * INSTALLER [ HEADER ] 4 bytes 0xfeebfaac ("magic number") (older patch - * files have a magic number 0xfeebfaab, indicating they are version number - * 0.) 2 bytes version number (if magic number == 0xfeebfaac) 4 bytes length - * of starting file (if version >= 1) 16 bytes MD5 of starting file (if - * version >= 1) 4 bytes length of resulting patched file 16 bytes MD5 of - * resultant patched file Note that MD5 hashes are written in the order - * observed by HashVal::read_stream() and HashVal::write_stream(), which is - * not the normal linear order. (Each group of four bytes is reversed.) + * Patch File Format + * IF THIS CHANGES, UPDATE installerApplyPatch.cxx IN THE INSTALLER + * + * [ HEADER ] + * 4 bytes 0xfeebfaac ("magic number") + * (older patch files have a magic number 0xfeebfaab, + * indicating they are version number 0.) + * 2 bytes version number (if magic number == 0xfeebfaac) + * 4 bytes length of starting file (if version >= 1) + * 16 bytes MD5 of starting file (if version >= 1) + * 4 bytes length of resulting patched file + * 16 bytes MD5 of resultant patched file + * + * Note that MD5 hashes are written in the order observed by + * HashVal::read_stream() and HashVal::write_stream(), which is not + * the normal linear order. (Each group of four bytes is reversed.) */ const int _v0_header_length = 4 + 4 + 16; const int _v1_header_length = 4 + 2 + 4 + 16 + 4 + 16; /* - * [ ADDCOPY pairs; repeated N times ] 2 bytes AL = ADD length AL bytes - * bytes to add 2 bytes CL = COPY length 4 bytes offset of data to copy from - * original file, if CL != 0. If version >= 2, offset is relative to end of - * previous copy block; if version < 2, offset is relative to beginning of - * file. [ TERMINATOR ] 2 bytes zero-length ADD 2 bytes zero-length COPY + * [ ADD/COPY pairs; repeated N times ] + * 2 bytes AL = ADD length + * AL bytes bytes to add + * 2 bytes CL = COPY length + * 4 bytes offset of data to copy from original file, if CL != 0. + * If version >= 2, offset is relative to end of previous + * copy block; if version < 2, offset is relative to + * beginning of file. + * + * [ TERMINATOR ] + * 2 bytes zero-length ADD + * 2 bytes zero-length COPY */ // Defines @@ -258,11 +272,14 @@ read_header(const Filename &patch_file) { } /** - * 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 + * Perform one buffer's worth of patching. + * Returns one of the following values: + * @li @c EU_ok : while patching + * @li @c EU_success : when done + * @li @c EU_error_abort : Patching has not been initiated + * @li @c EU_error_file_invalid : file is corrupted + * @li @c EU_error_invalid_checksum : incompatible patch file + * @li @c EU_error_write_file_rename : could not rename file */ int Patchfile:: run() {