Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line 35... Line 35...
35
#ifndef STR_OPS_H_INCLUDED
35
#ifndef STR_OPS_H_INCLUDED
36
#define STR_OPS_H_INCLUDED
36
#define STR_OPS_H_INCLUDED
37
 
37
 
38
/* Operations for union STRING */
38
/* Operations for union STRING */
39
 
39
 
40
#define TAG_str( P )			( ( unsigned ) 0 )
40
#define TAG_str(P)			((unsigned) 0)
41
 
41
 
42
 
42
 
43
/* Operations for component next of union STRING */
43
/* Operations for component next of union STRING */
44
 
44
 
45
#define str_next( P )			( CHECK_NULL ( P ) + 0 )
45
#define str_next(P)			(CHECK_NULL(P) + 0)
46
 
46
 
47
 
47
 
48
/* Operations for field simple of union STRING */
48
/* Operations for field simple of union STRING */
49
 
49
 
50
#define str_simple_tag			( ( unsigned ) 0 )
50
#define str_simple_tag			((unsigned)0)
51
#define IS_str_simple( P )		1
51
#define IS_str_simple(P)		1
52
 
52
 
53
#define str_simple_len( P )		( ( P ) + 1 )
53
#define str_simple_len(P)		((P) + 1)
54
#define str_simple_text( P )		( ( P ) + 2 )
54
#define str_simple_text(P)		((P) + 2)
55
#define str_simple_kind( P )		( ( P ) + 3 )
55
#define str_simple_kind(P)		((P) + 3)
56
#define str_simple_tok( P )		( ( P ) + 4 )
56
#define str_simple_tok(P)		((P) + 4)
57
 
57
 
58
#define MAKE_str_simple( len_, text_, kind_, c_class_str )\
58
#define MAKE_str_simple(len_, text_, kind_, c_class_str)\
59
    {\
59
    {\
60
	c_class *x483_ = GEN_c_class ( 5, TYPEID_str ) ;\
60
	c_class *x483_ = GEN_c_class(5, TYPEID_str);\
61
	COPY_str ( x483_ + 0, NULL_str ) ;\
61
	COPY_str(x483_ + 0, NULL_str);\
62
	COPY_ulong ( x483_ + 1, ( len_ ) ) ;\
62
	COPY_ulong(x483_ + 1, (len_));\
63
	COPY_string ( x483_ + 2, ( text_ ) ) ;\
63
	COPY_string(x483_ + 2, (text_));\
64
	COPY_unsigned ( x483_ + 3, ( kind_ ) ) ;\
64
	COPY_unsigned(x483_ + 3, (kind_));\
65
	COPY_ulong ( x483_ + 4, LINK_NONE ) ;\
65
	COPY_ulong(x483_ + 4, LINK_NONE);\
66
	( c_class_str ) = x483_ ;\
66
	(c_class_str) = x483_;\
67
    }
67
    }
68
 
68
 
69
#define DECONS_str_simple( next_, len_, text_, kind_, tok_, c_class_str )\
69
#define DECONS_str_simple(next_, len_, text_, kind_, tok_, c_class_str)\
70
    {\
70
    {\
71
	c_class *x484_ = ( c_class_str ) ;\
71
	c_class *x484_ = (c_class_str);\
72
	( next_ ) = DEREF_str ( x484_ + 0 ) ;\
72
	(next_) = DEREF_str(x484_ + 0);\
73
	( len_ ) = DEREF_ulong ( x484_ + 1 ) ;\
73
	(len_) = DEREF_ulong(x484_ + 1);\
74
	( text_ ) = DEREF_string ( x484_ + 2 ) ;\
74
	(text_) = DEREF_string(x484_ + 2);\
75
	( kind_ ) = DEREF_unsigned ( x484_ + 3 ) ;\
75
	(kind_) = DEREF_unsigned(x484_ + 3);\
76
	( tok_ ) = DEREF_ulong ( x484_ + 4 ) ;\
76
	(tok_) = DEREF_ulong(x484_ + 4);\
77
    }
77
    }
78
 
78
 
79
#define DESTROY_str_simple( destroyer_, next_, len_, text_, kind_, tok_, c_class_str )\
79
#define DESTROY_str_simple(destroyer_, next_, len_, text_, kind_, tok_, c_class_str)\
80
    {\
80
    {\
81
	c_class *x485_ = ( c_class_str ) ;\
81
	c_class *x485_ = (c_class_str);\
82
	( next_ ) = DEREF_str ( x485_ + 0 ) ;\
82
	(next_) = DEREF_str(x485_ + 0);\
83
	( len_ ) = DEREF_ulong ( x485_ + 1 ) ;\
83
	(len_) = DEREF_ulong(x485_ + 1);\
84
	( text_ ) = DEREF_string ( x485_ + 2 ) ;\
84
	(text_) = DEREF_string(x485_ + 2);\
85
	( kind_ ) = DEREF_unsigned ( x485_ + 3 ) ;\
85
	(kind_) = DEREF_unsigned(x485_ + 3);\
86
	( tok_ ) = DEREF_ulong ( x485_ + 4 ) ;\
86
	(tok_) = DEREF_ulong(x485_ + 4);\
87
	( destroyer_ ) ( x485_, ( unsigned ) 5 ) ;\
87
	(destroyer_)(x485_, (unsigned)5);\
88
    }
88
    }
89
 
89
 
90
 
90
 
91
#endif
91
#endif