Remove "boolean" and "var_boolean" checks from ARI
[deliverable/binutils-gdb.git] / binutils / windmc.c
index 63db990594edaa99bdb98e104ea59af45a666496..10bd6144c698be69fe4e6d1009c3b3add7088b9c 100644 (file)
@@ -1,6 +1,5 @@
 /* windmc.c -- a program to compile Windows message files.
-   Copyright 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 2007-2019 Free Software Foundation, Inc.
    Written by Kai Tietz, Onevision.
 
    This file is part of GNU Binutils.
@@ -187,7 +186,7 @@ mc_create_path_text_file (const char *path, const char *ext)
   sprintf (hsz, "%s%s%s", (path != NULL ? path : ""), mcset_mc_basename,
     (ext != NULL ? ext : ""));
   if ((ret = fopen (hsz, "wb")) == NULL)
-    fatal (_("can't create %s file ,%s' for output.\n"), (ext ? ext : "text"), hsz);
+    fatal (_("can't create %s file `%s' for output.\n"), (ext ? ext : "text"), hsz);
   free (hsz);
   return ret;
 }
@@ -205,7 +204,7 @@ usage (FILE *stream, int status)
   -C --codepage_in=<val>       Set codepage when reading mc text file\n\
   -d --decimal_values          Print values to text files decimal\n\
   -e --extension=<extension>   Set header extension used on export header file\n\
-  -F --target <target>         Specify output target for endianess.\n\
+  -F --target <target>         Specify output target for endianness.\n\
   -h --headerdir=<directory>   Set the export directory for headers\n\
   -u --unicode_in              Read input file as UTF16 file\n\
   -U --unicode_out             Write binary messages as UFT16\n\
@@ -231,7 +230,7 @@ usage (FILE *stream, int status)
 }
 
 static void
-set_endianess (bfd *abfd, const char *target)
+set_endianness (bfd *abfd, const char *target)
 {
   const bfd_target *target_vec;
 
@@ -239,7 +238,7 @@ set_endianess (bfd *abfd, const char *target)
   target_vec = bfd_get_target_info (target, abfd, &target_is_bigendian, NULL,
                                   &def_target_arch);
   if (! target_vec)
-    fatal ("Can't detect target endianess and architecture.");
+    fatal ("Can't detect target endianness and architecture.");
   if (! def_target_arch)
     fatal ("Can't detect architecture.");
 }
@@ -259,7 +258,7 @@ probe_codepage (rc_uint_type *cp, int *is_uni, const char *pswitch, int defmode)
       if (*cp != 0 && *cp != CP_UTF16)
        {
          fprintf (stderr, _("%s: warning: "), program_name);
-         fprintf (stderr, _("A codepage was specified switch ,%s' and UTF16.\n"), pswitch);
+         fprintf (stderr, _("A codepage was specified switch `%s' and UTF16.\n"), pswitch);
          fprintf (stderr, _("\tcodepage settings are ignored.\n"));
        }
       *cp = CP_UTF16;
@@ -699,7 +698,7 @@ windmc_write_bin (const char *filename, mc_node_lang **nl, int elems)
       dta_off += mi[i].res_len;
     }
   sec_length = (dta_off + 3) & ~3;
-  if (! bfd_set_section_size (mc_bfd.abfd, mc_bfd.sec, sec_length))
+  if (!bfd_set_section_size (mc_bfd.sec, sec_length))
     bfd_fatal ("bfd_set_section_size");
   /* Make sure we write the complete block.  */
   set_windmc_bfd_content ("\0", sec_length - 1, 1);
@@ -953,10 +952,12 @@ main (int argc, char **argv)
 
   program_name = argv[0];
   xmalloc_set_program_name (program_name);
+  bfd_set_error_program_name (program_name);
 
   expandargv (&argc, &argv);
 
-  bfd_init ();
+  if (bfd_init () != BFD_INIT_MAGIC)
+    fatal (_("fatal error: libbfd ABI mismatch"));
   set_default_bfd_target ();
 
   target = NULL;
@@ -1054,7 +1055,7 @@ main (int argc, char **argv)
       ++optind;
     }
 
-  set_endianess (NULL, target);
+  set_endianness (NULL, target);
 
   if (input_filename == NULL)
     {
@@ -1113,7 +1114,7 @@ main (int argc, char **argv)
     FILE *fp = fopen (input_filename, "rb");
 
     if (!fp)
-      fatal (_("unable to open file ,%s' for input.\n"), input_filename);
+      fatal (_("unable to open file `%s' for input.\n"), input_filename);
 
     fseek (fp, 0, SEEK_END);
     flen = ftell (fp);
This page took 0.024501 seconds and 4 git commands to generate.