pathmax
pipe-posix
quotearg
+ snippet/unused-parameter
strndup
sys_wait
unistd
/xmalloc.c
/xsize.c
/xsize.h
+/unused-parameter.h
AUTOMAKE_OPTIONS = gnits
bin_PROGRAMS = recode
lib_LTLIBRARIES = librecode.la
+noinst_LTLIBRARIES = libmerged.la
man_MANS = recode.1
include_HEADERS = recode.h recodext.h
ebcdic.c ibmpc.c iconqnx.c lat1asci.c java.c mule.c strip-data.c \
testdump.c ucs.c utf16.c utf7.c utf8.c varia.c vn.c
-ALL_STEPS = $(C_STEPS) $(C_FALLBACKS) $(C_SURFACES) merged.c
+ALL_STEPS = $(C_STEPS) $(C_FALLBACKS) $(C_SURFACES)
L_STEPS = ascilat1.l $(L_FALLBACKS) $(L_SURFACES)
names.c outer.c recode.c request.c strip-pool.c task.c $(ALL_STEPS) \
$(include_HEADERS) $(noinst_HEADERS) $(H_STEPS)
librecode_la_LDFLAGS = -version-info 0:0:0
+librecode_la_LIBADD = libmerged.la
+
+libmerged_la_SOURCES = merged.c
+libmerged_la_CPPFLAGS = $(NON_WARN_CFLAGS)
loc:
- cloc $(C_STEPS) $(L_FALLBACKS) $(H_STEPS) $(top_srcdir)/tables.py mergelex.py
+ cloc $(ALL_STEPS) $(L_STEPS) common.h $(H_FALLBACKS) $(H_SURFACES) $(top_srcdir)/tables.py mergelex.py
# Relative to $(srcdir).
ALAIN = $(KELD)
RFC1345_TXT = $(KELD)/rfc1345.txt
NOMS_CARACS = $(ALAIN)/NomsSeulsfinal.lst
-AM_CPPFLAGS = -I.. -I$(srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib $(WARN_CFLAGS)
+NON_WARN_CFLAGS = -I.. -I$(srcdir) $(ISYSTEM)$(top_builddir)/lib $(ISYSTEM)$(top_srcdir)/lib
+AM_CPPFLAGS = $(NON_WARN_CFLAGS) $(WARN_CFLAGS)
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
ETAGS_ARGS = $(L_STEPS)
flat.lo html.lo lat1ltex.lo lat1txte.lo rfc1345.lo texinfo.lo \
base64.lo dump.lo endline.lo permut.lo quoted.lo \
iconv.lo outer.lo decsteps.h inisteps.h tersteps.h: stamp-steps
-stamp-steps: $(ALL_STEPS)
+stamp-steps: $(ALL_STEPS) merged.c
@echo "Updating {dec,ini,ter}steps.h"
- @(cd $(srcdir) && grep -h '^module_' $(ALL_STEPS)) \
+ @(cd $(srcdir) && grep -h '^module_' $(ALL_STEPS) merged.c) \
| sed 's/ .*//' > liste.tmp
@sed 's/\(.*\)/bool \1 (struct recode_outer *);/' \
liste.tmp > decsteps.tmp
François Pinard <pinard@iro.umontreal.ca>, 1997. */
#include "common.h"
+#include "decsteps.h"
/* Bambara, Ewondo and Fulfude. */
return true;
}
-void
-delmodule_african (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_african (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
François Pinard <pinard@iro.umontreal.ca>, 1997. */
#include "common.h"
+#include "decsteps.h"
static const unsigned short ful_data[] =
{
return true;
}
-void
-delmodule_afrtran (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_afrtran (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
/* Previously, the LF surface was built-in. It is now handled through a
separate, optional step. An optimisation might use a flag to trigger old
return true;
}
-void
-delmodule_applemac (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_applemac (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
#define USE_RFC1345_STEP 1
#include "common.h"
+#include "decsteps.h"
/* RFC 1345 style description for AtariST (non official).
#endif
}
-void
-delmodule_atarist (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_atarist (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static const char *const translation_table[256] =
{
static bool
init_latin1_bangbang (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
+ RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
RECODE_CONST_OPTION_LIST before_options,
RECODE_CONST_OPTION_LIST after_options)
{
NULL, transform_bangbang_latin1);
}
-void
-delmodule_bangbang (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_bangbang (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#include "base64.h"
/* Table of characters coding the 64 values. */
&& declare_alias (outer, "64", "Base64");
}
-void
-delmodule_base64 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_base64 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static const char *const translation_table[128] =
{
SUBTASK_RETURN (subtask);
}
break;
+
+ default:
+ break;
}
put_byte (input_char, subtask);
}
&& declare_alias (outer, "NOS", "CDC-NOS");
}
-void
-delmodule_cdcnos (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_cdcnos (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
bool
init_explode (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
+ RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
RECODE_CONST_OPTION_LIST before_options,
RECODE_CONST_OPTION_LIST after_options)
{
Hash_table *table = (Hash_table *) subtask->step->step_table;
unsigned value;
- while (value = get_byte (subtask), value != EOF)
+ while (value = get_byte (subtask), value != (unsigned)EOF)
{
unsigned short lookup = value;
unsigned short *result = (unsigned short *) hash_lookup (table, &lookup);
Hash_table *table = (Hash_table *) subtask->step->step_table;
unsigned value;
- if (value = get_byte (subtask), value != EOF)
+ if (value = get_byte (subtask), value != (unsigned)EOF)
{
if (subtask->task->byte_order_mark)
put_ucs2 (BYTE_ORDER_MARK, subtask);
else
put_ucs2 (value, subtask);
- if (value = get_byte (subtask), value == EOF)
+ if (value = get_byte (subtask), value == (unsigned)EOF)
break;
}
}
bool
init_combine (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
+ RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
RECODE_CONST_OPTION_LIST before_options,
RECODE_CONST_OPTION_LIST after_options)
{
struct state *state = NULL;
unsigned value;
- if (value = get_byte (subtask), value != EOF)
+ if (value = get_byte (subtask), value != (unsigned)EOF)
{
while (true)
{
if (shift)
{
state = shift;
- if (value = get_byte (subtask), value == EOF)
+ if (value = get_byte (subtask), value == (unsigned)EOF)
break;
}
else if (state)
else
{
put_byte (value, subtask);
- if (value = get_byte (subtask), value == EOF)
+ if (value = get_byte (subtask), value == (unsigned)EOF)
break;
}
}
{
unsigned value;
- if (value = get_byte (subtask), value != EOF)
+ if (value = get_byte (subtask), value != (unsigned)EOF)
{
struct state *state = NULL;
if (shift)
{
state = shift;
- if (value = get_byte (subtask), value == EOF)
+ if (value = get_byte (subtask), value == (unsigned)EOF)
break;
}
else if (state)
else
{
put_ucs2 (value, subtask);
- if (value = get_byte (subtask), value == EOF)
+ if (value = get_byte (subtask), value == (unsigned)EOF)
break;
}
}
#include "localcharset.h"
#include "error.h"
#include "gettext.h"
+#include "unused-parameter.h"
#if ENABLE_NLS
# define _(Text) gettext (Text)
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
/* Constants for the possible bases. If these are reordered, so should be
the initialisers for the three tables which follow. */
/* Write formatted value. */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
sprintf (buffer, format_table[base][byte_count], value);
+#pragma GCC diagnostic pop
for (cursor = buffer; *cursor; cursor++)
put_byte (*cursor, subtask);
else
break;
break;
+
+ default:
+ break;
}
if (width == 0 || width > width_table[base][expected_size])
size = expected_size;
/* Produce the output bytes. */
-
- {
- unsigned shift;
-
- for (shift = size * 8; shift != 0; shift -= 8)
- put_byte (MASK (8) & value >> (shift - 8), subtask);
- }
+ for (unsigned shift = size; shift != 0; shift--)
+ put_byte (MASK (8) & value >> ((shift * 8) - 8), subtask);
}
/* Skip separators. */
return true;
}
-void
-delmodule_dump (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_dump (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
/* Previously: #define ASCII "ASCII-BS" */
#include "common.h"
+#include "decsteps.h"
static unsigned char const ascii_to_ebcdic[256] =
{
static bool
init_ascii_ebcdic (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
+ RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
RECODE_CONST_OPTION_LIST before_options,
RECODE_CONST_OPTION_LIST after_options)
{
static bool
init_ascii_ebcdic_ccc (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
+ RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
RECODE_CONST_OPTION_LIST before_options,
RECODE_CONST_OPTION_LIST after_options)
{
static bool
init_ascii_ebcdic_ibm (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
+ RECODE_CONST_REQUEST request _GL_UNUSED_PARAMETER,
RECODE_CONST_OPTION_LIST before_options,
RECODE_CONST_OPTION_LIST after_options)
{
init_ebcdic_ibm_ascii, transform_byte_to_byte);
}
-void
-delmodule_ebcdic (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_ebcdic (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#define CR 13 /* carriage return */
#define LF 10 /* line feed */
&& declare_alias (outer, "cl", "CR-LF");
}
-void
-delmodule_endline (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_endline (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static bool
transform_ascii_flat (RECODE_SUBTASK subtask)
return true;
}
-void
-delmodule_flat (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_flat (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#include "hash.h"
/* FIXME: An @code{HTML} text which has spurious semi-colons to end entities
&& declare_alias (outer, "h", "HTML_4.0");
}
-void
-delmodule_html (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_html (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
/* Previously, the CR-LF surface was built-in. It is now handled through a
separate, optional step. An optimisation might use a flag to trigger old
return true;
}
-void
-delmodule_ibmpc (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_ibmpc (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#define DOS_CR 13 /* carriage return */
#define DOS_LF 10 /* line feed */
&& declare_alias (outer, "QNX", "Icon-QNX");
}
-void
-delmodule_iconqnx (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_iconqnx (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#include <iconv.h>
#include "iconvdecl.h"
return true;
}
-void
-delmodule_iconv (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_iconv (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static bool
transform_java_utf16 (RECODE_SUBTASK subtask)
NULL, transform_java_utf16);
}
-void
-delmodule_java (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_java (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static const char *const translation_table[128] =
{
return true;
}
-void
-delmodule_latin1_ascii (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_latin1_ascii (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
struct translation
{
&& declare_alias (outer, "ltex", "LaTeX");
}
-void
-delmodule_latin1_latex (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_latin1_latex (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static const char *const translation_table[128] =
{
&& declare_alias (outer, "txte", "Texte");
}
-void
-delmodule_latin1_texte (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_latin1_texte (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
case 2:
task_option.strategy = RECODE_SEQUENCE_WITH_PIPE;
break;
+
+ default:
+ break;
}
break;
case 3:
list_format = RECODE_FULL_FORMAT;
break;
+
+ default:
+ break;
}
break;
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static bool
transform_latin_mule (RECODE_SUBTASK subtask,
NULL, transform_mule_latin2);
}
-void
-delmodule_mule (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_mule (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
| negative number if this symbol is not defined. |
`-------------------------------------------------------------------------*/
-int
+_GL_ATTRIBUTE_PURE int
code_to_ucs2 (RECODE_CONST_SYMBOL charset, unsigned code)
{
const struct strip_data *data = (const struct strip_data *) charset->data;
| Return true if BEFORE to AFTER is currently restricted. |
`---------------------------------------------------------*/
-static bool
+static _GL_ATTRIBUTE_PURE bool
check_restricted (RECODE_CONST_OUTER outer,
RECODE_CONST_SYMBOL before,
RECODE_CONST_SYMBOL after)
result = ordinal < 0 ? NULL : outer->realname_surface_array[ordinal];
}
break;
+
+ default:
+ break;
}
free (hashname);
| values for run of decimal digits at first. |
`-------------------------------------------------------------------------*/
-static int
+static _GL_ATTRIBUTE_PURE int
compare_strings (const char *stringA, const char *stringB)
{
int delayed = 0;
/* FIXME: Trailing space elimination is not always effective. */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
if (ucs2 >= 0)
printf (format, code);
else if (mnemonic || counter2 != 112)
fputs (blanks, stdout);
+#pragma GCC diagnostic pop
if (mnemonic)
printf (counter2 == 112 ? " %s\n" : " %-3s", mnemonic);
const char *charname;
if (code >= 0)
- printf ("%3d %.3o %.2x", code, code, code);
+ printf ("%3d %.3o %.2x", code, (unsigned)code, (unsigned)code);
else
fputs (" + + + ", stdout);
printf ("[ 0] %s == %s\n",
charset1->name, charset2->name);
else
- printf ("[%3d] %s < %s\n", distance,
+ printf ("[%3u] %s < %s\n", distance,
charset1->name, charset2->name);
success = false;
| coding as a fallback, which is the traditional Recode behaviour. |
`-----------------------------------------------------------------------*/
-bool
-reversibility (RECODE_SUBTASK subtask, unsigned code)
+_GL_ATTRIBUTE_CONST bool
+reversibility (RECODE_SUBTASK subtask _GL_UNUSED_PARAMETER, unsigned code _GL_UNUSED_PARAMETER)
{
return false;
}
`---------------------------------------------------------------*/
static void
-estimate_single_cost (RECODE_OUTER outer, RECODE_SINGLE single)
+estimate_single_cost (RECODE_OUTER outer _GL_UNUSED_PARAMETER, RECODE_SINGLE single)
{
int cost;
case RECODE_N:
/* Analysing varysizes is surely much harder than producing them. */
cost += 60;
+
+ default:
+ break;
}
switch (single->quality.out_size)
/* Writing varysizes requires loops and such. */
cost += 35;
break;
+
+ default:
+ break;
}
/* Consider speed for fine tuning the cost. */
return true;
}
-void static
+static void
unregister_all_modules (RECODE_OUTER outer)
{
#include "tersteps.h"
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static bool
permute_21 (RECODE_SUBTASK subtask)
&& declare_alias (outer, "swabytes", "21-Permutation");
}
-void
-delmodule_permutations (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_permutations (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
+
static const bool bitnet_flag = false;
/* Maximum number of characters per MIME line. */
&& declare_alias (outer, "QP", "Quoted-Printable");
}
-void
-delmodule_quoted_printable (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_quoted_printable (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
/* Global declarations and definitions. */
+#include <stdio.h>
#include <ctype.h>
#include <unistd.h>
#include <stdarg.h>
-void
-recode_error (RECODE_OUTER outer, const char *format, ...)
+_GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) void
+recode_error (RECODE_OUTER outer _GL_UNUSED_PARAMETER, const char *format, ...)
{
va_list args;
fflush (stderr);
}
-void
-recode_perror (RECODE_OUTER outer, const char *format, ...)
+_GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) void
+recode_perror (RECODE_OUTER outer _GL_UNUSED_PARAMETER, const char *format, ...)
{
int saved_errno = errno;
va_list args;
{
if (flag[table[counter]])
{
- recode_error (outer, _("Codes %3d and %3d both recode to %3d"),
+ recode_error (outer, _("Codes %3d and %3u both recode to %3d"),
result[table[counter]], counter, table[counter]);
table_error = true;
}
{
for (counter = 0; counter < 256; counter++)
if (!flag[counter])
- recode_error (outer, _("No character recodes to %3d"), counter);
+ recode_error (outer, _("No character recodes to %3u"), counter);
recode_error (outer, _("Cannot invert given one-to-one table"));
}
return result;
table_error = true;
}
recode_error (outer,
- _("Pair no. %d: <%3d, %3d> conflicts with <%3d, %3d>"),
+ _("Pair no. %u: <%3d, %3d> conflicts with <%3d, %3d>"),
counter, left, right, left, left_table[left]);
}
else if (right_flag[right])
table_error = true;
}
recode_error (outer,
- _("Pair no. %d: <%3d, %3d> conflicts with <%3d, %3d>"),
+ _("Pair no. %u: <%3d, %3d> conflicts with <%3d, %3d>"),
counter, left, right, right_table[right], right);
}
else
printf ("@%s =\n", name);
printf (" (\n");
break;
+
+ default:
+ break;
}
for (counter = 0; counter < 256; counter++)
{
printf ("%s%3d,", counter % 8 == 0 ? " " : " ", table[counter]);
if (counter % 8 == 7)
- printf ("\t%s%3d - %3d%s",
+ printf ("\t%s%3u - %3u%s",
start_comment, counter - 7, counter, end_comment);
}
switch (header_language)
case RECODE_LANGUAGE_PERL:
printf (" );\n");
break;
+
+ default:
+ break;
}
}
else if (step->step_type == RECODE_BYTE_TO_STRING)
printf ("@%s =\n", name);
printf (" (\n");
break;
+
+ default:
+ break;
}
for (counter = 0; counter < 256; counter++)
{
printf ("''");
column += 2;
break;
+
+ default:
+ break;
}
printf (",");
column++;
printf ("\t");
column += 8 - column % 8;
}
- printf ("%s%3d%s", start_comment, counter, end_comment);
+ printf ("%s%3u%s", start_comment, counter, end_comment);
}
switch (header_language)
{
case RECODE_LANGUAGE_PERL:
printf (" );\n");
break;
+
+ default:
+ break;
}
}
else
/* recode.c. */
#define ALLOC_SIZE(Variable, Size, Type) \
- (Variable = (Type *) recode_malloc (outer, (Size)), Variable)
+ (Variable = (Type *) recode_malloc (outer, (Size)))
#define ALLOC(Variable, Count, Type) \
ALLOC_SIZE (Variable, (Count) * sizeof (Type), Type)
/* iconv.c. */
bool transform_with_iconv (RECODE_SUBTASK);
+bool module_iconv (struct recode_outer *);
+void delmodule_iconv (struct recode_outer *);
/* names.c. */
RECODE_OUTER outer = request->outer;
RECODE_STEP step;
- if (request->sequence_length == request->sequence_allocated)
+ if ((unsigned)request->sequence_length == request->sequence_allocated)
{
if (request->sequence_allocated == 0)
request->sequence_allocated = 16;
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#include "rfc1345.h"
/* This module takes care only of short RFC 1345 forms. Module charname.c
| NULL if this value has no such known short form. |
`----------------------------------------------------------------------*/
-const char *
+_GL_ATTRIBUTE_PURE const char *
ucs2_to_rfc1345 (recode_ucs2 code)
{
int first = 0;
| MASK (16) if the short form is unknown. |
`---------------------------------------------------------------------*/
-static recode_ucs2
+static _GL_ATTRIBUTE_PURE recode_ucs2
rfc1345_to_ucs2 (const char *string)
{
int first = 0;
while (get_ucs2 (&value, subtask))
if (IS_ASCII (value))
- if (value == intro)
+ if (value == (unsigned)intro)
{
put_byte (intro, subtask);
put_byte (intro, subtask);
static bool
init_rfc1345 (RECODE_CONST_REQUEST request,
RECODE_STEP step,
- RECODE_CONST_OPTION_LIST options)
+ RECODE_CONST_OPTION_LIST options _GL_UNUSED_PARAMETER)
{
RECODE_OUTER outer = request->outer;
struct local *local;
&& declare_alias (outer, "mnemonic", "RFC1345");
}
-void
-delmodule_rfc1345 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_rfc1345 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
/* Execute one pass for each step of the sequence. */
for (sequence_index = 0;
- sequence_index < request->sequence_length
+ sequence_index < (unsigned)request->sequence_length
&& task->error_so_far < task->abort_level;
sequence_index++)
{
/* Select the output text for this step. */
- if (sequence_index < request->sequence_length - 1)
+ if (sequence_index < (unsigned)request->sequence_length - 1)
{
subtask->output = output;
subtask->output.cursor = subtask->output.buffer;
task->swap_input = RECODE_SWAP_UNDECIDED;
- if (sequence_index < request->sequence_length - 1)
+ if (sequence_index < (unsigned)request->sequence_length - 1)
{
output = input;
input = subtask->output;
/* Execute one pass for each step of the sequence. */
for (sequence_index = 0;
- sequence_index < request->sequence_length
+ sequence_index < (unsigned)request->sequence_length
&& task->error_so_far < task->abort_level;
sequence_index++)
{
/* Select the output text for this step. */
- if (sequence_index < request->sequence_length - 1)
+ if (sequence_index < (unsigned)request->sequence_length - 1)
{
subtask->output = output;
task->swap_input = RECODE_SWAP_UNDECIDED;
- if (sequence_index < request->sequence_length - 1)
+ if (sequence_index < (unsigned)request->sequence_length - 1)
{
output = input;
input = subtask->output;
(*step->transform_routine) (subtask);
fclose (subtask->input.file);
- if (sequence_index < request->sequence_length - 1
+ if (sequence_index < (unsigned)request->sequence_length - 1
|| *subtask->output.name)
fclose (subtask->output.file);
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#include "hash.h"
/*------------------------.
}
/* Copy the rest verbatim. */
- while (value = get_byte (subtask), value != EOF)
+ while (value = get_byte (subtask), value != (unsigned)EOF)
put_byte (value, subtask);
SUBTASK_RETURN (subtask);
put_ucs2 (counter, subtask);
/* Copy the rest verbatim. */
- while (value = get_byte (subtask), value != EOF)
+ while (value = get_byte (subtask), value != (unsigned)EOF)
put_byte (value, subtask);
SUBTASK_RETURN (subtask);
for (cursor = array; cursor < array + size; cursor++)
if ((*cursor)->count > maximum_count)
maximum_count = (*cursor)->count;
- sprintf (buffer, "%d", maximum_count);
+ sprintf (buffer, "%u", maximum_count);
count_width = strlen (buffer);
for (cursor = array; cursor < array + size; cursor++)
delayed--;
}
- sprintf (buffer, "%*d %.4X", count_width, (*cursor)->count, character);
+ sprintf (buffer, "%*u %.4X", (int)count_width, (*cursor)->count, character);
put_string (buffer, subtask);
if (mnemonic)
{
return true;
}
-void
-delmodule_testdump (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_testdump (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static const unsigned short texinfo_data[] =
{
&& declare_alias (outer, "ti", "Texinfo");
}
-void
-delmodule_texinfo (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_texinfo (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
/* Description of some UCS-2 combinings. */
return true;
}
break;
+
+ default:
+ break;
}
}
}
&& declare_alias (outer, "co", "combined-UCS-2");
}
-void
-delmodule_ucs (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_ucs (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static bool
transform_ucs4_utf16 (RECODE_SUBTASK subtask)
&& declare_alias (outer, "u6", "UTF-16");
}
-void
-delmodule_utf16 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_utf16 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
#include "base64.h"
/* Classification of first 128 UCS-2 characters. */
};
#undef z
-/* Should the character be directly represented in message headers? */
-#define IS_HEADER_DIRECT(Character) \
- (IS_ASCII (Character) && classification[Character] & (D | W))
-
/* Should the character be directly represented in message bodies?
Here, & (D | O | W) is implied, since these are the only flags. */
#define IS_BODY_DIRECT(Character) \
NULL, transform_utf16_utf7);
}
-void
-delmodule_utf7 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_utf7 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
/* Define HANDLE_32_BITS if you want conversion for 2^32 codes instead
of 2^31. But this would not be ISO-10646, which says 2^31. */
NULL, transform_ucs2_utf8);
}
-void
-delmodule_utf8 (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_utf8 (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
/* This file contains various temporary tables. These would ideally all go
away once Keld will be given references, solid enough, to really integrate
return true;
}
-void
-delmodule_varia (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_varia (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
Suite 330, Boston, MA 02111-1307, USA. */
#include "common.h"
+#include "decsteps.h"
static const recode_ucs2 tcvn_pool[256] =
{
return true;
}
-void
-delmodule_vietnamese (RECODE_OUTER outer)
+_GL_ATTRIBUTE_CONST void
+delmodule_vietnamese (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
{
}
' return true;\n'
'}\n'
'\n'
- 'void\n'
- 'delmodule_explodes (struct recode_outer *outer)\n'
+ '_GL_ATTRIBUTE_CONST void\n'
+ 'delmodule_explodes (struct recode_outer *outer _GL_UNUSED_PARAMETER)\n'
'{\n'
'}\n')
\f
self.write_data = Output(self.DATA).write
write = self.write_data
write('\n'
- '#include \"common.h\"\n')
+ '#include "common.h"\n'
+ '#include "decsteps.h"\n')
# Read the text of RFC 1345, saving all charsets it declares.
# UCS-2 mnemonics files should have been read in already.
sys.stdout.write("Completing %s\n" % self.DATA)
write = self.write_data
write('\n'
- 'bool\n'
- 'module_strips (struct recode_outer *outer)\n'
+ '_GL_ATTRIBUTE_CONST bool\n'
+ 'module_strips (struct recode_outer *outer _GL_UNUSED_PARAMETER)\n'
'{\n'
' RECODE_ALIAS alias;\n'
'\n')
' return true;\n'
'}\n'
'\n'
- 'void\n'
- 'delmodule_strips (struct recode_outer *outer)\n'
+ '_GL_ATTRIBUTE_CONST void\n'
+ 'delmodule_strips (struct recode_outer *outer _GL_UNUSED_PARAMETER)\n'
'{\n'
'}\n')