On Mon, Jul 17, 2000 at 12:01:48AM +0200, M.-A. Lemburg wrote: > Greg Stein wrote: >... > > ! #define UTF8_ERROR(details) \ > > ! if (1) { \ > > ! if (utf8_decoding_error(&s, &p, errors, (details))) \ > > ! goto onError; \ > > ! continue; \ > > ! } else > > Greg, this doesn't work... UTF8_ERROR is used in if-clauses > and the above may alter the else-branches in subtle ways which > are just as hard to detect as the original bug. The goto may > not be the greatest in style, but it doesn't have the above > caveats. Nope. It *does* work. Note the "else" on the end there. That creates the proper binding. All uses of the UTF8_ERROR() macro have a semicolon after them (like any normal statement does(!)). This expands the macro to: if (1) { ... } else ; /* this is the semicolon I referred to */ Therefore, it creates a complete if/else statement, and any surrounding if/else statements will bind as expected. Cheers, -g -- Greg Stein, http://www.lyra.org/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4