- Status Closed
- Percent Complete
- Task Type Bugs
- Category
-
Assigned To
linusnielsen - Operating System
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#412 - *.cfg reading can ignore settings
Reading a *.cfg file stops when settings are defined after
an empty line. This is due to a bug in the read_line
function in settings.c
I did not cure this bug because I believe that there are
at least 3 or 4 different versions of read_line in various
patches. I believe read_line should go into file.c. But
we want to have a good one and I haven’t seen a good
version
yet.
Requriements for a genera purpose read_line:
- it has parameters for the buffer and its size
- if the line is longer than the buffer the buffer
must not be exceeded
- the string that it fills the buffer with must always
be zero terminated
- the string that it fills the buffer with must not
contain eol tokens
- it must be able to handle cr, lf and cr+lf as eol
tokens
- it must return the number of bytes read from the file
including all eol characters. (only that way we can
keep track on the current file position) - if an error occurred it must return -1
read_line is not as easy as it looks at first. For handling
cr/lf we must peek one character ahead to determine
wether we have one or two character eol tokens. We
cannot skip all potential eol tokens as there might be
applications that expect an empty string if an empty line
occurred.
Has anybody made a good read_line yet?
Phil
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
This is fixed in CVS.