]> granicus.if.org Git - yasm/commitdiff
Make InternalError() a bit easier to call. Also, reverse its file and line
authorPeter Johnson <peter@tortall.net>
Mon, 29 Oct 2001 00:21:00 +0000 (00:21 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 29 Oct 2001 00:21:00 +0000 (00:21 -0000)
parameters to match the *At() functions.

svn path=/trunk/yasm/; revision=299

18 files changed:
libyasm/bytecode.c
libyasm/errwarn.c
libyasm/errwarn.h
libyasm/expr.c
libyasm/floatnum.c
libyasm/intnum.c
libyasm/xmalloc.c
modules/arch/x86/expr.c
modules/arch/x86/x86expr.c
src/arch/x86/expr.c
src/arch/x86/x86expr.c
src/bytecode.c
src/errwarn.c
src/errwarn.h
src/expr.c
src/floatnum.c
src/intnum.c
src/xmalloc.c

index a6fc2078b93408ad4bba949541546330e8c3d56a..8f4d91edb477f49a04364657fa63153a24de84ae 100644 (file)
@@ -316,8 +316,7 @@ GetInsnEA(bytecode *bc)
        return NULL;
 
     if (bc->type != BC_INSN)
-       InternalError(__LINE__, __FILE__,
-                     _("Trying to get EA of non-instruction"));
+       InternalError(_("Trying to get EA of non-instruction"));
 
     return bc->data.insn.ea;
 }
@@ -336,8 +335,7 @@ SetInsnOperSizeOverride(bytecode *bc, unsigned char opersize)
            bc->data.jmprel.opersize = opersize;
            break;
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("OperSize override applied to non-instruction"));
+           InternalError(_("OperSize override applied to non-instruction"));
            return;
     }
 }
@@ -356,8 +354,7 @@ SetInsnAddrSizeOverride(bytecode *bc, unsigned char addrsize)
            bc->data.jmprel.addrsize = addrsize;
            break;
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("AddrSize override applied to non-instruction"));
+           InternalError(_("AddrSize override applied to non-instruction"));
            return;
     }
 }
@@ -378,8 +375,7 @@ SetInsnLockRepPrefix(bytecode *bc, unsigned char prefix)
            lockrep_pre = &bc->data.jmprel.lockrep_pre;
            break;
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("LockRep prefix applied to non-instruction"));
+           InternalError(_("LockRep prefix applied to non-instruction"));
            return;
     }
 
@@ -396,8 +392,7 @@ SetInsnShiftFlag(bytecode *bc)
        return;
 
     if (bc->type != BC_INSN)
-       InternalError(__LINE__, __FILE__,
-                     _("Attempted to set shift flag on non-instruction"));
+       InternalError(_("Attempted to set shift flag on non-instruction"));
 
     bc->data.insn.shift_op = 1;
 }
@@ -718,8 +713,7 @@ bytecode_parser_finalize(bytecode *bc)
     switch (bc->type) {
        case BC_EMPTY:
            /* FIXME: delete it (probably in bytecodes_ level, not here */
-           InternalError(__LINE__, __FILE__,
-                         _("got empty bytecode in parser_finalize"));
+           InternalError(_("got empty bytecode in parser_finalize"));
            break;
        case BC_INSN:
            bytecode_parser_finalize_insn(bc);
index 4e183561308f798d506386e94cd65766fc5360fc..74061c69bcd6ca0dbf137b232febd6638e8b66b3 100644 (file)
@@ -129,7 +129,7 @@ ParserError(const char *s)
 /* Report an internal error.  Essentially a fatal error with trace info.
  * Exit immediately because it's essentially an assert() trap. */
 void
-InternalError(unsigned int line, const char *file, const char *message)
+InternalError_(const char *file, unsigned int line, const char *message)
 {
     fprintf(stderr, _("INTERNAL ERROR at %s, line %d: %s\n"), file, line,
            message);
index 6a7d9ece1f371c10845b52186cac4f49a30039e9..4c78b8d24c02f6ce404ef1b62958d5961c679c3f 100644 (file)
@@ -34,7 +34,8 @@ char *conv_unprint(char ch);
 
 void ParserError(const char *);
 
-void InternalError(unsigned int line, const char *file, const char *message);
+void InternalError_(const char *file, unsigned int line, const char *message);
+#define InternalError(msg)     InternalError_(__FILE__, __LINE__, msg)
 
 void Fatal(fatal_num);
 void Error(const char *, ...);
index 1ec7a96991c82ae500afc4ceea15b5f729b288cd..a3c11d85cab4abf0233f3cad3582cae8de89cdae 100644 (file)
@@ -112,8 +112,7 @@ expr_new(ExprOp op, ExprItem *left, ExprItem *right)
        xfree(left);
        ptr->numterms++;
     } else {
-       InternalError(__LINE__, __FILE__,
-                     _("Right side of expression must exist"));
+       InternalError(_("Right side of expression must exist"));
     }
 
     if (right) {
@@ -880,8 +879,7 @@ expr_checkea_distcheck_reg(expr **ep)
        /* The reg expn *must* be EXPR_ADD at this point.  Sanity check. */
        if (e->terms[havereg_expr].type != EXPR_EXPR ||
            e->terms[havereg_expr].data.expn->op != EXPR_ADD)
-           InternalError(__LINE__, __FILE__,
-                         _("Register expression not ADD or EXPN"));
+           InternalError(_("Register expression not ADD or EXPN"));
 
        /* Iterate over each term in reg expn */
        for (i=0; i<e->terms[havereg_expr].data.expn->numterms; i++) {
@@ -974,11 +972,9 @@ expr_checkea_getregusage(expr **ep, int *indexreg, void *data,
                     * Sanity check for EXPR_INT.
                     */
                    if (e->terms[i].data.expn->terms[0].type != EXPR_REG)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Register not found in reg expn"));
+                       InternalError(_("Register not found in reg expn"));
                    if (e->terms[i].data.expn->terms[1].type != EXPR_INT)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Non-integer value in reg expn"));
+                       InternalError(_("Non-integer value in reg expn"));
                    reg = get_reg(&e->terms[i].data.expn->terms[0], data);
                    if (!reg)
                        return 0;
index b4386c157be9a38887b632fdbbee6de6887fd74b..1f173d144db022e3ed04e090ec721711f99504d2 100644 (file)
@@ -574,7 +574,7 @@ floatnum_get_common(const floatnum *flt, unsigned char *ptr, int byte_size,
 
     /* underflow and overflow both set!? */
     if (underflow && overflow)
-       InternalError(__LINE__, __FILE__, _("Both underflow and overflow set"));
+       InternalError(_("Both underflow and overflow set"));
 
     /* check for underflow or overflow and set up appropriate output */
     if (underflow) {
@@ -597,8 +597,7 @@ floatnum_get_common(const floatnum *flt, unsigned char *ptr, int byte_size,
     /* get little-endian bytes */
     buf = BitVector_Block_Read(output, &len);
     if (len < byte_size)
-       InternalError(__LINE__, __FILE__,
-                     _("Byte length of BitVector does not match bit length"));
+       InternalError(_("Byte length of BitVector does not match bit length"));
 
     /* copy to output */
     memcpy(ptr, buf, byte_size*sizeof(unsigned char));
@@ -652,8 +651,7 @@ floatnum_get_sized(const floatnum *flt, unsigned char *ptr, size_t size)
        case 10:
            return floatnum_get_common(flt, ptr, 10, 64, 0, 15);
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("Invalid float conversion size"));
+           InternalError(_("Invalid float conversion size"));
            return 1;       /* never reached, but silence GCC warning */
     }
 }
index 6e8c7bfc4785411bb34b65699b96b12c9b34e082..9b09d9b2ac50e53eade64d5686bd648cd23d107a 100644 (file)
@@ -257,7 +257,7 @@ intnum_calc(intnum *acc, ExprOp op, intnum *operand)
     }
 
     if (!operand && op != EXPR_NEG && op != EXPR_NOT && op != EXPR_LNOT)
-       InternalError(__LINE__, __FILE__, _("Operation needs an operand"));
+       InternalError(_("Operation needs an operand"));
 
     /* A operation does a bitvector computation if result is allocated. */
     switch (op) {
@@ -488,7 +488,7 @@ intnum_get_uint(const intnum *intn)
        case INTNUM_BV:
            return BitVector_Chunk_Read(intn->val.bv, 32, 0);
        default:
-           InternalError(__LINE__, __FILE__, _("unknown intnum type"));
+           InternalError(_("unknown intnum type"));
            return 0;
     }
 }
@@ -515,7 +515,7 @@ intnum_get_int(const intnum *intn)
            } else
                return BitVector_Chunk_Read(intn->val.bv, 32, 0);
        default:
-           InternalError(__LINE__, __FILE__, _("unknown intnum type"));
+           InternalError(_("unknown intnum type"));
            return 0;
     }
 }
@@ -539,8 +539,7 @@ intnum_get_sized(const intnum *intn, unsigned char *ptr, size_t size)
        case INTNUM_BV:
            buf = BitVector_Block_Read(intn->val.bv, &len);
            if (len < size)
-               InternalError(__LINE__, __FILE__,
-                             _("Invalid size specified (too large)"));
+               InternalError(_("Invalid size specified (too large)"));
            memcpy(ptr, buf, size);
            xfree(buf);
            break;
index 119376e69c331580305a5beae16a41b9b8fbe8f3..656ca4a8615f6a2de7c606d21e14591ac8d7a293 100644 (file)
@@ -88,7 +88,7 @@ void
 xfree(void *p)
 {
     if (!p)
-       InternalError(__LINE__, __FILE__, _("Tried to free NULL pointer"));
+       InternalError(_("Tried to free NULL pointer"));
     free(p);
 }
 
index 1ec7a96991c82ae500afc4ceea15b5f729b288cd..a3c11d85cab4abf0233f3cad3582cae8de89cdae 100644 (file)
@@ -112,8 +112,7 @@ expr_new(ExprOp op, ExprItem *left, ExprItem *right)
        xfree(left);
        ptr->numterms++;
     } else {
-       InternalError(__LINE__, __FILE__,
-                     _("Right side of expression must exist"));
+       InternalError(_("Right side of expression must exist"));
     }
 
     if (right) {
@@ -880,8 +879,7 @@ expr_checkea_distcheck_reg(expr **ep)
        /* The reg expn *must* be EXPR_ADD at this point.  Sanity check. */
        if (e->terms[havereg_expr].type != EXPR_EXPR ||
            e->terms[havereg_expr].data.expn->op != EXPR_ADD)
-           InternalError(__LINE__, __FILE__,
-                         _("Register expression not ADD or EXPN"));
+           InternalError(_("Register expression not ADD or EXPN"));
 
        /* Iterate over each term in reg expn */
        for (i=0; i<e->terms[havereg_expr].data.expn->numterms; i++) {
@@ -974,11 +972,9 @@ expr_checkea_getregusage(expr **ep, int *indexreg, void *data,
                     * Sanity check for EXPR_INT.
                     */
                    if (e->terms[i].data.expn->terms[0].type != EXPR_REG)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Register not found in reg expn"));
+                       InternalError(_("Register not found in reg expn"));
                    if (e->terms[i].data.expn->terms[1].type != EXPR_INT)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Non-integer value in reg expn"));
+                       InternalError(_("Non-integer value in reg expn"));
                    reg = get_reg(&e->terms[i].data.expn->terms[0], data);
                    if (!reg)
                        return 0;
index 1ec7a96991c82ae500afc4ceea15b5f729b288cd..a3c11d85cab4abf0233f3cad3582cae8de89cdae 100644 (file)
@@ -112,8 +112,7 @@ expr_new(ExprOp op, ExprItem *left, ExprItem *right)
        xfree(left);
        ptr->numterms++;
     } else {
-       InternalError(__LINE__, __FILE__,
-                     _("Right side of expression must exist"));
+       InternalError(_("Right side of expression must exist"));
     }
 
     if (right) {
@@ -880,8 +879,7 @@ expr_checkea_distcheck_reg(expr **ep)
        /* The reg expn *must* be EXPR_ADD at this point.  Sanity check. */
        if (e->terms[havereg_expr].type != EXPR_EXPR ||
            e->terms[havereg_expr].data.expn->op != EXPR_ADD)
-           InternalError(__LINE__, __FILE__,
-                         _("Register expression not ADD or EXPN"));
+           InternalError(_("Register expression not ADD or EXPN"));
 
        /* Iterate over each term in reg expn */
        for (i=0; i<e->terms[havereg_expr].data.expn->numterms; i++) {
@@ -974,11 +972,9 @@ expr_checkea_getregusage(expr **ep, int *indexreg, void *data,
                     * Sanity check for EXPR_INT.
                     */
                    if (e->terms[i].data.expn->terms[0].type != EXPR_REG)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Register not found in reg expn"));
+                       InternalError(_("Register not found in reg expn"));
                    if (e->terms[i].data.expn->terms[1].type != EXPR_INT)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Non-integer value in reg expn"));
+                       InternalError(_("Non-integer value in reg expn"));
                    reg = get_reg(&e->terms[i].data.expn->terms[0], data);
                    if (!reg)
                        return 0;
index 1ec7a96991c82ae500afc4ceea15b5f729b288cd..a3c11d85cab4abf0233f3cad3582cae8de89cdae 100644 (file)
@@ -112,8 +112,7 @@ expr_new(ExprOp op, ExprItem *left, ExprItem *right)
        xfree(left);
        ptr->numterms++;
     } else {
-       InternalError(__LINE__, __FILE__,
-                     _("Right side of expression must exist"));
+       InternalError(_("Right side of expression must exist"));
     }
 
     if (right) {
@@ -880,8 +879,7 @@ expr_checkea_distcheck_reg(expr **ep)
        /* The reg expn *must* be EXPR_ADD at this point.  Sanity check. */
        if (e->terms[havereg_expr].type != EXPR_EXPR ||
            e->terms[havereg_expr].data.expn->op != EXPR_ADD)
-           InternalError(__LINE__, __FILE__,
-                         _("Register expression not ADD or EXPN"));
+           InternalError(_("Register expression not ADD or EXPN"));
 
        /* Iterate over each term in reg expn */
        for (i=0; i<e->terms[havereg_expr].data.expn->numterms; i++) {
@@ -974,11 +972,9 @@ expr_checkea_getregusage(expr **ep, int *indexreg, void *data,
                     * Sanity check for EXPR_INT.
                     */
                    if (e->terms[i].data.expn->terms[0].type != EXPR_REG)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Register not found in reg expn"));
+                       InternalError(_("Register not found in reg expn"));
                    if (e->terms[i].data.expn->terms[1].type != EXPR_INT)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Non-integer value in reg expn"));
+                       InternalError(_("Non-integer value in reg expn"));
                    reg = get_reg(&e->terms[i].data.expn->terms[0], data);
                    if (!reg)
                        return 0;
index 1ec7a96991c82ae500afc4ceea15b5f729b288cd..a3c11d85cab4abf0233f3cad3582cae8de89cdae 100644 (file)
@@ -112,8 +112,7 @@ expr_new(ExprOp op, ExprItem *left, ExprItem *right)
        xfree(left);
        ptr->numterms++;
     } else {
-       InternalError(__LINE__, __FILE__,
-                     _("Right side of expression must exist"));
+       InternalError(_("Right side of expression must exist"));
     }
 
     if (right) {
@@ -880,8 +879,7 @@ expr_checkea_distcheck_reg(expr **ep)
        /* The reg expn *must* be EXPR_ADD at this point.  Sanity check. */
        if (e->terms[havereg_expr].type != EXPR_EXPR ||
            e->terms[havereg_expr].data.expn->op != EXPR_ADD)
-           InternalError(__LINE__, __FILE__,
-                         _("Register expression not ADD or EXPN"));
+           InternalError(_("Register expression not ADD or EXPN"));
 
        /* Iterate over each term in reg expn */
        for (i=0; i<e->terms[havereg_expr].data.expn->numterms; i++) {
@@ -974,11 +972,9 @@ expr_checkea_getregusage(expr **ep, int *indexreg, void *data,
                     * Sanity check for EXPR_INT.
                     */
                    if (e->terms[i].data.expn->terms[0].type != EXPR_REG)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Register not found in reg expn"));
+                       InternalError(_("Register not found in reg expn"));
                    if (e->terms[i].data.expn->terms[1].type != EXPR_INT)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Non-integer value in reg expn"));
+                       InternalError(_("Non-integer value in reg expn"));
                    reg = get_reg(&e->terms[i].data.expn->terms[0], data);
                    if (!reg)
                        return 0;
index a6fc2078b93408ad4bba949541546330e8c3d56a..8f4d91edb477f49a04364657fa63153a24de84ae 100644 (file)
@@ -316,8 +316,7 @@ GetInsnEA(bytecode *bc)
        return NULL;
 
     if (bc->type != BC_INSN)
-       InternalError(__LINE__, __FILE__,
-                     _("Trying to get EA of non-instruction"));
+       InternalError(_("Trying to get EA of non-instruction"));
 
     return bc->data.insn.ea;
 }
@@ -336,8 +335,7 @@ SetInsnOperSizeOverride(bytecode *bc, unsigned char opersize)
            bc->data.jmprel.opersize = opersize;
            break;
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("OperSize override applied to non-instruction"));
+           InternalError(_("OperSize override applied to non-instruction"));
            return;
     }
 }
@@ -356,8 +354,7 @@ SetInsnAddrSizeOverride(bytecode *bc, unsigned char addrsize)
            bc->data.jmprel.addrsize = addrsize;
            break;
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("AddrSize override applied to non-instruction"));
+           InternalError(_("AddrSize override applied to non-instruction"));
            return;
     }
 }
@@ -378,8 +375,7 @@ SetInsnLockRepPrefix(bytecode *bc, unsigned char prefix)
            lockrep_pre = &bc->data.jmprel.lockrep_pre;
            break;
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("LockRep prefix applied to non-instruction"));
+           InternalError(_("LockRep prefix applied to non-instruction"));
            return;
     }
 
@@ -396,8 +392,7 @@ SetInsnShiftFlag(bytecode *bc)
        return;
 
     if (bc->type != BC_INSN)
-       InternalError(__LINE__, __FILE__,
-                     _("Attempted to set shift flag on non-instruction"));
+       InternalError(_("Attempted to set shift flag on non-instruction"));
 
     bc->data.insn.shift_op = 1;
 }
@@ -718,8 +713,7 @@ bytecode_parser_finalize(bytecode *bc)
     switch (bc->type) {
        case BC_EMPTY:
            /* FIXME: delete it (probably in bytecodes_ level, not here */
-           InternalError(__LINE__, __FILE__,
-                         _("got empty bytecode in parser_finalize"));
+           InternalError(_("got empty bytecode in parser_finalize"));
            break;
        case BC_INSN:
            bytecode_parser_finalize_insn(bc);
index 4e183561308f798d506386e94cd65766fc5360fc..74061c69bcd6ca0dbf137b232febd6638e8b66b3 100644 (file)
@@ -129,7 +129,7 @@ ParserError(const char *s)
 /* Report an internal error.  Essentially a fatal error with trace info.
  * Exit immediately because it's essentially an assert() trap. */
 void
-InternalError(unsigned int line, const char *file, const char *message)
+InternalError_(const char *file, unsigned int line, const char *message)
 {
     fprintf(stderr, _("INTERNAL ERROR at %s, line %d: %s\n"), file, line,
            message);
index 6a7d9ece1f371c10845b52186cac4f49a30039e9..4c78b8d24c02f6ce404ef1b62958d5961c679c3f 100644 (file)
@@ -34,7 +34,8 @@ char *conv_unprint(char ch);
 
 void ParserError(const char *);
 
-void InternalError(unsigned int line, const char *file, const char *message);
+void InternalError_(const char *file, unsigned int line, const char *message);
+#define InternalError(msg)     InternalError_(__FILE__, __LINE__, msg)
 
 void Fatal(fatal_num);
 void Error(const char *, ...);
index 1ec7a96991c82ae500afc4ceea15b5f729b288cd..a3c11d85cab4abf0233f3cad3582cae8de89cdae 100644 (file)
@@ -112,8 +112,7 @@ expr_new(ExprOp op, ExprItem *left, ExprItem *right)
        xfree(left);
        ptr->numterms++;
     } else {
-       InternalError(__LINE__, __FILE__,
-                     _("Right side of expression must exist"));
+       InternalError(_("Right side of expression must exist"));
     }
 
     if (right) {
@@ -880,8 +879,7 @@ expr_checkea_distcheck_reg(expr **ep)
        /* The reg expn *must* be EXPR_ADD at this point.  Sanity check. */
        if (e->terms[havereg_expr].type != EXPR_EXPR ||
            e->terms[havereg_expr].data.expn->op != EXPR_ADD)
-           InternalError(__LINE__, __FILE__,
-                         _("Register expression not ADD or EXPN"));
+           InternalError(_("Register expression not ADD or EXPN"));
 
        /* Iterate over each term in reg expn */
        for (i=0; i<e->terms[havereg_expr].data.expn->numterms; i++) {
@@ -974,11 +972,9 @@ expr_checkea_getregusage(expr **ep, int *indexreg, void *data,
                     * Sanity check for EXPR_INT.
                     */
                    if (e->terms[i].data.expn->terms[0].type != EXPR_REG)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Register not found in reg expn"));
+                       InternalError(_("Register not found in reg expn"));
                    if (e->terms[i].data.expn->terms[1].type != EXPR_INT)
-                       InternalError(__LINE__, __FILE__,
-                                     _("Non-integer value in reg expn"));
+                       InternalError(_("Non-integer value in reg expn"));
                    reg = get_reg(&e->terms[i].data.expn->terms[0], data);
                    if (!reg)
                        return 0;
index b4386c157be9a38887b632fdbbee6de6887fd74b..1f173d144db022e3ed04e090ec721711f99504d2 100644 (file)
@@ -574,7 +574,7 @@ floatnum_get_common(const floatnum *flt, unsigned char *ptr, int byte_size,
 
     /* underflow and overflow both set!? */
     if (underflow && overflow)
-       InternalError(__LINE__, __FILE__, _("Both underflow and overflow set"));
+       InternalError(_("Both underflow and overflow set"));
 
     /* check for underflow or overflow and set up appropriate output */
     if (underflow) {
@@ -597,8 +597,7 @@ floatnum_get_common(const floatnum *flt, unsigned char *ptr, int byte_size,
     /* get little-endian bytes */
     buf = BitVector_Block_Read(output, &len);
     if (len < byte_size)
-       InternalError(__LINE__, __FILE__,
-                     _("Byte length of BitVector does not match bit length"));
+       InternalError(_("Byte length of BitVector does not match bit length"));
 
     /* copy to output */
     memcpy(ptr, buf, byte_size*sizeof(unsigned char));
@@ -652,8 +651,7 @@ floatnum_get_sized(const floatnum *flt, unsigned char *ptr, size_t size)
        case 10:
            return floatnum_get_common(flt, ptr, 10, 64, 0, 15);
        default:
-           InternalError(__LINE__, __FILE__,
-                         _("Invalid float conversion size"));
+           InternalError(_("Invalid float conversion size"));
            return 1;       /* never reached, but silence GCC warning */
     }
 }
index 6e8c7bfc4785411bb34b65699b96b12c9b34e082..9b09d9b2ac50e53eade64d5686bd648cd23d107a 100644 (file)
@@ -257,7 +257,7 @@ intnum_calc(intnum *acc, ExprOp op, intnum *operand)
     }
 
     if (!operand && op != EXPR_NEG && op != EXPR_NOT && op != EXPR_LNOT)
-       InternalError(__LINE__, __FILE__, _("Operation needs an operand"));
+       InternalError(_("Operation needs an operand"));
 
     /* A operation does a bitvector computation if result is allocated. */
     switch (op) {
@@ -488,7 +488,7 @@ intnum_get_uint(const intnum *intn)
        case INTNUM_BV:
            return BitVector_Chunk_Read(intn->val.bv, 32, 0);
        default:
-           InternalError(__LINE__, __FILE__, _("unknown intnum type"));
+           InternalError(_("unknown intnum type"));
            return 0;
     }
 }
@@ -515,7 +515,7 @@ intnum_get_int(const intnum *intn)
            } else
                return BitVector_Chunk_Read(intn->val.bv, 32, 0);
        default:
-           InternalError(__LINE__, __FILE__, _("unknown intnum type"));
+           InternalError(_("unknown intnum type"));
            return 0;
     }
 }
@@ -539,8 +539,7 @@ intnum_get_sized(const intnum *intn, unsigned char *ptr, size_t size)
        case INTNUM_BV:
            buf = BitVector_Block_Read(intn->val.bv, &len);
            if (len < size)
-               InternalError(__LINE__, __FILE__,
-                             _("Invalid size specified (too large)"));
+               InternalError(_("Invalid size specified (too large)"));
            memcpy(ptr, buf, size);
            xfree(buf);
            break;
index 119376e69c331580305a5beae16a41b9b8fbe8f3..656ca4a8615f6a2de7c606d21e14591ac8d7a293 100644 (file)
@@ -88,7 +88,7 @@ void
 xfree(void *p)
 {
     if (!p)
-       InternalError(__LINE__, __FILE__, _("Tried to free NULL pointer"));
+       InternalError(_("Tried to free NULL pointer"));
     free(p);
 }