Changeset 20941

Show
Ignore:
Timestamp:
11/21/07 22:12:29 (1 year ago)
Author:
patrick
Message:

Made simple improvements to the clarity of main().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vrjuggler/samples/OGL/advanced/glove/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Test OpenGL VR Juggler program 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
     27#include <cstdlib> 
    3228#include <gloveApp.h> 
    3329 
     
    6258   delete application; 
    6359 
    64    return 0
     60   return EXIT_SUCCESS
    6561} 
  • juggler/trunk/modules/vrjuggler/samples/OGL/advanced/navgrab/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
     27#include <cstdlib> 
    2728#include <vrj/Kernel/Kernel.h> 
    2829#include "NavGrabApp.h" 
     
    4546      } 
    4647      else 
     48      { 
    4749         kernel->loadConfigFile(argv[i]); 
     50      } 
    4851   } 
    4952 
     
    6063   delete application; 
    6164 
    62    return 0
     65   return EXIT_SUCCESS
    6366} 
  • juggler/trunk/modules/vrjuggler/samples/OGL/ext/proceduralApp/main.cpp

    r20495 r20941  
    4444#include <iostream> 
    4545#include <iomanip> 
     46#include <cstdlib> 
    4647 
    4748#include <gmtl/Matrix.h> 
     
    9899#endif 
    99100 
    100    return 0
     101   return EXIT_SUCCESS
    101102} 
    102103 
  • juggler/trunk/modules/vrjuggler/samples/OGL/simple/ConfigApp/main.cpp

    r20937 r20941  
    2626 
    2727#include <iostream> 
    28 #include <stdlib.h
     28#include <cstdlib
    2929 
    3030#include <vrj/Kernel/Kernel.h> 
     
    4949                << " vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]" 
    5050                << std::endl; 
    51       exit(1); 
     51      std::exit(EXIT_FAILURE); 
    5252   } 
    5353#endif 
     
    7373   delete app; 
    7474 
    75    return 0
     75   return EXIT_SUCCESS
    7676} 
  • juggler/trunk/modules/vrjuggler/samples/OGL/simple/MPApp/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Simple OpenGL sample application 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
     27#include <cstdlib> 
    3228#include <MPApp.h> 
    3329 
     
    5349                << " vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]" 
    5450                << std::endl; 
    55       exit(1); 
     51      std::exit(EXIT_FAILURE); 
    5652   } 
    5753#endif 
     
    7773   delete application; 
    7874 
    79    return 0
     75   return EXIT_SUCCESS
    8076} 
  • juggler/trunk/modules/vrjuggler/samples/OGL/simple/SimpleApp/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Simple OpenGL sample application 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
     27#include <cstdlib> 
    3228#include <simpleApp.h> 
    3329 
     
    5147      std::cout << "\n\n"; 
    5248      std::cout << "Usage: " << argv[0] << " vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]" << std::endl; 
    53       exit(1); 
     49      std::exit(EXIT_FAILURE); 
    5450   } 
    5551#endif 
     
    7470   delete application; 
    7571 
    76    return 0
     72   return EXIT_SUCCESS
    7773} 
  • juggler/trunk/modules/vrjuggler/samples/OGL/simple/contextApp/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Simple OpenGL sample application 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
     27#include <cstdlib> 
    3228#include <contextApp.h> 
    3329 
     
    5349                << " vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]" 
    5450                << std::endl; 
    55       exit(1); 
     51      std::exit(EXIT_FAILURE); 
    5652   } 
    5753#endif 
     
    7773   delete application; 
    7874 
    79    return 0
     75   return EXIT_SUCCESS
    8076} 
  • juggler/trunk/modules/vrjuggler/samples/OGL/simple/simpleInput/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Simple input sample application 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
     27#include <cstdlib> 
    3228#include <simpleInput.h> 
    3329 
     
    5147      std::cout << "\n\n"; 
    5248      std::cout << "Usage: " << argv[0] << " vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]" << std::endl; 
    53       exit(1); 
     49      std::exit(EXIT_FAILURE); 
    5450   } 
    5551#endif 
     
    7571   delete application; 
    7672 
    77    return 0
     73   return EXIT_SUCCESS
    7874} 
  • juggler/trunk/modules/vrjuggler/samples/OSG/advanced/OSGNavGrab/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Test Osg VR Juggler program 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
    32  
    3327#include <cstdlib> 
    3428#include <OsgNavGrab.h> 
     
    3630// --- Lib Stuff --- // 
    3731#include <vrj/Kernel/Kernel.h> 
     32 
    3833 
    3934int main(int argc, char* argv[]) 
     
    5449         << std::endl << std::endl; 
    5550 
    56       std::exit(1); 
     51      std::exit(EXIT_FAILURE); 
    5752   } 
    5853 
     
    7469   delete application; 
    7570 
    76    return 0
     71   return EXIT_SUCCESS
    7772} 
  • juggler/trunk/modules/vrjuggler/samples/OSG/simple/osgNav/main.cpp

    r20937 r20941  
    2424 * 
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    26  
    27 //---------------------------------------- 
    28 // Test Osg VR Juggler program 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
    3226 
    3327#include <cstdlib> 
     
    5751         << std::endl << std::endl; 
    5852 
    59       std::exit(1); 
     53      std::exit(EXIT_FAILURE); 
    6054   } 
    6155 
     
    7771   delete application; 
    7872 
    79    return 0
     73   return EXIT_SUCCESS
    8074} 
  • juggler/trunk/modules/vrjuggler/samples/OpenSG/advanced/OpenSGNavGrab/app.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
     27#include <cstdlib> 
    2728#include <string> 
    2829#include <vector> 
     
    6869   delete application; 
    6970 
    70    return 0
     71   return EXIT_SUCCESS
    7172} 
  • juggler/trunk/modules/vrjuggler/samples/OpenSG/advanced/OpenSGViewer/app.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
     27#include <cstdlib> 
    2728#include <vrj/Kernel/Kernel.h> 
    2829#include <OpenSGViewer.h> 
     30 
    2931 
    3032int main(int argc, char* argv[]) 
     
    3739    { 
    3840      std::cout << "\n\nUsage: " << argv[0] << " modelname vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]\n" << std::flush; 
    39       exit(1); 
     41      std::exit(EXIT_FAILURE); 
    4042    } 
    4143#endif 
     
    5557    kernel->waitForKernelStop(); 
    5658 
    57     return 1
     59    return EXIT_SUCCESS
    5860} 
    5961 
  • juggler/trunk/modules/vrjuggler/samples/OpenSG/simple/OpenSGNav/app.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
     27#include <cstdlib> 
    2728#include <OpenSGNav.h> 
    2829 
    2930#include <vrj/Kernel/Kernel.h> 
     31 
    3032 
    3133int main(int argc, char* argv[]) 
     
    4042                << " modelname vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]\n" 
    4143                << std::flush; 
    42       exit(1); 
     44      std::exit(EXIT_FAILURE); 
    4345   } 
    4446#endif 
     
    6062   delete application; 
    6163 
    62    return 0
     64   return EXIT_SUCCESS
    6365} 
  • juggler/trunk/modules/vrjuggler/samples/Pf/advanced/pfConfigNav/pfBasicConfigNav.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
     27#include <cstdlib> 
     28 
    2729 // --- VR Juggler Stuff --- // 
    2830#include <vrj/Kernel/Kernel.h> 
    2931#include <pfBasicConfigNavApp.h> 
     32 
    3033 
    3134int main(int argc, char* argv[]) 
     
    4144   for ( int i = 1; i < argc; i++ ) 
    4245   { 
    43      kernel->loadConfigFile(argv[i]); 
     46      kernel->loadConfigFile(argv[i]); 
    4447   } 
    4548 
     
    5558   pfExit(); 
    5659 
    57    return 0
     60   return EXIT_SUCCESS
    5861} 
  • juggler/trunk/modules/vrjuggler/samples/Pf/advanced/pfNav/pfNav.cpp

    r20937 r20941  
    2626 
    2727#include <iostream> 
     28#include <cstdlib> 
    2829#include <string> 
    2930 
     
    3334#include <vrj/Kernel/Kernel.h> 
    3435#include <simplePfNavApp.h> 
     36 
    3537 
    3638void usage(char** argv) 
     
    6264      std::cout << "\n\n[ERROR!!!] you must supply a model database followed " 
    6365                << "by VR Juggler config files." << std::endl; 
    64       return 1
     66      return EXIT_FAILURE
    6567   } 
    6668 
     
    107109   pfExit(); 
    108110 
    109    return 0
     111   return EXIT_SUCCESS
    110112} 
  • juggler/trunk/modules/vrjuggler/samples/Pf/simple/simplePf/main.cpp

    r20937 r20941  
    2626 
    2727#include <iostream> 
     28#include <cstdlib> 
    2829#include <string> 
    2930 
     
    3132#include <vrj/Kernel/Kernel.h> 
    3233#include <simplePfApp.h> 
     34 
    3335 
    3436using namespace vrj; 
     
    5557      std::cout << "\n\n[ERROR!!!] you must supply a model database followed " 
    5658                << "by VR Juggler config files." << std::endl; 
    57       return 1
     59      return EXIT_FAILURE
    5860   } 
    5961   else if ( argc < 3 ) 
     
    9294   pfExit(); 
    9395 
    94    return 0
     96   return EXIT_SUCCESS
    9597} 
  • juggler/trunk/modules/vrjuggler/samples/sound/simple/sonix/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Test OpenGL VR Juggler program 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
    3227#include <iostream> 
    33 #include <stdlib.h
     28#include <cstdlib
    3429#include <sonixApp.h> 
    3530 
     
    5449                << std::flush; 
    5550      std::cout << "\n\n" << std::flush; 
    56       exit(1); 
     51      std::exit(EXIT_FAILURE); 
    5752   } 
    5853#endif 
     
    7267   delete application; 
    7368 
    74    return 0
     69   return EXIT_SUCCESS
    7570} 
  • juggler/trunk/modules/vrjuggler/samples/sound/simple/soundManager/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Test OpenGL VR Juggler program 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
    3227#include <iostream> 
    33 #include <stdlib.h
     28#include <cstdlib
    3429#include <soundManagerApp.h> 
    3530 
     
    5449                << std::flush; 
    5550      std::cout << "\n\n" << std::flush; 
    56       exit(1); 
     51      std::exit(EXIT_FAILURE); 
    5752   } 
    5853#endif 
     
    7469   delete application; 
    7570 
    76    return 0
     71   return EXIT_SUCCESS
    7772} 
  • juggler/trunk/modules/vrjuggler/samples/speech/simple/SpeechRecogApp/main.cpp

    r20937 r20941  
    2525 *************** <auto-copyright.pl END do not edit this line> ***************/ 
    2626 
    27 //---------------------------------------- 
    28 // Simple OpenGL sample application 
    29 // 
    30 // main.cpp 
    31 //---------------------------------------- 
     27#include <cstdlib> 
    3228#include <SpeechRecogApp.h> 
    3329 
     
    5046      std::cout << "\n\n"; 
    5147      std::cout << "Usage: " << argv[0] << " vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]" << std::endl; 
    52       exit(1); 
     48      std::exit(EXIT_FAILURE); 
    5349   } 
    5450 
     
    7268   delete application; 
    7369 
    74    return 0
     70   return EXIT_SUCCESS
    7571}