p12tic / cppreference-doc

C++ standard library reference
en.cppreference.com
GNU General Public License v3.0
414 stars 105 forks source link

Headers for C? #119

Closed jsinglet closed 2 years ago

jsinglet commented 2 years ago

In this repo the headers for C++ are present. Is a similar effort available for the C headers (eg, string.h, etc) available? I notice those headers are described on cppreference so I was curious where I might find those. Thanks!

p12tic commented 2 years ago

I personally use C++ that's why I focused in C++ headers. I think this could be a good place for C headers too. I'm not aware of anyone solving a similar problem.

cubbimew commented 2 years ago

cpp/headers is populated from the header synopses found in the C++ standard, for example https://en.cppreference.com/w/cpp/header/array is populated from https://eel.is/c++draft/array.syn (personally I think it's unnecessary but a lot of people seem to look for meaning to headers)

The C standard doesn';t offer such synopses - each header is just followed by the description of the library components associated with it, which cppreference already does, more or less, at https://en.cppreference.com/w/c/header

p12tic commented 2 years ago

If I understand correctly @jsinglet referred to https://github.com/p12tic/cppreference-doc/tree/master/headers which is a version of the C++ headers that compiles and can be used to speed up code completion. It's separate than what's on cppreference.com website.

jsinglet commented 2 years ago

Thanks @p12tic and @cubbimew! That was really helpful to know! The closest to a really portable (as in easy to extract) set of pre-baked libc headers I've found is in this project, here: https://musl.libc.org/