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>3#include <base.h>45int INFO_LEVEL;6extern int SFLAG;789main(int argc,char **argv){1011bravais_TYP *G;1213matrix_TYP **base;1415bahn **strong;1617int i,18j,19l,20siz,21anz;2223char comment[1000];242526read_header(argc,argv);2728if ((is_option('h') && optionnumber('h')==0) || (FILEANZ < 1)){29printf("Usage: %s 'file' [-o]\n",argv[0]);30printf("\n");31printf("file: bravais_TYP containing a finite matrix group G.\n");32printf("\n");33printf("Calculates the order of G via an Algorithm by Schreier and Sims.\n");34printf("Options:\n");35printf("\n");36printf("-O : writes the group to stdout again, including the order and\n");37printf(" a factorisation of it.\n");38printf("-o : write a factorisation and the order to stdout. This can\n");39printf(" be used to append it to a bravais_TYP.\n");40printf("\n");41printf("WARNING: THE PROGRAM WILL TERMINATE IFF THE GROUP IS FINITE.\n");42printf("\n");43printf("Cf. Is_finite\n");44if (is_option('h')){45exit(0);46}47else{48exit(31);49}50}5152INFO_LEVEL = optionnumber('h');5354if (INFO_LEVEL & 12){55SFLAG = 1;56}5758G = get_bravais(FILENAMES[0]);5960base = get_base(G);6162strong = strong_generators(base,G,FALSE);6364siz = G->order = size(strong);6566memset(G->divisors,0,100*sizeof(int));6768for (i=2;i<100;i++){69if ((siz % i) == 0){70siz /= i;71G->divisors[i]++;72i--;73}74}7576if (is_option('o')){77fput_order(stdout,G->divisors,G->order);78}79if (is_option('O')){80put_bravais(G,NULL,NULL);81}82fprintf(stderr,"The order of the group is %d\n",G->order);8384free_bravais(G);85for (i=0;i<G->dim;i++){86free_mat(base[i]);87free_bahn(strong[i]);88free(strong[i]);89}90free(strong);91free(base);9293if (INFO_LEVEL & 12){94pointer_statistics(0,0);95}9697exit(0);9899} /* main */100101102103