comparison src/mb_types.h @ 11:128af06c876c

Fix the bug that data of a path end with white spaces would make system down
author Thinker K.F. Li <thinker@branda.to>
date Sat, 26 Jul 2008 06:34:15 +0800
parents 7cfecdce94cc
children 79e9edf4c00a
comparison
equal deleted inserted replaced
10:7cfecdce94cc 11:128af06c876c
1 #ifndef __MB_TYPES_H_ 1 #ifndef __MB_TYPES_H_
2 #define __MB_TYPES_H_ 2 #define __MB_TYPES_H_
3 3
4 typedef float co_aix; 4 typedef float co_aix;
5 typedef struct _shape shape_t;
5 6
6 /*! \brief A coordination system. 7 /*! \brief A coordination system.
7 * 8 *
8 * It have a transform function defined by matrix to transform 9 * It have a transform function defined by matrix to transform
9 * coordination from source space to target space. 10 * coordination from source space to target space.
15 int seq; 16 int seq;
16 co_aix matrix[6]; 17 co_aix matrix[6];
17 co_aix aggr_matrix[6]; 18 co_aix aggr_matrix[6];
18 struct _coord *parent; 19 struct _coord *parent;
19 struct _coord *children, *sibling; 20 struct _coord *children, *sibling;
21 shape_t *members;
20 } coord_t; 22 } coord_t;
21 23
22 24
23 typedef struct _geo geo_t; 25 typedef struct _geo geo_t;
24 typedef struct _shape { 26 struct _shape {
25 int sh_type; 27 int sh_type;
26 geo_t *geo; 28 geo_t *geo;
27 } shape_t; 29 struct _shape *sibling;
30 };
28 31
29 enum { SHT_UNKNOW, SHT_PATH, SHT_TEXT }; 32 enum { SHT_UNKNOW, SHT_PATH, SHT_TEXT };
30 33
31 extern void coord_init(coord_t *co, coord_t *parent); 34 extern void coord_init(coord_t *co, coord_t *parent);
32 extern void coord_trans_pos(coord_t *co, co_aix *x, co_aix *y); 35 extern void coord_trans_pos(coord_t *co, co_aix *x, co_aix *y);