Purpose
Reads the named file (Name), and mallocs an array of char * pointers to the start of each line read. The number of lines returned may be less than the number in the file, since by default LQU_fReadFile ignores blank or commented lines. Comments are denoted by a # as the first non-blank character on the line. If the file can't be opened, memory is exhausted, LQU_ReadFile() calls Error() with the given Severity, and with an error message constructed out of What, which should be a short (e.g. 3-word) description of the purpose of the file. The Flags argument can contain any of the following, combined with or (|):
- UF_IGNBLANKS to throw away blank lines,
- UF_IGNSPACES to discard leading and trailing spaces,
- UF_IGNHASH to discard leading comments (# with a hash-sign)
- UF_IGNALLHASH to discard comments (# with a hash-sign)
- UF_ESCAPEOK to accept "\#" and "\\" as "#" and "\"
In addition, UF_NORMAL is defined to be UF_IGNBLANKS | UF_IGNSPACES | UF_IGNHASH | UF_ESCAPEOK and use of this in reading files is strongly encouraged to provide a consistent file format.
Returns
- a pointer to the array of lines, in Lines
- the number of lines allocated.
- -1 if the file couldn't be opened.