[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Revert "Add switching from/to unfilled and change
From: |
Patrice Dumas |
Subject: |
branch master updated: Revert "Add switching from/to unfilled and change in indenting in Paragraph" |
Date: |
Mon, 24 Jul 2023 01:55:56 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 923aa5ed31 Revert "Add switching from/to unfilled and change in
indenting in Paragraph"
923aa5ed31 is described below
commit 923aa5ed31bef5955516d52f7fcc97cd83f59b8e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jul 24 07:54:44 2023 +0200
Revert "Add switching from/to unfilled and change in indenting in Paragraph"
This reverts commit 6c76fad2a04ca57318da065914a1d207cfe19a24.
Changing unfilled state is not sufficient to switch from unfilled
to paragraph and back.
---
ChangeLog | 12 +---------
tp/Texinfo/Convert/Paragraph.pm | 1 -
tp/Texinfo/Convert/ParagraphNonXS.pm | 22 ------------------
tp/Texinfo/XS/XSParagraph.xs | 44 +-----------------------------------
tp/Texinfo/XS/xspara.c | 21 -----------------
tp/Texinfo/XS/xspara.h | 2 --
tp/t/paragraph.t | 32 +-------------------------
7 files changed, 3 insertions(+), 131 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6b21b94ad7..f0cf7eec75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,3 @@
-2023-07-23 Patrice Dumas <pertusus@free.fr>
-
- Add switching from/to unfilled and change in indenting in Paragraph
-
- * tp/Texinfo/Convert/ParagraphNonXS.pm (set_unfilled_indent),
- tp/Texinfo/XS/XSParagraph.xs (xspara_set_unfilled_indent),
- tp/Texinfo/XS/xspara.c (xspara_set_unfilled_indent):
-
- * t/paragraph.t: test set_unfilled_indent.
-
2023-07-23 Gavin Smith <gavinsmith0123@gmail.com>
Fix parsetexi compilation errors
@@ -19,7 +9,7 @@
2023-07-23 Patrice Dumas <pertusus@free.fr>
- @nodedescription parsing in texi2any
+ @nodedescription parsing in texi1any
* tp/Texinfo/ParserNonXS.pm (%contain_full_text_commands)
(_handle_line_command), tp/Texinfo/XS/parsetexi/handle_commands.c
diff --git a/tp/Texinfo/Convert/Paragraph.pm b/tp/Texinfo/Convert/Paragraph.pm
index ed836be225..c5d5e0839c 100644
--- a/tp/Texinfo/Convert/Paragraph.pm
+++ b/tp/Texinfo/Convert/Paragraph.pm
@@ -39,7 +39,6 @@ sub import {
end_line
add_pending_word
get_pending
- set_unfilled_indent
);
my ($callpkg, $filename, $line) = caller(0);
diff --git a/tp/Texinfo/Convert/ParagraphNonXS.pm
b/tp/Texinfo/Convert/ParagraphNonXS.pm
index 4f7627b76b..1c074121c5 100644
--- a/tp/Texinfo/Convert/ParagraphNonXS.pm
+++ b/tp/Texinfo/Convert/ParagraphNonXS.pm
@@ -291,28 +291,6 @@ sub set_space_protection($$;$$$$)
}
}
-sub set_unfilled_indent($;$$$)
-{
- my $paragraph = shift;
- my $unfilled = shift;
- my $indent_length = shift;
- my $indent_length_next = shift;
-
- my $result = '';
-
- if (defined($unfilled)) {
- if (!$paragraph->{'unfilled'} and $unfilled) {
- $result .= _add_pending_word($paragraph, 1);
- }
- $paragraph->{'unfilled'} = $unfilled;
- }
- $paragraph->{'indent_length'} = $indent_length
- if defined($indent_length);
- $paragraph->{'indent_length_next'} = $indent_length_next
- if defined($indent_length_next);
- return $result;
-}
-
# Wrap $TEXT, returning the wrapped text, taking into account the current
state
# of $PARAGRAPH. Any end of sentence punctuation in $TEXT that should be
# allowed to end a sentence but which would otherwise be preceded by an
diff --git a/tp/Texinfo/XS/XSParagraph.xs b/tp/Texinfo/XS/XSParagraph.xs
index 763284ddf7..02f8875da8 100644
--- a/tp/Texinfo/XS/XSParagraph.xs
+++ b/tp/Texinfo/XS/XSParagraph.xs
@@ -228,7 +228,7 @@ xspara_allow_end_sentence (paragraph)
CODE:
xspara_set_state (paragraph);
xspara_allow_end_sentence ();
-
+
# Optional parameters are IGNORE_COLUMNS, KEEP_END_LINES, FRENCHSPACING,
# DOUBLE_WIDTH_NO_BREAK.
# Pass them to the C function as -1 if not given or undef.
@@ -282,45 +282,3 @@ xspara_set_space_protection (paragraph,
space_protection_in, ...)
(space_protection, ignore_columns, keep_end_lines,
french_spacing, double_width_no_break);
-SV *
-xspara_set_unfilled_indent (paragraph, ...)
- SV *paragraph
- PREINIT:
- int unfilled = -1;
- int indent_length = -1;
- int indent_length_next = -1;
- TEXT retval;
- SV *arg_in;
- CODE:
- /* Get optional arguments from stack. */
- items -= 1;
- if (items > 0)
- {
- items--;
- arg_in = ST(1);
- if (SvOK(arg_in))
- unfilled = (int)SvIV(arg_in);
- }
- if (items > 0)
- {
- items--;
- arg_in = ST(2);
- if (SvOK(arg_in))
- indent_length = (int)SvIV(arg_in);
- }
- if (items > 0)
- {
- items--;
- arg_in = ST(3);
- if (SvOK(arg_in))
- indent_length_next = (int)SvIV(arg_in);
- }
-
- xspara_set_state (paragraph);
- retval = xspara_set_unfilled_indent (unfilled, indent_length,
- indent_length_next);
-
- RETVAL = newSVpv (retval.text ? retval.text : "", retval.end);
- SvUTF8_on (RETVAL);
- OUTPUT:
- RETVAL
diff --git a/tp/Texinfo/XS/xspara.c b/tp/Texinfo/XS/xspara.c
index 2522ca866a..6832da328c 100644
--- a/tp/Texinfo/XS/xspara.c
+++ b/tp/Texinfo/XS/xspara.c
@@ -1061,25 +1061,4 @@ xspara_add_text (char *text, int len)
return result;
}
-TEXT
-xspara_set_unfilled_indent (int unfilled, int indent_length,
- int indent_length_next)
-{
- static TEXT result;
- text_reset (&result);
- if (unfilled != -1)
- {
- if (unfilled && !state.unfilled)
- xspara__add_pending_word (&result, 1);
- state.unfilled = unfilled;
- }
-
- if (indent_length != -1)
- state.indent_length = indent_length;
-
- if (indent_length_next != -1)
- state.indent_length_next = indent_length_next;
-
- return result;
-}
diff --git a/tp/Texinfo/XS/xspara.h b/tp/Texinfo/XS/xspara.h
index 9483b933e6..57520efb51 100644
--- a/tp/Texinfo/XS/xspara.h
+++ b/tp/Texinfo/XS/xspara.h
@@ -18,5 +18,3 @@ void xspara_allow_end_sentence (void);
void xspara_remove_end_sentence (void);
void xspara_add_end_sentence (int value);
int xspara_end_line_count (void);
-TEXT xspara_set_unfilled_indent (int unfilled, int indent_length,
- int indent_length_next);
diff --git a/tp/t/paragraph.t b/tp/t/paragraph.t
index 6f26eb0f9c..c89f17184c 100644
--- a/tp/t/paragraph.t
+++ b/tp/t/paragraph.t
@@ -7,7 +7,7 @@ use File::Basename;
use lib '.';
use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
-BEGIN { plan tests => 120 ; }
+BEGIN { plan tests => 119 ; }
use Texinfo::Convert::Paragraph;
@@ -689,34 +689,4 @@ $result .= add_text($line, " after");
$result .= Texinfo::Convert::Paragraph::end($line);
is ($result, "protected after", 'line 2 spaces after end space protection with
dot');
-$para = Texinfo::Convert::Paragraph->new();
-$result = '';
-$result .= add_text($para, 'As para');
-$result .= set_unfilled_indent($para, 1, 30, 60);
-$result .= add_text($para, "uuuuuuuuuuuuu uuu uu uu uuuuuuuuuu uu uu uuuuu\n");
-$result .= add_text($para, "ttttttttttttu ttu tt tt tttttttttt tt tt ttttu
tt\n");
-$result .= set_unfilled_indent($para, 0, 0, 20);
-$result .= add_text($para, 'Now the description which we make long to test
better if things are going our way');
-$result .= add_text($para, "\n");
-$result .= add_text($para, "and more text going on");
-$result .= set_unfilled_indent($para, 1, 0, 0);
-$result .= add_text($para, "mmmmmmmmmmmmmmmmmmmmmmm m m m mmmmmmmmmmmmmmmmmmm
m mmmmmmmmmmmmm");
-$result .= add_text($para, "\n");
-$result .= add_text($para, "* more text unfilled");
-$result .= add_text($para, "\n");
-$result .= Texinfo::Convert::Paragraph::end($para);
-
-is ($result, 'As para uuuuuuuuuuuuu uuu uu uu uuuuuuuuuu
uu uu
- uuuuu
- ttttttttttttu
- ttu tt tt
- tttttttttt
- tt tt ttttu
- tt
-Now the description which we make long to test better if things are
- going our way and more text going on
-mmmmmmmmmmmmmmmmmmmmmmm m m m mmmmmmmmmmmmmmmmmmm m mmmmmmmmmmmmm
-* more text unfilled
-', 'test set_unfilled_indent');
-
1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Revert "Add switching from/to unfilled and change in indenting in Paragraph",
Patrice Dumas <=