#include "check.h"
#include "coll.h"
#include "scanner.h"
+#include "segnames.h"
#include "xmalloc.h"
/* cc65 */
void InitSegNames (void)
/* Initialize the segment names */
{
- SegmentNames [SEG_BSS] = xstrdup ("BSS");
- SegmentNames [SEG_CODE] = xstrdup ("CODE");
- SegmentNames [SEG_DATA] = xstrdup ("DATA");
- SegmentNames [SEG_RODATA] = xstrdup ("RODATA");
+ SegmentNames [SEG_BSS] = xstrdup (SEGNAME_BSS);
+ SegmentNames [SEG_CODE] = xstrdup (SEGNAME_CODE);
+ SegmentNames [SEG_DATA] = xstrdup (SEGNAME_DATA);
+ SegmentNames [SEG_RODATA] = xstrdup (SEGNAME_RODATA);
}
-int ValidSegName (const char* Name)
-/* Return true if the given segment name is valid, return false otherwise */
-{
- /* Must start with '_' or a letter */
- if ((*Name != '_' && !IsAlpha(*Name)) || strlen(Name) > 80) {
- return 0;
- }
-
- /* Can have letters, digits or the underline */
- while (*++Name) {
- if (*Name != '_' && !IsAlNum(*Name)) {
- return 0;
- }
- }
-
- /* Name is ok */
- return 1;
-}
-
-
-
static Segments* NewSegments (SymEntry* Func)
/* Initialize a Segments structure (set all fields to NULL) */
{