66
77/* static function prototypes */
88static Text_T strip (Text_T * txt );
9- static Attr_rep_T attribute (Text_T * tag );
10- static char * attribute_name (Text_T * tag );
11- static char * attribute_value (Text_T * tag );
9+ static Attr_rep_T attribute (Text_T * tag_chunk );
10+ static char * attribute_name (Text_T * tag_chunk );
11+ static char * attribute_value (Text_T * tag_chunk );
1212
13- Attr_list_T attribute_reader (Text_T * tag )
13+ Attr_list_T Attribute_reader (Text_T * tag_chunk )
1414{
1515 Attr_list_T attr_list ;
1616
1717 Fmt_register ('T' , Text_fmt );
1818
1919 attr_list = Attr_list_list ();
20- while (tag -> len > 0 )
21- attr_list = Attr_list_enqueue (attr_list , attribute (tag ));
20+ while (tag_chunk -> len > 0 )
21+ attr_list = Attr_list_enqueue (attr_list , attribute (tag_chunk ));
2222
2323 return attr_list ;
2424}
2525
26- static Attr_rep_T attribute (Text_T * tag )
26+ static Attr_rep_T attribute (Text_T * tag_chunk )
2727{
2828 char * name , * value ;
2929 Attr_rep_T new ;
3030
31- name = attribute_name (tag );
32- value = attribute_value (tag );
31+ name = attribute_name (tag_chunk );
32+ value = attribute_value (tag_chunk );
3333
3434 new = Attr_rep_new (name , value );
3535
@@ -39,44 +39,45 @@ static Attr_rep_T attribute(Text_T *tag)
3939 return new ;
4040}
4141
42- static char * attribute_name (Text_T * tag )
42+ static char * attribute_name (Text_T * tag_chunk )
4343{
4444 int end ;
4545 Text_T name ;
4646
47- end = Text_chr (* tag , 1 , 0 , '=' );
48- name = Text_sub (* tag , 1 , end );
47+ end = Text_chr (* tag_chunk , 1 , 0 , '=' );
48+ name = Text_sub (* tag_chunk , 1 , end );
4949
5050 strip (& name );
5151
52- /* progress tag */
53- * tag = Text_sub (* tag , end + 1 , 0 );
52+ /* progress tag_chunk */
53+ * tag_chunk = Text_sub (* tag_chunk , end + 1 , 0 );
5454
5555 return Text_get (NULL , -1 , name );
5656}
5757
58- static char * attribute_value (Text_T * tag )
58+ static char * attribute_value (Text_T * tag_chunk )
5959{
6060 int start , end ;
6161 Text_T value ;
6262
63- start = Text_upto (* tag , 1 , 0 , Text_nonwhite );
63+ start = Text_upto (* tag_chunk , 1 , 0 , Text_nonwhite );
6464
6565 /* Is the value enclosed by quotes? */
66- if (Text_chr (* tag , start , start + 1 , '"' )) {
66+ if (Text_chr (* tag_chunk , start , start + 1 , '"' )) {
6767 start ++ ;
68- end = Text_chr (* tag , start + 1 , 0 , '"' );
68+ end = Text_chr (* tag_chunk , start + 1 , 0 , '"' );
6969 } else {
70- end = Text_chr (* tag , start , 0 , ' ' );
70+ end = Text_chr (* tag_chunk , start , 0 , ' ' );
7171 }
7272
73- value = Text_sub (* tag , start , end );
73+ value = Text_sub (* tag_chunk , start , end );
7474
75- /* progress tag */
75+ /* progress tag_chunk */
7676 if (end == 0 )
77- * tag = Text_sub (* tag , 0 , 0 );
77+ * tag_chunk = Text_sub (* tag_chunk , 0 , 0 );
7878 else
79- * tag = Text_sub (* tag , Text_upto (* tag , end + 1 , 0 , Text_nonwhite ), 0 );
79+ * tag_chunk = Text_sub (* tag_chunk , Text_upto (* tag_chunk , end + 1 , 0 ,
80+ Text_nonwhite ), 0 );
8081
8182 return Text_get (NULL , -1 , value );
8283}
0 commit comments