annotate pyPRADA_1.2/tools/samtools-0.1.16/kstring.c @ 0:acc2ca1a3ba4

Uploaded
author siyuan
date Thu, 20 Feb 2014 00:44:58 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
1 #include <stdarg.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
2 #include <stdio.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
3 #include <ctype.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
4 #include <string.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
5 #include <stdint.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
6 #include "kstring.h"
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
7
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
8 int ksprintf(kstring_t *s, const char *fmt, ...)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
9 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
10 va_list ap;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
11 int l;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
12 va_start(ap, fmt);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
13 l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap); // This line does not work with glibc 2.0. See `man snprintf'.
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
14 va_end(ap);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
15 if (l + 1 > s->m - s->l) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
16 s->m = s->l + l + 2;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
17 kroundup32(s->m);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
18 s->s = (char*)realloc(s->s, s->m);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
19 va_start(ap, fmt);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
20 l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
21 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
22 va_end(ap);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
23 s->l += l;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
24 return l;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
25 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
26
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
27 char *kstrtok(const char *str, const char *sep, ks_tokaux_t *aux)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
28 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
29 const char *p, *start;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
30 if (sep) { // set up the table
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
31 if (str == 0 && (aux->tab[0]&1)) return 0; // no need to set up if we have finished
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
32 aux->finished = 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
33 if (sep[1]) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
34 aux->sep = -1;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
35 aux->tab[0] = aux->tab[1] = aux->tab[2] = aux->tab[3] = 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
36 for (p = sep; *p; ++p) aux->tab[*p>>6] |= 1ull<<(*p&0x3f);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
37 } else aux->sep = sep[0];
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
38 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
39 if (aux->finished) return 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
40 else if (str) aux->p = str - 1, aux->finished = 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
41 if (aux->sep < 0) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
42 for (p = start = aux->p + 1; *p; ++p)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
43 if (aux->tab[*p>>6]>>(*p&0x3f)&1) break;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
44 } else {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
45 for (p = start = aux->p + 1; *p; ++p)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
46 if (*p == aux->sep) break;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
47 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
48 aux->p = p; // end of token
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
49 if (*p == 0) aux->finished = 1; // no more tokens
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
50 return (char*)start;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
51 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
52
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
53 // s MUST BE a null terminated string; l = strlen(s)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
54 int ksplit_core(char *s, int delimiter, int *_max, int **_offsets)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
55 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
56 int i, n, max, last_char, last_start, *offsets, l;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
57 n = 0; max = *_max; offsets = *_offsets;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
58 l = strlen(s);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
59
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
60 #define __ksplit_aux do { \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
61 if (_offsets) { \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
62 s[i] = 0; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
63 if (n == max) { \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
64 max = max? max<<1 : 2; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
65 offsets = (int*)realloc(offsets, sizeof(int) * max); \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
66 } \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
67 offsets[n++] = last_start; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
68 } else ++n; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
69 } while (0)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
70
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
71 for (i = 0, last_char = last_start = 0; i <= l; ++i) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
72 if (delimiter == 0) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
73 if (isspace(s[i]) || s[i] == 0) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
74 if (isgraph(last_char)) __ksplit_aux; // the end of a field
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
75 } else {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
76 if (isspace(last_char) || last_char == 0) last_start = i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
77 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
78 } else {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
79 if (s[i] == delimiter || s[i] == 0) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
80 if (last_char != 0 && last_char != delimiter) __ksplit_aux; // the end of a field
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
81 } else {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
82 if (last_char == delimiter || last_char == 0) last_start = i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
83 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
84 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
85 last_char = s[i];
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
86 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
87 *_max = max; *_offsets = offsets;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
88 return n;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
89 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
90
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
91 /**********************
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
92 * Boyer-Moore search *
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
93 **********************/
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
94
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
95 typedef unsigned char ubyte_t;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
96
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
97 // reference: http://www-igm.univ-mlv.fr/~lecroq/string/node14.html
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
98 static int *ksBM_prep(const ubyte_t *pat, int m)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
99 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
100 int i, *suff, *prep, *bmGs, *bmBc;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
101 prep = calloc(m + 256, sizeof(int));
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
102 bmGs = prep; bmBc = prep + m;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
103 { // preBmBc()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
104 for (i = 0; i < 256; ++i) bmBc[i] = m;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
105 for (i = 0; i < m - 1; ++i) bmBc[pat[i]] = m - i - 1;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
106 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
107 suff = calloc(m, sizeof(int));
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
108 { // suffixes()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
109 int f = 0, g;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
110 suff[m - 1] = m;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
111 g = m - 1;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
112 for (i = m - 2; i >= 0; --i) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
113 if (i > g && suff[i + m - 1 - f] < i - g)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
114 suff[i] = suff[i + m - 1 - f];
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
115 else {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
116 if (i < g) g = i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
117 f = i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
118 while (g >= 0 && pat[g] == pat[g + m - 1 - f]) --g;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
119 suff[i] = f - g;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
120 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
121 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
122 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
123 { // preBmGs()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
124 int j = 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
125 for (i = 0; i < m; ++i) bmGs[i] = m;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
126 for (i = m - 1; i >= 0; --i)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
127 if (suff[i] == i + 1)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
128 for (; j < m - 1 - i; ++j)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
129 if (bmGs[j] == m)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
130 bmGs[j] = m - 1 - i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
131 for (i = 0; i <= m - 2; ++i)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
132 bmGs[m - 1 - suff[i]] = m - 1 - i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
133 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
134 free(suff);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
135 return prep;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
136 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
137
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
138 void *kmemmem(const void *_str, int n, const void *_pat, int m, int **_prep)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
139 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
140 int i, j, *prep = 0, *bmGs, *bmBc;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
141 const ubyte_t *str, *pat;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
142 str = (const ubyte_t*)_str; pat = (const ubyte_t*)_pat;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
143 prep = (_prep == 0 || *_prep == 0)? ksBM_prep(pat, m) : *_prep;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
144 if (_prep && *_prep == 0) *_prep = prep;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
145 bmGs = prep; bmBc = prep + m;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
146 j = 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
147 while (j <= n - m) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
148 for (i = m - 1; i >= 0 && pat[i] == str[i+j]; --i);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
149 if (i >= 0) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
150 int max = bmBc[str[i+j]] - m + 1 + i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
151 if (max < bmGs[i]) max = bmGs[i];
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
152 j += max;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
153 } else return (void*)(str + j);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
154 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
155 if (_prep == 0) free(prep);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
156 return 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
157 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
158
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
159 char *kstrstr(const char *str, const char *pat, int **_prep)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
160 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
161 return (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
162 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
163
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
164 char *kstrnstr(const char *str, const char *pat, int n, int **_prep)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
165 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
166 return (char*)kmemmem(str, n, pat, strlen(pat), _prep);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
167 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
168
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
169 /***********************
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
170 * The main() function *
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
171 ***********************/
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
172
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
173 #ifdef KSTRING_MAIN
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
174 #include <stdio.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
175 int main()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
176 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
177 kstring_t *s;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
178 int *fields, n, i;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
179 ks_tokaux_t aux;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
180 char *p;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
181 s = (kstring_t*)calloc(1, sizeof(kstring_t));
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
182 // test ksprintf()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
183 ksprintf(s, " abcdefg: %d ", 100);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
184 printf("'%s'\n", s->s);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
185 // test ksplit()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
186 fields = ksplit(s, 0, &n);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
187 for (i = 0; i < n; ++i)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
188 printf("field[%d] = '%s'\n", i, s->s + fields[i]);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
189 // test kstrtok()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
190 s->l = 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
191 for (p = kstrtok("ab:cde:fg/hij::k", ":/", &aux); p; p = kstrtok(0, 0, &aux)) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
192 kputsn(p, aux.p - p, s);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
193 kputc('\n', s);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
194 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
195 printf("%s", s->s);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
196 // free
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
197 free(s->s); free(s); free(fields);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
198
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
199 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
200 static char *str = "abcdefgcdgcagtcakcdcd";
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
201 static char *pat = "cd";
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
202 char *ret, *s = str;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
203 int *prep = 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
204 while ((ret = kstrstr(s, pat, &prep)) != 0) {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
205 printf("match: %s\n", ret);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
206 s = ret + prep[0];
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
207 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
208 free(prep);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
209 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
210 return 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
211 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
212 #endif