suckless-quark/dirl.h
Armin Friedl 5b6f8e5083
Some checks failed
continuous-integration/drone/push Build is failing
Read from template files with placeholder replacement
2020-08-28 00:46:08 +02:00

35 lines
762 B
C

/* See LICENSE file for copyright and license details. */
#ifndef DIRL_H
#define DIRL_H
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "http.h"
#define DIRL_HEADER ".header.tpl"
#define DIRL_ENTRY ".entry.tpl"
#define DIRL_FOOTER ".footer.tpl"
#define DIRL_STYLE "style.css"
struct dirl_env_entry {
char *name;
char *value;
};
struct dirl_env {
struct dirl_env_entry *entries;
};
/*
* Determine if an dirlist entry should be skipped because it has special
* meaning. Skips header-, entry-, footer templates and dirlist style css.
*/
int dirl_skip(const char*);
enum status dirl_header(int, const struct response*);
enum status dirl_entry(int, const struct dirent*);
enum status dirl_footer(int);
#endif /* DIRL_H */