How vinislima/42sp_common_core_ft_printf works
Main Components
• ft_printf Core Module: Represent the central module (ft_printf.c) that parses the format string and decides which auxiliary functions to call.
• Auxiliary/Helper Modules: Create separate components for each of the helper functions—ft_putchar, ft_putstr, ft_putnbr, ft_putunbr, ft_puthexa, and ft_putptr. Each of these modules is responsible for handling a different conversion or printing functionality.
• Build/Compilation Process: Include the Makefile as a component that compiles the source (.c) files into object (.o) files and archives them into the static library (libftprintf.a).
Relationships and Data Flow
• Interface Layer: The header file (ft_printf.h) should be shown as the common interface that connects the ft_printf core and all helper modules, emphasizing that all functions share the same declarations.
Architectural Principles and Patterns
• Modular Design: Clearly illustrate that each printing functionality is encapsulated within its own module/file (separation of concerns), making maintenance and testing easier.
• Build Automation: Reflect the role of the Makefile in automating the build process, showing how it compiles and aggregates the individual modules into a single static library.
• A boundary (or a separate section) to show the build process: “Makefile” leading to “Compilation” and then “libftprintf.a (Static Library)”.
• Optionally, include an external “Client” block that links with the static library to produce a runnable executable.