Add a gentype.c module that contains GT_FromStrBuf.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5238 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -39,11 +39,26 @@
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/* Forwards */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
struct StrBuf;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* The data type used to encode a generic type */
|
||||
typedef unsigned char* gt_string;
|
||||
|
||||
|
||||
|
||||
/* Termination, so we can use string functions to handle type strings */
|
||||
#define GT_END 0x00U
|
||||
|
||||
@@ -88,7 +103,7 @@
|
||||
#define GT_IS_FUNCTION(x) (GT_GET_TYPE(x) == GT_FUNCTION)
|
||||
#define GT_IS_STRUCT(x) (GT_GET_TYPE(x) == GT_STRUCT)
|
||||
#define GT_IS_UNION(x) (GT_GET_TYPE(x) == GT_UNION)
|
||||
|
||||
|
||||
/* Combined values for the 6502 family */
|
||||
#define GT_BYTE (GT_INTEGER | GT_LITTLE_ENDIAN | GT_UNSIGNED | GT_SIZE_1)
|
||||
#define GT_WORD (GT_INTEGER | GT_LITTLE_ENDIAN | GT_UNSIGNED | GT_SIZE_2)
|
||||
@@ -99,6 +114,17 @@
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
gt_string GT_FromStrBuf (const struct StrBuf* S);
|
||||
/* Create a dynamically allocated type string from a string buffer */
|
||||
|
||||
|
||||
|
||||
/* End of gentype.h */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user