More basics.
[frameshot.git] / utils.c
blob95a105908bffd6189f7434ac60ac1cc101e6f2f9
1 #include "utils.h"
3 void reduce_fraction( int *n, int *d )
5 int a = *n;
6 int b = *d;
7 int c;
8 if( !a || !b )
9 return;
10 c = a % b;
11 while(c)
13 a = b;
14 b = c;
15 c = a % b;
17 *n /= b;
18 *d /= b;