Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3280692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:43:59+00:00 2026-05-17T19:43:59+00:00

We have most of Gnu C Library Headers in /usr/include I’m looking for a

  • 0

We have most of Gnu C Library Headers in /usr/include
I’m looking for a way to open and read an include file and parse it to print all the declared functions which are located inside it.
and can any one explain or provide a link talking about this headers formatting.
I doing this because I’m trying to do an C Auto completion plug-in which if I include a file.h the plug-in will give me all functions are located in the file.h.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:43:59+00:00Added an answer on May 17, 2026 at 7:43 pm

    Everyone eventually asks for a tool like this at least once in their careers; something that will scan C source code and print out a listing of function/variable names or a cross-reference of function calls between various modules.

    To adequately do what you’re asking, you’re going to have to write what is basically a C compiler front end; no amount of regular expression magic is going to give you what you want. Grab a yaccable version of the C language grammar and womp up a parser using lex and yacc (or flex and bison, or your tools of choice). However, when you match a function declaration, instead of generating machine instructions you’ll just print it out (or save it to a database, or something like that).

    Run the header of interest through the existing C preprocessor (e.g. gcc -E) to strip out comments and do any macro expansion, then feed the resulting file into your parser.

    EDIT

    And now that I actually go read the gcc man page, there’s an option -aux-info that will write the prototype declarations of all functions declared/defined within the translation unit, including the ones declared in the included header files. Even better, the output is somewhat nicely formatted and regular and should be reasonably easy to parse.

    So, lesson learned: check your compiler documentation and ignore old farts like me who still think in terms of ’80s-vintage tools.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking to build a mobile version of a WordPress site and have most
I am looking for some assistance. Long story short, I have most of my
I'm looking for a make platform. I've read a little about gnu make, and
I read have most if not all of the various articles on adding MVC
well i have most probably an extremly stupid problem but could not figure it
Quick one. I'm using mod rewrite and have most replacements in place: empty space
I have spent most of my web-development career in the Microsoft camp, but for
I have the most bizarre bug, where clicking a listbox item makes the listbox
I have the most basic jquery function of them all, but I couldn't find
I have studied most of the posts concerning web page being viewed in an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.