/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
if (p->reg->reg_class == q->reg->reg_class)
return p->reg->index - q->reg->index;
else
- return p->reg->reg_class - q->reg->reg_class;
+ return p->reg->reg_class < q->reg->reg_class ? -1 : +1;
}
static void reg_map_to_arr(reg_node_map_t *res, pmap *reg_map)
/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
unsigned cur_token; /**< current token. */
unsigned number; /**< current token attribute. */
const char *s; /**< current token attribute. */
- unsigned len; /**< current token attribute. */
+ size_t len; /**< current token attribute. */
const char *curr_pos;
const char *end_pos;
void firm_debug(const char *cmd)
{
char name[1024], fname[1024];
- int len;
+ size_t len;
init_lexer(cmd);
for (ch = *s; ch != '}' && ch != '\0'; ch = *++s);
if (s - named) {
- int n = s - named;
+ size_t n = s - named;
char *name;
lc_arg_t tmp;
const op_mode_entry_t *e2 = (const op_mode_entry_t*)key;
(void) size;
- return (e1->op - e2->op) | (e1->imode - e2->imode) | (e1->omode - e2->omode);
+ return (e1->op != e2->op) | (e1->imode != e2->imode) | (e1->omode != e2->omode);
}
/**
const conv_tp_entry_t *e2 = (const conv_tp_entry_t*)key;
(void) size;
- return (e1->imode - e2->imode) | (e1->omode - e2->omode);
+ return (e1->imode != e2->imode) | (e1->omode != e2->omode);
}
/**
/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
const distrib_entry_t *p1 = (const distrib_entry_t*)elt;
const distrib_entry_t *p2 = (const distrib_entry_t*)key;
- return (char *)p1->object - (char *)p2->object;
+ if (p1->object == p2->object)
+ return 0;
+ return p1->object < p2->object ? -1 : 1;
}
/*
/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
{
char fname[2048];
const char *p;
- int l;
+ size_t l;
if (! status->stat_options)
return;