Not using a nested function anymore, since this is not a ANSI C
supported feature.