1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / language.h
index 02fccec1ee053671c57a9058b033522e66f2d070..e33686914919e3e3563653ff629270d0a29d8c9a 100644 (file)
@@ -17,7 +17,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.  */
 
 #if !defined (LANGUAGE_H)
 #define LANGUAGE_H 1
@@ -134,12 +134,16 @@ struct language_defn
   void (*la_error) PARAMS ((char *));
 
   /* Evaluate an expression. */
-  struct value * (*evaluate_exp) PARAMS ((struct type*, struct expression *, 
+  struct value * (*evaluate_exp) PARAMS ((struct type *, struct expression *, 
                                          int *, enum noside));
 
-  void (*la_printchar) PARAMS ((int, GDB_FILE *));
+  void (*la_printchar) PARAMS ((int ch, GDB_FILE *stream));
 
-  void (*la_printstr) PARAMS ((GDB_FILE *, char *, unsigned int, int));
+  void (*la_printstr) PARAMS ((GDB_FILE *stream, char *string,
+                              unsigned int length, int width,
+                              int force_ellipses));
+
+  void (*la_emitchar) PARAMS ((int ch, GDB_FILE *stream, int quoter));
 
   struct type *(*la_fund_type) PARAMS ((struct objfile *, int));
 
@@ -149,7 +153,7 @@ struct language_defn
 
   /* Print a value using syntax appropriate for this language. */
 
-  int (*la_val_print) PARAMS ((struct type *, char *,  CORE_ADDR, GDB_FILE *,
+  int (*la_val_print) PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
                               int, int, int, enum val_prettyprint));
 
   /* Print a top-level value using syntax appropriate for this language. */
@@ -245,7 +249,7 @@ extern enum language_mode
 extern void
 language_info PARAMS ((int));
 
-extern void
+extern enum language
 set_language PARAMS ((enum language));
 
 \f
@@ -260,8 +264,8 @@ set_language PARAMS ((enum language));
 #define LA_PRINT_TYPE(type,varstring,stream,show,level) \
   (current_language->la_print_type(type,varstring,stream,show,level))
 
-#define LA_VAL_PRINT(type,valaddr,addr,stream,fmt,deref,recurse,pretty) \
-  (current_language->la_val_print(type,valaddr,addr,stream,fmt,deref, \
+#define LA_VAL_PRINT(type,valaddr,offset,addr,stream,fmt,deref,recurse,pretty) \
+  (current_language->la_val_print(type,valaddr,offset,addr,stream,fmt,deref, \
                                  recurse,pretty))
 #define LA_VALUE_PRINT(val,stream,fmt,pretty) \
   (current_language->la_value_print(val,stream,fmt,pretty))
@@ -309,8 +313,10 @@ set_language PARAMS ((enum language));
 
 #define LA_PRINT_CHAR(ch, stream) \
   (current_language->la_printchar(ch, stream))
-#define LA_PRINT_STRING(stream, string, length, force_ellipses) \
-  (current_language->la_printstr(stream, string, length, force_ellipses))
+#define LA_PRINT_STRING(stream, string, length, width, force_ellipses) \
+  (current_language->la_printstr(stream, string, length, width, force_ellipses))
+#define LA_EMIT_CHAR(ch, stream, quoter) \
+  (current_language->la_emitchar(ch, stream, quoter))
 
 /* Test a character to decide whether it can be printed in literal form
    or needs to be printed in another representation.  For example,
@@ -318,8 +324,10 @@ set_language PARAMS ((enum language));
    and the "other representation" is '\141'.  The "other representation"
    is program language dependent. */
 
-#define PRINT_LITERAL_FORM(c) \
-  ((c)>=0x20 && ((c)<0x7F || (c)>=0xA0) && (!sevenbit_strings || (c)<0x80))
+#define PRINT_LITERAL_FORM(c)          \
+  ((c) >= 0x20                         \
+   && ((c) < 0x7F || (c) >= 0xA0)      \
+   && (!sevenbit_strings || (c) < 0x80))
 
 /* Return a format string for printf that will print a number in one of
    the local (language-specific) formats.  Result is static and is
@@ -395,16 +403,23 @@ op_error PARAMS ((char *fmt, enum exp_opcode, int));
    op_error((f),(o),range_check==range_check_on ? 1 : 0)
 
 extern void
-type_error ();
+type_error PARAMS ((char *, ...))
+     ATTR_FORMAT(printf, 1, 2);
 
 void
-range_error ();
+range_error PARAMS ((char *, ...))
+     ATTR_FORMAT(printf, 1, 2);
 
 /* Data:  Does this value represent "truth" to the current language?  */
 
 extern int
 value_true PARAMS ((struct value *));
 
+extern struct type * lang_bool_type PARAMS ((void));
+
+/* The type used for Boolean values in the current language. */
+#define LA_BOOL_TYPE lang_bool_type ()
+
 /* Misc:  The string representing a particular enum language.  */
 
 extern const struct language_defn *
This page took 0.024429 seconds and 4 git commands to generate.