]> git.sur5r.net Git - cc65/blobdiff - samples/geos/overlay-demo.c
Merge pull request #834 from jedeoric/master
[cc65] / samples / geos / overlay-demo.c
index cc751ea37ae7581f7bc73eac083b719c287eff37..a37f6bdcb697f434a9a4f0072b093d750172f476 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * Minimalistic GEOSLib overlay demo program
- *
- * 2012-01-01, Oliver Schmidt (ol.sc@web.de)
- *
- */
+** Minimalistic GEOSLib overlay demo program
+**
+** 2012-01-01, Oliver Schmidt (ol.sc@web.de)
+**
+*/
 
 
 #include <stdio.h>
 
 
 /* Functions resident in an overlay can call back functions resident in the
- * main program at any time without any precautions. The function show() is
- * an example for such a function resident in the main program.
- */
+** main program at any time without any precautions. The function show() is
+** an example for such a function resident in the main program.
+*/
 void show(char *name)
 {
     char line1[40];
 
     sprintf(line1, CBOLDON "Overlay Demo - Overlay %s" CPLAINTEXT, name);
-    DlgBoxOk(line1,
-             "Click OK to return to Main.");
+    DlgBoxOk(line1, "Click OK to return to Main.");
 }
 
 /* In a real-world overlay program one would probably not use a #pragma but
- * rather place the all the code of certain souce files into the overlay by
- * compiling them with --code-name OVERLAY1.
- */
+** rather place the all the code of certain source files into the overlay by
+** compiling them with --code-name OVERLAY1.
+*/
 #pragma code-name(push, "OVERLAY1");
 
 void foo(void)
 {
     /* Functions resident in an overlay can access all program variables and
-     * constants at any time without any precautions because those are never
-     * placed in overlays. The string constant "One" is an example for such 
-     * a constant resident in the main program.
-     */
+    ** constants at any time without any precautions because those are never
+    ** placed in overlays. The string constant "One" is an example for such 
+    ** a constant resident in the main program.
+    */
     show("One");
 }
 
@@ -79,18 +78,18 @@ void main(int /*argc*/, char *argv[])
     }
 
     /* The macro definitions OVERLAY_ADDR and OVERLAY_SIZE were generated in
-     * overlay-demores.h by grc65. They contain the overlay area address and
-     * size specific to a certain program.
-     */
+    ** overlay-demores.h by grc65. They contain the overlay area address and
+    ** size specific to a certain program.
+    */
     if (ReadRecord(OVERLAY_ADDR, OVERLAY_SIZE)) {
         _poserror("ReadRecord.1");
         return;
     }
 
     /* The linker makes sure that the call to foo() ends up at the right mem
-     * addr. However it's up to user to make sure that the - right - overlay
-     * is actually loaded before making the the call.
-     */
+    ** addr. However, it's up to user to make sure that the -- right -- overlay
+    ** actually is loaded before making the call.
+    */
     foo();
 
     DlgBoxOk(CBOLDON "Overlay Demo - Main" CPLAINTEXT,
@@ -102,8 +101,8 @@ void main(int /*argc*/, char *argv[])
     }
 
     /* Replacing one overlay with another one can only happen from the main
-     * program. This implies that an overlay can never load another overlay.
-     */
+    ** program. This implies that an overlay can never load another overlay.
+    */
     if (ReadRecord(OVERLAY_ADDR, OVERLAY_SIZE)) {
         _poserror("ReadRecord.2");
         return;