+2001-07-09 Andrew Cagney <ac131313@redhat.com>
+
+ * serial.h (struct serial): Rename `struct _serial_t'.
+ * serial.c (XMALLOC): Define.
+ (serial_open): Update. Use XMALLOC.
+ (serial_fdopen): Ditto.
+
2001-07-07 Andrew Cagney <ac131313@redhat.com>
* gdbtypes.h (builtin_type_void_data_ptr): Rename
static const char *logbase_enums[] =
{logbase_hex, logbase_octal, logbase_ascii, NULL};
static const char *serial_logbase = logbase_ascii;
+
+#undef XMALLOC
+#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
\f
if (!ops)
return NULL;
- scb = (serial_t) xmalloc (sizeof (struct _serial_t));
+ scb = XMALLOC (struct serial);
scb->ops = ops;
if (!ops)
return NULL;
- scb = (serial_t) xmalloc (sizeof (struct _serial_t));
+ scb = XMALLOC (struct serial);
scb->ops = ops;
interface. */
typedef void *serial_ttystate;
-struct _serial_t;
-typedef struct _serial_t *serial_t;
+struct serial;
+typedef struct serial *serial_t;
/* Try to open NAME. Returns a new serial_t on success, NULL on
failure. */
/* Details of an instance of a serial object */
-struct _serial_t
+struct serial
{
int fd; /* File descriptor */
struct serial_ops *ops; /* Function vector */
still need to wait for this many
more seconds. */
char *name; /* The name of the device or host */
- struct _serial_t *next; /* Pointer to the next serial_t */
+ struct serial *next; /* Pointer to the next serial_t */
int refcnt; /* Number of pointers to this block */
int debug_p; /* Trace this serial devices operation. */
int async_state; /* Async internal state. */