6fcbcf8update readme
1 file changed, +37, -4
README.md
+37, -4
+37, -4
@@ -220,20 +220,53 @@ Parsing stops once a valid specifier is found, and the collected information is
220220
221221 <h3 id="data_structures">Data Structures</h3>
222222
223 -A [`struct`](./include/core.h) is used to store a parsed conversion specification. This structure contains fields for flags, width, precision, and the specifier itself.
223+A [`structure`](./include/core.h) is used to store a parsed conversion specification. This structure contains fields for flags, width, precision, and the specifier itself.
224+
225+Additionally, a global [`structure`](./include/core.h) is used to maintain state between functions, storing the current position in the format string, the number of characters written, the list of arguments, and the instance of the conversion specification structure.
224226
225227 <h3 id="formatting_logic">Formatting Logic</h3>
226228
227 -Each specifier is handled by dedicated function responsible for:
229+Each specifier is handled by a dedicated function responsible for:
228230
229231 - Converting the argument to the appropriate representation
230232 - Applying width and padding (spaces and zeros)
231233 - Handling alignment and flag interactions
232234 - Applying precision rules
233235
234 -<h3 id="design_choices">Design Choices</h3>
236+<h3 id="project_structure">Project Structure</h3>
237+
238+The project is organized into modular components to separate [parsing](./parser/), [printing](./printers/) and [utility](./utils/) logic. \
239+Each part of the implementation is isolated in its own directory to improve readability, maintainability, and scalability.
240+
241+The following tree outlines the overall structure:
235242
236 -A modular approach was chosen to separate parsing, formatting logic and printing. This improves readability, maintainability and scalability.
243+```
244+.
245+├── ft_printf.c # main entry point
246+├── include # header files (interfaces and shared definitions)
247+│ ├── core.h
248+│ ├── ft_printf.h
249+│ ├── parser.h
250+│ ├── printers.h
251+│ └── utils.h
252+├── Makefile # Makefile
253+├── parser # parsing of format string
254+│ ├── parse_format.c
255+│ └── parse_utils.c
256+├── printers # conversion handlers (printing logic)
257+│ ├── print_c.c
258+│ ├── print_diu.c
259+│ ├── print_hex.c
260+│ ├── print_s.c
261+│ └── render_number.c
262+├── README.md
263+└── utils # helper functions
264+ ├── char.c
265+ ├── convert.c
266+ ├── io.c
267+ ├── memory.c
268+ └── string.c
269+```
237270
238271 <h1 id="resources">Resources</h1>
239272