From 2cb06ddf8e142ff8bd3ba671245a653ec0822088 Mon Sep 17 00:00:00 2001 From: izydorst Date: Fri, 10 Jan 2003 21:09:13 +0000 Subject: [PATCH] sample programs updated for new GEOS exit/return/MainLoop policy git-svn-id: svn://svn.cc65.org/cc65/trunk@1899 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- samples/geos/filesel.c | 5 ++--- samples/geos/geosconio.c | 2 -- samples/geos/hello1.c | 12 +++++++++--- samples/geos/hello2.c | 8 +++++++- samples/geos/rmvprot.c | 6 +++--- samples/geos/yesno.c | 5 ++--- 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/samples/geos/filesel.c b/samples/geos/filesel.c index a25aa3e1e..9247fc289 100644 --- a/samples/geos/filesel.c +++ b/samples/geos/filesel.c @@ -5,8 +5,8 @@ using DlgBoxFileSelect - Maciej 'YTM/Alliance' Witkowiak - + Maciej 'YTM/Elysium' Witkowiak + 26.12.1999 */ @@ -24,5 +24,4 @@ void main (void) DlgBoxFileSelect("",APPLICATION,fName); DlgBoxOk("You've chosen:" CBOLDON, fName); - EnterDeskTop(); } diff --git a/samples/geos/geosconio.c b/samples/geos/geosconio.c index 616127485..1c728f851 100644 --- a/samples/geos/geosconio.c +++ b/samples/geos/geosconio.c @@ -55,6 +55,4 @@ char ch; DlgBoxOk("Bye,", "Bye."); - EnterDeskTop(); - } diff --git a/samples/geos/hello1.c b/samples/geos/hello1.c index f4b5e626a..749cb29f9 100644 --- a/samples/geos/hello1.c +++ b/samples/geos/hello1.c @@ -5,8 +5,8 @@ Hello, world example - with DBox - Maciej 'YTM/Alliance' Witkowiak - + Maciej 'YTM/Elysium' Witkowiak + 26.12.1999 */ @@ -24,6 +24,12 @@ void main (void) /* Normal apps exit from main into system's mainloop, and app finish when user selects it from icons or menu, but here we want to exit immediately. + So instead: + MainLoop(); + we can do: + (nothing as this is the end of main function) + exit(0); + return; */ - EnterDeskTop(); + return; } diff --git a/samples/geos/hello2.c b/samples/geos/hello2.c index 8bc28ab3d..1692c4b5b 100644 --- a/samples/geos/hello2.c +++ b/samples/geos/hello2.c @@ -45,6 +45,12 @@ void main (void) /* Normal apps exit from main into system's mainloop, and app finish when user selects it from icons or menu, but here we want to exit immediately. + So instead: + MainLoop(); + we can do: + (nothing as this is the end of main function) + exit(0); + return; */ - EnterDeskTop(); + return; } diff --git a/samples/geos/rmvprot.c b/samples/geos/rmvprot.c index a249290ef..3e324da38 100644 --- a/samples/geos/rmvprot.c +++ b/samples/geos/rmvprot.c @@ -6,8 +6,8 @@ This small application removes GEOS disk write protection tag. e.g. boot disk is always protected after boot-up - Maciej 'YTM/Alliance' Witkowiak - + Maciej 'YTM/Elysium' Witkowiak + 21.03.2000 */ @@ -81,7 +81,7 @@ void main(void) GetPtrCurDkNm(diskName); break; default: /* CANCEL is the third option */ - EnterDeskTop(); + return; break; } } diff --git a/samples/geos/yesno.c b/samples/geos/yesno.c index b085db91a..dadf11449 100644 --- a/samples/geos/yesno.c +++ b/samples/geos/yesno.c @@ -5,8 +5,8 @@ example of using DlgBoxYesNo, DlgBoxOkCancel and DlgBoxOk functions - Maciej 'YTM/Alliance' Witkowiak - + Maciej 'YTM/Elysium' Witkowiak + 26.12.1999 */ @@ -23,5 +23,4 @@ void main(void) }; } while (DlgBoxOkCancel("Do you want to try again?", "") == OK); - EnterDeskTop(); }