[syslinux] comment syntax
H. Peter Anvin
hpa at zytor.com
Fri Oct 8 14:26:11 PDT 2010
On 08/31/2010 09:03 AM, Ferenc Wagner wrote:
>>
>> I haven't looked at the code at all.... but my _guess_ is that in
>> moving to C from asm, a stock parser was used? C pre-processor for C
>> code? Just pointing out that diglyphs are sometimes interpreted, and
>> it would be _a_ (not necessarily _the_) reason for requiring the
>> trailing space on '# '
>
> The config file parsing is still done in assembly:
>
> getcommand:
> .find:
> call skipspace ; Skip leading whitespace
> jz .eof ; End of file
> jc .find ; End of line: try again
>
> ; Do this explicitly so #foo is treated as a comment
> cmp al,'#' ; Leading hash mark -> comment
> je .skipline
>
> Which contradicts the documentation, as the actual code does not require
> a space after the #. Testing confirms this.
Yes, it *used* to be implemented that # was simply a keyword (which
would ignore the rest of the line.) However, too many people got
confused despite the documentation, so I implemented it ad hoc.
-hpa
More information about the Syslinux
mailing list