devhelp r1151 - in trunk: . src
- From: rhult svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1151 - in trunk: . src
- Date: Mon, 6 Oct 2008 17:09:49 +0000 (UTC)
Author: rhult
Date: Mon Oct 6 17:09:49 2008
New Revision: 1151
URL: http://svn.gnome.org/viewvc/devhelp?rev=1151&view=rev
Log:
2008-10-06 Richard Hult <richard imendio com>
* src/dh-parser.c: (parser_start_node_keyword): Fix regression
introduced recently when parsing devhelp2 files by stripping away
struct/union/enum even for devhelp2 again.
Modified:
trunk/ChangeLog
trunk/src/dh-parser.c
Modified: trunk/src/dh-parser.c
==============================================================================
--- trunk/src/dh-parser.c (original)
+++ trunk/src/dh-parser.c Mon Oct 6 17:09:49 2008
@@ -317,19 +317,25 @@
tmp = NULL;
}
- /* We only get "keyword" from old gtk-doc files, try to fix up the
- * metadata as well as we can.
+ /* Strip out prefixing "struct", "union", "enum", to make searching
+ * easier. Also fix up the link type (only applies for old devhelp
+ * format).
*/
- if (link_type == DH_LINK_TYPE_KEYWORD) {
- if (g_str_has_prefix (name, "struct ")) {
- name = name + 7;
+ if (g_str_has_prefix (name, "struct ")) {
+ name = name + 7;
+ if (link_type == DH_LINK_TYPE_KEYWORD) {
link_type = DH_LINK_TYPE_STRUCT;
}
- else if (g_str_has_prefix (name, "union ")) {
- name = name + 6;
+ }
+ else if (g_str_has_prefix (name, "union ")) {
+ name = name + 6;
+ if (link_type == DH_LINK_TYPE_KEYWORD) {
+ link_type = DH_LINK_TYPE_STRUCT;
}
- else if (g_str_has_prefix (name, "enum ")) {
- name = name + 5;
+ }
+ else if (g_str_has_prefix (name, "enum ")) {
+ name = name + 5;
+ if (link_type == DH_LINK_TYPE_KEYWORD) {
link_type = DH_LINK_TYPE_ENUM;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]