Show
Ignore:
Timestamp:
04/06/03 23:32:44 (12 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/osgcopy/osgcopy.cpp

    r1747 r1815  
    134134 
    135135    // set up the usage document, in case we need to print out how to use this program. 
    136     arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); 
     136    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); 
    137137    arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 
    138138    
     
    154154    { 
    155155        arguments.writeErrorMessages(std::cout); 
     156        return 1; 
     157    } 
     158     
     159    if (arguments.argc()<=1) 
     160    { 
     161        arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); 
    156162        return 1; 
    157163    }