A quick look at the code in ent.c, shows a while statement on line 181. This line does an fgetc from the file pointed to by fp. In order to get this to work correctly, you would just add a counter to the statement. Something along the lines of
while ((my_count++ < MAX_COUNT) && ((oc = fgetc(fp)) != EOF))
where my_count is an int (or long - depending on how big you really want) and MAX_COUNT for you would be 100000. Be sure to initialize my_count to 0.