X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/81ec0e15af36d4ade14cd9ebb01c9a53d262c9be..26df5dd39a8c09397b19cd98ea51600af5a1dea4:/samples/console/console.cpp diff --git a/samples/console/console.cpp b/samples/console/console.cpp index b8b624de18..fa356714ad 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -6,7 +6,7 @@ // Created: 04.10.99 // RCS-ID: $Id$ // Copyright: (c) 1999 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -16,10 +16,10 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- - + // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" - + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -80,7 +80,7 @@ int main(int argc, char **argv) // kill the last '\n' input[wxStrlen(input) - 1] = 0; - + if (wxStrcmp(input, "quit") == 0) break; @@ -103,6 +103,14 @@ int main(int argc, char **argv) break; } + if ( argc == 1 ) + { + // If there were no command-line options supplied, emit a message + // otherwise it's not obvious that the sample ran successfully + wxPrintf("Welcome to the wxWidgets 'console' sample!\n"); + wxPrintf("For more information, run it again with the --help option\n"); + } + // do something useful here return 0;