Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563642 views
1
#include"typedef.h"
2
/**************************************************************************\
3
@---------------------------------------------------------------------------
4
@---------------------------------------------------------------------------
5
@ FILE: init_bravais.c
6
@---------------------------------------------------------------------------
7
@---------------------------------------------------------------------------
8
@
9
\**************************************************************************/
10
11
/**************************************************************************\
12
@---------------------------------------------------------------------------
13
@ bravais_TYP *init_bravais(dim)
14
@ int dim;
15
@
16
@ returns a bravais_TYP 'B' with B->dim = dim
17
@ and all other pointers an integers in B are set to NULL resp. 0
18
@ and B->divisors[i] = 0 for 0<= i < 100
19
@---------------------------------------------------------------------------
20
@
21
\**************************************************************************/
22
23
24
bravais_TYP *init_bravais(dim)
25
int dim;
26
{
27
int i;
28
bravais_TYP *B;
29
30
/* changed on 1/08/97 from malloc to calloc for paranoia reasons */
31
if( (B = (bravais_TYP *)calloc(1,sizeof(bravais_TYP))) == NULL)
32
{
33
printf("malloc of 'B' in 'init_bravais' failed\n");
34
exit(2);
35
}
36
B->dim = dim;
37
for(i=0;i<100;i++)
38
B->divisors[i] = 0;
39
B->order = 0;
40
B->gen_no = B->zentr_no = B->form_no = B->normal_no = B->cen_no = 0;
41
B->gen = NULL;
42
B->form = NULL;
43
B->zentr = NULL;
44
B->normal = NULL;
45
B->cen = NULL;
46
return(B);
47
}
48
49