From: Bruno Haible Date: Mon, 30 Apr 2001 16:55:46 +0000 (+0000) Subject: Add a few consts. X-Git-Tag: v0.11~748 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ab2a856e517ec30496b136c97e4681bd9f43cb2;p=thirdparty%2Fgettext.git Add a few consts. --- diff --git a/src/ChangeLog b/src/ChangeLog index 39ceab110..600e74fb3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2001-04-30 Bruno Haible + + * message.h (message_alloc): Add const to prototype. + * message.c (message_alloc): Add const to argument type. + * msgcmp.c (compare_class_ty): Add const to 'domain' field. + * xgettext.c (default_domain): Add const. + (msgstr_prefix): Likewise. + (msgstr_suffix): Likewise. + (main): Add const to 'file_name' variable. + 2001-04-29 Bruno Haible * read-po.h: New file. diff --git a/src/message.c b/src/message.c index b819f825a..40b754dd5 100644 --- a/src/message.c +++ b/src/message.c @@ -73,7 +73,7 @@ parse_c_width_description_string (s) message_ty * message_alloc (msgid, msgid_plural) - char *msgid; + const char *msgid; const char *msgid_plural; { message_ty *mp; diff --git a/src/message.h b/src/message.h index af5da2702..5770854de 100644 --- a/src/message.h +++ b/src/message.h @@ -110,7 +110,8 @@ struct message_ty int obsolete; }; -message_ty *message_alloc PARAMS ((char *msgid, const char *msgid_plural)); +message_ty *message_alloc PARAMS ((const char *msgid, + const char *msgid_plural)); void message_free PARAMS ((message_ty *)); message_variant_ty *message_variant_search PARAMS ((message_ty *mp, diff --git a/src/msgcmp.c b/src/msgcmp.c index 983c279d0..ef07b1dbb 100644 --- a/src/msgcmp.c +++ b/src/msgcmp.c @@ -45,7 +45,7 @@ struct compare_class_ty PO_BASE_TY /* Name of domain we are currently examining. */ - char *domain; + const char *domain; /* List of domains already appeared in the current file. */ string_list_ty *domain_list; diff --git a/src/xgettext.c b/src/xgettext.c index 231db94ca..5c451bf3e 100644 --- a/src/xgettext.c +++ b/src/xgettext.c @@ -71,7 +71,7 @@ static int line_comment; static char *comment_tag; /* Name of default domain file. If not set defaults to messages.po. */ -static char *default_domain; +static const char *default_domain; /* If called with --debug option the output reflects whether format string recognition is done automatically or forced by the user. */ @@ -91,10 +91,10 @@ static int force_po; static int foreign_user; /* String used as prefix for msgstr. */ -static char *msgstr_prefix; +static const char *msgstr_prefix; /* String used as suffix for msgstr. */ -static char *msgstr_suffix; +static const char *msgstr_suffix; /* Directory in which output files are created. */ static char *output_dir; @@ -207,7 +207,7 @@ main (argc, argv) int join_existing = 0; int sort_by_msgid = 0; int sort_by_filepos = 0; - char *file_name; + const char *file_name; const char *files_from = NULL; string_list_ty *file_list; char *output_file = NULL;