Peng Zhang
Peng Zhang

Reputation: 3585

Where to find C standard function prototypes easily

When coding C# in IDEs like Visual Studio, it is quite handy to "jump to definition or declarations". So that we know the prototypes/interfaces of functions/APIs easily.

Question: Is there an easy way to look up standard C functions prototypes? like a database or index of function declarations, or a website gives searching by function names, or a *NIX command?

Solutions that work/integrate within VIM are great.

If you are recommending download source code and then grep, could you give a grep command that returns more accurate results. Since the grep may return all lines that has the name of that function.

Upvotes: 5

Views: 572

Answers (2)

NPE
NPE

Reputation: 500327

*NIX command?

Yes, the command is man, for example man fopen. Type man man on the command line to read its manual page. If the same keyword has multiple meanings (and therefore multiple man pages), you may need to specify the right section number, i.e. man 3 time.

Solutions that work/integrate within VIM are great.

In vim, to view the man page for the word under cursor, press Shift+K.

Upvotes: 7

Grzegorz Szpetkowski
Grzegorz Szpetkowski

Reputation: 37914

I would say that one place to find out prototypes is C standard itself. You can download latest draft for C99 and C11 from here. Beside that I agree with man 3 func approach.

Upvotes: 3

Related Questions