Holberton School: Custom Printf Project
Created by Elijah Poole and Courtney Graham
Fall 2023
Introduction:
This project is intended to recreate a custom version of the C standard library function PRINTF which prints formatted output and returns the amount of bytes used to print to standard output.
It accomplishes this by utilizing an array of function pointers and loops to iterate through input, searching for format specifiers and then executing functions based on that specifier.
FILES:
- MAIN.H - header file for printf project. This header file includes the initialization of our structure data type and contains prototypes for all of our functions included in our array of function pointers.
- FUNCTIONS.C - functions for converting certain special characters to and writing them to standard output
- PRINTDIG.C - file for printdigit function that was too long to include in functions file
- SPEC_FUNCTIONS.C - this file further identifies the structure full of pointer functions and executes the function depending on the special character
- _PRINTF.C - this is our custom _printf function which should return the amount of bytes written to standard output
FORMAT SPECIFIERS:
%c: print character
%s: print string
%\0: print null
%i: print digit
%d: print digit
Flowchart (attempt)