Note: I'm currently working on the bonuses, so this repo wouldn't be able to be submitted as is.
ft_printf, one of three projects in Ring 1 of the 42 Cursus, introduced us to the idea of variadic functions: functions that take in a variable amount of arguments. Our task was to write a library that contains a recreation of printf from <stdio.h> in the Standard C Library.
Mandatory requirements:
- Don't implement original printf buffer management
- Handle the conversions
cspdiuxX% - Output will be compared to original printf()
Bonus requirements:
- Manage a combination of the flags
-0.and field minimum width - Manage flags
# +(one is a space)
To test your own ft_printf, download main.c and testing_Makefile files from my repo, and move into your ft_printf project folder.
Run these commands to test your ft_printf functionality:
# Make using the specific Makefile with the -f flag
make re -f testing_Makefile
# Run compiled program
./test_printfCompare the user output with the expected output.
Important: Make sure to run make fclean -f testing_Makefile to clean up files before submitting for evaluation.
To change the specifier my program tests:
- Edit the
int main(void)function inmain.c - Comment out the currently active tests (with
//) - Uncomment desired test and recompile as above
ft_printf can be added to your libft project folder to be used in future projects
- Complete bonus flag functionality
- Create test function for bonus flags
- Re-evaluate project with bonuses
- Return whether diff of output is same or different from expected