/* tshuffl.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Test: shuffl Uses: bran setbran Input parameters: s -> unsigned integer: pseudorandom seed m -> integer: number of shuffles */ #include "ccmath.h" void main(int na,char **av) { int base[12],*sh[12]; unsigned int s; int n,m,i,j; if(na!=3){ printf("para: seed msz\n"); exit(-1);} printf(" Test of Shuffle\n"); /* initialize pseudorandom generator */ sscanf(*++av,"%x",&s); printf(" seed= %x\n",s); setbran(s); m=atoi(*++av); for(i=0,n=12; i