#endif lint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*
-/* gdb_stype.c
-/*
-/* GDB - System Data Type Definitions
-/*
-/* Author: Noah Mendelsohn
-/* Copyright: 1986 MIT Project Athena
-/* For copying and distribution information, please see
-/* the file <mit-copyright.h>.
-/*
-/* This file initializes the definitions for all system defined
-/* data types, and it includes the type specific semantic routines
-/* for each of the system defined types.
-/*
-/* The initialization routine which adds these type definitions
-/* to the type definition table is at the end of this source file.
-/*
-/************************************************************************/
-/*
-/* This file is organized into one section for each system
-/* defined type followed at the end by a final section which
-/* initializes the type tables. Each of the type specific
-/* sections does #defines for each type specific parameter. The
-/* gdb_i_stype initialization routine at the end of this source
-/* file uses these defines to initialize the appropriate entry in
-/* the type definition tables.
-/*
-/* NOTE: some of the type definitions in this file may be machine
-/* dependent.
-/*
-/************************************************************************/
+/************************************************************************
+ *
+ * gdb_stype.c
+ *
+ * GDB - System Data Type Definitions
+ *
+ * Author: Noah Mendelsohn
+ * Copyright: 1986 MIT Project Athena
+ * For copying and distribution information, please see
+ * the file <mit-copyright.h>.
+ *
+ * This file initializes the definitions for all system defined
+ * data types, and it includes the type specific semantic routines
+ * for each of the system defined types.
+ *
+ * The initialization routine which adds these type definitions
+ * to the type definition table is at the end of this source file.
+ *
+ ************************************************************************
+ *
+ * This file is organized into one section for each system
+ * defined type followed at the end by a final section which
+ * initializes the type tables. Each of the type specific
+ * sections does #defines for each type specific parameter. The
+ * gdb_i_stype initialization routine at the end of this source
+ * file uses these defines to initialize the appropriate entry in
+ * the type definition tables.
+ *
+ * NOTE: some of the type definitions in this file may be machine
+ * dependent.
+ *
+ ************************************************************************/
#include <mit-copyright.h>
#include <stdio.h>
-#include <strings.h>
+#include <string.h>
#include "gdb.h"
#ifdef vax /* XXX */
extern u_long ntohl(), htonl();
#endif vax
#include <netinet/in.h> /* for htonl routine */
-\f
-/************************************************************************/
-/*
-/* INTEGER_T
-/*
-/************************************************************************/
+
+
+/************************************************************************
+ *
+ * INTEGER_T
+ *
+ ************************************************************************/
#define IN_LEN (sizeof(int))
#define IN_ALI IN_LEN
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_in_cdlen(dp,hcon)
char *dp; /* pointer to the data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_in_enc(dp, hcon, outp)
char *dp; /* pointer to data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_in_dec(outp, hcon, inp)
char *inp; /* pointer to data */
{
fprintf(gdb_log, "INTEGER_T\t%s=%d\n",name,(*(int *)dp));
}
-\f
+
+
/************************************************************************/
/*
/* STRING_T
* Now, copy the data itself after the encoded integer length
*/
if (len > 0)
- bcopy(STRING_DATA(*stp), nextp, len);
+ memcpy(nextp, STRING_DATA(*stp), len);
/* copy the data without */
/* changing representation*/
return (int)(nextp+len);
/*
* Now, copy the data itself
*/
- bcopy(nextp, STRING_DATA(*stp), len); /* copy the data without */
+ memcpy(STRING_DATA(*stp), nextp, len); /* copy the data without */
/* changing representation*/
return (int)(nextp+len);
}
fprintf(gdb_log,"\"\n");
}
-\f
+
+
/************************************************************************/
/*
/* REAL_T
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_rl_cdlen(dp,hcon)
char *dp; /* pointer to the data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_rl_enc(dp, hcon, outp)
char *dp; /* pointer to data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_rl_dec(outp, hcon, inp)
char *inp; /* pointer to data */
{
fprintf(gdb_log, "REAL_T\t\t%s=%le\n",name,*((double *)dp) );
}
-\f
+
+
/************************************************************************/
/*
/* DATE_T
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_dt_cdlen(dp,hcon)
char *dp; /* pointer to the data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_dt_enc(dp, hcon, outp)
char *dp; /* pointer to data */
/*
/*----------------------------------------------------------*/
+/*ARGSUSED*/
int
g_dt_dec(outp, hcon, inp)
char *inp; /* pointer to data */
{
char buf[DT_EXTERNSIZE+1];
- bcopy(dp, buf, DT_EXTERNSIZE); /* copy date to buffer */
+ memcpy(buf, dp, DT_EXTERNSIZE); /* copy date to buffer */
buf[DT_EXTERNSIZE] = '\0'; /* null terminate it */
fprintf(gdb_log, "DATE_T\t\t%s=%s\n",name,buf);
}
-\f
+
+
/************************************************************************/
/*
/* TUPLE_DESCRIPTOR_T
/*
* Finally, copy all the null terminated strings.
*/
- bcopy(((char *)(tdp))+gdb_descriptor_length(tdp->field_count),
- nextp, tdp->str_len); /* copy the string data all */
+ memcpy(nextp,((char *)(tdp))+gdb_descriptor_length(tdp->field_count),
+ tdp->str_len); /* copy the string data all */
/* at once */
return (int)(nextp+tdp->str_len);
}
}
fprintf(gdb_log,"\n");
}
-\f
+
+
/************************************************************************/
/*
/* TUPLE_T
fprintf(gdb_log,"END_OF_TUPLE\n");
}
-\f
+
+
/************************************************************************/
/*
/* TUPLE_DATA_T
fprintf(gdb_log,"END_OF_TUPLE\n");
}
-\f
+
+
/************************************************************************/
/*
/* RELATION_T
fprintf(gdb_log,"END_OF_RELATION\n");
}
-\f
+
+
/************************************************************************/
/*
/* DECLARE AND INITIALIZE THE SYSTEM TYPE DEFINITION