gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11517: Use EXIT_SUCCESS/EXIT_FAILUR


From: Markus Gothe
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11517: Use EXIT_SUCCESS/EXIT_FAILURE consistent
Date: Mon, 21 Sep 2009 04:56:49 +0200
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11517
committer: Markus Gothe <address@hidden>
branch nick: trunk
timestamp: Mon 2009-09-21 04:56:49 +0200
message:
  Use EXIT_SUCCESS/EXIT_FAILURE consistent
modified:
  cygnal/cgi-bin/echo/gateway.cpp
  cygnal/cvm.cpp
  cygnal/cygnal.cpp
  cygnal/proc.cpp
  extensions/launcher/launcher.cpp
  gui/gui.h
  libcore/FreetypeGlyphsProvider.cpp
  libcore/debugger.cpp
  libnet/network.cpp
  libsound/aos4/sound_handler_ahi.cpp
  libsound/sdl/sound_handler_sdl.cpp
=== modified file 'cygnal/cgi-bin/echo/gateway.cpp'
--- a/cygnal/cgi-bin/echo/gateway.cpp   2009-09-07 23:29:49 +0000
+++ b/cygnal/cgi-bin/echo/gateway.cpp   2009-09-21 02:56:49 +0000
@@ -161,7 +161,7 @@
     if (infile.empty()) {
         fd = net.createServer(port);
         if (fd <= 0) {
-            exit(1);
+            exit(EXIT_FAILURE);
         }
         // Only wait for a limited time.
         net.setTimeout(10);

=== modified file 'cygnal/cvm.cpp'
--- a/cygnal/cvm.cpp    2009-09-07 17:34:36 +0000
+++ b/cygnal/cvm.cpp    2009-09-21 02:56:49 +0000
@@ -225,12 +225,12 @@
     // scan for the two main standard GNU options
     for (c = 0; c < argc; c++) {
       if (strcmp("--help", argv[c]) == 0) {
-        exit(0);
+        exit(EXIT_SUCCESS);
       }
       if (strcmp("--version", argv[c]) == 0) {
         printf (_("Gnash gprocessor version: %s, Gnash version: %s\n"),
                   GPROC_VERSION, VERSION);
-        exit(0);
+        exit(EXIT_SUCCESS);
       }
     }
  
@@ -263,7 +263,7 @@
        switch (c) {
          case 'h':
               dbglogfile.removeLog();
-             exit(0);
+             exit(EXIT_SUCCESS);
          case 'w':
              s_do_output = true;
              break;
@@ -306,11 +306,11 @@
              break;
          case ':':
               fprintf(stderr, "Missing argument for switch ``%c''\n", optopt); 
-             exit(1);
+             exit(EXIT_FAILURE);
          case '?':
          default:
               fprintf(stderr, "Unknown switch ``%c''\n", optopt); 
-             exit(1);
+             exit(EXIT_FAILURE);
        }
     }
     
@@ -325,14 +325,14 @@
     if (infiles.empty()) {
            std::cerr << "no input files" << std::endl;
         dbglogfile.removeLog();
-           exit(1);
+           exit(EXIT_FAILURE);
     }
 
     if (infiles.size() > 1) {
         // We're not ready for multiple runs yet.
         std::cerr << "Multiple input files not supported." << std::endl;
         dbglogfile.removeLog();
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
 
@@ -344,7 +344,7 @@
             new gnash::media::gst::MediaHandlerGst() );
 #else
     std::cerr << "Neither SOUND_SDL nor SOUND_GST defined" << std::endl;
-    exit(1);
+    exit(EXIT_FAILURE);
 #endif
     gnash::media::MediaHandler::set(handler);
 
@@ -366,7 +366,7 @@
            if (s_stop_on_errors) {
                // Fail.
                 std::cerr << "error playing through movie " << *i << std::endl;
-               std::exit(1);
+               std::exit(EXIT_FAILURE);
            }
         }
        
@@ -423,7 +423,7 @@
     }
     if (md == NULL) {
         std::cerr << "error: can't play movie: "<< filename << std::endl;
-           std::exit(1);
+           std::exit(EXIT_FAILURE);
     }
 
     float fps = md->get_frame_rate();

=== modified file 'cygnal/cygnal.cpp'
--- a/cygnal/cygnal.cpp 2009-09-09 03:00:53 +0000
+++ b/cygnal/cygnal.cpp 2009-09-21 02:56:49 +0000
@@ -464,10 +464,10 @@
          case 'h':
              version_and_copyright();
              usage();
-             exit(0);
+             exit(EXIT_SUCCESS);
          case 'V':
              version_and_copyright();
-             exit(0);
+             exit(EXIT_SUCCESS);
          case 't':
              crcfile.setTestingFlag(true);
              break;
@@ -497,7 +497,7 @@
              break;
          case 'd':
              crcfile.dump();
-             exit(0);
+             exit(EXIT_SUCCESS);
              break;
          default:
              log_error (_("Extraneous argument: %s"), 
parser.argument(i).c_str());
@@ -601,7 +601,7 @@
 {
     log_network(_("Got a %d interrupt"), sig);
 //    sigaction (SIGINT, &act, NULL);
-    exit(-1);
+    exit(EXIT_FAILURE);
 }
 
 // Trap SIGHUP so we can 

=== modified file 'cygnal/proc.cpp'
--- a/cygnal/proc.cpp   2009-03-16 22:44:59 +0000
+++ b/cygnal/proc.cpp   2009-09-21 02:56:49 +0000
@@ -173,7 +173,7 @@
        // Start the desired executable
        execv(path.c_str(), cmd_line);
        perror(path.c_str());
-       exit(0);
+       exit(EXIT_SUCCESS);
     }
     
     return (true);

=== modified file 'extensions/launcher/launcher.cpp'
--- a/extensions/launcher/launcher.cpp  2009-02-25 22:30:19 +0000
+++ b/extensions/launcher/launcher.cpp  2009-09-21 02:56:49 +0000
@@ -75,7 +75,7 @@
     // See if the file actually exists, otherwise we can't spawn it
     if (stat(procname.c_str(), &procstats) == -1) {
        cout << "Invalid filename: " << procname << endl;
-        exit(-1);
+        exit(EXIT_FAILURE);
     }
 
     // Check the MD5, as a minimal security check
@@ -84,7 +84,7 @@
         cout << "MD5 matches for " << procname << endl;
     } else {
         cout << "ERROR: MD5 doesn't match! for " << procname << endl;
-        exit(-1);
+        exit(EXIT_FAILURE);
     }
     
     // make a copy of ourself, the child gets replaced by the file to
@@ -94,14 +94,14 @@
     // childpid is -1, if the fork failed, so print out an error message
     if (childpid == -1) {
       cout << "ERROR: dup2() failed: " << strerror(errno) << endl;
-      exit(-1);
+      exit(EXIT_FAILURE);
     }
 
     // childpid is a positive integer, if we are the parent, and
     // fork() worked, so exit cleanly
     if (childpid > 0) {
       cout << "Forked sucessfully, child process PID is " << childpid << endl;
-      exit(0);
+      exit(EXIT_SUCCESS);
     }
     
     // setup the command line for the executable we want to launch

=== modified file 'gui/gui.h'
--- a/gui/gui.h 2009-07-13 09:15:53 +0000
+++ b/gui/gui.h 2009-09-21 02:56:49 +0000
@@ -123,10 +123,10 @@
 
     /// End main rendering loop, making the call to run() return.
     //
-    /// The default implementation calls exit(0), which isn't nice.
+    /// The default implementation calls exit(EXIT_SUCCESS), which isn't nice.
     /// Please implement the proper main loop quitter in the subclasses.
     ///
-    virtual void quit()  { std::exit(0); }
+    virtual void quit()  { std::exit(EXIT_SUCCESS); }
 
     /// Render the current buffer.
     /// For OpenGL, this means that the front and back buffers are swapped.

=== modified file 'libcore/FreetypeGlyphsProvider.cpp'
--- a/libcore/FreetypeGlyphsProvider.cpp        2009-07-13 07:07:26 +0000
+++ b/libcore/FreetypeGlyphsProvider.cpp        2009-09-21 02:56:49 +0000
@@ -247,7 +247,7 @@
        {
                std::cerr << boost::format(_("Can't init FreeType! Error "
                                        "= %d")) % error << std::endl;
-               exit(1);
+               exit(EXIT_FAILURE);
        }
 }
 

=== modified file 'libcore/debugger.cpp'
--- a/libcore/debugger.cpp      2009-07-14 15:39:12 +0000
+++ b/libcore/debugger.cpp      2009-09-21 02:56:49 +0000
@@ -148,7 +148,7 @@
            // Quit Gnash.
          case 'Q':
          case 'q':
-             exit(0);
+             exit(EXIT_SUCCESS);
              break;
              // Continue executing.
          case 'c':

=== modified file 'libnet/network.cpp'
--- a/libnet/network.cpp        2009-09-09 02:59:37 +0000
+++ b/libnet/network.cpp        2009-09-21 02:56:49 +0000
@@ -101,7 +101,7 @@
     wVersionRequested = MAKEWORD(1, 1);                // Windows Sockets 1.1
     if (WSAStartup( wVersionRequested, &wsaData ) != 0) {
         log_error(_("Could not find a usable WinSock DLL"));
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 #endif
 
@@ -1567,7 +1567,7 @@
 {
     sig_number = sig;
     log_debug(_("Got an %d interrupt while blocked on pselect()"), sig);
-    exit(-1);
+    exit(EXIT_FAILURE);
 }
 
 } // end of gnash namespace

=== modified file 'libsound/aos4/sound_handler_ahi.cpp'
--- a/libsound/aos4/sound_handler_ahi.cpp       2009-09-11 16:59:21 +0000
+++ b/libsound/aos4/sound_handler_ahi.cpp       2009-09-21 02:56:49 +0000
@@ -115,7 +115,7 @@
         file_stream.open(wavefile.c_str());
         if (file_stream.fail()) {
             std::cerr << "Unable to write file '" << wavefile << std::endl;
-            exit(1);
+            exit(EXIT_FAILURE);
         } else {
                 write_wave_header(file_stream);
                 std::cout << "# Created 44100 16Mhz stereo wave file:" << 
std::endl <<

=== modified file 'libsound/sdl/sound_handler_sdl.cpp'
--- a/libsound/sdl/sound_handler_sdl.cpp        2009-08-07 12:06:37 +0000
+++ b/libsound/sdl/sound_handler_sdl.cpp        2009-09-21 02:56:49 +0000
@@ -138,7 +138,7 @@
         file_stream.open(wavefile.c_str());
         if (file_stream.fail()) {
             std::cerr << "Unable to write file '" << wavefile << std::endl;
-            exit(1);
+            exit(EXIT_FAILURE);
         } else {
                 write_wave_header(file_stream);
                 std::cout << "# Created 44100 16Mhz stereo wave file:" << 
std::endl <<


reply via email to

[Prev in Thread] Current Thread [Next in Thread]