Steps into definition for printf

>steps into definition for printf
What in the ever loving FUCK is this shit?

Attached: whatthefuck.png (721x213, 20.65K)

Other urls found in this thread:

git.musl-libc.org/cgit/musl/tree/src/stdio/printf.c
twitter.com/NSFWRedditVideo

Cannot into vprintf. Shame

c my beloved...

Printf is of course implemented by rearranging the args into an array and passing them to vfprintf.

>more colors is gooder
I'm vomiting rainbow here.

Attached: clownworld.jpg (1200x630, 103.03K)

>mingw
found your problem
stop being a wintoddler

What is the attribute shit above the function and why so they prefix everything with two underscores?

>why so they prefix everything with two underscores?
im guessing they are private functions

>beautiful
>simple
>elegant
We were trying to tell you, bro.

It's going to be ugly anywhere. You can't make va_args shit look good. Honestly, the entire idea was a mistake, but proper macros would have been slow as balls in the 70s.

>why so they prefix everything with two underscores?
It's called a reserved identifier. The standard states that if you use double underscores anywhere in your code, you risk the chance of stepping on identifiers used by the standard library implementation. Accordingly, the standard library developers use them everywhere so they don't step on identifiers used by YOUR code.

>__attribute__((__format__(gnu_printf, 1, 2)))
Tells the compiler this is a printf where the format string is in position 1 and the format parameters start at position 2. This lets the compiler bitch at you if you've written like printf("%s %d", 1234).
>__MINGW_ATTRIBUTE_NONNULL(1)
Tells the compiler that argument 1, the format string, can't be null, so it will bitch at you if you fuck that up somehow. Otherwise it would compile without warnings and then segfault when run.
>__builtin_va_list __local_argv
Makes a variable argument list, which is a specialized array.
>__builtin_va_start(__local_argv, __format)
Populates the VA list with everything after the parameter __format.
Then it calls its builtin vfprintf implementation with that VA list, and uses __builtin_va_end to clean up the VA list before returning.

monochrome bro

This is pro shit, you amateur. I see that and immediately know a natural programmer wrote that. No midwit code will ever look like that.

It's like when Ramanujan sent some of his equations to Hardy and he knew at first glance that they had to be true. Even though he didn't prove them at the moment, he just felt that nobody could make them up and that Ramanujan couldn't possibly be an impostor.

You just know.

Attached: ramanujan.png (400x394, 255.47K)

Imagine being so triggered by rainbows that any use of color, even if just to aid in quick scanning through code, is unbearable. Your life must be miserable, living in a house devoid of all colors and freaking out when a colored pixel disgraces your screen. I pity you.

>TFW just started learning coding and i have literally zero idea what any of that means and realize i should probably just commit sudoku

Attached: 1591647753139.jpg (480x480, 24.11K)

printf cannot be written in pure standard C unless you write compiler-specific hooks deliberately put in so you'll be able to implement printf

A lot of this shit is builtin compiler directives that only need to be around in standard library implementations, and most people using the language will never encounter. Some of it is not a compiler directive, but it still should almost never be used. va_args and the like are a sign that maybe you shouldn't be using C.

That stuff tells the compiler what to do. It's not for you to use it.

Its just a function executing another function and returning the return value
And some other crap

Don't worry, it's just GANOO mental illness. This is what the function should look like:
git.musl-libc.org/cgit/musl/tree/src/stdio/printf.c

been programming for a few years now, all i recognize are a few keywords