So, I ran into this piece of code. It is part of a library I am trying to implement as a test. I did some google searching around and really don’t understand the argument of the function … it isn’t defined anywhere… I looked at environment variables, but is this setting the environment variable or calling the ERFI function … this one has me a bit stumped. I looked around also for some includes I might have been missing … no luck there.
Or, you can also just use plain grep from the command line. What you need to do is look for this in the code:
ag ERFI_OUT
Or, you can do this:
grep ERFI_OUT
I’d also look up ERFI_Print_Env. What you’re trying to do is find all the places this is used, then find where it’s defined. Being that it’s an environment variable it’ll probably come from some C calls to access the environment. To learn how that’s done start here:
Then you can also search for any uses of those functions with the above commands as well. Finally, there’s a terrible but very useful tool called cscope. It does these kinds of searches too, and I find if I’m trying to understand C code it’s very helpful.
Cool, thanks for your help, I was confused because assert and stdio are the only libs added and of course the code I am going through (Mersenne Twister) … . I will take a look and see where how far I am go. Thanks ! )