switch (v->type->type)
{ case ECPGt_short: case ECPGt_int: case ECPGt_long: case ECPGt_long_long: case ECPGt_unsigned_short: case ECPGt_unsigned_int: case ECPGt_unsigned_long: case ECPGt_unsigned_long_long: case ECPGt_const:
fputs(name, base_yyout); break; default:
mmerror(PARSE_ERROR, ET_ERROR, "variable \"%s\" must have a numeric type", name); break;
}
}
staticconstchar *
descriptor_item_name(enum ECPGdtype itemcode)
{ switch (itemcode)
{ case ECPGd_cardinality: return"CARDINALITY"; case ECPGd_count: return"COUNT"; case ECPGd_data: return"DATA"; case ECPGd_di_code: return"DATETIME_INTERVAL_CODE"; case ECPGd_di_precision: return"DATETIME_INTERVAL_PRECISION"; case ECPGd_indicator: return"INDICATOR"; case ECPGd_key_member: return"KEY_MEMBER"; case ECPGd_length: return"LENGTH"; case ECPGd_name: return"NAME"; case ECPGd_nullable: return"NULLABLE"; case ECPGd_octet: return"OCTET_LENGTH"; case ECPGd_precision: return"PRECISION"; case ECPGd_ret_length: return"RETURNED_LENGTH"; case ECPGd_ret_octet: return"RETURNED_OCTET_LENGTH"; case ECPGd_scale: return"SCALE"; case ECPGd_type: return"TYPE"; default: return NULL;
}
}
switch (results->value)
{ case ECPGd_cardinality: case ECPGd_di_code: case ECPGd_di_precision: case ECPGd_precision: case ECPGd_scale:
mmfatal(PARSE_ERROR, "descriptor item \"%s\" is not implemented",
descriptor_item_name(results->value)); break;
case ECPGd_key_member: case ECPGd_name: case ECPGd_nullable: case ECPGd_octet: case ECPGd_ret_length: case ECPGd_ret_octet:
mmfatal(PARSE_ERROR, "descriptor item \"%s\" cannot be set",
descriptor_item_name(results->value)); break;
case ECPGd_data: case ECPGd_indicator: case ECPGd_length: case ECPGd_type:
{ char *str_zero = mm_strdup("0");
/* I consider dynamic allocation overkill since at most two descriptor variablesarepossibleperstatement.(inputandoutputdescriptor) Anddescriptorsarenonormalvariables,sotheydon'tbelonginto thevariablelist.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.