Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] "Config error at line" should also display the problematic line contents

2013-08-11 by manu@...

Jim Klimov <jimklimov@...> wrote:

> I've traced it to 448:conf_lex.l yyerror() routine, but this is
> not mentioned anywhere else in the code. I am not familiar with
> lex beyond monkey-cloning a few constructs recently to define new
> config variables; so I'd like to propose this (probably simple)
> RFE to someone who can implement it :)

Try to use yytext (defined as extern char *yytext), but I am not sure
wether you only get the current line, or all the remaining of the file.
You may have to use do something like strncpy(output, yytext,
strspn(yytext, "\n"))  (in several lines, because you need to check for
strcpn return value)

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.