diary.h (1086B)
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 29 #define XDG_CONFIG_HOME_FALLBACK "~/.config" 30 #define CONFIG_FILE_PATH "diary/diary.cfg" 31 #define DIARY_VERSION "0.16-unstable" 32 33 static const char* WEEKDAYS[] = {"Su","Mo","Tu","We","Th","Fr","Sa"}; 34 35 void setup_cal_timeframe(); 36 void draw_wdays(WINDOW* head); 37 void draw_calendar(WINDOW* number_pad, WINDOW* month_pad, const char* diary_dir, size_t diary_dir_size); 38 39 void display_entry(const char* dir, size_t dir_size, const struct tm* date, WINDOW* win, int width); 40 void edit_cmd(const char* dir, size_t dir_size, const struct tm* date, char** rcmd, size_t rcmd_size); 41 42 extern config CONFIG; 43 44 #endif