So are printf(), scanf() and many other Standard Library functions that you would rather use than rewrite from scratch! Getopt() and getopt_long() are frameworks written, debugged, and proven, that you just use. I don't have to "Hunt down" the actual code, I just use it!
I don't want to spend vast amounts of time hard coding Command Line Argument options, and other non-option arguments, or end up with 175 lines of complicated code. How much work will it take to Add/Change/Delete some of your options, plus track down intermittent bugs? Very little when using getopt() or getopt_long()!
Why do you consistently fight the excellent advise you are given by more experienced programmers? Some of us have been there, doen that, made mistakes and learned from those mistakes. Why ask for advice when it will just be ignored when we offer it??? You wonder why readers don't respond to many of your postings!!!
getopt() may not be part of the C Standard, but is, "POSIX.1-2001, POSIX.1-2008, and POSIX.2"
Please review the code examples in the man page link above.