about summary refs log tree commit diff
path: root/lib/libpbm3.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-03-30 18:31:01 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-03-30 18:31:01 +0000
commit81c59f730dacf62c927eb57dcadeecffe8b8daea (patch)
treea67cc5906891e0965c3a9d8cea80deacbc7f1930 /lib/libpbm3.c
parent19387d1be30e80e8c4e865bfe053aed1094ca8af (diff)
downloadnetpbm-mirror-81c59f730dacf62c927eb57dcadeecffe8b8daea.tar.gz
netpbm-mirror-81c59f730dacf62c927eb57dcadeecffe8b8daea.tar.xz
netpbm-mirror-81c59f730dacf62c927eb57dcadeecffe8b8daea.zip
promote Development to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4897 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libpbm3.c')
-rw-r--r--lib/libpbm3.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/libpbm3.c b/lib/libpbm3.c
index 5d4e614b..b566202f 100644
--- a/lib/libpbm3.c
+++ b/lib/libpbm3.c
@@ -324,7 +324,15 @@ pbm_writepbmrow_packed(FILE *                const fileP,
                        const unsigned char * const packedBits,
                        int                   const cols,
                        int                   const forceplain) {
+/*----------------------------------------------------------------------------
+   Write to file *fileP the PBM row 'cols' columns wide in packed bit buffer
+   'packedBits'.
+
+   Write it in PBM plain format iff 'forceplain' is nonzero.
 
+   In raw format, the don't-care bits at the end of the row are the same as
+   in the input buffer.
+-----------------------------------------------------------------------------*/
     if (!forceplain && !pm_plain_output)
         writePackedRawRow(fileP, packedBits, cols);
     else {
@@ -385,10 +393,14 @@ pbm_writepbmrow_bitoffset(FILE *          const fileP,
                           int             const format,
                           unsigned int    const offset) {
 /*----------------------------------------------------------------------------
-   Write PBM row from a packed bit buffer 'packedBits, starting at the
-   specified offset 'offset' in the buffer.
+   Write to file *fileP the tail of the PBM row 'cols' columns wide in packed
+   bit buffer 'packedBits'.  Start at column 'offset' of the row.
+
+   Write it in PBM raw format.
+
+   Make any don't-care bits at the end of the row written zero.
 
-   We destroy the buffer.
+   We destroy the contents of the buffer.
 -----------------------------------------------------------------------------*/
     unsigned int const rsh = offset % 8;
     unsigned int const lsh = (8 - rsh) % 8;