Show
Ignore:
Timestamp:
04/06/03 23:32:44 (11 years ago)
Author:
robert
Message:

Added the usage report to the examples for when no arguments are passed
to the examples.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgscribe/osgscribe.cpp

    r1747 r1815  
    2121 
    2222    // set up the usage document, in case we need to print out how to use this program. 
    23     arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); 
     23    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); 
    2424    arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 
    2525    
     
    4747    { 
    4848        arguments.writeErrorMessages(std::cout); 
     49        return 1; 
     50    } 
     51     
     52    if (arguments.argc()<=1) 
     53    { 
     54        arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); 
    4955        return 1; 
    5056    }