Main Page | Class List | File List | Class Members | File Members

between.c File Reference

#include "standard.h"
#include "error.h"

Go to the source code of this file.

Functions

int between (int x, int low, int high)
int minus (int a, int b)


Function Documentation

int between (  int  x,
int  low,
int  high
) 
 

Definition at line 8 of file between.c.

Referenced by place_rcpc().

00015 {
00016   if (high < low)
00017     return (x>low || x<high);
00018   else 
00019     return (x<high && x>low);
00020 }

int minus (  int  a,
int  b
) 
 

Definition at line 22 of file between.c.

References a, and error().

Referenced by place_rcpc().

00028 {
00029   if ((a>31) || (b>31) || (a<0) || (b<0))
00030     error("minus","Non mod 32 numbers passed to mod 32 minus routine");
00031   if(b<=a)
00032     return (a-b);
00033   else
00034     return (32-(b-a));
00035 }


Generated on Sun Jul 16 16:27:45 2006 by  doxygen 1.3.9.1