GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#include "typedef.h"1#include "getput.h"2#include "matrix.h"345/**************************************************************************\6@---------------------------------------------------------------------------7@---------------------------------------------------------------------------8@ FILE: put_order.c9@---------------------------------------------------------------------------10@---------------------------------------------------------------------------11@12\**************************************************************************/1314/**************************************************************************\15@---------------------------------------------------------------------------16@ void fput_order(outfile, divisors, ord)17@ FILE *outfile;18@ int *divisors;19@ int ord;20@ A tools to print the order of a bravais_TYP21@---------------------------------------------------------------------------22@23\**************************************************************************/24void fput_order(outfile, divisors, ord)25FILE *outfile;26int *divisors;27int ord;28{29int tester, i, j;30if(divisors == NULL)31{32if(ord <= 0)33fprintf(outfile, "%% order of the group unknown\n");34else35fprintf(outfile, " = %d %% order of the group\n", ord);36}37else38{39tester = FALSE;40if(divisors[0] != 0)41fprintf(outfile, "%% order of the group unknown\n");42else43{44for(i=0; i<100 && tester == FALSE; i++)45if(divisors[i] != 0)46tester = TRUE;47if(tester == FALSE && ord == 0)48fprintf(outfile, "%% order of the group unknown\n");49if(tester == TRUE)50{51j = 0;52for(i=2; i<100; i++)53{54if(divisors[i] != 0)55{56if(j != 0)57fprintf(outfile, "* ");58fprintf(outfile, "%d^%d ", i, divisors[i]);59j = 1;60}61}62if(ord != 0)63fprintf(outfile, " = %d ", ord);64fprintf(outfile, "%% order of the group\n");65}66}67}68}697071/*{{{}}}*/727374