LCDproc development and user support list

Text archives Help


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


Chronological Thread 
  • From: bsdfan at nurfuerspam.de (Markus Dolze)
  • Subject: [Lcdproc] configfile.c breaks on Mac OS X due to nested function
  • Date: Mon, 23 Feb 2009 18:32:49 +0100

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




Archive powered by MHonArc 2.6.18.

Top of page