diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | Pull requests | README | LICENSE

diary.h (1108B)


      1 #ifndef DIARY_H
      2 #define DIARY_H
      3 
      4 #ifdef __MACH__
      5 	#include <CoreFoundation/CoreFoundation.h>
      6 #endif
      7 #define _XOPEN_SOURCE 700
      8 
      9 #include <stdio.h>
     10 #include <stdint.h>
     11 #include <stdlib.h>
     12 #include <unistd.h>
     13 #include <getopt.h>
     14 #include <string.h>
     15 #include <time.h>
     16 #include <errno.h>
     17 #include <dirent.h>
     18 #include <ncurses.h>
     19 #include <locale.h>
     20 #include <langinfo.h>
     21 #include <sys/wait.h>
     22 #include <fcntl.h>
     23 
     24 #include "utils.h"
     25 #include "import.h"
     26 #include "export.h"
     27 #include "caldav.h"
     28 #include "diary-tp.h"
     29 
     30 #define XDG_CONFIG_HOME_FALLBACK "~/.config"
     31 #define CONFIG_FILE_PATH "diary/diary.cfg"
     32 #define DIARY_VERSION "0.14-unstable"
     33 
     34 static const char* WEEKDAYS[] = {"Su","Mo","Tu","We","Th","Fr","Sa"};
     35 
     36 void setup_cal_timeframe();
     37 void draw_wdays(WINDOW* head);
     38 void draw_calendar(WINDOW* number_pad, WINDOW* month_pad, const char* diary_dir, size_t diary_dir_size);
     39 
     40 void display_entry(const char* dir, size_t dir_size, const struct tm* date, WINDOW* win, int width);
     41 void edit_cmd(const char* dir, size_t dir_size, const struct tm* date, char** rcmd, size_t rcmd_size);
     42 
     43 extern config CONFIG;
     44 
     45 #endif