From 3604512985747712642e8094892f10905d62c074 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 14 Sep 2003 19:27:59 +0000 Subject: [PATCH] Added SegTypeToStr git-svn-id: svn://svn.cc65.org/cc65/trunk@2439 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/segdefs.c | 13 +++++++++++++ src/common/segdefs.h | 3 +++ 2 files changed, 16 insertions(+) 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 */ -- 2.39.5