]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/m2-lang.c
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / gdb / m2-lang.c
index 4eac7e60a6c3865069357980a5284a4c58d61f89..f5f38a9d3ed66f0ca5bb6f61652609fa89aecba6 100644 (file)
@@ -15,7 +15,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "symtab.h"
@@ -26,6 +26,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "m2-lang.h"
 #include "c-lang.h"
 
+static struct type *m2_create_fundamental_type PARAMS ((struct objfile *, int));
+static void m2_printstr PARAMS ((GDB_FILE *stream, char *string, unsigned int length, int width, int force_ellipses));
+static void m2_printchar PARAMS ((int, GDB_FILE *));
+static void m2_emit_char PARAMS ((int, GDB_FILE *, int));
+
 /* Print the character C on STREAM as part of the contents of a literal
    string whose delimiter is QUOTER.  Note that that format for printing
    characters and strings is language specific.
@@ -34,7 +39,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  */
 
 static void
-emit_char (c, stream, quoter)
+m2_emit_char (c, stream, quoter)
      register int c;
      GDB_FILE *stream;
      int quoter;
@@ -91,7 +96,7 @@ m2_printchar (c, stream)
      GDB_FILE *stream;
 {
   fputs_filtered ("'", stream);
-  emit_char (c, stream, '\'');
+  LA_EMIT_CHAR (c, stream, '\'');
   fputs_filtered ("'", stream);
 }
 
@@ -103,10 +108,11 @@ m2_printchar (c, stream)
    be replaced with a true Modula version. */
 
 static void
-m2_printstr (stream, string, length, force_ellipses)
+m2_printstr (stream, string, length, width, force_ellipses)
      GDB_FILE *stream;
      char *string;
      unsigned int length;
+     int width;
      int force_ellipses;
 {
   register unsigned int i;
@@ -173,7 +179,7 @@ m2_printstr (stream, string, length, force_ellipses)
                fputs_filtered ("\"", stream);
              in_quotes = 1;
            }
-         emit_char (string[i], stream, '"');
+         LA_EMIT_CHAR (string[i], stream, '"');
          ++things_printed;
        }
     }
@@ -398,7 +404,7 @@ struct type *builtin_type_m2_card;
 struct type *builtin_type_m2_real;
 struct type *builtin_type_m2_bool;
 
-struct type ** const (m2_builtin_types[]) = 
+struct type ** CONST_PTR (m2_builtin_types[]) = 
 {
   &builtin_type_m2_char,
   &builtin_type_m2_int,
@@ -419,6 +425,7 @@ const struct language_defn m2_language_defn = {
   evaluate_subexp_standard,
   m2_printchar,                        /* Print character constant */
   m2_printstr,                 /* function to print string constant */
+  m2_emit_char,                        /* Function to print a single character */
   m2_create_fundamental_type,  /* Create fundamental type in this language */
   m2_print_type,               /* Print a type using appropriate syntax */
   m2_val_print,                        /* Print a value using appropriate syntax */