texinfo-commits
[Top][All Lists]
Advanced

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

[5568] handle_tag removed


From: Gavin D. Smith
Subject: [5568] handle_tag removed
Date: Sat, 17 May 2014 20:58:37 +0000

Revision: 5568
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5568
Author:   gavin
Date:     2014-05-17 20:58:36 +0000 (Sat, 17 May 2014)
Log Message:
-----------
handle_tag removed

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/info-utils.c
    trunk/info/info-utils.h
    trunk/info/tag.c
    trunk/info/tag.h
    trunk/info/window.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-05-17 19:53:53 UTC (rev 5567)
+++ trunk/ChangeLog     2014-05-17 20:58:36 UTC (rev 5568)
@@ -1,5 +1,12 @@
 2014-05-17  Gavin Smith  <address@hidden>
 
+       * info/window.c (info_tag)
+       * info/info-utils.c (printed_representation): do_tags argument
+       removed.
+       * info/tag.c (handle_tag): Removed.
+
+2014-05-17  Gavin Smith  <address@hidden>
+
        * info/window.c (process_node_text): Don't split printed
        representations like "^X" across lines.
 

Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c     2014-05-17 19:53:53 UTC (rev 5567)
+++ trunk/info/info-utils.c     2014-05-17 20:58:36 UTC (rev 5568)
@@ -471,16 +471,14 @@
 
 /* Return pointer to string that is the printed representation of character
    (or other logical unit) at ITER if it were printed at screen column
-   PL_CHARS.  Update mb_len (mbi_cur (*ITER)) if byte length is different.  If
-   ITER points at a tag, process tag if DO_TAGS is non-zero.  If ITER points at
-   an end-of-line character, set *DELIM to this character.  *PCHARS gets the
-   number of screen columns taken up by outputting the return value, and
-   *PBYTES the number of bytes in returned string.  Return value is not
-   null-terminated.  Return value must not be called by caller. */
-
+   PL_CHARS.  Update mb_len (mbi_cur (*ITER)) if byte length is different.
+   If ITER points at an end-of-line character, set *DELIM to this character.
+   *PCHARS gets the number of screen columns taken up by outputting the return
+   value, and *PBYTES the number of bytes in returned string.  Return value is
+   not null-terminated.  Return value must not be freed by caller. */
 char *
-printed_representation (mbi_iterator_t *iter, int do_tags, int *delim,
-                        size_t pl_chars, size_t *pchars, size_t *pbytes) 
+printed_representation (mbi_iterator_t *iter, int *delim, size_t pl_chars,
+                        size_t *pchars, size_t *pbytes) 
 {
   int printable_limit = ISO_Latin_p ? 255 : 127;
   struct text_buffer *rep = &printed_rep;
@@ -514,7 +512,7 @@
 
           return cur_ptr;
         }
-      else if (info_tag (*iter, do_tags, &cur_len))
+      else if (info_tag (*iter, &cur_len))
         {
           *pchars = 0; 
           *pbytes = cur_len;

Modified: trunk/info/info-utils.h
===================================================================
--- trunk/info/info-utils.h     2014-05-17 19:53:53 UTC (rev 5567)
+++ trunk/info/info-utils.h     2014-05-17 20:58:36 UTC (rev 5568)
@@ -98,10 +98,9 @@
 
 /* Return a pointer to a string which is the printed representation
    of CHARACTER if it were printed at HPOS. */
-extern char *printed_representation (mbi_iterator_t *iter, int do_tags,
-                          int *delim,
-                          size_t pl_chars,
-                          size_t *pchars, size_t *pbytes);
+extern char *printed_representation (mbi_iterator_t *iter,
+                                     int *delim, size_t pl_chars,
+                                     size_t *pchars, size_t *pbytes);
 
 /* Return a pointer to the part of PATHNAME that simply defines the file. */
 extern char *filename_non_directory (char *pathname);

Modified: trunk/info/tag.c
===================================================================
--- trunk/info/tag.c    2014-05-17 19:53:53 UTC (rev 5567)
+++ trunk/info/tag.c    2014-05-17 20:58:36 UTC (rev 5568)
@@ -240,9 +240,3 @@
     }
   return 0;
 }
-  
-void
-handle_tag (char *tag)
-{
-  /* Nothing so far */
-}

Modified: trunk/info/tag.h
===================================================================
--- trunk/info/tag.h    2014-05-17 19:53:53 UTC (rev 5567)
+++ trunk/info/tag.h    2014-05-17 20:58:36 UTC (rev 5568)
@@ -19,7 +19,6 @@
 #ifndef TAG_H
 #define TAG_H
 
-int tags_expand (char *input, long inputlen, char **pbuf, long *pbuflen);
-void handle_tag (char *tag);
+int tag_expand (char **input, struct text_buffer *outbuf, int *is_index);
 
 #endif

Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2014-05-17 19:53:53 UTC (rev 5567)
+++ trunk/info/window.c 2014-05-17 20:58:36 UTC (rev 5568)
@@ -1380,14 +1380,11 @@
 }
 
 
-/* If ITER points to an info tag, process it, set PLEN to its
-   length in bytes, and return 1.
-   Otherwise, return 0.
-
-   Collected tag is processed if HANDLE!=0.
+/* If ITER points to an info tag, set PLEN to its length in bytes and
+   return 1.  Otherwise, return 0.
 */
 int
-info_tag (mbi_iterator_t iter, int handle, size_t *plen)
+info_tag (mbi_iterator_t iter, size_t *plen)
 {
   if (*mbi_cur_ptr (iter) == '\0' && mbi_avail (iter))
     {
@@ -1403,17 +1400,7 @@
              end = memmem (ptr, ITER_LIMIT (iter), "\0\b]", 3);
              if (end)
                {
-                 size_t len = end - ptr;
-
-                 if (handle)
-                   {
-                     char *elt = xmalloc (len + 1);
-                     memcpy (elt, ptr, len);
-                     elt[len] = 0;
-                     handle_tag (elt);
-                     free (elt);
-                   }
-                 *plen = len + 6;
+                 *plen = end - ptr + 6;
                  return 1;
                }
            }
@@ -1443,14 +1430,11 @@
    If FUN returns non zero, process_node_text stops processing and returns
    immediately.
 
-   If DO_TAGS is not zero, process info tags, otherwise ignore them.
-
    Return value: number of lines processed.
 */
    
 size_t
 process_node_text (WINDOW *win, char *start,
-                  int do_tags,
                   int (*fun) (WINDOW *, size_t, size_t,
                               size_t, char *, size_t, size_t))
 {
@@ -1481,7 +1465,7 @@
       int delim = 0;
       int finish;
 
-      cur_ptr = printed_representation (&iter, do_tags, &delim,
+      cur_ptr = printed_representation (&iter, &delim,
                                         pl_chars, &pchars, &pbytes);
 
       /* Ensure there is enough space in the buffer */
@@ -1662,8 +1646,8 @@
       if (cur_ptr >= endp)
        break;
       
-      printed_representation (&iter, 0, &delim,
-                              win->line_map.used, &pchars, &pbytes);
+      printed_representation (&iter, &delim, win->line_map.used,
+                              &pchars, &pbytes);
 
       if (fun)
        fun (closure, cur_ptr - win->node->contents, pchars);




reply via email to

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