- if (type != vollim_maximum && calculate->type == MRP_C_FUNCTION) {
- if (strcmp(calculate->c.signature, "odo"))
- luaL_error(L, "invalid calculate field (mismatching signature)");
- if (calculate->c.data == mir_volume_suppress) {
- if (type != vollim_class)
- luaL_error(L, "attempt to make generic volume supression");
- suppress = true;
- arglgh = sizeof(mir_volume_suppress_arg);
- }
- else if (calculate->c.data == mir_volume_correction) {
- if (type != vollim_generic)
- luaL_error(L, "attempt to make class based volume correction");
- correct = true;
- arglgh = sizeof(double *);
+ if (type != vollim_maximum) {
+ if (calculate->type == MRP_C_FUNCTION) {
+ if (strcmp(calculate->c.signature, "odo"))
+ luaL_error(L,"invalid calculate field (mismatching signature)");
+ if (calculate->c.data == mir_volume_suppress) {
+ if (type != vollim_class)
+ luaL_error(L, "attempt to make generic volume supression");
+ suppress = true;
+ arglgh = sizeof(mir_volume_suppress_arg);
+ }
+ else if (calculate->c.data == mir_volume_correction) {
+ if (type != vollim_generic) {
+ luaL_error(L, "attempt to make class based volume"
+ "correction");
+ }
+ correct = true;
+ arglgh = sizeof(double *);
+ }
+ else {
+ luaL_error(L, "invalid builtin.method for calculate");
+ }