version 1.2, 2001/03/14 06:04:53 |
version 1.4, 2001/03/29 09:49:58 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/engine/gfs.c,v 1.1 2001/03/13 01:10:25 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/engine/gfs.c,v 1.3 2001/03/14 06:27:57 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
|
|
|
|
else if ( OID(a) == O_N && NID(a) == N_M ) |
else if ( OID(a) == O_N && NID(a) == N_M ) |
mqtogfs(a,b); |
mqtogfs(a,b); |
else if ( OID(a) == O_N && NID(a) == N_Q ) { |
else if ( OID(a) == O_N && NID(a) == N_Q ) { |
ptomp(current_gfs_q,(P)a,&t); mqtogfs(t,b); |
ptomp(current_gfs_p,(P)a,&t); mqtogfs(t,b); |
} else |
} else |
error("ntogfs : invalid argument"); |
error("ntogfs : invalid argument"); |
} |
} |
|
|
else |
else |
return 0; |
return 0; |
} |
} |
|
} |
|
|
|
void randomgfs(r) |
|
GFS *r; |
|
{ |
|
unsigned int t; |
|
|
|
if ( !current_gfs_q1 ) |
|
error("addgfs : current_gfs_q is not set"); |
|
t = mt_genrand()%current_gfs_q; |
|
if ( !t ) |
|
*r = 0; |
|
else { |
|
if ( t == current_gfs_q1 ) |
|
t = 0; |
|
MKGFS(t,*r); |
|
} |
} |
} |