Rev 3403 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3403 | Rev 3535 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (c) 2008 Jakub Jermar |
2 | * Copyright (c) 2008 Jakub Jermar |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
8 | * |
8 | * |
9 | * - Redistributions of source code must retain the above copyright |
9 | * - Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
10 | * notice, this list of conditions and the following disclaimer. |
11 | * - Redistributions in binary form must reproduce the above copyright |
11 | * - Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the |
12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. |
13 | * documentation and/or other materials provided with the distribution. |
14 | * - The name of the author may not be used to endorse or promote products |
14 | * - The name of the author may not be used to endorse or promote products |
15 | * derived from this software without specific prior written permission. |
15 | * derived from this software without specific prior written permission. |
16 | * |
16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup libc |
29 | /** @addtogroup libc |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | 32 | ||
33 | /** |
33 | /** |
34 | * @file |
34 | * @file |
35 | * @brief |
35 | * @brief |
36 | */ |
36 | */ |
37 | 37 | ||
38 | #include <stdlib.h> |
38 | #include <stdlib.h> |
- | 39 | #include <vfs/canonify.h> |
|
39 | 40 | ||
40 | /** Token types used for tokenization of path. */ |
41 | /** Token types used for tokenization of path. */ |
41 | typedef enum { |
42 | typedef enum { |
42 | TK_INVALID, |
43 | TK_INVALID, |
43 | TK_SLASH, |
44 | TK_SLASH, |
44 | TK_DOT, |
45 | TK_DOT, |
45 | TK_DOTDOT, |
46 | TK_DOTDOT, |
46 | TK_COMP, |
47 | TK_COMP, |
47 | TK_NUL |
48 | TK_NUL |
48 | } tokval_t; |
49 | } tokval_t; |
49 | 50 | ||
50 | typedef struct { |
51 | typedef struct { |
51 | tokval_t kind; |
52 | tokval_t kind; |
52 | char *start; |
53 | char *start; |
53 | char *stop; |
54 | char *stop; |
54 | } token_t; |
55 | } token_t; |
55 | 56 | ||
56 | /** Fake up the TK_SLASH token. */ |
57 | /** Fake up the TK_SLASH token. */ |
57 | static token_t slash_token(char *start) |
58 | static token_t slash_token(char *start) |
58 | { |
59 | { |
59 | token_t ret; |
60 | token_t ret; |
60 | ret.kind = TK_SLASH; |
61 | ret.kind = TK_SLASH; |
61 | ret.start = start; |
62 | ret.start = start; |
62 | ret.stop = start; |
63 | ret.stop = start; |
63 | return ret; |
64 | return ret; |
64 | } |
65 | } |
65 | 66 | ||
66 | /** Given a token, return the next token. */ |
67 | /** Given a token, return the next token. */ |
67 | static token_t next_token(token_t *cur) |
68 | static token_t next_token(token_t *cur) |
68 | { |
69 | { |
69 | token_t ret; |
70 | token_t ret; |
70 | 71 | ||
71 | if (cur->stop[1] == '\0') { |
72 | if (cur->stop[1] == '\0') { |
72 | ret.kind = TK_NUL; |
73 | ret.kind = TK_NUL; |
73 | ret.start = cur->stop + 1; |
74 | ret.start = cur->stop + 1; |
74 | ret.stop = ret.start; |
75 | ret.stop = ret.start; |
75 | return ret; |
76 | return ret; |
76 | } |
77 | } |
77 | if (cur->stop[1] == '/') { |
78 | if (cur->stop[1] == '/') { |
78 | ret.kind = TK_SLASH; |
79 | ret.kind = TK_SLASH; |
79 | ret.start = cur->stop + 1; |
80 | ret.start = cur->stop + 1; |
80 | ret.stop = ret.start; |
81 | ret.stop = ret.start; |
81 | return ret; |
82 | return ret; |
82 | } |
83 | } |
83 | if (cur->stop[1] == '.' && (!cur->stop[2] || cur->stop[2] == '/')) { |
84 | if (cur->stop[1] == '.' && (!cur->stop[2] || cur->stop[2] == '/')) { |
84 | ret.kind = TK_DOT; |
85 | ret.kind = TK_DOT; |
85 | ret.start = cur->stop + 1; |
86 | ret.start = cur->stop + 1; |
86 | ret.stop = ret.start; |
87 | ret.stop = ret.start; |
87 | return ret; |
88 | return ret; |
88 | } |
89 | } |
89 | if (cur->stop[1] == '.' && cur->stop[2] == '.' && |
90 | if (cur->stop[1] == '.' && cur->stop[2] == '.' && |
90 | (!cur->stop[3] || cur->stop[3] == '/')) { |
91 | (!cur->stop[3] || cur->stop[3] == '/')) { |
91 | ret.kind = TK_DOTDOT; |
92 | ret.kind = TK_DOTDOT; |
92 | ret.start = cur->stop + 1; |
93 | ret.start = cur->stop + 1; |
93 | ret.stop = cur->stop + 2; |
94 | ret.stop = cur->stop + 2; |
94 | return ret; |
95 | return ret; |
95 | } |
96 | } |
96 | unsigned i; |
97 | unsigned i; |
97 | for (i = 1; cur->stop[i] && cur->stop[i] != '/'; i++) |
98 | for (i = 1; cur->stop[i] && cur->stop[i] != '/'; i++) |
98 | ; |
99 | ; |
99 | ret.kind = TK_COMP; |
100 | ret.kind = TK_COMP; |
100 | ret.start = &cur->stop[1]; |
101 | ret.start = &cur->stop[1]; |
101 | ret.stop = &cur->stop[i - 1]; |
102 | ret.stop = &cur->stop[i - 1]; |
102 | return ret; |
103 | return ret; |
103 | } |
104 | } |
104 | 105 | ||
105 | /** States used by canonify(). */ |
106 | /** States used by canonify(). */ |
106 | typedef enum { |
107 | typedef enum { |
107 | S_INI, |
108 | S_INI, |
108 | S_A, |
109 | S_A, |
109 | S_B, |
110 | S_B, |
110 | S_C, |
111 | S_C, |
111 | S_ACCEPT, |
112 | S_ACCEPT, |
112 | S_RESTART, |
113 | S_RESTART, |
113 | S_REJECT |
114 | S_REJECT |
114 | } state_t; |
115 | } state_t; |
115 | 116 | ||
116 | typedef struct { |
117 | typedef struct { |
117 | state_t s; |
118 | state_t s; |
118 | void (* f)(token_t *, token_t *, token_t *); |
119 | void (* f)(token_t *, token_t *, token_t *); |
119 | } change_state_t; |
120 | } change_state_t; |
120 | 121 | ||
121 | /* |
122 | /* |
122 | * Actions that can be performed when transitioning from one |
123 | * Actions that can be performed when transitioning from one |
123 | * state of canonify() to another. |
124 | * state of canonify() to another. |
124 | */ |
125 | */ |
125 | static void set_first_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
126 | static void set_first_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
126 | { |
127 | { |
127 | *tfsl = *t; |
128 | *tfsl = *t; |
128 | *tlcomp = *t; |
129 | *tlcomp = *t; |
129 | } |
130 | } |
130 | static void save_component(token_t *t, token_t *tfsl, token_t *tlcomp) |
131 | static void save_component(token_t *t, token_t *tfsl, token_t *tlcomp) |
131 | { |
132 | { |
132 | *tlcomp = *t; |
133 | *tlcomp = *t; |
133 | } |
134 | } |
134 | static void terminate_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
135 | static void terminate_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
135 | { |
136 | { |
136 | if (tfsl->stop[1]) /* avoid writing to a well-formatted path */ |
137 | if (tfsl->stop[1]) /* avoid writing to a well-formatted path */ |
137 | tfsl->stop[1] = '\0'; |
138 | tfsl->stop[1] = '\0'; |
138 | } |
139 | } |
139 | static void remove_trailing_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
140 | static void remove_trailing_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
140 | { |
141 | { |
141 | t->start[-1] = '\0'; |
142 | t->start[-1] = '\0'; |
142 | } |
143 | } |
143 | /** Eat the extra '/'.. |
144 | /** Eat the extra '/'.. |
144 | * |
145 | * |
145 | * @param t The current TK_SLASH token. |
146 | * @param t The current TK_SLASH token. |
146 | */ |
147 | */ |
147 | static void shift_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
148 | static void shift_slash(token_t *t, token_t *tfsl, token_t *tlcomp) |
148 | { |
149 | { |
149 | char *p = t->start; |
150 | char *p = t->start; |
150 | char *q = t->stop + 1; |
151 | char *q = t->stop + 1; |
151 | while ((*p++ = *q++)) |
152 | while ((*p++ = *q++)) |
152 | ; |
153 | ; |
153 | } |
154 | } |
154 | /** Eat the extra '.'. |
155 | /** Eat the extra '.'. |
155 | * |
156 | * |
156 | * @param t The current TK_DOT token. |
157 | * @param t The current TK_DOT token. |
157 | */ |
158 | */ |
158 | static void shift_dot(token_t *t, token_t *tfsl, token_t *tlcomp) |
159 | static void shift_dot(token_t *t, token_t *tfsl, token_t *tlcomp) |
159 | { |
160 | { |
160 | char *p = t->start; |
161 | char *p = t->start; |
161 | char *q = t->stop + 1; |
162 | char *q = t->stop + 1; |
162 | while ((*p++ = *q++)) |
163 | while ((*p++ = *q++)) |
163 | ; |
164 | ; |
164 | } |
165 | } |
165 | /** Collapse the TK_COMP TK_SLASH TK_DOTDOT pattern. |
166 | /** Collapse the TK_COMP TK_SLASH TK_DOTDOT pattern. |
166 | * |
167 | * |
167 | * @param t The current TK_DOTDOT token. |
168 | * @param t The current TK_DOTDOT token. |
168 | * @param tlcomp The last TK_COMP token. |
169 | * @param tlcomp The last TK_COMP token. |
169 | */ |
170 | */ |
170 | static void shift_dotdot(token_t *t, token_t *tfsl, token_t *tlcomp) |
171 | static void shift_dotdot(token_t *t, token_t *tfsl, token_t *tlcomp) |
171 | { |
172 | { |
172 | char *p = tlcomp->start; |
173 | char *p = tlcomp->start; |
173 | char *q = t->stop + 1; |
174 | char *q = t->stop + 1; |
174 | while ((*p++ = *q++)) |
175 | while ((*p++ = *q++)) |
175 | ; |
176 | ; |
176 | } |
177 | } |
177 | 178 | ||
178 | /** Transition function for canonify(). */ |
179 | /** Transition function for canonify(). */ |
179 | static change_state_t trans[4][6] = { |
180 | static change_state_t trans[4][6] = { |
180 | [S_INI] = { |
181 | [S_INI] = { |
181 | [TK_SLASH] = { |
182 | [TK_SLASH] = { |
182 | .s = S_A, |
183 | .s = S_A, |
183 | .f = set_first_slash, |
184 | .f = set_first_slash, |
184 | }, |
185 | }, |
185 | [TK_DOT] = { |
186 | [TK_DOT] = { |
186 | .s = S_REJECT, |
187 | .s = S_REJECT, |
187 | .f = NULL, |
188 | .f = NULL, |
188 | }, |
189 | }, |
189 | [TK_DOTDOT] = { |
190 | [TK_DOTDOT] = { |
190 | .s = S_REJECT, |
191 | .s = S_REJECT, |
191 | .f = NULL, |
192 | .f = NULL, |
192 | }, |
193 | }, |
193 | [TK_COMP] = { |
194 | [TK_COMP] = { |
194 | .s = S_REJECT, |
195 | .s = S_REJECT, |
195 | .f = NULL, |
196 | .f = NULL, |
196 | }, |
197 | }, |
197 | [TK_NUL] = { |
198 | [TK_NUL] = { |
198 | .s = S_REJECT, |
199 | .s = S_REJECT, |
199 | .f = NULL, |
200 | .f = NULL, |
200 | }, |
201 | }, |
201 | [TK_INVALID] = { |
202 | [TK_INVALID] = { |
202 | .s = S_REJECT, |
203 | .s = S_REJECT, |
203 | .f = NULL, |
204 | .f = NULL, |
204 | }, |
205 | }, |
205 | }, |
206 | }, |
206 | [S_A] = { |
207 | [S_A] = { |
207 | [TK_SLASH] = { |
208 | [TK_SLASH] = { |
208 | .s = S_A, |
209 | .s = S_A, |
209 | .f = set_first_slash, |
210 | .f = set_first_slash, |
210 | }, |
211 | }, |
211 | [TK_DOT] = { |
212 | [TK_DOT] = { |
212 | .s = S_A, |
213 | .s = S_A, |
213 | .f = NULL, |
214 | .f = NULL, |
214 | }, |
215 | }, |
215 | [TK_DOTDOT] = { |
216 | [TK_DOTDOT] = { |
216 | .s = S_A, |
217 | .s = S_A, |
217 | .f = NULL, |
218 | .f = NULL, |
218 | }, |
219 | }, |
219 | [TK_COMP] = { |
220 | [TK_COMP] = { |
220 | .s = S_B, |
221 | .s = S_B, |
221 | .f = save_component, |
222 | .f = save_component, |
222 | }, |
223 | }, |
223 | [TK_NUL] = { |
224 | [TK_NUL] = { |
224 | .s = S_ACCEPT, |
225 | .s = S_ACCEPT, |
225 | .f = terminate_slash, |
226 | .f = terminate_slash, |
226 | }, |
227 | }, |
227 | [TK_INVALID] = { |
228 | [TK_INVALID] = { |
228 | .s = S_REJECT, |
229 | .s = S_REJECT, |
229 | .f = NULL, |
230 | .f = NULL, |
230 | }, |
231 | }, |
231 | }, |
232 | }, |
232 | [S_B] = { |
233 | [S_B] = { |
233 | [TK_SLASH] = { |
234 | [TK_SLASH] = { |
234 | .s = S_C, |
235 | .s = S_C, |
235 | .f = NULL, |
236 | .f = NULL, |
236 | }, |
237 | }, |
237 | [TK_DOT] = { |
238 | [TK_DOT] = { |
238 | .s = S_REJECT, |
239 | .s = S_REJECT, |
239 | .f = NULL, |
240 | .f = NULL, |
240 | }, |
241 | }, |
241 | [TK_DOTDOT] = { |
242 | [TK_DOTDOT] = { |
242 | .s = S_REJECT, |
243 | .s = S_REJECT, |
243 | .f = NULL, |
244 | .f = NULL, |
244 | }, |
245 | }, |
245 | [TK_COMP] = { |
246 | [TK_COMP] = { |
246 | .s = S_REJECT, |
247 | .s = S_REJECT, |
247 | .f = NULL, |
248 | .f = NULL, |
248 | }, |
249 | }, |
249 | [TK_NUL] = { |
250 | [TK_NUL] = { |
250 | .s = S_ACCEPT, |
251 | .s = S_ACCEPT, |
251 | .f = NULL, |
252 | .f = NULL, |
252 | }, |
253 | }, |
253 | [TK_INVALID] = { |
254 | [TK_INVALID] = { |
254 | .s = S_REJECT, |
255 | .s = S_REJECT, |
255 | .f = NULL, |
256 | .f = NULL, |
256 | }, |
257 | }, |
257 | }, |
258 | }, |
258 | [S_C] = { |
259 | [S_C] = { |
259 | [TK_SLASH] = { |
260 | [TK_SLASH] = { |
260 | .s = S_RESTART, |
261 | .s = S_RESTART, |
261 | .f = shift_slash, |
262 | .f = shift_slash, |
262 | }, |
263 | }, |
263 | [TK_DOT] = { |
264 | [TK_DOT] = { |
264 | .s = S_RESTART, |
265 | .s = S_RESTART, |
265 | .f = shift_dot, |
266 | .f = shift_dot, |
266 | }, |
267 | }, |
267 | [TK_DOTDOT] = { |
268 | [TK_DOTDOT] = { |
268 | .s = S_RESTART, |
269 | .s = S_RESTART, |
269 | .f = shift_dotdot, |
270 | .f = shift_dotdot, |
270 | }, |
271 | }, |
271 | [TK_COMP] = { |
272 | [TK_COMP] = { |
272 | .s = S_B, |
273 | .s = S_B, |
273 | .f = save_component, |
274 | .f = save_component, |
274 | }, |
275 | }, |
275 | [TK_NUL] = { |
276 | [TK_NUL] = { |
276 | .s = S_ACCEPT, |
277 | .s = S_ACCEPT, |
277 | .f = remove_trailing_slash, |
278 | .f = remove_trailing_slash, |
278 | }, |
279 | }, |
279 | [TK_INVALID] = { |
280 | [TK_INVALID] = { |
280 | .s = S_REJECT, |
281 | .s = S_REJECT, |
281 | .f = NULL, |
282 | .f = NULL, |
282 | }, |
283 | }, |
283 | } |
284 | } |
284 | }; |
285 | }; |
285 | 286 | ||
286 | /** Canonify a file system path. |
287 | /** Canonify a file system path. |
287 | * |
288 | * |
288 | * A file system path is canonical, if the following holds: |
289 | * A file system path is canonical, if the following holds: |
289 | * 1) the path is absolute (i.e. a/b/c is not canonical) |
290 | * 1) the path is absolute (i.e. a/b/c is not canonical) |
290 | * 2) there is no trailing slash in the path (i.e. /a/b/c is not canonical) |
291 | * 2) there is no trailing slash in the path (i.e. /a/b/c is not canonical) |
291 | * 3) there is no extra slash in the path (i.e. /a//b/c is not canonical) |
292 | * 3) there is no extra slash in the path (i.e. /a//b/c is not canonical) |
292 | * 4) there is no '.' component in the path (i.e. /a/./b/c is not canonical) |
293 | * 4) there is no '.' component in the path (i.e. /a/./b/c is not canonical) |
293 | * 5) there is no '..' component in the path (i.e. /a/b/../c is not canonical) |
294 | * 5) there is no '..' component in the path (i.e. /a/b/../c is not canonical) |
294 | * |
295 | * |
295 | * This function makes a potentially non-canonical file system path canonical. |
296 | * This function makes a potentially non-canonical file system path canonical. |
296 | * It works in-place and requires a NULL-terminated input string. |
297 | * It works in-place and requires a NULL-terminated input string. |
297 | * |
298 | * |
298 | * @param path Path to be canonified. |
299 | * @param path Path to be canonified. |
299 | * @param lenp Pointer where the length of the final path will be |
300 | * @param lenp Pointer where the length of the final path will be |
300 | * stored. Can be NULL. |
301 | * stored. Can be NULL. |
301 | * |
302 | * |
302 | * @return Canonified path or NULL on failure. |
303 | * @return Canonified path or NULL on failure. |
303 | */ |
304 | */ |
304 | char *canonify(char *path, size_t *lenp) |
305 | char *canonify(char *path, size_t *lenp) |
305 | { |
306 | { |
306 | state_t state; |
307 | state_t state; |
307 | token_t t; |
308 | token_t t; |
308 | token_t tfsl; /* first slash */ |
309 | token_t tfsl; /* first slash */ |
309 | token_t tlcomp; /* last component */ |
310 | token_t tlcomp; /* last component */ |
310 | if (*path != '/') |
311 | if (*path != '/') |
311 | return NULL; |
312 | return NULL; |
312 | tfsl = slash_token(path); |
313 | tfsl = slash_token(path); |
313 | restart: |
314 | restart: |
314 | state = S_INI; |
315 | state = S_INI; |
315 | t = tfsl; |
316 | t = tfsl; |
316 | tlcomp = tfsl; |
317 | tlcomp = tfsl; |
317 | while (state != S_ACCEPT && state != S_RESTART && state != S_REJECT) { |
318 | while (state != S_ACCEPT && state != S_RESTART && state != S_REJECT) { |
318 | if (trans[state][t.kind].f) |
319 | if (trans[state][t.kind].f) |
319 | trans[state][t.kind].f(&t, &tfsl, &tlcomp); |
320 | trans[state][t.kind].f(&t, &tfsl, &tlcomp); |
320 | state = trans[state][t.kind].s; |
321 | state = trans[state][t.kind].s; |
321 | t = next_token(&t); |
322 | t = next_token(&t); |
322 | } |
323 | } |
323 | 324 | ||
324 | switch (state) { |
325 | switch (state) { |
325 | case S_RESTART: |
326 | case S_RESTART: |
326 | goto restart; |
327 | goto restart; |
327 | case S_REJECT: |
328 | case S_REJECT: |
328 | return NULL; |
329 | return NULL; |
329 | case S_ACCEPT: |
330 | case S_ACCEPT: |
330 | if (lenp) |
331 | if (lenp) |
331 | *lenp = (size_t)((tlcomp.stop - tfsl.start) + 1); |
332 | *lenp = (size_t)((tlcomp.stop - tfsl.start) + 1); |
332 | return tfsl.start; |
333 | return tfsl.start; |
333 | default: |
334 | default: |
334 | abort(); |
335 | abort(); |
335 | } |
336 | } |
336 | } |
337 | } |
337 | 338 | ||
338 | /** |
339 | /** |
339 | * @} |
340 | * @} |
340 | */ |
341 | */ |
341 | 342 |