AM_CFLAGS = $(CURSES_CFLAGS) $(MOTIF_CFLAGS)
GNULIB = libgnu.a $(LIB_CLOCK_GETTIME) $(LIB_GETHRXTIME) $(LIB_HARD_LOCALE) \
- $(LIB_MBRTOWC) $(LIB_SETLOCALE_NULL) $(LTLIBICONV) $(LTLIBINTL) \
- $(LTLIBUNISTRING)
+ $(LIB_MBRTOWC) $(LIB_SETLOCALE_NULL) $(LTLIBINTL) $(LTLIBUNISTRING)
LDADD = $(GNULIB)
if HAVE_CURSES
$(libglohelp_a_OBJECTS): $(gnulib_headers)
libglohelp_a_SHORTNAME = glo
+if USE_NLS
+rrace_curses_SOURCES += common/src/copysym.c
+rrace_motif_SOURCES += common/src/copysym.c
+endif
+
OPTFILES = src/cursesopt.opt src/motifopt.opt
.opt.h:
$(AM_V_GEN) $(AWK) -f $(DX_BASEDIR)/scripts/gen-options.awk $< >$@.tmp
#!/bin/sh
#
-# Copyright © 2011-2012, 2015, 2021-2022 Nick Bowler
+# Copyright © 2011-2012, 2015, 2021-2023 Nick Bowler
#
# Simple script to get started from a fresh git checkout.
#
scriptname=$0
-err() { printf '%s: %s\n' "$scriptname" "$*" 1>&2; }
-die() { err "$@"; exit 1; }
+err () { printf '%s: %s\n' "$scriptname" "$*" 1>&2; }
+die () { err "$@"; exit 1; }
: ${AUTORECONF=autoreconf}
: ${AUTOMAKE=automake}
if test -x $GNULIB/gnulib-tool; then
$GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib."
+ $GNULIB/gnulib-tool --copy-file -S build-aux/config.rpath config.rpath
else
err "Gnulib sources are not properly installed in $GNULIB/"
cat >&2 <<'EOF'
-Subproject commit 70c84546fa5ecaba26e4ed021b292a5580f304f0
+Subproject commit 207d0dbfbbfa7ad70b59ada3a741895842958885
AC_CHECK_PROGS([OPTIPNG], [optipng])
: "${OPTIPNG:=:}"
+AM_CONDITIONAL([USE_NLS], [test x"$USE_NLS" = x"yes"])
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
# gettext-h \
# inline \
# localcharset \
-# mbswidth \
-# striconv
+# mbswidth
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
inline
localcharset
mbswidth
- striconv
])
gl_AVOID([std-gnu11])
gl_SOURCE_BASE([lib])
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <stdarg.h>
-#include <striconv.h>
#include <localcharset.h>
#include "version.h"
-
-const char *init_copysign(char **alloc)
-{
- *alloc = NULL;
-
- if (ENABLE_NLS) {
- char *buf = str_iconv("\xc2\xa9", "UTF-8", locale_charset());
- if (buf)
- return *alloc = buf;
- }
-
- return "(C)";
-}
+#include "copysym.h"
#define VERSION_HEAD_FMT "%s (RRace) %s\nCopyright %s 2023 Nick Bowler"
#define VERSION_HEAD_ARGS progname, PACKAGE_VERSION, copysign
void version_print_head(const char *progname, FILE *f)
{
- const char *copysign;
- char *copybuf;
-
- copysign = init_copysign(©buf);
+ const char *copysign = copyright_symbol(locale_charset());
printf(VERSION_HEAD_FMT, VERSION_HEAD_ARGS);
putc('\n', f);
-
- free(copybuf);
}
char *version_format_head(const char *progname)
{
- const char *copysign;
- char *copybuf, *ret;
-
- copysign = init_copysign(©buf);
+ const char *copysign = copyright_symbol(locale_charset());
+ char *ret;
ret = malloc(sizeof VERSION_HEAD_FMT + 100);
if (ret)
sprintf(ret, VERSION_HEAD_FMT, VERSION_HEAD_ARGS);
- free(copybuf);
return ret;
}