cstructtypespolipo

How to find out where a C struct is declared?


I am trying to add logging to the web proxy Polipo and as part of this need to log the url request in the following function following line:

httpClientRequest(HTTPRequestPtr request, AtomPtr url)

From compilation I see that AtomPtr is a struct of type _Atom but I cannot find where this is defined so that I can reference the text of the url in a log statement. What is the canonical method of looking up struct definitions in C code?


Solution

  • you can search AtomPtr like this and see where AtomPtr is defined

    typedef struct _Atom {
        unsigned int refcount;
        struct _Atom *next;
        unsigned short length;
        char string[1];
    } AtomRec, *AtomPtr;