It always tickles my brain when I see "zero-dependency" or "no dependency" and then the first thing in a project is a bunch of include statements. Don't understand me wrongly, the includes by themselves don't strike me as a bad thing! I just sometimes wonder whether it's a me-thing or whether other people are wandering off to the question 'what is a dependency' as oft as I do :)
They are:
They are all standard headers, required in a hosted implementation of ISO C. Only stripped down C implementations which the standard calls "freestanding" can omit parts of the standard library.#include <ctype.h> #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h>
Except for <stdint.h>, all existed in 1989 ANSI C; though not with all the content they have now.
If you write a C program, you have a dependency on a C implementation; it's not going to compile itself. That's an external dependency: something not in your program. It is a second party dependency. First party is you, second is the programming language and library (and perhaps the platforms you are targeting and what they supply). Third party external dependencies are anything not in your program or language implementation or platform. The things you have to tell the user to download and install, possibly from source.
One second-party dependency this code has is on a Windows-like command interpreter which provides a "cls" command, for the several system("cls") calls the code makes to clear the screen.
I do know about the ISO C standard, I was actually more intending to refer to the fact that, even though there exists a well defined standard, there may be implementation differences in the libc variants you compile against, certainly in certain UB-areas. I probably should have made that a bit more clear, because I didn't actually make that point at all. Excuses for the bad formulation of my thoughts.
Yes, a program can have a second-party dependency in the form of invoking some implementation-defined behaviors or undefined behaviors that de facto work, not just a dependence on the simple existence of something without which the program doesn't build.
We can't infer a dependence of that kind from seeing standard header includes. That does not raise the suspicion above background levels.
You should also complain that it depends on having a computer while you are at it.
There are plenty of platforms that don't have a stdlib available.