]> git.sur5r.net Git - cc65/commitdiff
Moved the segdefs module to ca65, since it was used only there and renamed it
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 4 Jan 2012 22:02:02 +0000 (22:02 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 4 Jan 2012 22:02:02 +0000 (22:02 +0000)
to segdef, since there might be a new segdefs module in common soon.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5381 b7a2c559-68d2-44c3-8de9-860c34a00d81

12 files changed:
src/ca65/make/gcc.mak
src/ca65/make/watcom.mak
src/ca65/segdef.c [new file with mode: 0644]
src/ca65/segdef.h [new file with mode: 0644]
src/ca65/segment.h
src/common/make/gcc.mak
src/common/make/watcom.mak
src/common/segdefs.c [deleted file]
src/common/segdefs.h [deleted file]
src/ld65/condes.c
src/ld65/segments.c
src/od65/dump.c

index 46d432bbd6bb0422ef0b286fbfe609ffbc4c4bd8..9d8e782a94995d98dbde8ad6956597ee1279da67 100644 (file)
@@ -55,6 +55,7 @@ OBJS =  anonname.o      \
        pseudo.o        \
        repeat.o        \
        scanner.o       \
+        segdef.o        \
        segment.o       \
        sizeof.o        \
        span.o          \
index 8760b0691a7f011f4def187114cfd70021d7ad22..e7802d8cb8885762a30467fa30e063b4388114c1 100644 (file)
@@ -88,6 +88,7 @@ OBJS =        anonname.obj    \
        pseudo.obj      \
        repeat.obj      \
        scanner.obj     \
+        segdef.obj      \
         segment.obj     \
         sizeof.obj      \
         span.obj        \
diff --git a/src/ca65/segdef.c b/src/ca65/segdef.c
new file mode 100644 (file)
index 0000000..a08a18d
--- /dev/null
@@ -0,0 +1,83 @@
+/*****************************************************************************/
+/*                                                                           */
+/*                                segdef.c                                  */
+/*                                                                           */
+/*             Segment definitions for the ca65 assembler                   */
+/*                                                                           */
+/*                                                                           */
+/*                                                                           */
+/* (C) 1998-2012, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
+/*                                                                           */
+/*                                                                           */
+/* This software is provided 'as-is', without any expressed or implied       */
+/* warranty.  In no event will the authors be held liable for any damages    */
+/* arising from the use of this software.                                    */
+/*                                                                           */
+/* Permission is granted to anyone to use this software for any purpose,     */
+/* including commercial applications, and to alter it and redistribute it    */
+/* freely, subject to the following restrictions:                            */
+/*                                                                           */
+/* 1. The origin of this software must not be misrepresented; you must not   */
+/*    claim that you wrote the original software. If you use this software   */
+/*    in a product, an acknowledgment in the product documentation would be  */
+/*    appreciated but is not required.                                       */
+/* 2. Altered source versions must be plainly marked as such, and must not   */
+/*    be misrepresented as being the original software.                      */
+/* 3. This notice may not be removed or altered from any source              */
+/*    distribution.                                                          */
+/*                                                                           */
+/*****************************************************************************/
+
+
+
+/* common */
+#include "xmalloc.h"
+
+/* ca65 */
+#include "segdef.h"
+
+
+
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+SegDef* NewSegDef (const char* Name, unsigned char AddrSize)
+/* Create a new segment definition and return it */
+{
+    /* Allocate memory */
+    SegDef* D = xmalloc (sizeof (SegDef));
+
+    /* Initialize it */
+    D->Name     = xstrdup (Name);
+    D->AddrSize = AddrSize;
+
+    /* Return the result */
+    return D;
+}
+
+
+
+void FreeSegDef (SegDef* D)
+/* Free a segment definition */
+{
+    xfree (D->Name);
+    xfree (D);
+}
+
+
+
+SegDef* DupSegDef (const SegDef* Def)
+/* Duplicate a segment definition and return it */
+{
+    return NewSegDef (Def->Name, Def->AddrSize);
+}
+
+
+
+
diff --git a/src/ca65/segdef.h b/src/ca65/segdef.h
new file mode 100644 (file)
index 0000000..bea326e
--- /dev/null
@@ -0,0 +1,86 @@
+/*****************************************************************************/
+/*                                                                           */
+/*                                segdef.h                                  */
+/*                                                                           */
+/*             Segment definitions for the ca65 assembler                   */
+/*                                                                           */
+/*                                                                           */
+/*                                                                           */
+/* (C) 1998-2012, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
+/*                                                                           */
+/*                                                                           */
+/* This software is provided 'as-is', without any expressed or implied       */
+/* warranty.  In no event will the authors be held liable for any damages    */
+/* arising from the use of this software.                                    */
+/*                                                                           */
+/* Permission is granted to anyone to use this software for any purpose,     */
+/* including commercial applications, and to alter it and redistribute it    */
+/* freely, subject to the following restrictions:                            */
+/*                                                                           */
+/* 1. The origin of this software must not be misrepresented; you must not   */
+/*    claim that you wrote the original software. If you use this software   */
+/*    in a product, an acknowledgment in the product documentation would be  */
+/*    appreciated but is not required.                                       */
+/* 2. Altered source versions must be plainly marked as such, and must not   */
+/*    be misrepresented as being the original software.                      */
+/* 3. This notice may not be removed or altered from any source              */
+/*    distribution.                                                          */
+/*                                                                           */
+/*****************************************************************************/
+
+
+
+#ifndef SEGDEF_H
+#define SEGDEF_H
+
+
+
+/* common */
+#include "addrsize.h"
+
+
+
+/*****************************************************************************/
+/*                                          Data                                    */
+/*****************************************************************************/
+
+
+
+/* Segment definition */
+typedef struct SegDef SegDef;
+struct SegDef {
+    char*         Name;         /* Segment name */
+    unsigned char AddrSize;     /* Default address size */
+};
+
+/* Initializer for static SegDefs */
+#define STATIC_SEGDEF_INITIALIZER(name, addrsize) { name, addrsize }
+
+
+
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+SegDef* NewSegDef (const char* Name, unsigned char AddrSize);
+/* Create a new segment definition and return it */
+
+void FreeSegDef (SegDef* D);
+/* Free a segment definition */
+
+SegDef* DupSegDef (const SegDef* D);
+/* Duplicate a segment definition and return it */
+
+
+
+/* End of segdefs.h */
+
+#endif
+
+
+
index 0575bc7748f449b9213e772896e02bdbbd23d4fb..faa3c5289ea5c9a664e76d1edbbef3007801b4d8 100644 (file)
 #include "coll.h"
 #include "fragdefs.h"
 #include "inline.h"
-#include "segdefs.h"
 
 /* ca65 */
 #include "fragment.h"
+#include "segdef.h"
 
 
 
index 049f44eedf04092667a5aa8d815d74fd3971cd81..54484a7a7daab815dbbb0a24519b58f43fac8d7e 100644 (file)
@@ -37,7 +37,6 @@ OBJS =        abend.o         \
        mmodel.o        \
        print.o         \
        searchpath.o    \
-       segdefs.o       \
        segnames.o      \
        shift.o         \
        strbuf.o        \
index 99a9924fc9573d589c3a35c4e07f048348c2c28a..e9d7e01c117a7799a0b0e2562e2f582704d81b58 100644 (file)
@@ -79,7 +79,6 @@ OBJS =        abend.obj       \
         mmodel.obj      \
        print.obj       \
         searchpath.obj  \
-        segdefs.obj     \
         segnames.obj    \
         shift.obj       \
        strbuf.obj      \
diff --git a/src/common/segdefs.c b/src/common/segdefs.c
deleted file mode 100644 (file)
index 5e0c5e9..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************/
-/*                                                                           */
-/*                                segdefs.c                                 */
-/*                                                                           */
-/*             Segment definitions for the bin65 binary utils               */
-/*                                                                           */
-/*                                                                           */
-/*                                                                           */
-/* (C) 2002-2003 Ullrich von Bassewitz                                       */
-/*               Römerstraße 52                                              */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
-/*                                                                           */
-/*                                                                           */
-/* This software is provided 'as-is', without any expressed or implied       */
-/* warranty.  In no event will the authors be held liable for any damages    */
-/* arising from the use of this software.                                    */
-/*                                                                           */
-/* Permission is granted to anyone to use this software for any purpose,     */
-/* including commercial applications, and to alter it and redistribute it    */
-/* freely, subject to the following restrictions:                            */
-/*                                                                           */
-/* 1. The origin of this software must not be misrepresented; you must not   */
-/*    claim that you wrote the original software. If you use this software   */
-/*    in a product, an acknowledgment in the product documentation would be  */
-/*    appreciated but is not required.                                       */
-/* 2. Altered source versions must be plainly marked as such, and must not   */
-/*    be misrepresented as being the original software.                      */
-/* 3. This notice may not be removed or altered from any source              */
-/*    distribution.                                                          */
-/*                                                                           */
-/*****************************************************************************/
-
-
-
-/* common */
-#include "xmalloc.h"
-#include "segdefs.h"
-
-
-
-/*****************************************************************************/
-/*                                          Code                                    */
-/*****************************************************************************/
-
-
-
-SegDef* NewSegDef (const char* Name, unsigned char AddrSize)
-/* Create a new segment definition and return it */
-{
-    /* Allocate memory */
-    SegDef* D = xmalloc (sizeof (SegDef));
-
-    /* Initialize it */
-    D->Name     = xstrdup (Name);
-    D->AddrSize = AddrSize;
-
-    /* Return the result */
-    return D;
-}
-
-
-
-void FreeSegDef (SegDef* D)
-/* Free a segment definition */
-{
-    xfree (D->Name);
-    xfree (D);
-}
-
-
-
-SegDef* DupSegDef (const SegDef* Def)
-/* Duplicate a segment definition and return it */
-{
-    return NewSegDef (Def->Name, Def->AddrSize);
-}
-
-
-
-                                                   
diff --git a/src/common/segdefs.h b/src/common/segdefs.h
deleted file mode 100644 (file)
index 5fbb8cb..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*****************************************************************************/
-/*                                                                           */
-/*                                segdefs.h                                 */
-/*                                                                           */
-/*             Segment definitions for the bin65 binary utils               */
-/*                                                                           */
-/*                                                                           */
-/*                                                                           */
-/* (C) 1998-2003 Ullrich von Bassewitz                                       */
-/*               Römerstraße 52                                              */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
-/*                                                                           */
-/*                                                                           */
-/* This software is provided 'as-is', without any expressed or implied       */
-/* warranty.  In no event will the authors be held liable for any damages    */
-/* arising from the use of this software.                                    */
-/*                                                                           */
-/* Permission is granted to anyone to use this software for any purpose,     */
-/* including commercial applications, and to alter it and redistribute it    */
-/* freely, subject to the following restrictions:                            */
-/*                                                                           */
-/* 1. The origin of this software must not be misrepresented; you must not   */
-/*    claim that you wrote the original software. If you use this software   */
-/*    in a product, an acknowledgment in the product documentation would be  */
-/*    appreciated but is not required.                                       */
-/* 2. Altered source versions must be plainly marked as such, and must not   */
-/*    be misrepresented as being the original software.                      */
-/* 3. This notice may not be removed or altered from any source              */
-/*    distribution.                                                          */
-/*                                                                           */
-/*****************************************************************************/
-
-
-
-#ifndef SEGDEFS_H
-#define SEGDEFS_H
-
-
-
-/* common */
-#include "addrsize.h"
-
-
-
-/*****************************************************************************/
-/*                                          Data                                    */
-/*****************************************************************************/
-
-
-
-/* Segment definition */
-typedef struct SegDef SegDef;
-struct SegDef {
-    char*         Name;         /* Segment name */
-    unsigned char AddrSize;     /* Default address size */
-};
-
-/* Initializer for static SegDefs */
-#define STATIC_SEGDEF_INITIALIZER(name, addrsize) { name, addrsize }
-
-
-
-/*****************************************************************************/
-/*                                          Code                                    */
-/*****************************************************************************/
-
-
-
-SegDef* NewSegDef (const char* Name, unsigned char AddrSize);
-/* Create a new segment definition and return it */
-
-void FreeSegDef (SegDef* D);
-/* Free a segment definition */
-
-SegDef* DupSegDef (const SegDef* D);
-/* Duplicate a segment definition and return it */
-
-
-                                                   
-/* End of segdefs.h */
-
-#endif
-
-
-
index 1e0406a648f8c2385f10baff32503f562052546a..836c9a58a8bf9ffe8c6fad9a53b8b781c92e9523 100644 (file)
@@ -40,7 +40,6 @@
 #include "check.h"
 #include "coll.h"
 #include "fragdefs.h"
-#include "segdefs.h"
 #include "xmalloc.h"
 
 /* ld65 */
index b67d0e2213e644911a0f01b025df26f5b6ad5729..a4e54317c30e81496e2d5c72790be92e98f31bde 100644 (file)
@@ -37,6 +37,7 @@
 #include <string.h>
 
 /* common */
+#include "addrsize.h"
 #include "alignment.h"
 #include "check.h"
 #include "coll.h"
@@ -44,7 +45,6 @@
 #include "fragdefs.h"
 #include "hashfunc.h"
 #include "print.h"
-#include "segdefs.h"
 #include "symdefs.h"
 #include "xmalloc.h"
 
@@ -105,7 +105,7 @@ static Segment* NewSegment (unsigned Name, unsigned char AddrSize)
     S->ReadOnly    = 0;
     S->Dumped      = 0;
     S->BankRef     = 0;
-                
+
     /* Insert the segment into the segment list and assign the segment id */
     S->Id = CollCount (&SegmentList);
     CollAppend (&SegmentList, S);
index 92ead85c1357618e376d49614546584cbf9b18f0..e0cf5c010a05155bf39d18e39af5c91b383f5e63 100644 (file)
@@ -46,7 +46,6 @@
 #include "objdefs.h"
 #include "optdefs.h"
 #include "scopedefs.h"
-#include "segdefs.h"
 #include "symdefs.h"
 #include "xmalloc.h"