2004-07-21 11:35:39 +01:00
|
|
|
#include "states.h"
|
2007-01-06 14:45:29 +00:00
|
|
|
#include "symbol.h"
|
2004-07-21 11:35:39 +01:00
|
|
|
|
|
|
|
/* States counter operations
|
|
|
|
*
|
|
|
|
* Note that these are also used for encountered claims and such.
|
|
|
|
*/
|
|
|
|
|
|
|
|
__inline__ states_t
|
|
|
|
statesIncrease (const states_t states)
|
|
|
|
{
|
2004-08-09 11:05:58 +01:00
|
|
|
return states + 1;
|
2004-07-21 11:35:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
__inline__ double
|
|
|
|
statesDouble (const states_t states)
|
|
|
|
{
|
|
|
|
return (double) states;
|
|
|
|
}
|
|
|
|
|
|
|
|
__inline__ int
|
|
|
|
statesSmallerThan (const states_t states, unsigned long int reflint)
|
|
|
|
{
|
|
|
|
if (states < (states_t) reflint)
|
2004-08-09 11:05:58 +01:00
|
|
|
return 1;
|
2004-07-21 11:35:39 +01:00
|
|
|
else
|
2004-08-09 11:05:58 +01:00
|
|
|
return 0;
|
2004-07-21 11:35:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//! Sensible output for number of states/claims
|
|
|
|
/**
|
|
|
|
* Acts like a modified form of %g
|
|
|
|
*/
|
|
|
|
__inline__ void
|
2004-07-30 13:04:38 +01:00
|
|
|
statesFormat (const states_t states)
|
2004-07-21 11:35:39 +01:00
|
|
|
{
|
2006-02-27 15:20:37 +00:00
|
|
|
eprintf ("%lu", states);
|
2004-07-21 11:35:39 +01:00
|
|
|
}
|