ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
manpage.c File Reference

Man page generation using modular architecture. More...

Go to the source code of this file.

Functions

const char * escape_groff_special (const char *str)
 Escape special groff/troff characters in text.
 
const char * format_mode_names (option_mode_bitmask_t mode_bitmask)
 Format option mode names as human-readable string.
 
asciichat_error_t options_config_generate_manpage_template (const options_config_t *config, const char *program_name, const char *mode_name, const char *output_path, const char *brief_description)
 Generate a man page template from options builder configuration.
 
asciichat_error_t options_builder_generate_manpage_template (options_builder_t *builder, const char *program_name, const char *mode_name, const char *output_path, const char *brief_description)
 Generate man page template from builder (before build())
 
asciichat_error_t options_config_generate_manpage_merged (const options_config_t *config, const char *program_name, const char *mode_name, const char *output_path, const char *brief_description)
 Generate merged man page template preserving manual content.
 
parsed_section_t * parse_manpage_sections (const char *filepath, size_t *num_sections)
 Parse existing man page template to extract sections.
 
void free_parsed_sections (parsed_section_t *sections, size_t num_sections)
 Free parsed sections array.
 
const parsed_section_t * find_section (const parsed_section_t *sections, size_t num_sections, const char *section_name)
 Find section by name.
 
asciichat_error_t options_config_generate_final_manpage (const char *template_path, const char *output_path, const char *version_string, const char *content_file_path)
 Generate final man page (.1) from template (.1.in) with version substitution and optional content file.
 

Detailed Description

Man page generation using modular architecture.

Refactored to use modular layers:

  • Resources: Loading embedded/filesystem templates
  • Parser: Parsing existing man page sections
  • Formatter: Groff/troff formatting utilities
  • Content Generators: OPTIONS, ENVIRONMENT, USAGE, EXAMPLES, POSITIONAL
  • Merger: Intelligently merging auto-generated with manual content

Definition in file options/manpage.c.