Thread: Reading C code
View Single Post
Old July 13, 2018, 01:40   #7
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,378
Donated: $40
Pete Mack is on a distinguished road
What OS are you on? You can find the definition for this function via grep on Linux, or on Windows if you have the unix tools installed (mingw or cygwin.) Windows PowerShell has it too, though the command is different. The function is declared in one or another .h file. The C file will have the corresponding definition. And you really need to look up how C works. I strongly recommend Kernighan and Ritchie. It is short and gets all the basics. Warning: C is Not object oriented. All functions are static. You can create "true" objects only with function pointers, which is done in a number of locations in Angband (Notably, in menus, spells, and commands.)
Pete Mack is offline   Reply With Quote