GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/****************************************************************************1**2*A delete_tables.c ANUPQ source Eamonn O'Brien3**4*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany5*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia6**7*/89#include "pq_defs.h"10#include "pcp_vars.h"1112/* subroutine to delete all word and subgroup tables13entries, depending upon the value of type;14if type = 1 delete only the word table entries;15if type = 2, delete only the subgroup table entries;16if type = 0, delete both */1718void delete_tables(int type, struct pcp_vars *pcp)19{20register int *y = y_address;2122register int i;23register int j;24register int n;25register int p1;26register int nsubgp = pcp->nsubgp;27register int address;2829/* delete all entries (pointers) in the words table */30if (type != 2) {31if ((n = pcp->nwords) != 0) {32address = pcp->words;33for (i = 1; i <= n; i++)34if ((p1 = -y[address + i]) != 0)35y[p1] = 0;3637/* shift up the subgroup table, if it exists */38if (type && pcp->nsubgp) {39j = pcp->structure + 1;40for (i = 1; i <= nsubgp; i++, j--) {41p1 = y[j - n];42y[j] = p1;43if (p1 != 0)44y[-p1] = j;45}46pcp->subgrp = j - 1;47pcp->submlg = pcp->subgrp - pcp->lastg;48}49pcp->words = pcp->structure;50pcp->nwords = 0;51}52}5354/* delete all entries (pointers) in the subgroup table */55if (type != 1) {56address = pcp->subgrp;57for (i = 1; i <= nsubgp; i++) {58if ((p1 = -y[address + i]) != 0) {59y[address + i] = 0;60y[p1] = 0;61}62}63pcp->nsubgp = 0;64pcp->subgrp = pcp->words;65pcp->submlg = pcp->subgrp - pcp->lastg;66}67}686970