texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Sun, 20 Mar 2022 04:55:18 -0400 (EDT)

branch: master
commit 1f61b72beb542b0adb2f8ddbdfdeb7414688a154
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Oct 16 14:08:28 2019 +0100

    do not hard code path to index node and fix null deref in extension.c
---
 js/wkinfo/extension.c | 2 +-
 js/wkinfo/main.c      | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/js/wkinfo/extension.c b/js/wkinfo/extension.c
index 3e68b3789b..1d5539f3c5 100644
--- a/js/wkinfo/extension.c
+++ b/js/wkinfo/extension.c
@@ -193,7 +193,7 @@ find_indices (WebKitDOMHTMLCollection *links, gulong 
num_links)
       /* Look for links to index nodes in the main menu.
          This is not the best way to check for index nodes.  We should
          have <a rel="index"> on the links instead. */
-      if (href && !*rel && !*id
+      if (href && (!rel || !*rel) && (!id || !*id)
           && (strstr (href, "-Index.html")
               || strstr (href, "-index.html")
               || strstr (href, "/Index.html")))
diff --git a/js/wkinfo/main.c b/js/wkinfo/main.c
index 47a85ea468..1a2fd87be7 100644
--- a/js/wkinfo/main.c
+++ b/js/wkinfo/main.c
@@ -67,6 +67,8 @@ char *info_dir = 0;
 void
 load_indices (void)
 {
+  return;
+
   if (indices_loaded)
     return;
   indices_loaded = TRUE;
@@ -265,7 +267,6 @@ socket_cb (GSocket *socket,
           g_print ("NEW MANUAL %s\n", p + 1);
           clear_completions ();
 
-#if 0
           char *q = strchr (p + 1, '\n');
           if (!q)
             break;
@@ -279,7 +280,6 @@ socket_cb (GSocket *socket,
           g_string_append (s, "/index.html?top-node");
           webkit_web_view_load_uri (hiddenWebView, s->str);
           g_string_free (s, TRUE);
-#endif
         }
       else if (!strcmp (buffer, "index-nodes"))
         {
@@ -509,7 +509,10 @@ main(int argc, char* argv[])
     webkit_web_view_load_uri (webView, s->str);
     g_string_free (s, TRUE);
 
-    load_indices ();
+    // load_indices ();
+
+    /* Create a web view to parse index files.  */
+    hiddenWebView = WEBKIT_WEB_VIEW(webkit_web_view_new());
 
     main_loop = g_main_loop_new (NULL, FALSE);
     g_main_loop_run (main_loop);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]