This is a study project.
- Reimplement the standard functions from the
<string.h> - Raise flags for GCC to check conversion for the types to be precise
Maintain two main files including standard or custom headers with similar functionalityCompile both main files to binaries that must result in identical behaviour
Since GCC will not allow to use reserved names for the custom functions:
- Selectively include the custom
"string.h"header with the custom functions - Maintain Makefile scenarios for using both the standard and the custom header
- Achieve identical byte-for-byte behaviour in both scenarios
- Learn to arrange a complex project with external header/source files
- Learn to maintain a Makefile
- Train using Git commands
- Learn to maintain a GitHub repo
- The names of standard functions are reserved in GCC, so it will throw an error if you try to name your custom function same way, no matter if the corresponding header is included or not.
- There is Section 3 of manpages that is dedicated to the standard C functions, so with a command like
man 3 strlenyou get a synopsis of such a function. - Dangerous usage of two enum counters, if DEMO_COUNT and NUMBER mismatch, it will cause segmentation fault.
- Require refactoring to put all enums, counters and function pointers in order.
- Screen and cursor position control is bulky and weak, the dedicated functions have side effects, which makes the demo functions bloated and hard to track.
- Error handlers are too aggressive, instead of force quit program should prompt and return to main menu.
Distributed under the MIT License, see LICENSE for more details.