Hexadecimal to decimal converter in C (htoi.c)
#define LIMIT 1024: magic constants should be named well. What is the limit for? You are also storing the result in an unsigned long and contain much less than 1021 hex digits (the last 3 are for 0x and the null terminator).

Operators should be spaced for better readability: int i = 0; and for (int

I'm a bit rusty with C, but I think fgets can be used instead of rolling your own getc loop

Inside htoi, a single tolower or toupper removes the need to check lowercase and capitals

if(s[i] &gt;= 'a' &amp;&amp; s[i] &lt;= 'z'): hex digits only contain 0-9 and a-f (not a-z)

pow(16, power): in this case, pow(16, power) = 1 &lt;&lt; (4 * power) (see bitshifts). I would split the 4 * power so that it is more clear what it represents (digit position)

Some changes to the algorithm are necessary: input of 1z00x000 gives 53477376 and kibe gives 86718. I would check if there is a leading 0x and if there is, to skip it (if not, return an error code)

if not, then we assume it is an upper case char and And should it be unsigned as well if I know it won't be negative: with your code, I can get currdigit to underflow by choosing (for example) a plus sign as input.