LCDproc development and user support list

Text archives Help


[Lcdproc] configfile.c breaks on Mac OS X due to nested function


Chronological Thread 
  • From: epooch at cox.net (Eric Pooch)
  • Subject: [Lcdproc] configfile.c breaks on Mac OS X due to nested function
  • Date: Mon, 23 Feb 2009 19:38:21 -0800

I am pretty sure this has been a non-issue for almost a year. I am
pretty sure the nested functions were removed a while ago.

--Eric

On Feb 23, 2009, at 9:32 AM, Markus Dolze wrote:

> Erik Hansen reported this as a SF tracker event:
>
> --- quote begin ---
>
> Nested functions have been disabled by Mac OS X Developer tools -- gcc
> 4.0.1. As a result, compilation of configfile.c fails due to the
> following
> code:
>
> int config_read_string(const char *sectionname, const char *str)
> /* All the config parameters are placed in the given section in
> memory.*/
> {
> int pos = 0;
> section *s;
>
> /* We use a nested fuction to transfer the characters from buffer
> to parser*/
> char get_next_char() {
> return str[pos++];
> }
>
> if ((s = find_section(sectionname)) == NULL)
> s = add_section(sectionname);
>
> return process_config(&s, get_next_char, "command line", NULL);
> }
>
> --- quote end ---
>
> Any suggestions how to deal with this? Does it work for other MacOS
> X users?
>
> Regards,
> Markus
> _______________________________________________
> LCDproc mailing list
> LCDproc at lists.omnipotent.net
> http://lists.omnipotent.net/mailman/listinfo/lcdproc





Archive powered by MHonArc 2.6.18.

Top of page