supergiox supergiox - 2 months ago 21
C Question

Find needed header file

I'm programming in

C
a device (
ESP8266
) whose documentation explains each function or data structure of the SDK, but doesn't tell where to locate the corresponding header file, so every time I need to search them using
grep
and annoying regex.

Which is in these cases the best/common practice to "browse" the SDK and find headers?
I usually use
nano
and
Sublime Text
as editor (on GNU/Linux and Mac OS X) but any other solution are appreciated.

Answer

I would normally just use find + grep for this, e.g. to find the definition of foo:

$ find /path/to/SDK -name \*.h -exec grep foo {} /dev/null \;
Comments