]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/file_directories/binary/class_BaseBinaryFile.php
Debug infos with var()=%d are for length and can be decimal.
[core.git] / inc / classes / main / file_directories / binary / class_BaseBinaryFile.php
index 8debce70d844326f6505f56786097f6ae1bf3c09..e4c3aeb5d5a74fb75fd8a237c091448f4f0bc37e 100644 (file)
@@ -396,11 +396,14 @@ class BaseBinaryFile extends BaseAbstractFile {
         * @return      void
         */
        public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data()=%s - CALLED!', __METHOD__, __LINE__, $seekPosition, strlen($data)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data()=%d - CALLED!', __METHOD__, __LINE__, $seekPosition, strlen($data)));
 
                // Write data at given position
                $this->getPointerInstance()->writeAtPosition($seekPosition, $data);
 
+               // Increment counter
+               $this->incrementCounter();
+
                // Update seek position
                $this->updateSeekPosition();
 
@@ -638,7 +641,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                        } // END - if
 
                        // Debug message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] current()=%s', __METHOD__, __LINE__, strlen($current)));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] current()=%d', __METHOD__, __LINE__, strlen($current)));
                } // END - while
 
                // If the last read block is empty, check gaps
@@ -679,7 +682,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] key()=%s', __FUNCTION__, __LINE__, $this->key()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] key()=%d', __FUNCTION__, __LINE__, $this->key()));
 
                // Make sure the block instance is set
                assert($this->getBlockInstance() instanceof CalculatableBlock);
@@ -704,7 +707,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                        $block = $this->read($length);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] block()=%s,length=%s', __FUNCTION__, __LINE__, strlen($block), $length));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] block()=%d,length=%s', __FUNCTION__, __LINE__, strlen($block), $length));
 
                        // Is it all empty?
                        if (strlen(trim($block)) == 0) {
@@ -719,7 +722,7 @@ class BaseBinaryFile extends BaseAbstractFile {
                        $data .= $block;
 
                        // A debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] data()=%s', __FUNCTION__, __LINE__, strlen($data)));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d] data()=%d', __FUNCTION__, __LINE__, strlen($data)));
                } // END - while
 
                // EOF reached?