]> gitweb.hhaalo.de Git - feierabend.git/commitdiff
change vars to stdint xml
authorBastian Dehn <hhaalo@arcor.de>
Wed, 11 Feb 2026 17:58:45 +0000 (18:58 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 11 Feb 2026 17:58:45 +0000 (18:58 +0100)
src/xml.c
src/xml.h

index ebb249e0bbde24cc2a979b6bde3068c91eff4ba2..91c858e08e761b5ba329e58344258b5c15868228 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -68,7 +68,7 @@ void readStdInIntoMemory(memFile* mem)
        
        allocChunk(mem);
        size_t read_size = 0;
-       size_t current_chunk = CHUCK_SIZE;
+       uint8_t current_chunk = CHUCK_SIZE;
        while(fread(buf, sizeof(char), 1, stdin) != 0) {
                mem->data[read_size] = *buf;
                read_size++;
@@ -134,10 +134,10 @@ void initTimeAcount()
 
 void writeEntryNode(xmlTextWriterPtr xmlWriter,
        const char* date,
-       int begin_hour,
-       int begin_min,
-       int end_hour,
-       int end_min,
+       uint8_t begin_hour,
+       uint8_t begin_min,
+       uint8_t end_hour,
+       uint8_t end_min,
        time_t last_saldo)
 {
        feierabend* fabend = feierabend_init();
@@ -303,10 +303,10 @@ void writeEntryNode(xmlTextWriterPtr xmlWriter,
        fabend = NULL;
 }
 
-void createEntry(int begin_hour,
-       int begin_min,
-       int end_hour,
-       int end_min)
+void createEntry(uint8_t begin_hour,
+       uint8_t begin_min,
+       uint8_t end_hour,
+       uint8_t end_min)
 {
        xmlChar* xmlElemName = NULL;
        xmlChar* xmlElemContent = NULL;
@@ -423,10 +423,10 @@ void copyNodeAttributes(xmlTextReaderPtr xmlreader, xmlTextWriterPtr xmlwriter)
 }
 
 void addEntry(const char* date,
-       int begin_hour,
-       int begin_min,
-       int end_hour,
-       int end_min)
+       uint8_t begin_hour,
+       uint8_t begin_min,
+       uint8_t end_hour,
+       uint8_t end_min)
 {
        memFile* fileContent = init_memFile();
        readStdInIntoMemory(fileContent);
index e3a223ae31c3c277c56cedf827dcac78b31e5eb2..c34b7fd4cac57d2f1510703b62f23292e625fc9b 100644 (file)
--- a/src/xml.h
+++ b/src/xml.h
@@ -1,5 +1,6 @@
 #ifndef XML_H
 #define XML_H
+#include <stdint.h>
 
 typedef struct {
        char* data;
@@ -7,15 +8,15 @@ typedef struct {
 } memFile;
 
 void initTimeAcount();
-void createEntry(int begin_hour,
-       int begin_min,
-       int end_hour,
-       int end_min);
+void createEntry(uint8_t begin_hour,
+       uint8_t begin_min,
+       uint8_t end_hour,
+       uint8_t end_min);
 void addEntry(const char* date,
-       int begin_hour,
-       int begin_min,
-       int end_hour,
-       int end_min);
+       uint8_t begin_hour,
+       uint8_t begin_min,
+       uint8_t end_hour,
+       uint8_t end_min);
 void merge(const char* dir);
 
 #endif
\ No newline at end of file