109 elements[n++] = elem; |
109 elements[n++] = elem; |
110 |
110 |
111 if (NULL == elem) return; |
111 if (NULL == elem) return; |
112 |
112 |
113 /* adjust the location parameters, taking into account the new element. */ |
113 /* adjust the location parameters, taking into account the new element. */ |
114 if ((first_line == elem->first_line) && |
114 if (NULL == first_file) { |
115 (first_column > elem->first_column)) { |
115 first_file = elem->first_file; |
|
116 first_line = elem->first_line; |
|
117 first_column = elem->first_column; |
|
118 } |
|
119 if ((first_line == elem->first_line) && (first_column > elem->first_column)) { |
116 first_column = elem->first_column; |
120 first_column = elem->first_column; |
117 } |
121 } |
118 if (first_line > elem->first_line) { |
122 if (first_line > elem->first_line) { |
119 first_line = elem->first_line; |
123 first_line = elem->first_line; |
120 first_column = elem->first_column; |
124 first_column = elem->first_column; |
|
125 } |
|
126 if (NULL == last_file) { |
|
127 last_file = elem->last_file; |
|
128 last_line = elem->last_line; |
|
129 last_column = elem->last_column; |
121 } |
130 } |
122 if ((last_line == elem->last_line) && |
131 if ((last_line == elem->last_line) && |
123 (last_column < elem->last_column)) { |
132 (last_column < elem->last_column)) { |
124 last_column = elem->last_column; |
133 last_column = elem->last_column; |
125 } |
134 } |