[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portability of libtextstyle
From: |
Akim Demaille |
Subject: |
Re: Portability of libtextstyle |
Date: |
Mon, 27 Jul 2020 07:43:42 +0200 |
Hi Bruno,
> Le 27 juil. 2020 à 03:17, Bruno Haible <bruno@clisp.org> a écrit :
>
> Hi Akim,
>
> I wrote:
>> I propose that I make a gettext release ASAP (today?), that includes the new
>> libtextstyle API, then you can refer all users to gettext-0.21.
>
> I released gettext-0.21 now. You can tell your users that it is a
> prerequisite for proper styling support of bison-3.7.
Wow... Thanks a lot for the effort! I appreciate that.
Here's my proposal to update the check for libtextstyle.
Cheers!
commit 76c00e218869dab03ec4a1f503495e0d729d0b97
Author: Akim Demaille <akim.demaille@gmail.com>
Date: Sun Jul 26 18:00:10 2020 +0200
libtextstyle: check the API of the latest release
* m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Require ostream_printf and
styled_ostream_get_hyperlink_ref.
diff --git a/ChangeLog b/ChangeLog
index 63138b822..9e7512bf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-07-27 Akim Demaille <akim@lrde.epita.fr>
+
+ libtextstyle: check the API of the latest release
+ * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Require ostream_printf and
+ styled_ostream_get_hyperlink_ref.
+
2020-07-26 Paul Eggert <eggert@cs.ucla.edu>
argz: pacify MSVC
diff --git a/m4/libtextstyle.m4 b/m4/libtextstyle.m4
index 23b4a6959..96ce60688 100644
--- a/m4/libtextstyle.m4
+++ b/m4/libtextstyle.m4
@@ -1,4 +1,4 @@
-# libtextstyle.m4 serial 1
+# libtextstyle.m4 serial 2
dnl Copyright (C) 2019-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -17,6 +17,11 @@ dnl LTLIBTEXTSTYLE to empty.
AC_DEFUN([gl_LIBTEXTSTYLE],
[
AC_LIB_HAVE_LINKFLAGS([textstyle], [],
- [#include <textstyle.h>],
[term_styled_ostream_create(1,"",TTYCTL_AUTO,"");],
+ [#include <textstyle.h>],
+ [const char *url = "https://www.gnu.org/software/gnulib/";
+ styled_ostream_t ostream = term_styled_ostream_create (1, "",
TTYCTL_AUTO, "");
+ styled_ostream_set_hyperlink (ostream, url, NULL);
+ ostream_printf (ostream, "%s%s", "gnu", "lib");
+ styled_ostream_set_hyperlink (ostream, NULL, NULL);],
[no])
])