This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: replace CONST with const (binutils/)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Sat, 8 Jun 2002 17:08:29 +0930
- Subject: Re: replace CONST with const (binutils/)
- References: <20020608072904.GK464@bubble.sa.bigpond.net.au>
binutils/ChangeLog
* bucomm.c: Replace CONST with const.
* nm.c: Likewise.
* objdump.c: Likewise.
Index: binutils/bucomm.c
===================================================================
RCS file: /cvs/src/src/binutils/bucomm.c,v
retrieving revision 1.14
diff -u -p -r1.14 bucomm.c
--- binutils/bucomm.c 19 May 2002 16:17:54 -0000 1.14
+++ binutils/bucomm.c 8 Jun 2002 04:27:31 -0000
@@ -1,5 +1,5 @@
/* bucomm.c -- Bin Utils COMmon code.
- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -42,9 +42,9 @@ char *program_name;
void
bfd_nonfatal (string)
- CONST char *string;
+ const char *string;
{
- CONST char *errmsg = bfd_errmsg (bfd_get_error ());
+ const char *errmsg = bfd_errmsg (bfd_get_error ());
if (string)
fprintf (stderr, "%s: %s: %s\n", program_name, string, errmsg);
@@ -54,7 +54,7 @@ bfd_nonfatal (string)
void
bfd_fatal (string)
- CONST char *string;
+ const char *string;
{
bfd_nonfatal (string);
xexit (1);
@@ -178,7 +178,7 @@ print_arelt_descr (file, abfd, verbose)
char modebuf[11];
char timebuf[40];
time_t when = buf.st_mtime;
- CONST char *ctime_result = (CONST char *) ctime (&when);
+ const char *ctime_result = (const char *) ctime (&when);
/* POSIX format: skip weekday and seconds from ctime output. */
sprintf (timebuf, "%.12s %.4s", ctime_result + 4, ctime_result + 20);
Index: binutils/nm.c
===================================================================
RCS file: /cvs/src/src/binutils/nm.c,v
retrieving revision 1.22
diff -u -p -r1.22 nm.c
--- binutils/nm.c 7 Jun 2002 11:02:48 -0000 1.22
+++ binutils/nm.c 8 Jun 2002 04:27:32 -0000
@@ -133,13 +133,13 @@ print_archive_filename_posix PARAMS ((ch
static void
-print_archive_member_bsd PARAMS ((char *archive, CONST char *filename));
+print_archive_member_bsd PARAMS ((char *archive, const char *filename));
static void
-print_archive_member_sysv PARAMS ((char *archive, CONST char *filename));
+print_archive_member_sysv PARAMS ((char *archive, const char *filename));
static void
-print_archive_member_posix PARAMS ((char *archive, CONST char *filename));
+print_archive_member_posix PARAMS ((char *archive, const char *filename));
static void
@@ -177,7 +177,7 @@ struct output_fns
void (*print_archive_filename) PARAMS ((char *filename));
/* Print the name of an archive member file. */
- void (*print_archive_member) PARAMS ((char *archive, CONST char *filename));
+ void (*print_archive_member) PARAMS ((char *archive, const char *filename));
/* Print the name of the file (and archive, if there is one)
containing a symbol. */
@@ -1384,7 +1384,7 @@ print_archive_filename_posix (filename)
static void
print_archive_member_bsd (archive, filename)
char *archive ATTRIBUTE_UNUSED;
- CONST char *filename;
+ const char *filename;
{
if (!filename_per_symbol)
printf ("\n%s:\n", filename);
@@ -1393,7 +1393,7 @@ print_archive_member_bsd (archive, filen
static void
print_archive_member_sysv (archive, filename)
char *archive;
- CONST char *filename;
+ const char *filename;
{
if (undefined_only)
printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename);
@@ -1406,7 +1406,7 @@ Name Value Class
static void
print_archive_member_posix (archive, filename)
char *archive;
- CONST char *filename;
+ const char *filename;
{
if (!filename_per_symbol)
printf ("%s[%s]:\n", archive, filename);
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.52
diff -u -p -r1.52 objdump.c
--- binutils/objdump.c 3 Jun 2002 13:02:04 -0000 1.52
+++ binutils/objdump.c 8 Jun 2002 04:27:33 -0000
@@ -957,8 +957,8 @@ show_line (abfd, section, addr_offset)
asection *section;
bfd_vma addr_offset;
{
- CONST char *filename;
- CONST char *functionname;
+ const char *filename;
+ const char *functionname;
unsigned int line;
if (! with_line_numbers && ! with_source_code)
@@ -2543,7 +2543,7 @@ dump_reloc_set (abfd, sec, relpp, relcou
}
else
{
- if (section_name == (CONST char *) NULL)
+ if (section_name == (const char *) NULL)
section_name = "*unknown*";
bfd_printf_vma (abfd, q->address);
printf (" %-16s [%s]",
--
Alan Modra
IBM OzLabs - Linux Technology Centre