+2003-08-24 Bruno Haible <bruno@clisp.org>
+
+ * relocatable.h: Make this file includable in C++ mode: add extern "C".
+
2003-08-23 Bruno Haible <bruno@clisp.org>
* Makefile.in (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 6:0:4.
#ifndef _RELOCATABLE_H
#define _RELOCATABLE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* This can be enabled through the configure --enable-relocatable option. */
#if ENABLE_RELOCATABLE
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RELOCATABLE_H */
+2003-08-24 Bruno Haible <bruno@clisp.org>
+
+ * basename.h: Make this file includable in C++ mode: add extern "C".
+ * error-progname.h: Likewise.
+ * pathname.h: Likewise.
+ * progname.h: Likewise.
+ * relocatable.h: Likewise.
+ * stpcpy.h: Likewise.
+ * strcase.h: Likewise.
+ * strstr.h: Likewise.
+ * xerror.h: Likewise.
+ * xmalloc.h: Likewise.
+
2003-08-23 Bruno Haible <bruno@clisp.org>
* getline.h: Update from gnulib.
/* Pathname hacking.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
/* This is where basename() is declared. */
#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
#if !(__GLIBC__ >= 2)
/* When not using the GNU libc we use the basename implementation we
provide here. */
#define basename(Arg) gnu_basename (Arg)
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _BASENAME_H */
error_print_progname = maybe_print_progname;
*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Indicates whether errors and warnings get prefixed with program_name.
Default is true.
A reason to omit the prefix is for better interoperability with Emacs'
is true. */
extern void maybe_print_progname (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _ERROR_PROGNAME_H */
/* Pathname support.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _PATHNAME_H
#define _PATHNAME_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Pathname support.
ISSLASH(C) tests whether C is a directory separator character.
IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
extern char *concatenated_pathname (const char *directory,
const char *filename, const char *suffix);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _PATHNAME_H */
set_program_name (argv[0]);
*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* String containing name the program is called with. */
extern const char *program_name;
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _PROGNAME_H */
#ifndef _RELOCATABLE_H
#define _RELOCATABLE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* This can be enabled through the configure --enable-relocatable option. */
#if ENABLE_RELOCATABLE
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RELOCATABLE_H */
#else
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
extern char *stpcpy (char *dst, const char *src);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif /* _STPCPY_H */
#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
greater than zero if S1 is lexicographically less than, equal to or greater
than S2.
Note: This function can not work correctly in multibyte locales. */
extern int strncasecmp (const char *s1, const char *s2, size_t n);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _STRCASE_H */
/* Searching in a string.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#else
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Find the first occurrence of NEEDLE in HAYSTACK. */
extern char *strstr (const char *haystack, const char *needle);
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* Multiline error-reporting functions.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
/* Get fallback definition of __attribute__. */
#include "error.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Format a message and return the freshly allocated resulting string. */
extern char *xasprintf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
PREFIX is NULL. Free the PREFIX and MESSAGE when done. */
extern void multiline_error (char *prefix, char *message);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _XERROR_H */
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Defined in xmalloc.c. */
/* Allocate SIZE bytes of memory dynamically, with error checking. */
extern char *xstrdup (const char *string);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _XMALLOC_H */
+2003-08-24 Bruno Haible <bruno@clisp.org>
+
+ * dir-list.h: Make this file includable in C++ mode: add extern "C".
+ * file-list.h: Likewise.
+ * format.h: Likewise.
+ * message.h: Likewise.
+ * msgl-ascii.h: Likewise.
+ * msgl-iconv.h: Likewise.
+ * open-po.h: Likewise.
+ * po-charset.h: Likewise.
+ * po-time.h: Likewise.
+ * read-po-abstract.h: Likewise.
+ * str-list.h: Likewise.
+ * write-po.h: Likewise.
+ * xgettext.h: Likewise.
+ * xgettext.c: Add extern "C" around all "x-*.h" includes.
+
2003-08-22 Bruno Haible <bruno@clisp.org>
* format-awk.c: Include error-progname.h instead of progname.h.
/* GNU gettext - internationalization aids
- Copyright (C) 1996, 1998, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2000-2003 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
It is an ordered list, without duplicates. The default value of the
list consists of the single directory ".". */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Append a directory to the end of the list of directories. */
extern void dir_list_append (const char *directory);
/* Restore a previously saved list of directories. */
extern void dir_list_restore (void *saved_value);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _DIR_LIST_H */
/* Reading file lists.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include "str-list.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Read list of filenames from a file.
One filename per line. Lines starting with # and whitespace lines are
ignored. Trailing whitespace is removed. */
extern string_list_ty *read_names_from_file (const char *file_name);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _FILE_LIST_H */
#include "pos.h" /* Get lex_pos_ty. */
#include "message.h" /* Get NFORMATS. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* This structure describes a format string parser for a language. */
struct formatstring_parser
{
};
extern void get_c99_format_directives (const char *string, struct interval **intervalsp, size_t *lengthp);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _FORMAT_H */
#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* According to Sun's Uniforum proposal the default message domain is
named 'messages'. */
#define MESSAGE_DOMAIN_DEFAULT "messages"
msgdomain_list_search_fuzzy (msgdomain_list_ty *mdlp, const char *msgid);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* message.h */
/* Message list test for ASCII character set.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
extern bool
is_ascii_string (const char *string);
extern bool
extern bool
is_ascii_message_list (message_list_ty *mlp);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _MSGL_ASCII_H */
/* Message list character set conversion.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include "message.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
#if HAVE_ICONV
/* Converts the STRING through the conversion descriptor CD. */
extern char *convert_string (iconv_t cd, const char *string);
const char *to_code,
const char *from_filename);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _MSGL_ICONV_H */
#include <stdbool.h>
#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Open the input file with the name INPUT_NAME. The ending .po is added
if necessary. If INPUT_NAME is not an absolute file name and the file is
not found, the list of directories in "dir-list.h" is searched. The
extern FILE *open_po_file (const char *input_name, char **real_file_name_p,
bool exit_on_error);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _OPEN_PO_H */
/* Charset handling while reading PO files.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include <iconv.h>
#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Canonicalize an encoding name.
The results of this function are statically allocated and can be
compared using ==. */
/* Finish up with the PO file's encoding. */
extern void po_lex_charset_close (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _PO_CHARSET_H */
/* PO/POT file timestamps.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Return a freshly allocated string containing the given time in the
format YYYY-MM-DD HH:MM+TZOFF. */
extern char *po_strftime (const time_t *tp);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _PO_TIME_H */
#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Note: the _t suffix is reserved by ANSI C, so the _ty suffix is
used to indicate a type name. */
enum is_format formatp[NFORMATS],
enum is_wrap *wrapp);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _READ_PO_ABSTRACT_H */
/* Get bool. */
#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Type describing list of immutable strings,
implemented using a dynamic array. */
typedef struct string_list_ty string_list_ty;
/* Return 1 if s is contained in the list of strings, 0 otherwise. */
extern bool string_list_member (const string_list_ty *slp, const char *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _STR_LIST_H */
#include <stdbool.h>
#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* These functions output parts of a message, as comments. */
extern void
message_print_comment (const message_ty *mp, FILE *fp);
extern void
msgdomain_list_sort_by_filepos (msgdomain_list_ty *mdlp);
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _WRITE_PO_H */
#define _(str) gettext (str)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "x-c.h"
#include "x-po.h"
#include "x-python.h"
#include "x-rst.h"
#include "x-glade.h"
+#ifdef __cplusplus
+}
+#endif
+
/* If nonzero add all comments immediately preceding one of the keywords. */
static bool add_all_comments = false;
/* Declare 'line_comment' and 'input_syntax'. */
#include "read-po.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* If true, omit the header entry.
If false, keep the header entry present in the input. */
extern int xgettext_omit_header;
char *string, lex_pos_ty *pos);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _XGETTEXT_H */