]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add pbm sig symbole
authorBastian Dehn <hhaalo@arcor.de>
Tue, 5 May 2026 14:35:47 +0000 (16:35 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 5 May 2026 14:35:47 +0000 (16:35 +0200)
src/kds_s2000w_handler.c

index a36398691b92f825b76f9472bd5402f9a3b3d016..ee0bf2e335ed4961a7d8057e5b45a4738564ca72 100644 (file)
@@ -10,6 +10,7 @@
 
 #define SPACE 0x0a
 #define ATTEMPT 30
+#define PBM_SIG "P4"
 
 uint32_t _kds_s2000w_handler_find_first_data_byte(const imagedata_t* image)
 {
@@ -18,7 +19,7 @@ uint32_t _kds_s2000w_handler_find_first_data_byte(const imagedata_t* image)
        const char* data = (const char*) image->data;
        uint8_t header_spaces = 3;
 
-       if (strncmp(data, "P4", 2) == 0)
+       if (strncmp(data, PBM_SIG, 2) == 0)
                header_spaces = 2;
 
        uint32_t space_count = 0;