/* pic's manual and reference, compiled in (help.c, src/manual.inc made from * docs/manual and docs/reference by tools/manual-inc.sh): what `pic help` * and the terminal's /help show. A topic is its file's name without .md. */ #ifndef PIC_HELP_H #define PIC_HELP_H #include <stddef.h> #include <stdio.h> /* The number of topics; topic I's name, title (the file's heading) and * whether it belongs to the reference rather than the manual. */ size_t pic_help_count(void); const char *pic_help_name(size_t i); const char *pic_help_title(size_t i); int pic_help_is_reference(size_t i); /* NAME's text, as its file holds it, malloc'd; NULL for an unknown topic (or * no memory). */ char *pic_help_text(const char *name); /* Writes the list of topics, one " NAME TITLE" line each under "Manual:" * and "Reference:". */ void pic_help_index(FILE *out); /* pic help [TOPIC]: the list, or the topic on stdout (0); an unknown topic * or more than one argument names the problem and lists the topics on * stderr (1). */ int pic_help_command(int argc, char **argv); #endif