-
Notifications
You must be signed in to change notification settings - Fork 6
/
tr.c
52 lines (39 loc) · 855 Bytes
/
tr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include"typedef.h"
#include"getput.h"
#include"bravais.h"
#include"matrix.h"
int main (int argc, char *argv[])
{
int anz,
i;
char comment[1000];
matrix_TYP **F,
*tmp;
read_header(argc, argv);
if((FILEANZ != 1) || (is_option('h')))
{
printf("Usage: %s 'file' \n",argv[0]);
printf("\n");
printf("file: matrix_TYP.\n");
printf("\n");
printf(" Transposes the given matrices.\n");
printf("\n");
printf("cf. Tr_Bravais.\n");
if (is_option('h')){
exit(0);
}
else{
exit(31);
}
}
F = mget_mat(FILENAMES[0],&anz);
printf("#%d\n",anz);
for (i=0;i<anz;i++){
Check_mat(F[i]);
tmp = tr_pose(F[i]);
sprintf(comment,"tranposed of %d-th matrix of %s",i+1,FILENAMES[0]);
put_mat(tmp,NULL,comment,2);
free_mat(tmp);
}
exit(0);
}