I've got a question. I'm writing a driver for a fiscal printer. The data I need to print is in a text file. It's just a bunch of order lines that have to be printed. Is there a function that will check the file and tell me how many lines are in it? This would help me a lot. I need to know how many lines are in this file before I can enter transaction mode.
If there is no function like this, my other idea was to use a linked list. Just read all the data into a linked list and every time I reach the end of a line, increment a counter. This would be a worse solution than the previous one. Thanks