Lines Matching refs:comments
54 /* trim C++ style comments */
88 /* print line with LZ4LIB_API removed and C++ comments not bold */
109 vector<string> input, lines, comments, chapters;
153 /* comments of type / * * < and / * ! < are detected, and only function declaration is highlighted (bold) */
177 comments = get_lines(input, linenum, "*/");
178 if (!comments.empty()) comments[0] = line.substr(spos+3);
179 if (!comments.empty())
180 comments[comments.size()-1] = comments[comments.size()-1].substr(0, comments[comments.size()-1].find("*/"));
181 for (l=0; l<comments.size(); l++) {
182 if (comments[l].compare(0, 2, " *") == 0)
183 comments[l] = comments[l].substr(2);
184 else if (comments[l].compare(0, 3, " *") == 0)
185 comments[l] = comments[l].substr(3);
186 trim(comments[l], "*-=");
188 while (!comments.empty() && comments[comments.size()-1].empty()) comments.pop_back(); // remove empty line at the end
189 while (!comments.empty() && comments[0].empty()) comments.erase(comments.begin()); // remove empty line at the start
191 /* comments of type / * ! mean: this is a function declaration; switch comments with declarations */
193 if (!comments.empty()) comments.erase(comments.begin()); /* remove first line like "LZ4_XXX() :" */
202 for (l=0; l<comments.size(); l++) {
203 print_line(sout, comments[l]);
206 } else if (exclam == '=') { /* comments of type / * = and / * * = mean: use a <H3> header and show also all functions until first empty line */
207 trim(comments[0], " ");
208 sout << "<h3>" << comments[0] << "</h3><pre>";
209 for (l=1; l<comments.size(); l++) {
210 print_line(sout, comments[l]);
218 } else { /* comments of type / * * and / * - mean: this is a comment; use a <H2> header for the first line */
219 if (comments.empty()) continue;
221 trim(comments[0], " ");
222 sout << "<a name=\"Chapter" << chapter << "\"></a><h2>" << comments[0] << "</h2><pre>";
223 chapters.push_back(comments[0]);
226 for (l=1; l<comments.size(); l++) {
227 print_line(sout, comments[l]);
229 if (comments.size() > 1)