mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 01:51:33 +02:00
a34702cd8d
This also fixes a bug in dump_one_field, which switched > and >=
41 lines
715 B
C
41 lines
715 B
C
/*
|
|
* relop.c - Relational operators
|
|
*
|
|
* Copyright 2012 by Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
#include "relop.h"
|
|
|
|
|
|
void dump_relop(FILE *file, enum relop op)
|
|
{
|
|
switch (op) {
|
|
case rel_lt:
|
|
fprintf(file, "<");
|
|
break;
|
|
case rel_le:
|
|
fprintf(file, "<=");
|
|
break;
|
|
case rel_eq:
|
|
fprintf(file, "=");
|
|
break;
|
|
case rel_ge:
|
|
fprintf(file, ">=");
|
|
break;
|
|
case rel_gt:
|
|
fprintf(file, ">");
|
|
break;
|
|
default:
|
|
abort();
|
|
}
|
|
}
|