```bash
cmake -DCMAKE_BUILD_TYPE=Release -DSOLL_HOUR=7 -DSOLL_MINUTES=30 ..
+```
+
+## Debian libxml
+
+```bash
+sudo ln -s /usr/include/libxml2/libxml /usr/include/libxml
```
\ No newline at end of file
PROJECT(feierabend VERSION 1.1.0)
+FIND_PACKAGE(LibXml2)
+
SET(SOLL_HOUR 8 CACHE STRING "soll Stunden")
SET(SOLL_MINUTES 0 CACHE STRING "soll Minuten")
feierabend.c
time_format.c
worktime.c
- break.c)
\ No newline at end of file
+ break.c)
+
+IF(${LibXml2_FOUND})
+ ADD_EXECUTABLE(${PROJECT_NAME}xml
+ feierabendxml.c
+ time_format.c
+ worktime.c
+ break.c)
+ TARGET_LINK_LIBRARIES(${PROJECT_NAME}xml
+ ${LibXml2_LIBRARY})
+ENDIF()
\ No newline at end of file
#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
+#include "feierabend.h"
#include "time_format.h"
#include "worktime.h"
#include "break.h"
#include "config.h"
-#define ONE_HOUR 3600
-
-typedef struct {
- time_t* now;
- time_t* begin;
- time_t* worktime;
- struct tm* now_tm;
- struct tm* begin_tm;
- struct tm* work_end_tm;
- char* weekday;
- char* timestr;
-} feierabend;
-
void init_feierabend(feierabend* fabend)
{
fabend->now = malloc(sizeof(time_t));
--- /dev/null
+#include <stdio.h>
+#include <libxml/encoding.h>
+#include <libxml/xmlwriter.h>
+#include "feierabend.h"
+
+void init_feierabend(feierabend* fabend)
+{
+ fabend->now = malloc(sizeof(time_t));
+ fabend->begin = malloc(sizeof(time_t));
+ fabend->worktime = malloc(sizeof(time_t));
+ fabend->weekday = malloc(sizeof(char) * 11);
+ fabend->timestr = malloc(sizeof(char) * 7);
+}
+
+void free_feierabend(feierabend* fabend)
+{
+ free(fabend->now);
+ free(fabend->begin);
+ free(fabend->worktime);
+ free(fabend->weekday);
+ free(fabend->timestr);
+ fabend->now = NULL;
+ fabend->begin = NULL;
+ fabend->worktime = NULL;
+ fabend->weekday = NULL;
+ fabend->timestr = NULL;
+}
+
+int main(int argc, char* argv[])
+{
+ printf("Hello World!");
+}
\ No newline at end of file