-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappendixB.tr
More file actions
87 lines (87 loc) · 1.27 KB
/
appendixB.tr
File metadata and controls
87 lines (87 loc) · 1.27 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
.ce 2
Приложение B
.sp 1
.
\fBЗаголовочные файлы\fP
.sp 1
\fBФайл markov.h\fP
.sp 1
.
.ps 10p
.vs 11p
.
.fam C
1 #ifndef _MARKOV_H
2 #define _MARKOV_H
3
4 #include <string.h>
5 #include <time.h>
6 #include <limits.h>
7
8 #include "xstdlib.h"
9
10 struct markov {
11 int maxj;
12 double *pj;
13 };
14
15 typedef struct markglob {
16 int maxi;
17 int maxel;
18 struct markov *mp;
19 } *MARK;
20
21 MARK minit(void);
22 void mfree(MARK p);
23 void mcount(MARK p, int ni, int nj);
24 void normalize(MARK p);
25 int getel(MARK p, int prewel);
26 #endif
.sp 1
.fam T
.ps 13
.vs 16
.
\fBФайл xstdlib.h\fP
.sp 1
.
.ps 10p
.vs 11p
.
.fam C
1 #ifndef _XSTDLIB_H
2 #define _XSTDLIB_H
3
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <errno.h>
7
8 void *xmalloc(size_t size);
9 void *xrealloc(void *p, size_t size);
10 #endif
.sp 1
.fam T
.ps 13
.vs 16
.
\fBФайл hashtb.h\fP
.sp 1
.
.ps 10p
.vs 11p
.
.fam C
1 #ifndef _HASHTB_H
2 #define _HASHTB_H
3
4 #include <string.h>
5
6 #include "xstdlib.h"
7
8 void addentry(int n, const char *word);
9 int getnum(const char *s);
10 #endif
.sp 1
.fam T
.ps 13
.vs 16