]> git.sur5r.net Git - cc65/blobdiff - samples/multidemo.c
Use array type declaration to avoid &-operator.
[cc65] / samples / multidemo.c
index 5e505083e5f7d56642018ee8f6f3e634a6f72c34..e44a34b969fe2d968ca131a817690373387b5de5 100644 (file)
  * linker. They contain the overlay area address and size specific to a
  * certain program.
  */
-extern void _OVERLAY1_LOAD__, _OVERLAY1_SIZE__;
-extern void _OVERLAY2_LOAD__, _OVERLAY2_SIZE__;
-extern void _OVERLAY3_LOAD__, _OVERLAY3_SIZE__;
-extern void _OVERLAY4_LOAD__, _OVERLAY4_SIZE__;
+extern void _OVERLAY1_LOAD__[], _OVERLAY1_SIZE__[];
+extern void _OVERLAY2_LOAD__[], _OVERLAY2_SIZE__[];
+extern void _OVERLAY3_LOAD__[], _OVERLAY3_SIZE__[];
+extern void _OVERLAY4_LOAD__[], _OVERLAY4_SIZE__[];
 
 struct {
     char     *name;
@@ -32,10 +32,10 @@ struct {
     void     *addr;
     unsigned size;
 } overlay[] =
-    {{"multdemo.1", -1, &_OVERLAY1_LOAD__, (unsigned)&_OVERLAY1_SIZE__},
-     {"multdemo.2", -1, &_OVERLAY2_LOAD__, (unsigned)&_OVERLAY2_SIZE__},
-     {"multdemo.3", -1, &_OVERLAY3_LOAD__, (unsigned)&_OVERLAY3_SIZE__},
-     {"multdemo.4", -1, &_OVERLAY4_LOAD__, (unsigned)&_OVERLAY4_SIZE__}};
+    {{"multdemo.1", -1, _OVERLAY1_LOAD__, (unsigned)_OVERLAY1_SIZE__},
+     {"multdemo.2", -1, _OVERLAY2_LOAD__, (unsigned)_OVERLAY2_SIZE__},
+     {"multdemo.3", -1, _OVERLAY3_LOAD__, (unsigned)_OVERLAY3_SIZE__},
+     {"multdemo.4", -1, _OVERLAY4_LOAD__, (unsigned)_OVERLAY4_SIZE__}};
 
 /* Copy overlays into extended memory up to overlay 3. Overlay 4 is known to
  * to be loaded only once for onetime initialization purposes so there's no