GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#include "typedef.h"1#include "datei.h"2#include "matrix.h"3#include "getput.h"45lattice_element **super_lattice(char *symb,int dim,int almost,int zclass,6int *no, int OPTION)7{89int i,10j,11pos,12found;1314FILE *infile;1516lattice_element **RES,17*TMP;1819/* saves space on the stack */20static char filename[1000];2122/* get the appropiate filename */23sprintf(filename,"%s%s%d/%s%s_%d_%d",TOPDIR,"/tables/lattices/dim",24dim,"reverse_",symb,almost,zclass);2526infile = fopen(filename,"r");2728/* save cores */29if (infile == NULL){30fprintf(stderr,"Couldn't find my input file %s\n",filename);31exit(4);32}3334fscanf(infile,"%d\n",no);3536RES = (lattice_element **) malloc(no[0] * sizeof(lattice_element *));3738for (i=0;i<no[0];i++){39RES[i] = init_lattice_element();4041fscanf(infile,"%s %d %d\n",42RES[i]->symbol,&RES[i]->almost,&RES[i]->zclass);43}4445fclose(infile);4647if (OPTION){48for (i=0;i<no[0];i++){4950found = FALSE;51/* get the appropiate filename */52sprintf(filename,"%s%s%d/%s%s_%d_%d",TOPDIR,"/tables/lattices/dim",53dim,"lattice_",RES[i]->symbol,RES[i]->almost,RES[i]->zclass);5455infile = fopen(filename,"r");56fscanf(infile,"#%d\n",&pos);57j = 0;58while (!found && j<pos){59TMP = fget_lattice_element(infile,FALSE);6061found = (strcmp(TMP->symbol,symb) == 0);62found = found && (TMP->almost == almost) && (TMP->zclass == zclass);6364if (found){65RES[i]->TR = TMP->TR;66TMP->TR = NULL;67RES[i]->N_orbits = TMP->N_orbits;68TMP->N_orbits = 0;69}7071j++;72free_lattice_element(TMP);73}74fclose(infile);7576if (!found){77fprintf(stderr,"ERROR: super_lattice\n");78exit(3);79}8081/* get the apropriate group */82RES[i]->grp = brav_from_datei(RES[i]->symbol,83RES[i]->almost,RES[i]->zclass);84}85}8687return RES;88}89909192