[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7596] revert last change
From: |
gavinsmith0123 |
Subject: |
[7596] revert last change |
Date: |
Sun, 1 Jan 2017 12:17:19 +0000 (UTC) |
Revision: 7596
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7596
Author: gavin
Date: 2017-01-01 12:17:19 +0000 (Sun, 01 Jan 2017)
Log Message:
-----------
revert last change
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/MiscXS/miscxs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-01-01 11:41:59 UTC (rev 7595)
+++ trunk/ChangeLog 2017-01-01 12:17:19 UTC (rev 7596)
@@ -1,8 +1,3 @@
-2017-01-01 Gavin Smith <address@hidden>
-
- * tp/Texinfo/MiscXS/miscxs.c (xs_merge_text): Use "memcmp" with
- length of string instead of "strcmp".
-
2016-12-31 Gavin Smith <address@hidden>
* tp/Texinfo/MiscXS/miscxs.c (xs_abort_empty_line)
Modified: trunk/tp/Texinfo/MiscXS/miscxs.c
===================================================================
--- trunk/tp/Texinfo/MiscXS/miscxs.c 2017-01-01 11:41:59 UTC (rev 7595)
+++ trunk/tp/Texinfo/MiscXS/miscxs.c 2017-01-01 12:17:19 UTC (rev 7596)
@@ -49,7 +49,6 @@
int contents_num;
HV *last_elt;
char *type;
- int type_len;
SV *existing_text_sv;
dTHX;
@@ -85,15 +84,15 @@
if (!svp)
return 0;
- type = SvPV (*svp, type_len);
+ type = SvPV_nolen (*svp);
if (!type)
return 0;
/* Must be one of these types to continue. */
- if (memcmp (type, "empty_line", type_len)
- && memcmp (type, "empty_line_after_command", type_len)
- && memcmp (type, "empty_spaces_before_argument", type_len)
- && memcmp (type, "empty_spaces_after_close_brace", type_len))
+ if (strcmp (type, "empty_line")
+ && strcmp (type, "empty_line_after_command")
+ && strcmp (type, "empty_spaces_before_argument")
+ && strcmp (type, "empty_spaces_after_close_brace"))
{
return 0;
}
@@ -184,7 +183,6 @@
else if (!strcmp (type, "empty_line"))
{
char *current_type;
- int len;
AV *context_stack;
SV *top_context_sv;
char *top_context;
@@ -194,15 +192,15 @@
if (!svp)
current_type = 0;
else
- current_type = SvPV (*svp, len);
+ current_type = SvPV_nolen (*svp);
/* "Types with paragraphs". Remove the type unless we are inside
one of these types. */
if (current_type
- && memcmp (current_type, "before_item", len)
- && memcmp (current_type, "text_root", len)
- && memcmp (current_type, "document_root", len)
- && memcmp (current_type, "brace_command_context", len))
+ && strcmp (current_type, "before_item")
+ && strcmp (current_type, "text_root")
+ && strcmp (current_type, "document_root")
+ && strcmp (current_type, "brace_command_context"))
goto delete_type;
/* Check the context stack. */
@@ -217,16 +215,16 @@
if (!svp)
goto delete_type; /* shouldn't happen */
top_context_sv = *svp;
- top_context = SvPV (top_context_sv, len);
+ top_context = SvPV_nolen (top_context_sv);
/* Change type to "empty_spaces_before_paragraph" unless we are in
one of these contexts. */
- if (memcmp (top_context, "math", len)
- && memcmp (top_context, "menu", len)
- && memcmp (top_context, "preformatted", len)
- && memcmp (top_context, "rawpreformatted", len)
- && memcmp (top_context, "def", len)
- && memcmp (top_context, "inlineraw", len))
+ if (strcmp (top_context, "math")
+ && strcmp (top_context, "menu")
+ && strcmp (top_context, "preformatted")
+ && strcmp (top_context, "rawpreformatted")
+ && strcmp (top_context, "def")
+ && strcmp (top_context, "inlineraw"))
{
hv_store (last_elt, "type", strlen ("type"),
newSVpv ("empty_spaces_before_paragraph", 0), 0);
@@ -300,20 +298,18 @@
{
HV *last_elt;
char *type = 0;
- int type_len;
last_elt = (HV *)
SvRV (*av_fetch (contents_array, contents_num - 1, 0));
svp = hv_fetch (last_elt, "type", strlen ("type"), 0);
if (svp)
- type = SvPV (*svp, type_len);
+ type = SvPV_nolen (*svp);
if (type
- && (!memcmp (type, "empty_line_after_command", type_len)
- || !memcmp (type, "empty_spaces_after_command", type_len)
- || !memcmp (type, "empty_spaces_before_argument", type_len)
- || !memcmp (type, "empty_spaces_after_close_brace",
- type_len)))
+ && (!strcmp (type, "empty_line_after_command")
+ || !strcmp (type, "empty_spaces_after_command")
+ || !strcmp (type, "empty_spaces_before_argument")
+ || !strcmp (type, "empty_spaces_after_close_brace")))
{
no_merge_with_following_text = 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7596] revert last change,
gavinsmith0123 <=