taiga/src/taiga.h

68 lines
1.5 KiB
C
Raw Normal View History

2026-03-01 20:48:09 +09:00
#ifndef __TAIGA_H__
#define __TAIGA_H__
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
2026-03-01 23:36:33 +09:00
#include <stdarg.h>
2026-03-02 17:32:20 +09:00
#include <time.h>
2026-03-01 23:36:33 +09:00
#include <sys/types.h>
#include <sys/stat.h>
2026-03-01 22:48:04 +09:00
#ifdef _WIN32
#include <direct.h>
2026-03-01 23:36:33 +09:00
#include <io.h>
2026-03-01 22:48:04 +09:00
#else
#include <unistd.h>
2026-03-01 23:36:33 +09:00
#include <dirent.h>
#endif
2026-03-02 07:14:39 +09:00
#include <xemil.h>
2026-03-01 23:36:33 +09:00
#ifdef _WIN32
2026-03-02 17:32:20 +09:00
#define io_mkdir(x, y) _mkdir(x)
2026-03-01 23:36:33 +09:00
#define io_chdir(x) _chdir(x)
#define io_stat _stat
#define IO_S_ISDIR(m) ((m) & _S_IFDIR)
#else
#define io_mkdir mkdir
#define io_chdir chdir
#define io_stat stat
#define IO_S_ISDIR(m) ((m) & S_IFDIR)
#define IO_DIR DIR
#define io_dirent dirent
#define io_opendir opendir
#define io_readdir readdir
#define io_closedir closedir
2026-03-01 22:48:04 +09:00
#endif
2026-03-01 20:48:09 +09:00
2026-03-01 22:43:41 +09:00
/* site.c */
2026-03-02 07:14:39 +09:00
extern xemil_t* skinconf;
2026-03-01 20:54:30 +09:00
int action_site(int argc, char** argv);
2026-03-01 22:43:41 +09:00
/* help.c */
int action_help(int argc, char** argv);
/* seed.c */
int action_seed(int argc, char** argv);
2026-03-01 23:36:33 +09:00
/* util.c */
char* u_strvacat(const char* str, ...);
2026-03-02 01:08:36 +09:00
char* u_strdup(const char* str);
/* process.c */
2026-03-02 07:14:39 +09:00
int process(const char* top, const char* out, const char* full);
/* classic.c */
2026-03-02 17:32:20 +09:00
void classic_stylesheet(FILE* out, const char* top); /* also create files here if you need one */
2026-03-02 07:14:39 +09:00
void classic_head(FILE* out, const char* top, xl_node_t* header);
void classic_body(FILE* out, const char* top, const char* title, xl_node_t* body);
2026-03-01 23:36:33 +09:00
2026-03-02 20:27:59 +09:00
/* default.c */
void default_node(FILE* out, const char* top, xl_node_t* element, int indent);
2026-03-02 21:05:55 +09:00
void default_nav(FILE* out, const char* top, xl_node_t* element, int indent);
2026-03-02 20:27:59 +09:00
2026-03-01 20:48:09 +09:00
#endif