Re: deprecation lost



Am Fre, 2002-11-29 um 22.32 schrieb Matthias Clasen:

> I guess we have to do some regex fiddling to match both
> 
> #ifndef DEPRECATION_GUARD
> 
> and
> 
> #if !defined(DEPRECATION_GUARD) || ..

Just in case you haven't solved this already, I played a bit with
regexxer (hint, hint :) and here's what I got:

^\s*#\s*if(?:ndef\b|\s+!\s*defined\s*\()\s*(\w+)

It extracts only the first tested macro in an #if line into $1, but that
seems to be sufficient AFAICT.

Cheers,
--Daniel





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]