From: cuz Date: Sun, 14 Sep 2003 19:27:59 +0000 (+0000) Subject: Added SegTypeToStr X-Git-Tag: V2.12.0~1332 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3604512985747712642e8094892f10905d62c074;p=cc65 Added SegTypeToStr git-svn-id: svn://svn.cc65.org/cc65/trunk@2439 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/common/segdefs.c b/src/common/segdefs.c index a2d3bb7db..cf289104f 100644 --- a/src/common/segdefs.c +++ b/src/common/segdefs.c @@ -80,3 +80,16 @@ SegDef* DupSegDef (const SegDef* Def) +const char* SetTypeToStr (unsigned char Type) +/* Map a segment type into a string */ +{ + switch (Type) { + case SEGTYPE_ABS: return "abs"; + case SEGTYPE_ZP: return "zp"; + case SEGTYPE_FAR: return "far"; + default: return "unknown"; + } +} + + + diff --git a/src/common/segdefs.h b/src/common/segdefs.h index c41edaff3..dd7dfbe7d 100644 --- a/src/common/segdefs.h +++ b/src/common/segdefs.h @@ -77,6 +77,9 @@ void FreeSegDef (SegDef* D); SegDef* DupSegDef (const SegDef* D); /* Duplicate a segment definition and return it */ +const char* SetTypeToStr (unsigned char Type); +/* Map a segment type into a string */ + /* End of segdefs.h */