Mercurial > hg > xemacs-beta
diff src/console.h @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | cca96a509cfe |
children | 41ff10fd062f |
line wrap: on
line diff
--- a/src/console.h Mon Aug 13 09:54:24 2007 +0200 +++ b/src/console.h Mon Aug 13 09:55:28 2007 +0200 @@ -304,31 +304,28 @@ /******** Defining new console types ********/ +typedef struct console_type_entry console_type_entry; struct console_type_entry { Lisp_Object symbol; struct console_methods *meths; }; -#define DECLARE_CONSOLE_TYPE(type) \ +#define DECLARE_CONSOLE_TYPE(type) \ extern struct console_methods * type##_console_methods -#define DEFINE_CONSOLE_TYPE(type) \ +#define DEFINE_CONSOLE_TYPE(type) \ struct console_methods * type##_console_methods -#define INITIALIZE_CONSOLE_TYPE(type, obj_name, pred_sym) \ - do { \ - type##_console_methods = \ - malloc_type_and_zero (struct console_methods); \ - type##_console_methods->name = obj_name; \ - type##_console_methods->symbol = Q##type; \ - defsymbol (&type##_console_methods->predicate_symbol, \ - pred_sym); \ - add_entry_to_console_type_list (Q##type, \ - type##_console_methods); \ - type##_console_methods->image_conversion_list = Qnil; \ - staticpro (&type##_console_methods->image_conversion_list); \ - } while (0) +#define INITIALIZE_CONSOLE_TYPE(type, obj_name, pred_sym) do { \ + type##_console_methods = xnew_and_zero (struct console_methods); \ + type##_console_methods->name = obj_name; \ + type##_console_methods->symbol = Q##type; \ + defsymbol (&type##_console_methods->predicate_symbol, pred_sym); \ + add_entry_to_console_type_list (Q##type, type##_console_methods); \ + type##_console_methods->image_conversion_list = Qnil; \ + staticpro (&type##_console_methods->image_conversion_list); \ +} while (0) /* Declare that console-type TYPE has method M; used in initialization routines */