if(success) { const char *const_format = is_long ? (is_signed ? "%ld" : "%lu") : (is_signed ? "%d" : "%u");
if (success) { const char *const_format = is_signed ? "%" IDL_LL "d" : "%" IDL_LL "u";
do_const_dcl(TreeState *state){    struct _IDL_CONST_DCL *dcl = &IDL_CONST_DCL(state->tree);    const char *name = IDL_IDENT(dcl->ident).str;    gboolean success, is_signed, is_long;    /* const -> list -> interface */    if (!IDL_NODE_UP(IDL_NODE_UP(state->tree)) ||        IDL_NODE_TYPE(IDL_NODE_UP(IDL_NODE_UP(state->tree)))        != IDLN_INTERFACE) {        XPIDL_WARNING((state->tree, IDL_WARNING1,                       "const decl \'%s\' not inside interface, ignored",                       name));        return TRUE;    }    success = (IDLN_TYPE_INTEGER == IDL_NODE_TYPE(dcl->const_type));    if(success) {        switch(IDL_TYPE_INTEGER(dcl->const_type).f_type) {        case IDL_INTEGER_TYPE_SHORT:            is_long = FALSE;            break;        case IDL_INTEGER_TYPE_LONG:            is_long = TRUE;            break;        default:            success = FALSE;        }        is_signed = IDL_TYPE_INTEGER(dcl->const_type).f_signed;    }    if(success) {        const char *const_format =            is_long ? (is_signed ? "%ld" : "%lu")                    : (is_signed ? "%d" : "%u");        fprintf(state->file, "\n  enum { %s = ", name);        fprintf(state->file, const_format,                (int)IDL_INTEGER(dcl->const_exp).value);        fprintf(state->file, " };\n");    } else {        IDL_tree_error(state->tree,                       "const declaration \'%s\' must be of type short or long",                       name);        return FALSE;    }    return TRUE;}