gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2039-gcc4013c
Date: Wed, 21 May 2014 11:55:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  cc4013c8301d29fa32d0b7cc87586fa01dd2fab8 (commit)
      from  3222fcaabcce42eef852db67aa95ab7f7954b5ec (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=cc4013c8301d29fa32d0b7cc87586fa01dd2fab8


commit cc4013c8301d29fa32d0b7cc87586fa01dd2fab8
Author: Bastiaan Jacques <address@hidden>
Date:   Wed May 21 13:54:02 2014 +0200

    Use nullptr for pointers set to NULL or zero.

diff --git a/cygnal/cgi-bin/oflaDemo/oflaDemo.cpp 
b/cygnal/cgi-bin/oflaDemo/oflaDemo.cpp
index 1e76000..3b2ebd4 100644
--- a/cygnal/cgi-bin/oflaDemo/oflaDemo.cpp
+++ b/cygnal/cgi-bin/oflaDemo/oflaDemo.cpp
@@ -316,7 +316,7 @@ demoService::getListOfAvailableFiles(const std::string 
&path,
 #else
        // The Adobe media server and Red5 sort the directories
        // alphabetically, so we do too.
-       int ret = scandir(path.c_str(), &namelist, 0, alphasort);
+       int ret = scandir(path.c_str(), &namelist, nullptr, alphasort);
        for (int i=0; i<ret; ++i) {
            entry = namelist[i];
 #endif 
diff --git a/cygnal/http_server.cpp b/cygnal/http_server.cpp
index 6f7c6aa..8f810cc 100644
--- a/cygnal/http_server.cpp
+++ b/cygnal/http_server.cpp
@@ -185,7 +185,7 @@ HTTPServer::processGetRequest(Handler *hand, int fd, 
cygnal::Buffer *buf)
 //    cerr << "YYYYYYY: " << (char *)buf->reference() << endl;
 //    cerr << hexify(buf->reference(), buf->allocated(), false) << endl;
     
-    if (buf == 0) {
+    if (buf == nullptr) {
      //        log_debug("Queue empty, net connection dropped for fd #%d", 
getFileFd());
        log_debug("Queue empty, net connection dropped for fd #%d", fd);
 //     cygnal::Buffer buf;
@@ -282,7 +282,7 @@ HTTPServer::processPostRequest(int fd, cygnal::Buffer * /* 
bufFIXME */)
     }
     
     buf = _que.pop();
-    if (buf == 0) {
+    if (buf == nullptr) {
        log_debug("Queue empty, net connection dropped for fd #%d",
                  getFileFd());
        return buf;
@@ -291,7 +291,7 @@ HTTPServer::processPostRequest(int fd, cygnal::Buffer * /* 
bufFIXME */)
     
     clearHeader();
     std::uint8_t *data = processHeaderFields(buf.get());
-    size_t length = strtol(getField("content-length").c_str(), NULL, 0);
+    size_t length = strtol(getField("content-length").c_str(), nullptr, 0);
     std::shared_ptr<cygnal::Buffer> content(new cygnal::Buffer(length));
     int ret = 0;
     if (buf->allocated() - (data - buf->reference()) ) {
@@ -819,8 +819,8 @@ HTTPServer::extractRTMPT(std::uint8_t *data)
        }
     }
 
-    _index = strtol(indx.c_str(), NULL, 0);
-    _clientid = strtol(cid.c_str(), NULL, 0);
+    _index = strtol(indx.c_str(), nullptr, 0);
+    _clientid = strtol(cid.c_str(), nullptr, 0);
     end =  body.find("\r\n", start);
 //     if (end != string::npos) {
 //         cmd = HTTPServer::CLOSE;
diff --git a/cygnal/libamf/amf.cpp b/cygnal/libamf/amf.cpp
index 98e66d4..b2dea5e 100644
--- a/cygnal/libamf/amf.cpp
+++ b/cygnal/libamf/amf.cpp
@@ -259,7 +259,7 @@ AMF::encodeDate(const std::uint8_t *date)
 //    GNASH_REPORT_FUNCTION;
 //    std::shared_ptr<Buffer> buf;
     std::shared_ptr<Buffer> buf;
-    if (date != 0) {
+    if (date != nullptr) {
        buf.reset(new Buffer(AMF0_NUMBER_SIZE+1));
        *buf = Element::DATE_AMF0;
        double num = *(reinterpret_cast<const double*>(date));
@@ -908,7 +908,7 @@ AMF::extractAMF(std::uint8_t *in, std::uint8_t* tooFar)
     std::uint16_t length;
     std::shared_ptr<cygnal::Element> el(new Element);
 
-    if (in == 0) {
+    if (in == nullptr) {
         gnash::log_error(_("AMF body input data is NULL"));
         return el;
     }
@@ -1003,7 +1003,7 @@ AMF::extractAMF(std::uint8_t *in, std::uint8_t* tooFar)
                 }
                 std::shared_ptr<cygnal::Element> child =
                     amf_obj.extractProperty(tmpptr, tooFar); 
-                if (child == 0) {
+                if (child == nullptr) {
                     // skip past zero length string (2 bytes), null
                     // (1 byte) and end object (1 byte)
                     //tmpptr += 3;
@@ -1051,7 +1051,7 @@ AMF::extractAMF(std::uint8_t *in, std::uint8_t* tooFar)
                 }
                 std::shared_ptr<cygnal::Element> child =
                     amf_obj.extractProperty(tmpptr, tooFar); 
-                if (child == 0) {
+                if (child == nullptr) {
                     // skip past zero length string (2 bytes),
                     // null (1 byte) and end object (1 byte)
                     //tmpptr += 3;
@@ -1096,7 +1096,7 @@ AMF::extractAMF(std::uint8_t *in, std::uint8_t* tooFar)
             while (items) {
                 std::shared_ptr<cygnal::Element> child =
                     amf_obj.extractAMF(tmpptr, tooFar); 
-                if (child == 0) {
+                if (child == nullptr) {
                     break;
                 } else {
                 //child->dump();
@@ -1153,7 +1153,7 @@ AMF::extractAMF(std::uint8_t *in, std::uint8_t* tooFar)
                 }
                 std::shared_ptr<cygnal::Element> child =
                     amf_obj.extractProperty(tmpptr, tooFar); 
-                if (child == 0) {
+                if (child == nullptr) {
                     break;
                 }
                 el->addProperty(child);
diff --git a/cygnal/libamf/buffer.cpp b/cygnal/libamf/buffer.cpp
index fc4cafd..b287759 100644
--- a/cygnal/libamf/buffer.cpp
+++ b/cygnal/libamf/buffer.cpp
@@ -142,7 +142,7 @@ Buffer::init(size_t size)
 
 /// \brief Create a new Buffer with the default size
 Buffer::Buffer() 
-    : _seekptr(0)
+    : _seekptr(nullptr)
 {
 //    GNASH_REPORT_FUNCTION;
     _nbytes = cygnal::NETBUFSIZE;
@@ -151,7 +151,7 @@ Buffer::Buffer()
     
 /// \brief Create a new Buffer with a size other than the default
 Buffer::Buffer(size_t nbytes)
-    : _seekptr(0)
+    : _seekptr(nullptr)
 {
 //    GNASH_REPORT_FUNCTION;
     _nbytes = nbytes;
@@ -180,7 +180,7 @@ Buffer::~Buffer()
                  (void *)_data.get(), _nbytes,
                  (float)((now.tv_sec - _stamp.tv_sec) + ((now.tv_nsec - 
_stamp.tv_nsec)/1e9)));
 #endif
-        _seekptr = 0;
+        _seekptr = nullptr;
         _nbytes = 0;
     }
 }
@@ -567,8 +567,8 @@ Buffer::remove(std::uint8_t c)
 
 //    log_debug("Byte is at %x", (void *)start);
     
-    if (start == 0) {
-       return 0;
+    if (start == nullptr) {
+       return nullptr;
     }
     
     std::copy(start + 1, end(), start);
diff --git a/cygnal/libamf/element.cpp b/cygnal/libamf/element.cpp
index 1f666fe..be9f7d0 100644
--- a/cygnal/libamf/element.cpp
+++ b/cygnal/libamf/element.cpp
@@ -65,7 +65,7 @@ const char *astype_str[] = {
 
 /// \brief Create a new Element with no data type.
 Element::Element()
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -83,7 +83,7 @@ Element::~Element()
 ///
 /// @param data The double to use as the value for this Element.
 Element::Element(double indata)
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -96,7 +96,7 @@ Element::Element(double indata)
 ///
 /// @param num The double to use as the value of the property.
 Element::Element(const string &name, double num)
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -109,7 +109,7 @@ Element::Element(const string &name, double num)
 ///
 /// @remarks This assume the data string is already NULL terminated.
 Element::Element(const string &indata)
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -118,7 +118,7 @@ Element::Element(const string &indata)
 
 /// \overload Element(const std::string &data)
 Element::Element(const char *indata)
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -131,7 +131,7 @@ Element::Element(const char *indata)
 ///
 /// @param data The ASCII string to use as the value of the property.
 Element::Element(const string &name, const string &data)
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -142,7 +142,7 @@ Element::Element(const string &name, const string &data)
 ///
 /// @param data The boolean to use as the value for this Element.
 Element::Element(bool data)
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -155,7 +155,7 @@ Element::Element(bool data)
 ///
 /// @param data The boolean to use as the value of the property.
 Element::Element(const string &name, bool indata)
-    : _name(0),
+    : _name(nullptr),
       _type(NOTYPE)
 {
 //    GNASH_REPORT_FUNCTION;
@@ -214,7 +214,7 @@ Element::clear()
 {
 //    GNASH_REPORT_FUNCTION;
        delete[] _name;
-       _name = 0;
+       _name = nullptr;
        _buffer.reset();
 }
 
@@ -287,7 +287,7 @@ Element::to_string() const
        }
        return "NULL";
     }
-    return 0;
+    return nullptr;
 }
 
 /// \brief Cast the data in this Element to a boolean value.
@@ -313,7 +313,7 @@ Element::to_reference()
     if (_buffer) {
        return _buffer->reference();
     }
-    return 0;
+    return nullptr;
 }
 
 const std::uint8_t *
@@ -323,7 +323,7 @@ Element::to_reference() const
     if (_buffer) {
        return _buffer->reference();
     }
-    return 0;
+    return nullptr;
 }
 
 /// \brief Test equivalance against another Element.
@@ -480,7 +480,7 @@ Element::encode(bool notobject)
        if (!notobject) {
            *buf = Element::OBJECT_AMF0;
        }
-       if (_name > static_cast<char *>(0)) {
+       if (_name > static_cast<char *>(nullptr)) {
            size_t length = getNameSize();
            std::uint16_t enclength = length;
            swapBytes(&enclength, 2);
@@ -1451,7 +1451,7 @@ void
 Element::setName(std::uint8_t *name, size_t size)
 {
 //    GNASH_REPORT_FUNCTION;
-    if ((size > 0) && (name != 0)) {
+    if ((size > 0) && (name != nullptr)) {
        _name = new char[size+1];
        std::copy(name, name+size, _name);
        *(_name + size) = 0;
@@ -1469,7 +1469,7 @@ void
 Element::check_buffer(size_t size)
 {
 //    GNASH_REPORT_FUNCTION;
-    if (_buffer == 0) {
+    if (_buffer == nullptr) {
        _buffer.reset(new Buffer(size));
     } else {
        if (_buffer->size() < size) {
diff --git a/cygnal/libamf/lcshm.cpp b/cygnal/libamf/lcshm.cpp
index 6c94c61..acd54b8 100644
--- a/cygnal/libamf/lcshm.cpp
+++ b/cygnal/libamf/lcshm.cpp
@@ -99,7 +99,7 @@ const int LC_LISTENERS_START  = MAX_LC_HEADER_SIZE +  
LC_HEADER_SIZE;
 LcShm::LcShm() 
     :
     SharedMem(64528),
-    _baseaddr(0)
+    _baseaddr(nullptr)
 {
 //    GNASH_REPORT_FUNCTION;
 }
@@ -136,7 +136,7 @@ LcShm::~LcShm()
 /// \brief Construct a block of Listeners.
 ///     This constructs an uninitialized Listener block.
 Listener::Listener()
-    : _baseaddr(0)
+    : _baseaddr(nullptr)
 {
 //    GNASH_REPORT_FUNCTION;
 }
@@ -208,7 +208,7 @@ Listener::addListener(const string &name)
     }
     
     // Add ourselves to the list
-    if (memcpy(item, name.c_str(), name.size()) == 0) {
+    if (memcpy(item, name.c_str(), name.size()) == nullptr) {
         return false;
     }
 
@@ -303,7 +303,7 @@ Listener::listListeners()
 {
 //    GNASH_REPORT_FUNCTION;    
     std::unique_ptr< vector<string> > listeners ( new vector<string> );
-    if (_baseaddr != 0) {
+    if (_baseaddr != nullptr) {
         std::uint8_t *addr = _baseaddr + LC_LISTENERS_START;
         
         const char *item = reinterpret_cast<const char *>(addr);
@@ -367,9 +367,9 @@ LcShm::parseHeader(std::uint8_t *data, std::uint8_t* tooFar)
 //    GNASH_REPORT_FUNCTION;
     std::uint8_t *ptr = data;
 
-    if (data == 0) {
+    if (data == nullptr) {
         log_debug(_("No data pointer to parse!"));
-        return 0;
+        return nullptr;
     }
 
 #ifndef GNASH_TRUST_AMF
@@ -386,14 +386,14 @@ LcShm::parseHeader(std::uint8_t *data, std::uint8_t* 
tooFar)
     
     AMF amf;
     std::shared_ptr<Element> el = amf.extractAMF(ptr, tooFar);
-    if (el == 0) {
+    if (el == nullptr) {
         log_debug(_("Didn't extract an element from the byte stream!"));
-        return 0;
+        return nullptr;
     }
     _object.connection_name = el->to_string();
     
     el = amf.extractAMF(ptr, tooFar);
-    if (ptr != 0) {
+    if (ptr != nullptr) {
         _object.hostname = el->to_string();
     }
     
@@ -515,7 +515,7 @@ LcShm::connect(const string& names)
         return false;
     }
 
-    if (SharedMem::begin() <= static_cast<unsigned char *>(0)) {
+    if (SharedMem::begin() <= static_cast<unsigned char *>(nullptr)) {
         log_error(_("Failed to open shared memory segment: \"%s\""), 
names.c_str());
         return false; 
     }
@@ -556,7 +556,7 @@ LcShm::connect(key_t key)
         return false;
     }
 
-    if (SharedMem::begin() <= static_cast<unsigned char *>(0)) {
+    if (SharedMem::begin() <= static_cast<unsigned char *>(nullptr)) {
         log_error(_("Failed to open shared memory segment: 0x%x"), key);
         return false; 
     }
diff --git a/cygnal/libamf/sol.cpp b/cygnal/libamf/sol.cpp
index d93d507..4b7be14 100644
--- a/cygnal/libamf/sol.cpp
+++ b/cygnal/libamf/sol.cpp
@@ -348,7 +348,7 @@ SOL::readFile(const std::string &filespec)
 
        try {
 
-        std::uint8_t *ptr = 0;
+        std::uint8_t *ptr = nullptr;
 
            std::ifstream ifs(filespec.c_str(), std::ios::binary);
 
@@ -420,7 +420,7 @@ SOL::readFile(const std::string &filespec)
            while ( ptr < tooFar) {
             if (ptr) {
                 el = amf_obj.extractProperty(ptr, tooFar);
-                if (el != 0) {
+                if (el != nullptr) {
                     ptr += amf_obj.totalsize() + 1;
                     _amfobjs.push_back(el);
                 }
diff --git a/cygnal/libnet/diskstream.cpp b/cygnal/libnet/diskstream.cpp
index a3bedae..ab3f833 100644
--- a/cygnal/libnet/diskstream.cpp
+++ b/cygnal/libnet/diskstream.cpp
@@ -86,7 +86,7 @@ DiskStream::DiskStream()
     : _state(DiskStream::NO_STATE),
       _filefd(0),
       _netfd(0),
-      _dataptr(0),
+      _dataptr(nullptr),
       _max_memload(0),
       _filesize(0),
       _pagesize(0),
@@ -126,7 +126,7 @@ DiskStream::DiskStream(const string &str)
     : _state(DiskStream::NO_STATE),
       _filefd(0),
       _netfd(0),
-      _dataptr(0),
+      _dataptr(nullptr),
       _max_memload(0),
       _filesize(0),
       _pagesize(0),
@@ -167,7 +167,7 @@ DiskStream::DiskStream(const string &str, std::uint8_t 
*data, size_t size)
     : _state(DiskStream::NO_STATE),
       _filefd(0),
       _netfd(0),
-      _dataptr(0),
+      _dataptr(nullptr),
       _max_memload(0),
       _pagesize(0),
       _offset(0)
@@ -215,7 +215,7 @@ DiskStream::DiskStream(const string &str, cygnal::Buffer 
&buf)
     : _state(DiskStream::NO_STATE),
       _filefd(0),
       _netfd(0),
-      _dataptr(0),
+      _dataptr(nullptr),
       _max_memload(0),
       _pagesize(0),
       _offset(0)
@@ -262,8 +262,8 @@ DiskStream::DiskStream(const string &str, cygnal::Buffer 
&buf)
 DiskStream::DiskStream(const string &str, int netfd)
     : _state(DiskStream::NO_STATE),
       _filefd(0),
-      _filespec(0),
-      _dataptr(0),
+      _filespec(nullptr),
+      _dataptr(nullptr),
       _max_memload(0),
       _filesize(0),
       _pagesize(0),
@@ -336,7 +336,7 @@ DiskStream::fullyPopulated()
 {
     // GNASH_REPORT_FUNCTION;
     
-    if ((_filesize < _max_memload) && (_dataptr != 0)) {
+    if ((_filesize < _max_memload) && (_dataptr != nullptr)) {
        return true;
     }
     return false;
@@ -443,13 +443,13 @@ DiskStream::loadToMem(size_t filesize, off_t offset)
        return _dataptr + offset;
     }
     
-    std::uint8_t *dataptr = 0;
+    std::uint8_t *dataptr = nullptr;
     
     if (_filefd) {
        /// If the data pointer is legit, then we need to unmap that page
        /// to mmap() a new one. If we're still in the current mapped
        /// page, then just return the existing data pointer.
-       if (dataptr != 0) {
+       if (dataptr != nullptr) {
 #ifdef _WIN32
            UnmapViewOfFile(_dataptr);
 #elif defined(__amigaos4__)
@@ -485,19 +485,19 @@ DiskStream::loadToMem(size_t filesize, off_t offset)
 #elif defined(__amigaos4__)
        dataptr = static_cast<std::uint8_t *>(malloc(loadsize));
 #else
-       dataptr = static_cast<std::uint8_t *>(mmap(0, loadsize,
+       dataptr = static_cast<std::uint8_t *>(mmap(nullptr, loadsize,
                                                     PROT_READ, MAP_SHARED,
                                                     _filefd, page));
 #endif
     } else {
        log_error(_("Couldn't load file %s"), _filespec);
-       return 0;
+       return nullptr;
     }
     
     if (dataptr == MAP_FAILED) {
        log_error(_("Couldn't map file %s into memory: %s"),
                   _filespec, strerror(errno));
-       return 0;
+       return nullptr;
     } else {
        log_debug(_("File %s a offset %d mapped to: %p"), _filespec, offset, 
(void *)dataptr);
        clock_gettime (CLOCK_REALTIME, &_last_access);
@@ -1048,42 +1048,42 @@ DiskStream::determineFileType( std::uint8_t *data)
 {
 //    GNASH_REPORT_FUNCTION;
 
-  if (data == 0) {
+  if (data == nullptr) {
     return FILETYPE_NONE;
   }
  
   // JPEG, offset 6 bytes, read the string JFIF
-  if (memcpy(data + 6, "JFIF", 4) == 0) {
+  if (memcpy(data + 6, "JFIF", 4) == nullptr) {
     return FILETYPE_NONE;
   }
   // SWF, offset 0, read the string FWS
-  if (memcpy(data, "SWF", 3) == 0) {
+  if (memcpy(data, "SWF", 3) == nullptr) {
     return FILETYPE_SWF;
   }
   // compressed SWF, offset 0, read the string CWS
   // FLV, offset 0, read the string FLV
   // PNG, offset 0, read the string PNG
-  if (memcpy(data, "PNG", 3) == 0) {
+  if (memcpy(data, "PNG", 3) == nullptr) {
     return FILETYPE_PNG;
   }
   // Ogg, offset 0, read the string OggS
-  if (memcpy(data, "OggS", 4) == 0) {
+  if (memcpy(data, "OggS", 4) == nullptr) {
     return FILETYPE_OGG;
   }
   // Theora, offset 28, read string theora
-  if (memcpy(data + 28, "theora", 6) == 0) {
+  if (memcpy(data + 28, "theora", 6) == nullptr) {
     return FILETYPE_THEORA;
   }
   // FLAC, offset 28, read string FLAC
-  if (memcpy(data + 28, "FLAC", 4) == 0) {
+  if (memcpy(data + 28, "FLAC", 4) == nullptr) {
     return FILETYPE_FLAC;
   }
   // Vorbis, offset 28, read string vorbis
-  if (memcpy(data + 28, "vorbis", 6) == 0) {
+  if (memcpy(data + 28, "vorbis", 6) == nullptr) {
     return FILETYPE_VORBIS;
   }
   // MP3, offset 0, read string ID3
-  if (memcpy(data, "ID3", 3) == 0) {
+  if (memcpy(data, "ID3", 3) == nullptr) {
     return FILETYPE_MP3;
   }
 
@@ -1092,12 +1092,12 @@ DiskStream::determineFileType( std::uint8_t *data)
   //   offset 0, read string "\<head"
   //   offset 0, read string "\<title"
   //   offset 0, read string "\<html"
-  if (memcpy(data, "ID3", 3) == 0) {
+  if (memcpy(data, "ID3", 3) == nullptr) {
     return FILETYPE_HTML;
   }
 
   // XML, offset 0, read string "\<?xml"
-  if (memcpy(data, "<?xml", 5) == 0) {
+  if (memcpy(data, "<?xml", 5) == nullptr) {
     return FILETYPE_XML;
   }
   
diff --git a/cygnal/libnet/http.cpp b/cygnal/libnet/http.cpp
index fdb7ebf..0ed1ea9 100644
--- a/cygnal/libnet/http.cpp
+++ b/cygnal/libnet/http.cpp
@@ -159,7 +159,7 @@ HTTP::processHeaderFields(cygnal::Buffer *buf)
            if (name == "keep-alive") {
                _keepalive = true;
                if ((value != "on") && (value != "off")) {
-                   _max_requests = strtol(value.c_str(), NULL, 0);
+                   _max_requests = strtol(value.c_str(), nullptr, 0);
                    // log_debug("Setting Max Requests for Keep-Alive to %d", 
_max_requests);
                }
            }
@@ -169,7 +169,7 @@ HTTP::processHeaderFields(cygnal::Buffer *buf)
                }
            }
            if (name == "content-length") {
-               _filesize = strtol(value.c_str(), NULL, 0);
+               _filesize = strtol(value.c_str(), nullptr, 0);
                log_debug(_("Setting Content Length to %d"), _filesize);
            }
            if (name == "content-type") {
@@ -639,7 +639,7 @@ HTTP::getContentLength()
     //    GNASH_REPORT_FUNCTION;
     std::string length = getField("content-length");
     if (length.size() > 0) {
-       return static_cast<size_t>(strtol(length.c_str(), NULL, 0));
+       return static_cast<size_t>(strtol(length.c_str(), nullptr, 0));
     }
 
     return 0;
@@ -1378,7 +1378,7 @@ HTTP::recvChunked(std::uint8_t *data, size_t size)
        // extract the total size of the chunk
        std::string bytes(data, start-2);
        size_t sizesize = start-data;
-       total = static_cast<size_t>(strtol(bytes.c_str(), NULL, 16));
+       total = static_cast<size_t>(strtol(bytes.c_str(), nullptr, 16));
        log_debug(_("%s: Total size for first chunk is: %d, data size %d (%d)"),
                  __PRETTY_FUNCTION__, total, size, sizesize);
        buf.reset(new cygnal::Buffer(total+2));
@@ -1427,7 +1427,7 @@ HTTP::recvChunked(std::uint8_t *data, size_t size)
                    if (start != buf->reference()+ret) {
                        // extract the total size of the chunk
                        std::string bytes(buf->reference(), start-2);
-                       total = static_cast<size_t>(strtol(bytes.c_str(), NULL, 
16));
+                       total = static_cast<size_t>(strtol(bytes.c_str(), 
nullptr, 16));
                        // The total size of the last chunk is always "0"
                        if (total == 0) {
                            log_debug(_("%s: end of chunks!"), 
__PRETTY_FUNCTION__);
diff --git a/cygnal/libnet/lirc.cpp b/cygnal/libnet/lirc.cpp
index 3d2b8b0..c0a8bc0 100644
--- a/cygnal/libnet/lirc.cpp
+++ b/cygnal/libnet/lirc.cpp
@@ -36,7 +36,7 @@ const int TIMEOUT = 10;
 const int BUTTONSIZE = 10;
 
 Lirc::Lirc() 
-    : _sockname("/tmp/lircd"), _button(0)
+    : _sockname("/tmp/lircd"), _button(nullptr)
 {
 //    GNASH_REPORT_FUNCTION;
     _button = new char[BUTTONSIZE];
@@ -45,7 +45,7 @@ Lirc::Lirc()
 Lirc::~Lirc()
 {
 //    GNASH_REPORT_FUNCTION;
-    if (_button != 0) {
+    if (_button != nullptr) {
        delete _button;
     }
     closeNet();
diff --git a/cygnal/libnet/network.cpp b/cygnal/libnet/network.cpp
index df4f508..ed23717 100644
--- a/cygnal/libnet/network.cpp
+++ b/cygnal/libnet/network.cpp
@@ -226,7 +226,7 @@ Network::createServer(std::string hostname, short port)
     }
 
     // error, wasn't able to create a socket
-    if (it == 0) {
+    if (it == nullptr) {
         log_error(_("unable to create socket: %s"), strerror(errno));
         return -1;
     }
@@ -338,9 +338,9 @@ Network::newConnection(bool block, int fd)
        tval.tv_sec = _timeout;
        tval.tv_nsec = 0;
         if (block) {
-           ret = pselect(fd+1, &fdset, NULL, NULL, NULL, &blockset);
+           ret = pselect(fd+1, &fdset, nullptr, nullptr, nullptr, &blockset);
        } else {
-           ret = pselect(fd+1, &fdset, NULL, NULL, &tval, &blockset);
+           ret = pselect(fd+1, &fdset, nullptr, nullptr, &tval, &blockset);
        }
        if (sig_number) {
            log_debug("Have a SIGINT interrupt waiting!");
@@ -459,7 +459,7 @@ Network::connectSocket(const string &sockname)
         tval.tv_sec = 5;
         tval.tv_usec = 0;
 
-        ret = ::select(_sockfd+1, &fdset, NULL, NULL, &tval);
+        ret = ::select(_sockfd+1, &fdset, nullptr, nullptr, &tval);
 
         // If interrupted by a system call, try again
         if (ret == -1 && errno == EINTR) {
@@ -575,7 +575,7 @@ Network::createClient(const string &hostname, short port)
     req.ai_family = AF_UNSPEC;  // Allow IPv4 or IPv6
     req.ai_socktype = SOCK_STREAM;
     
-    if ((code = getaddrinfo(hostname.c_str(), 0, &req, &ans)) != 0) {
+    if ((code = getaddrinfo(hostname.c_str(), nullptr, &req, &ans)) != 0) {
         log_error(_("getaddrinfo() failed with code: #%d - %s\n"),
                   code, gai_strerror(code));
         return false;
@@ -653,7 +653,7 @@ Network::createClient(const string &hostname, short port)
         tval.tv_sec = 5;
         tval.tv_usec = 0;
 
-        ret = ::select(_sockfd+1, &fdset, NULL, NULL, &tval);
+        ret = ::select(_sockfd+1, &fdset, nullptr, nullptr, &tval);
 
         // If interrupted by a system call, try again
         if (ret == -1 && errno == EINTR) {
@@ -945,7 +945,7 @@ Network::readNet(int fd, byte_t *buffer, int nbytes, int 
timeout)
        sigemptyset(&blockset);        
         // sigaddset(&blockset, SIGINT); /* Block SIGINT */
 //        sigaddset(&blockset, SIGPIPE); /* Block SIGPIPE */
-        sigprocmask(SIG_BLOCK, &blockset, NULL);
+        sigprocmask(SIG_BLOCK, &blockset, nullptr);
 
        // Trap ^C (SIGINT) so we can kill all the threads
 //     struct sigaction  act;
@@ -958,7 +958,7 @@ Network::readNet(int fd, byte_t *buffer, int nbytes, int 
timeout)
 #endif
         if (timeout == 0) {
 #ifdef HAVE_PSELECT
-           ret = pselect(fd+1, &fdset, NULL, NULL, NULL, &blockset);
+           ret = pselect(fd+1, &fdset, nullptr, nullptr, nullptr, &blockset);
 #else
            ret = select(fd+1, &fdset, NULL, NULL, NULL);
 #endif
@@ -966,7 +966,7 @@ Network::readNet(int fd, byte_t *buffer, int nbytes, int 
timeout)
 #ifdef HAVE_PSELECT
            tval.tv_sec = timeout;
            tval.tv_nsec = 0;
-           ret = pselect(fd+1, &fdset, NULL, NULL, &tval, &blockset);
+           ret = pselect(fd+1, &fdset, nullptr, nullptr, &tval, &blockset);
            sigpending(&pending);
            if (sigismember(&pending, SIGINT)) {
                log_debug("Have a pending SIGINT interrupt waiting!");
@@ -1136,7 +1136,7 @@ Network::writeNet(int fd, const byte_t *buffer, int 
nbytes, int timeout)
        sigemptyset(&blockset);        
         // sigaddset(&blockset, SIGINT); /* Block SIGINT */
         sigaddset(&blockset, SIGPIPE);
-        sigprocmask(SIG_BLOCK, &blockset, NULL);
+        sigprocmask(SIG_BLOCK, &blockset, nullptr);
 #else
        struct timeval tval;
 #endif
@@ -1147,7 +1147,7 @@ Network::writeNet(int fd, const byte_t *buffer, int 
nbytes, int timeout)
 #ifdef HAVE_PSELECT
        tval.tv_sec = timeout;
        tval.tv_nsec = 0;
-       ret = pselect(fd+1, NULL, &fdset, NULL, &tval, &blockset);
+       ret = pselect(fd+1, nullptr, &fdset, nullptr, &tval, &blockset);
        sigpending(&pending);
        if (sigismember(&pending, SIGINT)) {
            log_debug("Have a pending SIGINT interrupt waiting!");
@@ -1327,7 +1327,7 @@ Network::waitForNetData(int limit, struct pollfd *fds)
 
     log_debug(_("%s: waiting for %d fds"), __FUNCTION__, limit);
 
-    if ((fds == 0) || (limit == 0)) {
+    if ((fds == nullptr) || (limit == 0)) {
        return hits;
     }
     
@@ -1341,7 +1341,7 @@ Network::waitForNetData(int limit, struct pollfd *fds)
        sigemptyset(&blockset);         /* Block SIGINT */
 //        sigaddset(&blockset, SIGINT);
 //        sigaddset(&blockset, SIGPIPE);
-        sigprocmask(SIG_BLOCK, &blockset, NULL);
+        sigprocmask(SIG_BLOCK, &blockset, nullptr);
 
        tval.tv_sec = 5; // FIXME: was _timeout;
        tval.tv_nsec = 0;
@@ -1491,7 +1491,7 @@ Network::waitForNetData(int limit, fd_set files)
     struct timeval tval;
     tval.tv_sec = 0;
     tval.tv_usec = timeout * 1000; // was 1000000
-    int ret = select(limit+1, &fdset, NULL, NULL, &tval);
+    int ret = select(limit+1, &fdset, nullptr, nullptr, &tval);
 #endif
     // If interrupted by a system call, try again
     if (ret == -1 && errno == EINTR) {
@@ -1656,7 +1656,7 @@ Network::sniffBytesReady(int fd)
     struct timeval tval;
     tval.tv_sec = 0;
     tval.tv_usec = 10;
-    if (select(fd+1, &fdset, NULL, NULL, &tval)) {
+    if (select(fd+1, &fdset, nullptr, nullptr, &tval)) {
        if (FD_ISSET(fd, &fdset)) {
 #ifndef _WIN32
            ioctl(fd, FIONREAD, &bytes);
diff --git a/cygnal/libnet/rtmp.cpp b/cygnal/libnet/rtmp.cpp
index d9cba66..5c87fda 100644
--- a/cygnal/libnet/rtmp.cpp
+++ b/cygnal/libnet/rtmp.cpp
@@ -189,7 +189,7 @@ RTMP::headerSize(std::uint8_t header)
 }
 
 RTMP::RTMP() 
-    : _handshake(0),
+    : _handshake(nullptr),
       _packet_size(0),
       _mystery_word(0),
       _timeout(1)
@@ -763,7 +763,7 @@ RTMP::decodeMsgBody(std::uint8_t *data, size_t size)
        return msg;
     }
 
-    if (name->to_string() != 0) {
+    if (name->to_string() != nullptr) {
        msg->setMethodName(name->to_string());
     }
     
@@ -782,7 +782,7 @@ RTMP::decodeMsgBody(std::uint8_t *data, size_t size)
        // object is deleted 
         std::shared_ptr<cygnal::Element> el = amf_obj.extractAMF(ptr, tooFar);
        ptr += amf_obj.totalsize();
-        if (el == 0) {
+        if (el == nullptr) {
            break;
        }
        msg->addObject(el);
@@ -830,7 +830,7 @@ RTMP::encodeBytesRead()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 
 void
@@ -845,7 +845,7 @@ RTMP::encodeServer()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 
 void 
@@ -860,7 +860,7 @@ RTMP::encodeClient()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 
 void 
@@ -875,7 +875,7 @@ RTMP::encodeAudioData()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 
 void 
@@ -890,7 +890,7 @@ RTMP::encodeVideoData()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 
 void 
@@ -905,7 +905,7 @@ RTMP::encodeNotify()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 
 void 
@@ -920,7 +920,7 @@ RTMP::encodeSharedObj()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 
 void 
@@ -935,7 +935,7 @@ RTMP::encodeInvoke()
 {
     GNASH_REPORT_FUNCTION;
     log_unimpl(__PRETTY_FUNCTION__);
-    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)0);
+    return std::shared_ptr<cygnal::Buffer>((cygnal::Buffer*)nullptr);
 }
 void 
 RTMP::decodeInvoke()
@@ -1069,7 +1069,7 @@ RTMP::sendMsg(int fd, int channel, rtmp_headersize_e 
head_size,
                        ret, size-nbytes);
        }
 #else
-       if (data != 0) {
+       if (data != nullptr) {
            bigbuf->append(data + nbytes, partial);
        }
 #endif
@@ -1324,14 +1324,14 @@ RTMP::split(std::uint8_t *data, size_t size)
 {
 //    GNASH_REPORT_FUNCTION;
 
-    if (data == 0) {
+    if (data == nullptr) {
        log_error(_("Buffer pointer is invalid."));
     }
 
     std::shared_ptr<RTMP::queues_t> channels(new RTMP::queues_t);
        
     // split the buffer at the chunksize boundary
-    std::uint8_t *ptr = 0;
+    std::uint8_t *ptr = nullptr;
     std::shared_ptr<rtmp_head_t> rthead(new rtmp_head_t);
     size_t pktsize = 0;
     //size_t nbytes = 0;
@@ -1385,7 +1385,7 @@ RTMP::split(std::uint8_t *data, size_t size)
 #if 1
            // Red5 version 5 sends out PING messages with a 1 byte header. I 
think this
            // may be a bug in Red5, but we should handle it anyway.
-           if (chunk == 0) {
+           if (chunk == nullptr) {
                cerr << "Chunk wasn't allocated! " << (rthead->bodysize + 
rthead->head_size) 
                      << std::endl;
                chunk.reset(new cygnal::Buffer(rthead->bodysize + 
rthead->head_size));
diff --git a/cygnal/libnet/rtmp_client.cpp b/cygnal/libnet/rtmp_client.cpp
index df12f65..99e3d72 100644
--- a/cygnal/libnet/rtmp_client.cpp
+++ b/cygnal/libnet/rtmp_client.cpp
@@ -132,7 +132,7 @@ RTMPClient::encodeConnect(const char *uri,
             port = RTMP_PORT;
         }
     } else {
-        port = strtol(portstr.c_str(), NULL, 0) & 0xffff;
+        port = strtol(portstr.c_str(), nullptr, 0) & 0xffff;
     }
 
 
@@ -191,7 +191,7 @@ RTMPClient::encodeConnect(const char *app, const char 
*swfUrl, const char *tcUrl
     appnode->makeString("app", app);
     obj->addProperty(appnode);
 
-    const char *version = 0;
+    const char *version = nullptr;
     if (rcfile.getFlashVersionString().size() > 0) {
         version = rcfile.getFlashVersionString().c_str();
     } else {
@@ -268,7 +268,7 @@ RTMPClient::connectToServer(const std::string &url)
     // If we're currently not connected, build and send the
     // initial handshake packet.
     if (connected() == false) {
-       short port = strtol(uri.port().c_str(), NULL, 0) & 0xffff;
+       short port = strtol(uri.port().c_str(), nullptr, 0) & 0xffff;
        if (!createClient(uri.hostname(), port)) {
            return false;
        }
diff --git a/cygnal/libnet/rtmp_msg.cpp b/cygnal/libnet/rtmp_msg.cpp
index 797b8df..2f7f3dc 100644
--- a/cygnal/libnet/rtmp_msg.cpp
+++ b/cygnal/libnet/rtmp_msg.cpp
@@ -114,7 +114,7 @@ static RTMPStatusMsgCode rtmp_msg_code_list[] = {
     { "SharedObject.No.Read.Access",             RTMPMsg::SO_NO_READ_ACCESS },
     { "SharedObject.No.Write.Access",            RTMPMsg::SO_NO_WRITE_ACCESS },
     { "SharedObject.Persistence.Mismatch",       
RTMPMsg::SO_PERSISTENCE_MISMATCH },
-    { 0, RTMPMsg::NC_CONNECT_FAILED }
+    { nullptr, RTMPMsg::NC_CONNECT_FAILED }
 };
 
 // All the result messages from the server are ASCII text, so they have to be 
parsed to
diff --git a/cygnal/proc.cpp b/cygnal/proc.cpp
index 8a4c4dc..90a1b78 100644
--- a/cygnal/proc.cpp
+++ b/cygnal/proc.cpp
@@ -131,7 +131,7 @@ Proc::startCGI(const string &filespec, bool outflag, 
std::uint16_t port)
     strcpy(cmd_line[1], "-n");
     cmd_line[2] = new char[4];
     strcpy(cmd_line[2], "-vv");
-    cmd_line[3] = 0;
+    cmd_line[3] = nullptr;
 //     }
     
     // When running multiple cgis, we prefer to specify the port it's using.
@@ -140,7 +140,7 @@ Proc::startCGI(const string &filespec, bool outflag, 
std::uint16_t port)
         strcpy(cmd_line[3], "-p");
         cmd_line[4] = new char[10];
         sprintf(cmd_line[4], "%d", port);
-        cmd_line[5] = 0;
+        cmd_line[5] = nullptr;
     }
 
 
diff --git a/cygnal/rtmp_server.cpp b/cygnal/rtmp_server.cpp
index a75153b..3bf672f 100644
--- a/cygnal/rtmp_server.cpp
+++ b/cygnal/rtmp_server.cpp
@@ -134,7 +134,7 @@ RTMPServer::processClientHandShake(int fd)
     // just sent.
     std::shared_ptr<cygnal::Buffer> handshake2 = RTMP::recvMsg(fd);
     // See if we have data in the handshake, we should have 1536 bytes
-    if (handshake2 == 0) {
+    if (handshake2 == nullptr) {
        log_error(_("failed to read the handshake from the client."));
        return tcurl;           // nc is empty
     } else {
@@ -421,7 +421,7 @@ RTMPServer::packetRead(cygnal::Buffer &buf)
     std::uint8_t *ptr = buf.reference();
     AMF amf;
     
-    if (ptr == 0) {
+    if (ptr == nullptr) {
        return false;
     }
 
@@ -466,7 +466,7 @@ RTMPServer::packetRead(cygnal::Buffer &buf)
     while ( size < static_cast<std::uint16_t>(_header.bodysize) - 24 ) {
        if (ptr) {
            el = amf_obj.extractProperty(ptr, tooFar);
-           if (el != 0) {
+           if (el != nullptr) {
                size += amf_obj.totalsize();
                ptr += amf_obj.totalsize();
 //             _properties[el->getName()] = el;
@@ -1200,7 +1200,7 @@ RTMPServer::createClientID()
     std::uint64_t value = 0;
 # ifdef HAVE_GETTIMEOFDAY
     timeval tv;
-    gettimeofday(&tv, NULL);
+    gettimeofday(&tv, nullptr);
     random_time_bits = ((uint64_t)tv.tv_usec << 16) ^ tv.tv_sec;
 # else
     random_time_bits = time(NULL);
@@ -1408,14 +1408,14 @@ rtmp_handler(Network::thread_params_t *args)
     do {
        // If there is no data left from the previous chunk, process
        // that before reading more data.
-       if (pkt != 0) {
+       if (pkt != nullptr) {
            log_network("data left from previous packet");
        } else {
            pkt = rtmp->recvMsg(args->netfd);
        }
        
-       if (pkt != 0) {
-           std::uint8_t *tmpptr = 0;
+       if (pkt != nullptr) {
+           std::uint8_t *tmpptr = nullptr;
            if (pkt->allocated()) {
                std::shared_ptr<RTMP::queues_t> que = rtmp->split(*pkt);
                if (!que) {
@@ -1599,14 +1599,14 @@ rtmp_handler(Network::thread_params_t *args)
                              if (rtmp->sendMsg(args->netfd, 6,
                                        RTMP::HEADER_12, 0,
                                        RTMP::AUDIO_DATA, RTMPMsg::FROM_SERVER,
-                                       0, 0)) {
+                                       nullptr, 0)) {
                              }
                              // Send an empty Video packet to get
                              // things started.
                              if (rtmp->sendMsg(args->netfd, 5,
                                        RTMP::HEADER_12, 0,
                                        RTMP::VIDEO_DATA, RTMPMsg::FROM_SERVER,
-                                       0, 0)) {
+                                       nullptr, 0)) {
                              }
                              sleep(1); // FIXME: debugging crap
                              // Send the User Control - Stream Start
diff --git a/extensions/fileio/fileio.cpp b/extensions/fileio/fileio.cpp
index cf1cadd..23ca635 100644
--- a/extensions/fileio/fileio.cpp
+++ b/extensions/fileio/fileio.cpp
@@ -155,7 +155,7 @@ fileio_ctor(const fn_call& fn)
 
 FileIO::FileIO()
     :
-    _stream(0)
+    _stream(nullptr)
 {
 }
 
@@ -340,7 +340,7 @@ FileIO::fclose()
 //    GNASH_REPORT_FUNCTION;
     if (_stream) {
         int ret = ::fclose(_stream);
-        _stream = 0;
+        _stream = nullptr;
         return ret;
     }
     return -1;
@@ -576,7 +576,7 @@ fileio_scandir(const fn_call& fn)
        
     struct dirent **namelist;
        
-       const int n = ::scandir(dir.c_str(), &namelist, 0, alphasort);
+       const int n = ::scandir(dir.c_str(), &namelist, nullptr, alphasort);
        
        if (n < 0) {
            return as_value(false);
diff --git a/extensions/mysql/mysql_db.cpp b/extensions/mysql/mysql_db.cpp
index f33637c..840bcae 100644
--- a/extensions/mysql/mysql_db.cpp
+++ b/extensions/mysql/mysql_db.cpp
@@ -102,9 +102,9 @@ mysql_ctor(const fn_call& fn)
 
 
 MySQL::MySQL() :
-    _db(NULL),
-    _result(NULL),
-    _row(NULL)
+    _db(nullptr),
+    _result(nullptr),
+    _row(nullptr)
 {
 }
 
@@ -134,7 +134,7 @@ MySQL::fetch_row()
     if (_result) {
         return fetch_row(_result);
     }
-    return NULL;
+    return nullptr;
 }
 
 MYSQL_ROW
@@ -163,7 +163,7 @@ MySQL::store_result()
     if (_db) {
         return store_result(_db);
     }
-    return NULL;
+    return nullptr;
 }
 
 MYSQL_RES *
@@ -182,12 +182,12 @@ MySQL::connect(const char* host, const char* dbname, 
const char* user, const cha
     // also deallocates the connection handle
     disconnect();
     
-    if ((_db = mysql_init(NULL)) == NULL ) {
+    if ((_db = mysql_init(nullptr)) == nullptr ) {
         log_error(_("Couldn't initialize database"));
         return false;
     }
     
-    if (mysql_real_connect(_db, host, user, passwd, dbname, 0, NULL, 0) == 
NULL) {
+    if (mysql_real_connect(_db, host, user, passwd, dbname, 0, nullptr, 0) == 
nullptr) {
        log_error(_("Couldn't connect to database"));
        return false;
     }
@@ -285,9 +285,9 @@ bool
 MySQL::disconnect()
 {
 //    GNASH_REPORT_FUNCTION;
-    if (_db != NULL) {
+    if (_db != nullptr) {
         mysql_close(_db);    
-        _db = NULL;
+        _db = nullptr;
     }
     return true;
 }
diff --git a/gui/Player.cpp b/gui/Player.cpp
index 97bfc5f..be29eec 100644
--- a/gui/Player.cpp
+++ b/gui/Player.cpp
@@ -204,7 +204,7 @@ Player::Player()
     _doRender(true),
     _doSound(true),
     _exitTimeout(0),
-    _movieDef(0),
+    _movieDef(nullptr),
     _maxAdvances(0),
 #ifdef GNASH_FPS_DEBUG
     _fpsDebugTime(0.0),
@@ -361,12 +361,12 @@ Player::load_movie()
     }
     catch (const GnashException& er) {
         std::cerr << er.what() << std::endl;
-        md = NULL;
+        md = nullptr;
     }
 
     if (!md) {
         fprintf(stderr, "Could not load movie '%s'\n", _infile.c_str());
-        return NULL;
+        return nullptr;
     }
 
     return md;
@@ -782,7 +782,7 @@ Player::CallbacksHandler::notify(const std::string& command,
         //log_debug("allowscale: %s", args);
         if (noCaseCompare(args, "true")) _gui.allowScale(true);
         else {
-            if (strtol(args.c_str(), NULL, 0)) _gui.allowScale(true);
+            if (strtol(args.c_str(), nullptr, 0)) _gui.allowScale(true);
             else _gui.allowScale(false);
         }
         return;
diff --git a/gui/dump/dump.cpp b/gui/dump/dump.cpp
index 8b2e9a0..b361803 100644
--- a/gui/dump/dump.cpp
+++ b/gui/dump/dump.cpp
@@ -81,7 +81,7 @@ void terminate_signal(int /*signo*/)
 DumpGui::DumpGui(unsigned long xid, float scale, bool loop, RunResources& r)
     :
     Gui(xid, scale, loop, r),
-    _agg_renderer(0),
+    _agg_renderer(nullptr),
     _offscreenbuf_size(-1),
     _timeout(0),
     _framecount(0),
diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index fd65aaa..5e9a155 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -535,7 +535,7 @@ FBGui::find_accessible_tty(int no)
         if (fn) return fn;
     }
     
-    return NULL;
+    return nullptr;
 }
 
 char *
@@ -549,7 +549,7 @@ FBGui::find_accessible_tty(const char* format, int no)
         return fname;
     }
     
-    return NULL; 
+    return nullptr;
 }
 
 bool
diff --git a/gui/fb/fb_glue_agg.cpp b/gui/fb/fb_glue_agg.cpp
index 4f179cc..7dc8224 100644
--- a/gui/fb/fb_glue_agg.cpp
+++ b/gui/fb/fb_glue_agg.cpp
@@ -150,7 +150,7 @@ FBAggGlue::createRenderHandler()
 
     if (!_device) {
         log_error(_("No Device layer initialized yet!"));
-        return 0;
+        return nullptr;
     }
     
     const int width     = _device->getWidth();
@@ -176,18 +176,18 @@ FBAggGlue::createRenderHandler()
         rawfb->getBlueOffset(),  rawfb->getBlueSize(),
         rawfb->getDepth());
 
-    Renderer_agg_base *agg_handler = 0;
+    Renderer_agg_base *agg_handler = nullptr;
     if (pixelformat) {
        agg_handler = create_Renderer_agg(pixelformat);
     } else {
        log_error(_("The pixel format of your framebuffer could not be 
detected."));
-       return 0;
+       return nullptr;
     }
     
-    assert(agg_handler != NULL);
+    assert(agg_handler != nullptr);
 
     // Get the memory buffer to have AGG render into.
-    std::uint8_t *mem = 0;
+    std::uint8_t *mem = nullptr;
     if (rawfb->isSingleBuffered()) {
         log_debug(_("Double buffering disabled"));
         mem = rawfb->getFBMemory();
diff --git a/gui/gnash.cpp b/gui/gnash.cpp
index a93b58b..443b8e7 100644
--- a/gui/gnash.cpp
+++ b/gui/gnash.cpp
@@ -204,7 +204,7 @@ void
 setupFDs(gnash::Player& p, const std::string& fds)
 {
     int hostfd = 0, controlfd = 0;
-    hostfd = std::strtol(fds.substr(0, fds.find(":")).c_str(), NULL, 0);
+    hostfd = std::strtol(fds.substr(0, fds.find(":")).c_str(), nullptr, 0);
     std::string csub = fds.substr(fds.find(":")+1, fds.size());
     controlfd = strtol(csub.c_str(), 0, 0);
     // gnash::log_debug("Host FD #%d, Control FD #%d\n", hostfd, controlfd);
diff --git a/gui/gtk/gtk.cpp b/gui/gtk/gtk.cpp
index 01a2778..0e359b8 100644
--- a/gui/gtk/gtk.cpp
+++ b/gui/gtk/gtk.cpp
@@ -278,7 +278,7 @@ GtkGui::error(const std::string& msg)
     GtkWidget* popup = gtk_dialog_new_with_buttons("Gnash Error",
             GTK_WINDOW(_window),
             static_cast<GtkDialogFlags>(GTK_DIALOG_DESTROY_WITH_PARENT),
-            GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
+            GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, nullptr);
 
     g_signal_connect_swapped(popup, "response", G_CALLBACK(gtk_widget_destroy),
             popup);
@@ -402,7 +402,7 @@ GtkGui::setCursor(gnash_cursor_type newcursor)
             cursortype = GDK_LAST_CURSOR;
     }
   
-    GdkCursor* gdkcursor = NULL; 
+    GdkCursor* gdkcursor = nullptr;
   
     if (cursortype != GDK_LAST_CURSOR) {
          gdkcursor = gdk_cursor_new(cursortype);
@@ -441,7 +441,7 @@ GtkGui::showMouse(bool show)
         GdkColor *color;
 
         color = g_new0(GdkColor, 1);
-        pixmap = gdk_pixmap_new(NULL, 1, 1, 1);
+        pixmap = gdk_pixmap_new(nullptr, 1, 1, 1);
         GdkCursor* cursor = gdk_cursor_new_from_pixmap(pixmap, pixmap,
                                                     color, color, 0, 0);
 
@@ -565,7 +565,7 @@ GtkGui::setupEvents()
                    G_CALLBACK(visibilityNotifyEvent), this);
   
     g_signal_connect_after(_canvas, "realize",
-                         G_CALLBACK (realizeEvent), NULL);
+                         G_CALLBACK (realizeEvent), nullptr);
 
     // connect_after because we are going to cause a rendering and the canvas
     // widget should have had a chance to update the size of the render area
@@ -599,7 +599,7 @@ GtkGui::startAdvanceTimer()
     stopAdvanceTimer();
     
     _advanceSourceTimer = g_timeout_add_full(G_PRIORITY_LOW, _interval,
-            (GSourceFunc)advance_movie, this, NULL);
+            (GSourceFunc)advance_movie, this, nullptr);
 
     log_debug(_("Advance interval timer set to %d ms (~ %d FPS)"),
             _interval, _interval ? 1000/_interval : 1000);
@@ -818,7 +818,7 @@ GtkGui::makeTreeModel(const 
std::unique_ptr<movie_root::InfoTree>& treepointer)
         }
 
         //Read in data from present node
-        if (depth == 0) gtk_tree_store_append(model, &child_iter, NULL);
+        if (depth == 0) gtk_tree_store_append(model, &child_iter, nullptr);
         else gtk_tree_store_append(model, &child_iter, &iter);
 
         gtk_tree_store_set(model, &child_iter,
@@ -1237,7 +1237,7 @@ PreferencesDialog::PreferencesDialog(GtkWidget* window)
                     // The buttons and their response codes:
                     GTK_STOCK_OK, GTK_RESPONSE_OK,
                     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                    NULL);
+                    nullptr);
     // Add Gnash icon
     addGnashIcon(GTK_WINDOW(_prefsDialog));
 
@@ -1705,7 +1705,7 @@ GtkGui::showPropertiesDialog()
                         GTK_DIALOG_DESTROY_WITH_PARENT),
                         // Just a 'close' button
                         GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
-                        NULL);
+                        nullptr);
 
     // Not too small... But I'd rather not have to specify
     // a size in pixels.
@@ -1720,7 +1720,7 @@ GtkGui::showPropertiesDialog()
 
     // Destroy the window when a button is clicked.
     g_signal_connect (propsDialog, "response",
-               G_CALLBACK(gtk_widget_destroy), NULL);
+               G_CALLBACK(gtk_widget_destroy), nullptr);
 
     GtkWidget *propsvbox = gtk_vbox_new (FALSE, 1);
     gtk_container_add(GTK_CONTAINER(
@@ -1770,19 +1770,19 @@ GtkGui::showPropertiesDialog()
             -1, _("Variable"),
             renderer, "text",
             STRING1_COLUMN,
-            NULL);
+            nullptr);
 
     // 'Value' column:
     // Set to be 'editable' so that the data can be selected and
     // copied; it can't actually be edited, though.
     renderer = gtk_cell_renderer_text_new ();
-    g_object_set (renderer, "xalign", 0.0, "editable", TRUE, NULL);
+    g_object_set (renderer, "xalign", 0.0, "editable", TRUE, nullptr);
     gtk_tree_view_insert_column_with_attributes(
             GTK_TREE_VIEW(treeview),
             -1, _("Value"),
             renderer, "text",
             STRING2_COLUMN,
-            NULL);
+            nullptr);
 
     //Add tree to scrollwindow.
     gtk_container_add(GTK_CONTAINER(scrollwindow1), treeview);
@@ -1801,12 +1801,12 @@ GtkGui::showAboutDialog()
         "Rob Savoye", 
         "Sandro Santilli",
         "Ann Barcomb",
-        NULL 
+        nullptr
     };
 
     const gchar *artists[] = { 
         "Jason Savoye",
-        NULL
+        nullptr
     };
 
     const gchar *authors[] = { 
@@ -1828,7 +1828,7 @@ GtkGui::showAboutDialog()
         "Bob Naugle",
         "Si Liu",
         "Sharad Desai",
-        NULL
+        nullptr
     };
 
        const std::string license = 
@@ -2237,7 +2237,7 @@ GtkGui::yesno(const std::string& question)
 /// Anonymous namespace for callbacks, local functions, event handlers etc.
 namespace {
 
-static GList *pixmaps_directories = NULL;
+static GList *pixmaps_directories = nullptr;
 
 // Adds the Gnash icon to a window.
 void
@@ -2254,19 +2254,19 @@ addGnashIcon(GtkWindow* window)
 GdkPixbuf*
 createPixbuf (const gchar *filename)
 {
-    gchar *pathname = NULL;
+    gchar *pathname = nullptr;
     GdkPixbuf *pixbuf;
-    GError *error = NULL;
+    GError *error = nullptr;
 
     if (!filename || !filename[0])
-       return NULL;
+       return nullptr;
 
     pathname = findPixmapFile (filename);
 
     if (!pathname) {
         log_error (_("Couldn't find pixmap file: %s"), filename);
         g_warning(_("Couldn't find pixmap file: %s"), filename);
-        return NULL;
+        return nullptr;
     }
 
     pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
@@ -2396,7 +2396,7 @@ findPixmapFile(const gchar* filename)
         g_free (pathname);
         elem = elem->next;
     }
-    return NULL;
+    return nullptr;
 }
 
 
@@ -2598,11 +2598,11 @@ menuOpenFile(GtkMenuItem* /*menuitem*/, gpointer data)
 
 #if GTK_CHECK_VERSION(2,4,0)
     dialog = gtk_file_chooser_dialog_new (_("Open file"),
-                                          NULL,
+                                          nullptr,
                                           GTK_FILE_CHOOSER_ACTION_OPEN,
                                           GTK_STOCK_CANCEL, 
GTK_RESPONSE_CANCEL,
                                           GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
-                                          NULL);
+                                          nullptr);
     
     if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
         openFile(dialog, gui);
@@ -2663,7 +2663,7 @@ popupHandler(GtkWidget *widget, GdkEvent *event)
             GdkEventButton* event_button =
                             reinterpret_cast<GdkEventButton*>(event);
             if (event_button->button == 3) {
-                gtk_menu_popup(menu, NULL, NULL, NULL, NULL,
+                gtk_menu_popup(menu, nullptr, nullptr, nullptr, nullptr,
                                event_button->button, event_button->time);
                 return TRUE;
             } 
@@ -2685,7 +2685,7 @@ popupHandlerAlt(GtkWidget *widget, GdkEvent *event)
             GdkEventButton* event_button =
                             reinterpret_cast<GdkEventButton*>(event);
             if (event_button->button == 3) {
-                gtk_menu_popup(menu, NULL, NULL, NULL, NULL,
+                gtk_menu_popup(menu, nullptr, nullptr, nullptr, nullptr,
                                event_button->button, event_button->time);
                 return TRUE;
             } 
diff --git a/gui/gtk/gtk_canvas.cpp b/gui/gtk/gtk_canvas.cpp
index b28806d..b834c39 100644
--- a/gui/gtk/gtk_canvas.cpp
+++ b/gui/gtk/gtk_canvas.cpp
@@ -66,7 +66,7 @@ struct _GnashCanvas
 
 G_DEFINE_TYPE(GnashCanvas, gnash_canvas, GTK_TYPE_DRAWING_AREA)
 
-static GObjectClass *parent_class = NULL;
+static GObjectClass *parent_class = nullptr;
 
 static void gnash_canvas_class_init(GnashCanvasClass *gnash_canvas_class);
 static void gnash_canvas_init(GnashCanvas *canvas);
@@ -83,7 +83,7 @@ namespace {
 GtkWidget *
 gnash_canvas_new ()
 {
-    return GTK_WIDGET(g_object_new (GNASH_TYPE_CANVAS, NULL));
+    return GTK_WIDGET(g_object_new (GNASH_TYPE_CANVAS, nullptr));
 }
 
 static void
diff --git a/gui/gtk/gtk_glue.h b/gui/gtk/gtk_glue.h
index 721e2b5..36ce777 100644
--- a/gui/gtk/gtk_glue.h
+++ b/gui/gtk/gtk_glue.h
@@ -40,7 +40,7 @@ namespace gnash {
 class GtkGlue : public DeviceGlue
 {
   public:
-    GtkGlue() : _drawing_area(0), _needs_area(false) { }
+    GtkGlue() : _drawing_area(nullptr), _needs_area(false) { }
     virtual ~GtkGlue() { }
     virtual bool init(int argc, char **argv[]) = 0;
 
diff --git a/gui/gtk/gtk_glue_agg.cpp b/gui/gtk/gtk_glue_agg.cpp
index b4b3223..9db9bf8 100644
--- a/gui/gtk/gtk_glue_agg.cpp
+++ b/gui/gtk/gtk_glue_agg.cpp
@@ -39,8 +39,8 @@ namespace gnash
 {
 
 GtkAggGlue::GtkAggGlue()
-:   _offscreenbuf(NULL),
-    _agg_renderer(NULL)
+:   _offscreenbuf(nullptr),
+    _agg_renderer(nullptr)
 {
     GNASH_REPORT_FUNCTION;
 }
@@ -108,7 +108,7 @@ GtkAggGlue::setRenderHandlerSize(int width, int height)
 
     assert(width > 0);
     assert(height > 0);
-    assert(_agg_renderer != NULL);
+    assert(_agg_renderer != nullptr);
     
     if (_offscreenbuf && _offscreenbuf->width == width &&
         _offscreenbuf->height == height) {
diff --git a/gui/gtk/gtk_glue_cairo.cpp b/gui/gtk/gtk_glue_cairo.cpp
index e4336ed..133e6fb 100644
--- a/gui/gtk/gtk_glue_cairo.cpp
+++ b/gui/gtk/gtk_glue_cairo.cpp
@@ -29,10 +29,10 @@ namespace gnash
 {
 
 GtkCairoGlue::GtkCairoGlue()
-  : _cairo_handle(0),
-    _cairo_offscreen(0),
-    _renderer(0),
-    _image(0)
+  : _cairo_handle(nullptr),
+    _cairo_offscreen(nullptr),
+    _renderer(nullptr),
+    _image(nullptr)
 {
     GNASH_REPORT_FUNCTION;
 }
@@ -129,7 +129,7 @@ cairoFormatFromVisual(const GdkVisual* visual, 
cairo_format_t* format /*out*/)
       *format = CAIRO_FORMAT_ARGB32;
       break;
     default:
-      format = NULL;
+      format = nullptr;
       return false;
   }
   return true;
@@ -144,12 +144,12 @@ GtkCairoGlue::createGdkImageSurface(const int& width, 
const int& height)
   cairo_format_t format;
 
   if (!cairoFormatFromVisual(visual, &format)) {
-    return NULL;
+    return nullptr;
   }
 
   _image = gdk_image_new (GDK_IMAGE_FASTEST, visual, width, height);
   if (!_image) {
-    return NULL;
+    return nullptr;
   }
 
   cairo_surface_t* surface =
@@ -159,8 +159,8 @@ GtkCairoGlue::createGdkImageSurface(const int& width, const 
int& height)
   if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
     cairo_surface_destroy(surface);
     gdk_image_destroy(_image);
-    _image = 0;
-    return NULL;
+    _image = nullptr;
+    return nullptr;
   }
 
   return surface;
@@ -176,7 +176,7 @@ GtkCairoGlue::createSimilarSurface(const int& width, const 
int& height)
 
   if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
     cairo_surface_destroy(surface);
-    return NULL;
+    return nullptr;
   }
   return surface;
 }
@@ -189,7 +189,7 @@ GtkCairoGlue::createMemorySurface(const int& width, const 
int& height)
 
   if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
     cairo_surface_destroy(surface);
-    return NULL;
+    return nullptr;
   }
   return surface;
 }
@@ -202,7 +202,7 @@ GtkCairoGlue::configure(GtkWidget *const /*widget*/,
 
     if (_image) {
       gdk_image_destroy(_image);
-      _image = 0;
+      _image = nullptr;
     }
 
     cairo_surface_t* surface = createGdkImageSurface(event->width, 
event->height);
diff --git a/gui/gtk/gtk_glue_gtkglext.cpp b/gui/gtk/gtk_glue_gtkglext.cpp
index fc94fb0..848ec71 100644
--- a/gui/gtk/gtk_glue_gtkglext.cpp
+++ b/gui/gtk/gtk_glue_gtkglext.cpp
@@ -41,13 +41,13 @@ GtkGlExtGlue::~GtkGlExtGlue()
 //    GNASH_REPORT_FUNCTION;
     if (_glconfig) {
         g_object_unref (G_OBJECT (_glconfig));
-        _glconfig = NULL;
+        _glconfig = nullptr;
     }
     
     GdkGLContext *glcontext = gtk_widget_get_gl_context (_drawing_area);
     if (glcontext) {
        g_object_unref (G_OBJECT (glcontext));
-       glcontext = NULL;
+       glcontext = nullptr;
     }
 }
 
@@ -94,7 +94,7 @@ GtkGlExtGlue::prepDrawingArea(GtkWidget *drawing_area)
 //    GNASH_REPORT_FUNCTION;
     _drawing_area = drawing_area;
     gtk_widget_set_gl_capability(_drawing_area, _glconfig,
-                                 NULL, TRUE, GDK_GL_RGBA_TYPE);
+                                 nullptr, TRUE, GDK_GL_RGBA_TYPE);
 }
 
 Renderer*
diff --git a/gui/gui.cpp b/gui/gui.cpp
index 3c528c2..a822754 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -111,8 +111,8 @@ Gui::Gui(RunResources& r) :
     ,fps_timer_interval(0.0)
     ,frames_dropped(0)
 #endif
-    ,_movieDef(0)
-    ,_stage(0)
+    ,_movieDef(nullptr)
+    ,_stage(nullptr)
     ,_stopped(false)
     ,_started(false)
     ,_showUpdatedRegions(false)
@@ -155,8 +155,8 @@ Gui::Gui(unsigned long xid, float scale, bool loop, 
RunResources& r)
     ,fps_timer_interval(0.0)
     ,frames_dropped(0)
 #endif        
-    ,_movieDef(0)
-    ,_stage(0)
+    ,_movieDef(nullptr)
+    ,_stage(nullptr)
     ,_stopped(false)
     ,_started(false)
     ,_showUpdatedRegions(false)
@@ -984,7 +984,7 @@ Gui::advanceMovie(bool doDisplay)
     }
     
     if (_screenShotter.get() && _renderer.get()) {
-        _screenShotter->screenShot(*_renderer, _advances, doDisplay ? 0 : 
&dis);
+        _screenShotter->screenShot(*_renderer, _advances, doDisplay ? nullptr 
: &dis);
     }
     
     // Only increment advances and check for exit condition when we've
diff --git a/gui/pythonmod/gnash-view.cpp b/gui/pythonmod/gnash-view.cpp
index 00e0cad..a6db373 100644
--- a/gui/pythonmod/gnash-view.cpp
+++ b/gui/pythonmod/gnash-view.cpp
@@ -73,7 +73,7 @@ struct _GnashView {
 
 G_DEFINE_TYPE(GnashView, gnash_view, GTK_TYPE_BIN)
 
-static GObjectClass *parent_class = NULL;
+static GObjectClass *parent_class = nullptr;
 
 static void gnash_view_class_init(GnashViewClass *gnash_view_class);
 static void gnash_view_init(GnashView *view);
@@ -97,7 +97,7 @@ static void gnash_view_load_movie(GnashView *view, const 
gchar *path);
 GtkWidget *
 gnash_view_new (void)
 {
-    return GTK_WIDGET(g_object_new (GNASH_TYPE_VIEW, NULL));
+    return GTK_WIDGET(g_object_new (GNASH_TYPE_VIEW, nullptr));
 }
 
 const gchar *
@@ -109,7 +109,7 @@ gnash_view_call (GnashView *view, const gchar *func_name, 
const gchar *input_dat
     gnash::as_value func = getMember(*getObject(view->movie), getURI(vm, 
func_name));
 
     if( !func.is_function() ) {
-        return NULL;
+        return nullptr;
     }
 
     gnash::as_value result;
@@ -120,7 +120,7 @@ gnash_view_call (GnashView *view, const gchar *func_name, 
const gchar *input_dat
         result = callMethod(getObject(view->movie), getURI(vm, func_name));
     }
     if( !result.is_string() ) {
-        return NULL;
+        return nullptr;
     }
 
     return result.to_string().c_str();
@@ -147,7 +147,7 @@ gnash_view_class_init(GnashViewClass *gnash_view_class)
                                         g_param_spec_string ("uri",
                                                              "URI to movie",
                                                              "URI to the SWF 
movie to display",
-                                                             NULL,
+                                                             nullptr,
                                                              
(GParamFlags)G_PARAM_READWRITE));
 }
 
@@ -162,7 +162,7 @@ gnash_view_set_property (GObject      *object,
     switch (prop_id)
     {
     case PROP_URI:
-        if(view->movie_definition.get() != NULL) {
+        if(view->movie_definition.get() != nullptr) {
             g_warning("Cannot change the movie URI once the view has been 
initialized.");
             return;
         }
@@ -196,7 +196,7 @@ gnash_view_init(GnashView *view)
 {
     GNASH_REPORT_FUNCTION;
 
-    view->uri = NULL;
+    view->uri = nullptr;
     view->advance_timer = 0;
 
        g_signal_connect (GTK_WIDGET(view), "realize",
@@ -225,7 +225,7 @@ gnash_view_init(GnashView *view)
 
     view->canvas = GNASH_CANVAS(gnash_canvas_new());
     std::string nullstr;
-    gnash_canvas_setup(view->canvas, nullstr, nullstr, 0, NULL);
+    gnash_canvas_setup(view->canvas, nullstr, nullstr, 0, nullptr);
     gtk_container_add (GTK_CONTAINER (view), GTK_WIDGET(view->canvas));
     gtk_widget_show (GTK_WIDGET(view->canvas));
 
@@ -254,7 +254,7 @@ gnash_view_size_allocate (GtkWidget *widget, GtkAllocation 
*allocation)
     widget->allocation = *allocation;
     gtk_widget_size_allocate (GTK_BIN(widget)->child, allocation);
 
-    if( view->stage.get() != NULL) {
+    if( view->stage.get() != nullptr) {
        view->stage->setDimensions(allocation->width, allocation->height);
 
         std::shared_ptr<gnash::Renderer> renderer = 
gnash_canvas_get_renderer(view->canvas);
@@ -268,7 +268,7 @@ static void
 gnash_view_size_request (GtkWidget *widget, GtkRequisition *requisition)
 {
     GnashView *view = GNASH_VIEW(widget);
-    if( view->movie_definition.get() == NULL ) {
+    if( view->movie_definition.get() == nullptr ) {
         requisition->width = 0;
         requisition->height = 0;
     } else {
@@ -284,7 +284,7 @@ gnash_view_realize_cb(GtkWidget *widget, gpointer 
/*user_data*/)
     GnashView *view = GNASH_VIEW(widget);
 
     // Some initializations need to happen after the widget has been realized.
-    if(view->movie_definition.get() == NULL) {
+    if(view->movie_definition.get() == nullptr) {
         gtk_widget_realize(GTK_WIDGET(view->canvas));
         gnash_view_load_movie(view, view->uri);
     }
@@ -295,7 +295,7 @@ key_press_event_cb(GtkWidget */*widget*/, GdkEventKey 
*event, gpointer data)
 {
     GNASH_REPORT_FUNCTION;
     GnashView *view = GNASH_VIEW(data);
-    if (view->stage.get() == NULL)
+    if (view->stage.get() == nullptr)
         return FALSE;
 
     gnash::key::code c = gdk_to_gnash_key(event->keyval);
@@ -314,7 +314,7 @@ key_release_event_cb(GtkWidget */*widget*/, GdkEventKey 
*event, gpointer data)
 {
     GNASH_REPORT_FUNCTION;
     GnashView *view = GNASH_VIEW(data);
-    if (view->stage.get() == NULL)
+    if (view->stage.get() == nullptr)
         return FALSE;
 
     gnash::key::code c = gdk_to_gnash_key(event->keyval);
@@ -333,7 +333,7 @@ button_press_event_cb(GtkWidget */*widget*/, GdkEventButton 
*event, gpointer dat
 {
     GNASH_REPORT_FUNCTION;
     GnashView *view = GNASH_VIEW(data);
-    if (view->stage.get() == NULL)
+    if (view->stage.get() == nullptr)
         return FALSE;
 
     /// Double- and triple-clicks should not send an extra event!
@@ -353,7 +353,7 @@ button_release_event_cb(GtkWidget* /*widget*/, 
GdkEventButton* /*event*/,
 {
     GNASH_REPORT_FUNCTION;
     GnashView *view = GNASH_VIEW(data);
-    if (view->stage.get() == NULL)
+    if (view->stage.get() == nullptr)
         return FALSE;
 
     view->stage->mouseClick(false);
@@ -390,23 +390,23 @@ motion_notify_event_cb(GtkWidget */*widget*/, 
GdkEventMotion *event, gpointer da
                if ( activeEntity->isSelectableTextField() )
                {
                    GdkCursor *gdkcursor = gdk_cursor_new(GDK_XTERM);
-                   gdk_window_set_cursor (widget->window, NULL);
+                   gdk_window_set_cursor (widget->window, nullptr);
             gdk_cursor_unref(gdkcursor);
                }
                else if ( activeEntity->allowHandCursor() )
                {
                    GdkCursor *gdkcursor = gdk_cursor_new(GDK_HAND2);
-                   gdk_window_set_cursor (widget->window, NULL);
+                   gdk_window_set_cursor (widget->window, nullptr);
             gdk_cursor_unref(gdkcursor);
                }
                else
                {
-                   gdk_window_set_cursor (widget->window, NULL);
+                   gdk_window_set_cursor (widget->window, nullptr);
                }
        }
        else
        {
-           gdk_window_set_cursor (widget->window, NULL);
+           gdk_window_set_cursor (widget->window, nullptr);
        }
 
     return TRUE;
@@ -445,7 +445,7 @@ gnash_view_load_movie(GnashView *view, const gchar *uri)
     view->movie_definition = gnash::MovieFactory::makeMovie(url,
             *view->run_info, url.str().c_str(), false);
 
-    g_return_if_fail(view->movie_definition.get() != NULL);
+    g_return_if_fail(view->movie_definition.get() != nullptr);
 
     // NOTE: it's important that _systemClock is constructed
     //       before and destroyed after _virtualClock !
@@ -456,7 +456,7 @@ gnash_view_load_movie(GnashView *view, const gchar *uri)
     view->movie_definition->completeLoad();
 
     view->advance_timer = g_timeout_add_full(G_PRIORITY_LOW, 10,
-            (GSourceFunc)gnash_view_advance_movie, view, NULL);
+            (GSourceFunc)gnash_view_advance_movie, view, nullptr);
 
     gtk_widget_queue_resize (GTK_WIDGET(view));
 
@@ -499,7 +499,7 @@ gnash_view_display(GnashView *view)
 
     std::shared_ptr<gnash::Renderer> renderer = 
gnash_canvas_get_renderer(view->canvas);
     renderer->set_invalidated_regions(changed_ranges);
-    gdk_window_invalidate_rect(GTK_WIDGET(view->canvas)->window, NULL, false);
+    gdk_window_invalidate_rect(GTK_WIDGET(view->canvas)->window, nullptr, 
false);
 
     gnash_canvas_before_rendering(view->canvas, view->stage.get());
        view->stage->display();
diff --git a/gui/qt/Qt4Glue.h b/gui/qt/Qt4Glue.h
index cd08bea..13d8145 100644
--- a/gui/qt/Qt4Glue.h
+++ b/gui/qt/Qt4Glue.h
@@ -82,7 +82,7 @@ private:
 class Qt4Glue
 {
   public:
-    Qt4Glue() : _drawing_area(NULL) {}
+    Qt4Glue() : _drawing_area(nullptr) {}
     virtual ~Qt4Glue() { }
     virtual bool init(int argc, char **argv[]) = 0;
 
diff --git a/gui/qt/Qt4GlueAgg.cpp b/gui/qt/Qt4GlueAgg.cpp
index cc0348e..54ecddf 100644
--- a/gui/qt/Qt4GlueAgg.cpp
+++ b/gui/qt/Qt4GlueAgg.cpp
@@ -36,7 +36,7 @@ Qt4AggGlue::Qt4AggGlue()
 :
   _width(0),
   _height(0),
-  _renderer(0)
+  _renderer(nullptr)
 {
 }
 
diff --git a/gui/qt/Qt4GlueCairo.cpp b/gui/qt/Qt4GlueCairo.cpp
index 32a2897..47edffa 100644
--- a/gui/qt/Qt4GlueCairo.cpp
+++ b/gui/qt/Qt4GlueCairo.cpp
@@ -35,9 +35,9 @@ Qt4CairoGlue::Qt4CairoGlue()
 :
   _width(0),
   _height(0),
-  _renderer(0),
-  _cairo_handle(0),
-  _cairo_surface(0)
+  _renderer(nullptr),
+  _cairo_handle(nullptr),
+  _cairo_surface(nullptr)
 {
 }
 
diff --git a/gui/qt/Qt4GlueOgl.cpp b/gui/qt/Qt4GlueOgl.cpp
index eeb0a2f..59823a8 100644
--- a/gui/qt/Qt4GlueOgl.cpp
+++ b/gui/qt/Qt4GlueOgl.cpp
@@ -38,7 +38,7 @@ Qt4OglGlue::Qt4OglGlue()
 :
   _width(0),
   _height(0),
-  _renderer(0)
+  _renderer(nullptr)
 {
 }
 
diff --git a/gui/sdl/sdl_agg_glue.cpp b/gui/sdl/sdl_agg_glue.cpp
index 7cef174..0142cf1 100644
--- a/gui/sdl/sdl_agg_glue.cpp
+++ b/gui/sdl/sdl_agg_glue.cpp
@@ -32,10 +32,10 @@ namespace gnash
 
 SdlAggGlue::SdlAggGlue()
        :
-_sdl_surface(NULL),
-_offscreenbuf(NULL),
-_screen(NULL),
-_agg_renderer(NULL)
+_sdl_surface(nullptr),
+_offscreenbuf(nullptr),
+_screen(nullptr),
+_agg_renderer(nullptr)
 {
 //    GNASH_REPORT_FUNCTION;
 }
@@ -191,7 +191,7 @@ SdlAggGlue::render(int minx, int miny, int maxx, int maxy)
         static_cast<Uint16>(maxx - minx),
         static_cast<Uint16>(maxy - miny)};
     SDL_SetClipRect(_screen, &clip);
-    SDL_BlitSurface(_sdl_surface, 0, _screen, 0);
+    SDL_BlitSurface(_sdl_surface, nullptr, _screen, nullptr);
     SDL_UpdateRect(_screen, clip.x, clip.y, clip.w, clip.h);
 }
 
diff --git a/gui/sdl/sdl_cairo_glue.cpp b/gui/sdl/sdl_cairo_glue.cpp
index fb9f726..332cea8 100644
--- a/gui/sdl/sdl_cairo_glue.cpp
+++ b/gui/sdl/sdl_cairo_glue.cpp
@@ -27,12 +27,12 @@ namespace gnash
 {
 
 SdlCairoGlue::SdlCairoGlue()
-: _cairo_surface(NULL)
-  , _cairo_handle(NULL)
-  , _sdl_surface(NULL)
-  , _render_image(NULL)
-  , _screen(NULL)
-  , _renderer(NULL)
+: _cairo_surface(nullptr)
+  , _cairo_handle(nullptr)
+  , _sdl_surface(nullptr)
+  , _render_image(nullptr)
+  , _screen(nullptr)
+  , _renderer(nullptr)
 {
 //    GNASH_REPORT_FUNCTION;
 }
@@ -116,7 +116,7 @@ SdlCairoGlue::render()
     /*Fill the background in purple so we can see the alpha blend */
     //SDL_FillRect (_screen, NULL, SDL_MapRGB(_screen->format,255,0,255));
 
-    SDL_BlitSurface(_sdl_surface, NULL, _screen, NULL);
+    SDL_BlitSurface(_sdl_surface, nullptr, _screen, nullptr);
 
     //cairo_surface_write_to_png (_cairo_surface, "/tmp/gnash.png");
 
diff --git a/libbase/ClockTime.cpp b/libbase/ClockTime.cpp
index f6fd089..460ce6f 100644
--- a/libbase/ClockTime.cpp
+++ b/libbase/ClockTime.cpp
@@ -63,7 +63,7 @@ clocktime::getTicks()
 
     struct timeval tv;
     
-    gettimeofday(&tv, 0);
+    gettimeofday(&tv, nullptr);
 
     std::uint64_t result = static_cast<std::uint64_t>(tv.tv_sec) * 1000000L;
 
diff --git a/libbase/GC.cpp b/libbase/GC.cpp
index 2a4afc0..23c4fb5 100644
--- a/libbase/GC.cpp
+++ b/libbase/GC.cpp
@@ -47,7 +47,7 @@ GC::GC(GcRoot& root)
 #endif
     char* gcgap = std::getenv("GNASH_GC_TRIGGER_THRESHOLD");
     if (gcgap) {
-        const size_t gap = std::strtoul(gcgap, NULL, 0);
+        const size_t gap = std::strtoul(gcgap, nullptr, 0);
         _maxNewCollectablesCount = gap;
     }
 }
diff --git a/libbase/GnashFactory.h b/libbase/GnashFactory.h
index 378423f..0f783e3 100644
--- a/libbase/GnashFactory.h
+++ b/libbase/GnashFactory.h
@@ -102,11 +102,11 @@ public:
     T* get(const Key& name) {
         Init();
         if (name.empty()) {
-            return _handlers.empty() ? 0 : _handlers.begin()->second();
+            return _handlers.empty() ? nullptr : _handlers.begin()->second();
         }
 
         typename Handlers::const_iterator it = _handlers.find(name);
-        if (it == _handlers.end()) return 0;
+        if (it == _handlers.end()) return nullptr;
         return it->second();
     }
 
diff --git a/libbase/GnashImageGif.cpp b/libbase/GnashImageGif.cpp
index 90801c7..84b09ce 100644
--- a/libbase/GnashImageGif.cpp
+++ b/libbase/GnashImageGif.cpp
@@ -112,7 +112,7 @@ private:
 GifInput::GifInput(std::shared_ptr<IOChannel> in)
     :
     Input(in),
-    _gif(0),
+    _gif(nullptr),
     _currentRow(0)
 {
 }
diff --git a/libbase/GnashImageJpeg.cpp b/libbase/GnashImageJpeg.cpp
index e1b2a91..f3365f5 100644
--- a/libbase/GnashImageJpeg.cpp
+++ b/libbase/GnashImageJpeg.cpp
@@ -171,7 +171,7 @@ public:
     {
         // Discard existing bytes in our buffer.
         m_pub.bytes_in_buffer = 0;
-        m_pub.next_input_byte = NULL;
+        m_pub.next_input_byte = nullptr;
     }
 
     /// Set up the given decompress object to read from the given
@@ -199,7 +199,7 @@ private:
         m_pub.resync_to_restart = jpeg_resync_to_restart;
         m_pub.term_source = term_source;
         m_pub.bytes_in_buffer = 0;
-        m_pub.next_input_byte = NULL;
+        m_pub.next_input_byte = nullptr;
     }
 
     // Source stream
@@ -214,7 +214,7 @@ private:
 JpegInput::JpegInput(std::shared_ptr<IOChannel> in)
     :
     Input(in),
-    _errorOccurred(0),
+    _errorOccurred(nullptr),
     _jmpBuf(),
     _compressorOpened(false)
 {
@@ -235,7 +235,7 @@ JpegInput::~JpegInput()
         reinterpret_cast<rw_source_IOChannel*>(m_cinfo.src);
 
     delete src;
-    m_cinfo.src = NULL;
+    m_cinfo.src = nullptr;
 
     jpeg_destroy_decompress(&m_cinfo);
 }
@@ -548,7 +548,7 @@ public:
 
         // Clean ourselves up.
         delete dest;
-        cinfo->dest = NULL;
+        cinfo->dest = nullptr;
     }
 
 private:    
diff --git a/libbase/GnashImagePng.cpp b/libbase/GnashImagePng.cpp
index 3c388e6..907a8f0 100644
--- a/libbase/GnashImagePng.cpp
+++ b/libbase/GnashImagePng.cpp
@@ -93,8 +93,8 @@ public:
     PngInput(std::shared_ptr<IOChannel> in)
         :
         Input(in),
-        _pngPtr(0),
-        _infoPtr(0),
+        _pngPtr(nullptr),
+        _infoPtr(nullptr),
         _currentRow(0)
     {
         init();
@@ -174,7 +174,7 @@ private:
 
 PngInput::~PngInput()
 {
-    png_destroy_read_struct(&_pngPtr, &_infoPtr, 0);
+    png_destroy_read_struct(&_pngPtr, &_infoPtr, nullptr);
 }
 
 size_t
@@ -216,7 +216,7 @@ void
 PngInput::init()
 {
     // Initialize png library.
-    _pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, &error,
+    _pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, &error,
             &warning);
 
     if (!_pngPtr) return;
@@ -224,7 +224,7 @@ PngInput::init()
     _infoPtr = png_create_info_struct(_pngPtr);
 
     if (!_infoPtr) {
-        png_destroy_read_struct(&_pngPtr, 0, 0);
+        png_destroy_read_struct(&_pngPtr, nullptr, nullptr);
         return;
     }
 }
@@ -319,8 +319,8 @@ PngOutput::PngOutput(std::shared_ptr<IOChannel> out, size_t 
width,
         size_t height, int /*quality*/)
     :
     Output(out, width, height),
-    _pngPtr(0),
-    _infoPtr(0)
+    _pngPtr(nullptr),
+    _infoPtr(nullptr)
 {
     init();
 }
@@ -337,13 +337,13 @@ PngOutput::init()
 {
     // Initialize png library.
     _pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
-                                        NULL, &error, &warning);
+                                        nullptr, &error, &warning);
     if (!_pngPtr) return;
 
     _infoPtr = png_create_info_struct(_pngPtr);
 
     if (!_infoPtr) {
-        png_destroy_write_struct(&_pngPtr, static_cast<png_infopp>(NULL));
+        png_destroy_write_struct(&_pngPtr, static_cast<png_infopp>(nullptr));
         return;
     }
 }
@@ -369,7 +369,7 @@ PngOutput::writeImageRGBA(const unsigned char* rgbaData)
        8, PNG_COLOR_TYPE_RGBA, PNG_INTERLACE_NONE,
        PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
 
-    png_write_png(_pngPtr, _infoPtr, PNG_TRANSFORM_IDENTITY, NULL);
+    png_write_png(_pngPtr, _infoPtr, PNG_TRANSFORM_IDENTITY, nullptr);
 }
 
 
@@ -394,7 +394,7 @@ PngOutput::writeImageRGB(const unsigned char* rgbData)
        8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
        PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
 
-    png_write_png(_pngPtr, _infoPtr, PNG_TRANSFORM_IDENTITY, NULL);
+    png_write_png(_pngPtr, _infoPtr, PNG_TRANSFORM_IDENTITY, nullptr);
 }
 
 } // unnamed namespace
diff --git a/libbase/GnashSleep.h b/libbase/GnashSleep.h
index 46effce..dcce71c 100644
--- a/libbase/GnashSleep.h
+++ b/libbase/GnashSleep.h
@@ -39,7 +39,7 @@ inline void gnashSleep(time_t useconds)
 #else
     const time_t m = 1000000;
     const struct timespec t = { useconds / m, (useconds % m) * 1000 };
-    ::nanosleep(&t, 0);
+    ::nanosleep(&t, nullptr);
 #endif
 }
 
diff --git a/libbase/NetworkAdapter.cpp b/libbase/NetworkAdapter.cpp
index a133026..b113806 100644
--- a/libbase/NetworkAdapter.cpp
+++ b/libbase/NetworkAdapter.cpp
@@ -252,13 +252,13 @@ CurlSession::~CurlSession()
                  curl_share_strerror(code));
         gnashSleep(1000000);
     }
-    _shandle = 0;
+    _shandle = nullptr;
     curl_global_cleanup();
 }
 
 CurlSession::CurlSession()
     :
-    _shandle(0),
+    _shandle(nullptr),
     _shareMutex(),
     _cookieMutex(),
     _dnscacheMutex()
@@ -788,7 +788,7 @@ CurlStreamFile::processMessages()
 void
 CurlStreamFile::init(const std::string& url, const std::string& cachefile)
 {
-    _customHeaders = 0;
+    _customHeaders = nullptr;
 
     _url = url;
     _running = 1;
diff --git a/libbase/RTMP.cpp b/libbase/RTMP.cpp
index 213e87d..a44c87b 100644
--- a/libbase/RTMP.cpp
+++ b/libbase/RTMP.cpp
@@ -732,7 +732,7 @@ RTMP::sendPacket(RTMPPacket& packet)
             if (_socket.write(header, chunk) != chunk) {
                 return false;
             }
-            header = NULL;
+            header = nullptr;
             hSize = 0;
         }
       
@@ -1146,7 +1146,7 @@ decodeInt24(const std::uint8_t *c)
 std::uint8_t*
 encodeInt24(std::uint8_t *output, std::uint8_t *outend, int nVal)
 {
-    if (output + 3 > outend) return NULL;
+    if (output + 3 > outend) return nullptr;
 
     output[2] = nVal & 0xff;
     output[1] = nVal >> 8;
diff --git a/libbase/SharedMem.cpp b/libbase/SharedMem.cpp
index 8ad78af..88b2ab5 100644
--- a/libbase/SharedMem.cpp
+++ b/libbase/SharedMem.cpp
@@ -51,7 +51,7 @@ namespace gnash {
 
 SharedMem::SharedMem(size_t size)
     :
-    _addr(0),
+    _addr(nullptr),
     _size(size),
     _semid(0),
     _shmid(0),
@@ -82,7 +82,7 @@ SharedMem::~SharedMem()
         // Note that this isn't completely reliable.
         if (!ds.shm_nattch) {
             log_debug(_("No shared memory users left. Removing segment and 
semaphore."));
-            ::shmctl(_shmid, IPC_RMID, 0);
+            ::shmctl(_shmid, IPC_RMID, nullptr);
             ::semctl(_semid, IPC_RMID, 0);
         }
     }
@@ -219,7 +219,7 @@ SharedMem::attach()
         return false;
     }
 
-    _addr = static_cast<iterator>(::shmat(_shmid, 0, 0));
+    _addr = static_cast<iterator>(::shmat(_shmid, nullptr, 0));
 
     if (!_addr) {
         log_error(_("Unable to attach shared memory: %s"),
diff --git a/libbase/Socket.cpp b/libbase/Socket.cpp
index f6ce306..88fbd60 100644
--- a/libbase/Socket.cpp
+++ b/libbase/Socket.cpp
@@ -69,7 +69,7 @@ Socket::connected() const
         tval.tv_sec = 0;
         tval.tv_usec = 103;
             
-        const int ret = ::select(_socket + 1, NULL, &fdset, NULL, &tval);
+        const int ret = ::select(_socket + 1, nullptr, &fdset, nullptr, &tval);
         
         // Select timeout
         if (ret == 0) continue;
@@ -126,7 +126,7 @@ namespace {
 
 addrinfo* getAddrInfo(const std::string& hostname, std::uint16_t port)
 {
-    addrinfo req = addrinfo(), *ans = 0;
+    addrinfo req = addrinfo(), *ans = nullptr;
     
     req.ai_family = AF_UNSPEC;  // Allow IPv4 or IPv6
     req.ai_socktype = SOCK_STREAM;
@@ -136,7 +136,7 @@ addrinfo* getAddrInfo(const std::string& hostname, 
std::uint16_t port)
     if (code != 0) {
         log_error(_("getaddrinfo() failed with code: #%d - %s"),
                  code, gai_strerror(code));
-        return 0;
+        return nullptr;
     }
 
     return ans;
@@ -177,7 +177,7 @@ Socket::connect(const std::string& hostname, std::uint16_t 
port)
             char clienthost [INET6_ADDRSTRLEN] = {};
             int code = getnameinfo(ot->ai_addr, ot->ai_addrlen,
                                clienthost, sizeof(clienthost),
-                               NULL, 0, NI_NUMERICHOST);
+                               nullptr, 0, NI_NUMERICHOST);
 
             if (code != 0) {
                 log_error(_("getnameinfo() failed: %1%"), gai_strerror(code));
diff --git a/libbase/URL.cpp b/libbase/URL.cpp
index 0751218..02c29e3 100644
--- a/libbase/URL.cpp
+++ b/libbase/URL.cpp
@@ -155,7 +155,7 @@ URL::URL(const std::string& absolute_url)
         const size_t maxSize = 4096; 
         
         std::unique_ptr<char[]> buf; 
-        char* dir = 0;
+        char* dir = nullptr;
         size_t bufSize = 0;
         
         // This just assumes a failure in getcwd is a name-length error,
diff --git a/libbase/arg_parser.cpp b/libbase/arg_parser.cpp
index 10695e1..d60febf 100644
--- a/libbase/arg_parser.cpp
+++ b/libbase/arg_parser.cpp
@@ -137,7 +137,7 @@ Arg_parser::Arg_parser( const int argc, const char * const 
argv[],
         
         if( ch1 == '-' && ch2 )        {       // we found an option
             const char * const opt = argv[argind];
-            const char * const arg = (argind + 1 < argc) ? argv[argind+1] : 0;
+            const char * const arg = (argind + 1 < argc) ? argv[argind+1] : 
nullptr;
             if( ch2 == '-' ) {
                 if( !argv[argind][2] ) { ++argind; break; }    // we found "--"
                 else if( !parse_long_option( opt, arg, options, argind ) ) 
break;
diff --git a/libbase/extension.cpp b/libbase/extension.cpp
index 3c2d70f..31b31d3 100644
--- a/libbase/extension.cpp
+++ b/libbase/extension.cpp
@@ -199,7 +199,7 @@ Extension::scanDir(const std::string& dirlist)
         
         struct dirent *entry;
 
-        while ((entry = readdir(libdir)) != NULL) {
+        while ((entry = readdir(libdir)) != nullptr) {
             // We only want shared libraries that end with the suffix, 
otherwise
             // we get all the duplicates.
             std::string name(entry->d_name);
diff --git a/libbase/log.cpp b/libbase/log.cpp
index be0b364..782ae54 100644
--- a/libbase/log.cpp
+++ b/libbase/log.cpp
@@ -299,7 +299,7 @@ LogFile::LogFile()
     _state(CLOSED),
     _stamp(true),
     _write(false),
-    _listener(NULL)
+    _listener(nullptr)
 {
 }
 
diff --git a/libbase/log.h b/libbase/log.h
index d2d5610..562e03c 100644
--- a/libbase/log.h
+++ b/libbase/log.h
@@ -397,7 +397,7 @@ class DSOEXPORT HostFunctionReport
 public:
     // Only print function tracing messages when multiple -v
     // options have been supplied. 
-    HostFunctionReport() : _func(0) {
+    HostFunctionReport() : _func(nullptr) {
         log_debug("entering");
     }
 
diff --git a/libbase/memory.cpp b/libbase/memory.cpp
index d6c4403..aeaa00f 100644
--- a/libbase/memory.cpp
+++ b/libbase/memory.cpp
@@ -46,7 +46,7 @@ const int DATALOG_SIZE = 1024;
 
 Memory::Memory() 
     : _collecting(false),
-      _info(0),
+      _info(nullptr),
       _size(DATALOG_SIZE),
       _index(0)
     , _checkpoint()
@@ -92,7 +92,7 @@ Memory::startStats()
 {
 //    GNASH_REPORT_FUNCTION;
     _collecting = true;
-    if (_info == 0) {
+    if (_info == nullptr) {
         log_debug(_("Allocating buffer for %d data samples"), _size);
         _info = new struct small_mallinfo[_size];
         reset();
diff --git a/libbase/noseek_fd_adapter.cpp b/libbase/noseek_fd_adapter.cpp
index 4280ec7..b6fa3c1 100644
--- a/libbase/noseek_fd_adapter.cpp
+++ b/libbase/noseek_fd_adapter.cpp
@@ -62,7 +62,7 @@ public:
     ///    would not be accessible after destruction of this 
     ///    instance.
     ///
-    NoSeekFile(int fd, const char* filename=NULL);
+    NoSeekFile(int fd, const char* filename=nullptr);
 
     ~NoSeekFile();
 
@@ -367,7 +367,7 @@ make_stream(int fd, const char* cachefilename)
     std::cerr << boost::format("making NoSeekFile stream for fd %d") % fd << 
std::endl;
 #endif
 
-    NoSeekFile* stream = NULL;
+    NoSeekFile* stream = nullptr;
 
     try {
         stream = new NoSeekFile(fd, cachefilename);
@@ -375,7 +375,7 @@ make_stream(int fd, const char* cachefilename)
     catch (const std::exception& ex) {
         std::cerr << boost::format("NoSeekFile stream: %s") % ex.what() << 
std::endl;
         delete stream;
-        return NULL;
+        return nullptr;
     }
 
     return stream;
diff --git a/libbase/noseek_fd_adapter.h b/libbase/noseek_fd_adapter.h
index 78199df..064a35a 100644
--- a/libbase/noseek_fd_adapter.h
+++ b/libbase/noseek_fd_adapter.h
@@ -42,7 +42,7 @@ namespace noseek_fd_adapter {
 /// Specify a cachefilename if you want to be able to access
 /// the full cache after deletion of the returned IOChannel.
 ///
-DSOEXPORT IOChannel* make_stream(int fd, const char* cachefilename = 0);
+DSOEXPORT IOChannel* make_stream(int fd, const char* cachefilename = nullptr);
 
 } // namespace gnash::noseek_fd_adapter
 } // namespace gnash
diff --git a/libbase/rc.cpp b/libbase/rc.cpp
index 3acc625..312c19b 100644
--- a/libbase/rc.cpp
+++ b/libbase/rc.cpp
@@ -129,7 +129,7 @@ RcInitFile::RcInitFile()
 #ifdef __OS2__x
     _urlOpenerFormat = PrfQueryProfileString(HINI_USER, (PSZ)
             "WPURLDEFAULTSETTINGS",
-            (PSZ) "DefaultBrowserExe", NULL,
+            (PSZ) "DefaultBrowserExe", nullptr,
             (PVOID) browserExe, (LONG)sizeof(browserExe));
     _urlOpenerFormat += " -remote 'openurl(%u)'";
 #endif
@@ -323,7 +323,7 @@ RcInitFile::expandPath (std::string& path)
             else user = path.substr(1);
 
             // find user using pwd
-            const char *userhome = NULL;
+            const char *userhome = nullptr;
             struct passwd *password = getpwnam(user.c_str());
             if (password) {
                 userhome = password->pw_dir;
@@ -691,7 +691,7 @@ RcInitFile::updateFile()
         }
     } else {
         // Check the users home directory
-        const char *home = NULL;
+        const char *home = nullptr;
 #if defined(__amigaos4__)
         //on AmigaOS we have a GNASH: assign that point to program dir
         home = "/gnash";
diff --git a/libbase/sharedlib.cpp b/libbase/sharedlib.cpp
index 520bea9..49f57f7 100644
--- a/libbase/sharedlib.cpp
+++ b/libbase/sharedlib.cpp
@@ -59,7 +59,7 @@ namespace gnash {
 
 SharedLib::SharedLib(const std::string& filespec)
 #ifdef HAVE_LTDL
-  : _dlhandle(NULL)
+  : _dlhandle(nullptr)
 #endif
 {
     _filespec = filespec;
@@ -103,7 +103,7 @@ SharedLib::openLib (const std::string& filespec)
 #ifdef HAVE_LTDL
     _dlhandle = lt_dlopenext (filespec.c_str());
     
-    if (_dlhandle == NULL) {
+    if (_dlhandle == nullptr) {
         log_error("lt_dlopenext(\"%s\") failed: %s", filespec.c_str(), 
lt_dlerror());
         return false;
     }
@@ -123,16 +123,16 @@ SharedLib::initentry *
 SharedLib::getInitEntry (const std::string& symbol)
 {
     // GNASH_REPORT_FUNCTION;
-    lt_ptr run = NULL;
+    lt_ptr run = nullptr;
     
     scoped_lock lock(_libMutex);
 
 #ifdef HAVE_LTDL
     run  = lt_dlsym (_dlhandle, symbol.c_str());
     
-    if (run == NULL) {
+    if (run == nullptr) {
         log_error(_("Couldn't find symbol: %s"), symbol);
-        return NULL;
+        return nullptr;
     } else {
         log_debug(_("Found symbol %s @ %p"), symbol, (void *)run);
     }
@@ -148,7 +148,7 @@ SharedLib::getDllSymbol(const std::string& symbol)
 {
     GNASH_REPORT_FUNCTION;
     
-    lt_ptr run = NULL;
+    lt_ptr run = nullptr;
     
     scoped_lock lock(_libMutex);
 
@@ -160,9 +160,9 @@ SharedLib::getDllSymbol(const std::string& symbol)
     Realistically, we should never get a valid pointer with a value of 0
     Markus: 'Id est NULL.'
     */
-    if (run == NULL) {
+    if (run == nullptr) {
         log_error("Couldn't find symbol: %s", symbol);
-        return NULL;
+        return nullptr;
     } else {
         log_debug("Found symbol %s @ %p", symbol, (void *)run);
     }
diff --git a/libbase/tree.hh b/libbase/tree.hh
index f0bdc9e..74b44bb 100644
--- a/libbase/tree.hh
+++ b/libbase/tree.hh
@@ -53,13 +53,13 @@ class tree_node_ { // size: 5*4=20 bytes (on 32 bit arch), 
can be reduced by 8.
 
 template<class T>
 tree_node_<T>::tree_node_()
-       : parent(0), first_child(0), last_child(0), prev_sibling(0), 
next_sibling(0)
+       : parent(nullptr), first_child(nullptr), last_child(nullptr), 
prev_sibling(nullptr), next_sibling(nullptr)
        {
        }
 
 template<class T>
 tree_node_<T>::tree_node_(const T& val)
-       : parent(0), first_child(0), last_child(0), prev_sibling(0), 
next_sibling(0), data(val)
+       : parent(nullptr), first_child(nullptr), last_child(nullptr), 
prev_sibling(nullptr), next_sibling(nullptr), data(val)
        {
        }
 
@@ -507,22 +507,22 @@ tree<T, tree_node_allocator>::~tree()
 template <class T, class tree_node_allocator>
 void tree<T, tree_node_allocator>::head_initialise_() 
    { 
-   head = alloc_.allocate(1,0); // MSVC does not have default second argument 
-       feet = alloc_.allocate(1,0);
+   head = alloc_.allocate(1,nullptr); // MSVC does not have default second 
argument
+       feet = alloc_.allocate(1,nullptr);
        alloc_.construct(head, tree_node_<T>());
        alloc_.construct(feet, tree_node_<T>());
 
-   head->parent=0;
-   head->first_child=0;
-   head->last_child=0;
-   head->prev_sibling=0; //head;
+   head->parent=nullptr;
+   head->first_child=nullptr;
+   head->last_child=nullptr;
+   head->prev_sibling=nullptr; //head;
    head->next_sibling=feet; //head;
 
-       feet->parent=0;
-       feet->first_child=0;
-       feet->last_child=0;
+       feet->parent=nullptr;
+       feet->first_child=nullptr;
+       feet->last_child=nullptr;
        feet->prev_sibling=head;
-       feet->next_sibling=0;
+       feet->next_sibling=nullptr;
    }
 
 template <class T, class tree_node_allocator>
@@ -573,12 +573,12 @@ template<class T, class tree_node_allocator>
 void tree<T, tree_node_allocator>::erase_children(const iterator_base& it)
        {
 //     std::cout << "erase_children " << it.node << std::endl;
-       if(it.node==0) return;
+       if(it.node==nullptr) return;
 
        tree_node *cur=it.node->first_child;
-       tree_node *prev=0;
+       tree_node *prev=nullptr;
 
-       while(cur!=0) {
+       while(cur!=nullptr) {
                prev=cur;
                cur=cur->next_sibling;
                erase_children(pre_order_iterator(prev));
@@ -586,8 +586,8 @@ void tree<T, tree_node_allocator>::erase_children(const 
iterator_base& it)
                alloc_.destroy(prev);
                alloc_.deallocate(prev,1);
                }
-       it.node->first_child=0;
-       it.node->last_child=0;
+       it.node->first_child=nullptr;
+       it.node->last_child=nullptr;
 //     std::cout << "exit" << std::endl;
        }
 
@@ -601,13 +601,13 @@ iter tree<T, tree_node_allocator>::erase(iter it)
        ret.skip_children();
        ++ret;
        erase_children(it);
-       if(cur->prev_sibling==0) {
+       if(cur->prev_sibling==nullptr) {
                cur->parent->first_child=cur->next_sibling;
                }
        else {
                cur->prev_sibling->next_sibling=cur->next_sibling;
                }
-       if(cur->next_sibling==0) {
+       if(cur->next_sibling==nullptr) {
                cur->parent->last_child=cur->prev_sibling;
                }
        else {
@@ -713,8 +713,8 @@ typename tree<T, tree_node_allocator>::fixed_depth_iterator 
tree<T, tree_node_al
 template <class T, class tree_node_allocator>
 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, 
tree_node_allocator>::begin(const iterator_base& pos) const
        {
-       assert(pos.node!=0);
-       if(pos.node->first_child==0) {
+       assert(pos.node!=nullptr);
+       if(pos.node->first_child==nullptr) {
                return end(pos);
                }
        return pos.node->first_child;
@@ -723,7 +723,7 @@ typename tree<T, tree_node_allocator>::sibling_iterator 
tree<T, tree_node_alloca
 template <class T, class tree_node_allocator>
 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, 
tree_node_allocator>::end(const iterator_base& pos) const
        {
-       sibling_iterator ret(0);
+       sibling_iterator ret(nullptr);
        ret.parent_=pos.node;
        return ret;
        }
@@ -764,7 +764,7 @@ template <class T, class tree_node_allocator>
 template <typename iter>
 iter tree<T, tree_node_allocator>::parent(iter position) 
        {
-       assert(position.node!=0);
+       assert(position.node!=nullptr);
        return iter(position.node->parent);
        }
 
@@ -899,14 +899,14 @@ iter tree<T, tree_node_allocator>::append_child(iter 
position, const T& x)
        assert(position.node!=feet);
        assert(position.node);
 
-       tree_node* tmp = alloc_.allocate(1,0);
+       tree_node* tmp = alloc_.allocate(1,nullptr);
        alloc_.construct(tmp, x);
 //     kp::constructor(&tmp->data, x);
-       tmp->first_child=0;
-       tmp->last_child=0;
+       tmp->first_child=nullptr;
+       tmp->last_child=nullptr;
 
        tmp->parent=position.node;
-       if(position.node->last_child!=0) {
+       if(position.node->last_child!=nullptr) {
                position.node->last_child->next_sibling=tmp;
                }
        else {
@@ -914,7 +914,7 @@ iter tree<T, tree_node_allocator>::append_child(iter 
position, const T& x)
                }
        tmp->prev_sibling=position.node->last_child;
        position.node->last_child=tmp;
-       tmp->next_sibling=0;
+       tmp->next_sibling=nullptr;
        return tmp;
        }
 
@@ -1014,22 +1014,22 @@ template <class T, class tree_node_allocator>
 template <class iter>
 iter tree<T, tree_node_allocator>::insert(iter position, const T& x)
        {
-       if(position.node==0) {
+       if(position.node==nullptr) {
                position.node=feet; // Backward compatibility: when calling 
insert on a null node,
                                    // insert before the feet.
                }
-       tree_node* tmp = alloc_.allocate(1,0);
+       tree_node* tmp = alloc_.allocate(1,nullptr);
        alloc_.construct(tmp, x);
 //     kp::constructor(&tmp->data, x);
-       tmp->first_child=0;
-       tmp->last_child=0;
+       tmp->first_child=nullptr;
+       tmp->last_child=nullptr;
 
        tmp->parent=position.node->parent;
        tmp->next_sibling=position.node;
        tmp->prev_sibling=position.node->prev_sibling;
        position.node->prev_sibling=tmp;
 
-       if(tmp->prev_sibling==0) {
+       if(tmp->prev_sibling==nullptr) {
                if(tmp->parent) // when inserting nodes at the head, there is 
no parent
                        tmp->parent->first_child=tmp;
                }
@@ -1148,21 +1148,21 @@ iter tree<T, tree_node_allocator>::replace(iter 
position, const iterator_base& f
 //     std::cout << "warning!" << position.node << std::endl;
        erase_children(position);       
 //     std::cout << "no warning!" << std::endl;
-       tree_node* tmp = alloc_.allocate(1,0);
+       tree_node* tmp = alloc_.allocate(1,nullptr);
        alloc_.construct(tmp, (*from));
 //     kp::constructor(&tmp->data, (*from));
-       tmp->first_child=0;
-       tmp->last_child=0;
-       if(current_to->prev_sibling==0) {
-               if(current_to->parent!=0)
+       tmp->first_child=nullptr;
+       tmp->last_child=nullptr;
+       if(current_to->prev_sibling==nullptr) {
+               if(current_to->parent!=nullptr)
                        current_to->parent->first_child=tmp;
                }
        else {
                current_to->prev_sibling->next_sibling=tmp;
                }
        tmp->prev_sibling=current_to->prev_sibling;
-       if(current_to->next_sibling==0) {
-               if(current_to->parent!=0)
+       if(current_to->next_sibling==nullptr) {
+               if(current_to->parent!=nullptr)
                        current_to->parent->last_child=tmp;
                }
        else {
@@ -1181,16 +1181,16 @@ iter tree<T, tree_node_allocator>::replace(iter 
position, const iterator_base& f
        pre_order_iterator toit=tmp;
        // copy all children
        do {
-               assert(current_from!=0);
-               if(current_from->first_child != 0) {
+               assert(current_from!=nullptr);
+               if(current_from->first_child != nullptr) {
                        current_from=current_from->first_child;
                        toit=append_child(toit, current_from->data);
                        }
                else {
-                       while(current_from->next_sibling==0 && 
current_from!=start_from) {
+                       while(current_from->next_sibling==nullptr && 
current_from!=start_from) {
                                current_from=current_from->parent;
                                toit=parent(toit);
-                               assert(current_from!=0);
+                               assert(current_from!=nullptr);
                                }
                        current_from=current_from->next_sibling;
                        if(current_from!=last) {
@@ -1530,8 +1530,8 @@ void tree<T, tree_node_allocator>::sort(sibling_iterator 
from, sibling_iterator
        tree_node *prev=from.node->prev_sibling;
        tree_node *next=it2.node->next_sibling;
        typename std::multiset<tree_node *, compare_nodes<StrictWeakOrdering> 
>::iterator nit=nodes.begin(), eit=nodes.end();
-       if(prev==0) {
-               if((*nit)->parent!=0) // to catch "sorting the head" 
situations, when there is no parent
+       if(prev==nullptr) {
+               if((*nit)->parent!=nullptr) // to catch "sorting the head" 
situations, when there is no parent
                        (*nit)->parent->first_child=(*nit);
                }
        else prev->next_sibling=(*nit);
@@ -1551,8 +1551,8 @@ void tree<T, tree_node_allocator>::sort(sibling_iterator 
from, sibling_iterator
        // eit points to the last node in the sorted range.
        (*eit)->next_sibling=next;
    (*eit)->prev_sibling=prev; // missed in the loop above
-       if(next==0) {
-               if((*eit)->parent!=0) // to catch "sorting the head" 
situations, when there is no parent
+       if(next==nullptr) {
+               if((*eit)->parent!=nullptr) // to catch "sorting the head" 
situations, when there is no parent
                        (*eit)->parent->last_child=(*eit);
                }
        else next->prev_sibling=(*eit);
@@ -2038,7 +2038,7 @@ bool tree<T, 
tree_node_allocator>::leaf_iterator::operator==(const leaf_iterator
 template <class T, class tree_node_allocator>
 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, 
tree_node_allocator>::iterator_base::begin() const
        {
-       if(node->first_child==0) 
+       if(node->first_child==nullptr)
                return end();
 
        sibling_iterator ret(node->first_child);
@@ -2049,7 +2049,7 @@ typename tree<T, tree_node_allocator>::sibling_iterator 
tree<T, tree_node_alloca
 template <class T, class tree_node_allocator>
 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, 
tree_node_allocator>::iterator_base::end() const
        {
-       sibling_iterator ret(0);
+       sibling_iterator ret(nullptr);
        ret.parent_=node;
        return ret;
        }
@@ -2086,7 +2086,7 @@ unsigned int tree<T, 
tree_node_allocator>::iterator_base::number_of_children() c
 
 template <class T, class tree_node_allocator>
 tree<T, tree_node_allocator>::pre_order_iterator::pre_order_iterator() 
-       : iterator_base(0)
+       : iterator_base(nullptr)
        {
        }
 
@@ -2119,15 +2119,15 @@ tree<T, 
tree_node_allocator>::pre_order_iterator::pre_order_iterator(const sibli
 template <class T, class tree_node_allocator>
 typename tree<T, tree_node_allocator>::pre_order_iterator& tree<T, 
tree_node_allocator>::pre_order_iterator::operator++()
        {
-       assert(this->node!=0);
-       if(!this->skip_current_children_ && this->node->first_child != 0) {
+       assert(this->node!=nullptr);
+       if(!this->skip_current_children_ && this->node->first_child != nullptr) 
{
                this->node=this->node->first_child;
                }
        else {
                this->skip_current_children_=false;
-               while(this->node->next_sibling==0) {
+               while(this->node->next_sibling==nullptr) {
                        this->node=this->node->parent;
-                       if(this->node==0)
+                       if(this->node==nullptr)
                                return *this;
                        }
                this->node=this->node->next_sibling;
@@ -2599,9 +2599,9 @@ tree<T, 
tree_node_allocator>::sibling_iterator::sibling_iterator(const sibling_i
 template <class T, class tree_node_allocator>
 void tree<T, tree_node_allocator>::sibling_iterator::set_parent_()
        {
-       parent_=0;
-       if(this->node==0) return;
-       if(this->node->parent!=0)
+       parent_=nullptr;
+       if(this->node==nullptr) return;
+       if(this->node->parent!=nullptr)
                parent_=this->node->parent;
        }
 
diff --git a/libbase/tu_file.cpp b/libbase/tu_file.cpp
index 10e08ed..0091cb7 100644
--- a/libbase/tu_file.cpp
+++ b/libbase/tu_file.cpp
@@ -251,7 +251,7 @@ std::unique_ptr<IOChannel>
 makeFileChannel(const char* filepath, const char* mode)
 {
        FILE* fp = fopen(filepath, mode);
-       if ( fp == 0 ) { return std::unique_ptr<IOChannel>(); }
+       if ( fp == nullptr ) { return std::unique_ptr<IOChannel>(); }
 
        return makeFileChannel(fp, true);
 }
diff --git a/libbase/utf8.cpp b/libbase/utf8.cpp
index 3d708b8..e749ae3 100644
--- a/libbase/utf8.cpp
+++ b/libbase/utf8.cpp
@@ -358,7 +358,7 @@ guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
 #ifdef ANDROID
     length = str.size();
 #else
-    length = std::mbstowcs(NULL, str.c_str(), 0);
+    length = std::mbstowcs(nullptr, str.c_str(), 0);
 #endif
     if (length == -1)
     {
diff --git a/libbase/utility.h b/libbase/utility.h
index 8b9f48c..10f35aa 100644
--- a/libbase/utility.h
+++ b/libbase/utility.h
@@ -96,7 +96,7 @@ std::string typeName(const T& inst)
 #if defined(__GNUC__) && __GNUC__ > 2
        int status;
        char* typeNameUnmangled = 
-               abi::__cxa_demangle (typeName.c_str(), NULL, NULL,
+               abi::__cxa_demangle (typeName.c_str(), nullptr, nullptr,
                                     &status);
        if (status == 0)
        {
diff --git a/libbase/zlib_adapter.cpp b/libbase/zlib_adapter.cpp
index 8d84ce8..c5970ad 100644
--- a/libbase/zlib_adapter.cpp
+++ b/libbase/zlib_adapter.cpp
@@ -144,10 +144,10 @@ InflaterIOChannel::reset()
         return;
     }
 
-    m_zstream.next_in = 0;
+    m_zstream.next_in = nullptr;
     m_zstream.avail_in = 0;
 
-    m_zstream.next_out = 0;
+    m_zstream.next_out = nullptr;
     m_zstream.avail_out = 0;
 
     // Rewind the underlying stream.
diff --git a/libcore/AMFConverter.cpp b/libcore/AMFConverter.cpp
index 66975ba..0c2c155 100644
--- a/libcore/AMFConverter.cpp
+++ b/libcore/AMFConverter.cpp
@@ -343,7 +343,7 @@ Reader::operator()(as_value& val, Type t)
                 return true;
             
             case NULL_AMF0:
-                val = static_cast<as_object*>(0);
+                val = static_cast<as_object*>(nullptr);
                 return true;
             
             // Object types need access to Global_as to create objects.
diff --git a/libcore/Bitmap.cpp b/libcore/Bitmap.cpp
index a0ab5bc..24024ae 100644
--- a/libcore/Bitmap.cpp
+++ b/libcore/Bitmap.cpp
@@ -51,7 +51,7 @@ Bitmap::Bitmap(movie_root& mr, as_object* object,
     :
     DisplayObject(mr, object, parent),
     _def(def),
-    _bitmapData(0),
+    _bitmapData(nullptr),
     _width(def->get_width_pixels()),
     _height(def->get_height_pixels())
 {
@@ -67,7 +67,7 @@ Bitmap::bitmap() const
 {
     if (_def) return _def->bitmap();
     if (_bitmapData) return _bitmapData->bitmapInfo();
-    return 0;
+    return nullptr;
 }
 
 void
@@ -150,7 +150,7 @@ Bitmap::update()
     set_invalidated();
 
     if (_bitmapData->disposed()) {
-        _bitmapData = 0;
+        _bitmapData = nullptr;
         _shape.clear();
     }
 }
diff --git a/libcore/Bitmap.h b/libcore/Bitmap.h
index 9db7c1c..91731f0 100644
--- a/libcore/Bitmap.h
+++ b/libcore/Bitmap.h
@@ -75,7 +75,7 @@ public:
     virtual bool pointInShape(std::int32_t x, std::int32_t y) const;
 
     /// Called when the object is placed on stage.
-    virtual void construct(as_object* init = 0);
+    virtual void construct(as_object* init = nullptr);
 
 protected:
 
diff --git a/libcore/BitmapMovie.cpp b/libcore/BitmapMovie.cpp
index 2c8579c..60e5e5e 100644
--- a/libcore/BitmapMovie.cpp
+++ b/libcore/BitmapMovie.cpp
@@ -30,7 +30,7 @@ BitmapMovie::BitmapMovie(as_object* object, const 
BitmapMovieDefinition* def,
 {
     assert(def);
     assert(object);
-    Bitmap* bm = new Bitmap(stage(), 0, def, this);
+    Bitmap* bm = new Bitmap(stage(), nullptr, def, this);
 
     const int depth = 1 + DisplayObject::staticDepthOffset;
     placeDisplayObject(bm, depth);
diff --git a/libcore/Button.cpp b/libcore/Button.cpp
index 2be5f77..da16d2a 100644
--- a/libcore/Button.cpp
+++ b/libcore/Button.cpp
@@ -384,7 +384,7 @@ Button::topmostMouseEntity(std::int32_t x, std::int32_t y)
 {
     if (!visible() || !isEnabled())
     {
-        return 0;
+        return nullptr;
     }
 
     //-------------------------------------------------
@@ -417,7 +417,7 @@ Button::topmostMouseEntity(std::int32_t x, std::int32_t y)
     //-------------------------------------------------
 
     // Find hit DisplayObjects
-    if ( _hitCharacters.empty() ) return 0;
+    if ( _hitCharacters.empty() ) return nullptr;
 
     // point is in p's space,
     // we need to convert it in world space
@@ -437,7 +437,7 @@ Button::topmostMouseEntity(std::int32_t x, std::int32_t y)
         }
     }
 
-    return NULL;
+    return nullptr;
 }
 
 
@@ -529,7 +529,7 @@ Button::mouseEvent(const event_id& event)
             const SWF::SoundInfoRecord& sinfo = bs.soundInfo;
 
             const sound::SoundEnvelopes* env = 
-                sinfo.envelopes.empty() ? 0 : &sinfo.envelopes;
+                sinfo.envelopes.empty() ? nullptr : &sinfo.envelopes;
 
             s->startSound(bs.sample->m_sound_handler_id,
                     bs.soundInfo.loopCount,
@@ -662,8 +662,8 @@ Button::set_current_state(MouseState new_state)
             if ( oldch && oldch->unloaded() ) {
                 removeInstanceProperty(*this, oldch);
                 if ( ! oldch->isDestroyed() ) oldch->destroy();
-                _stateCharacters[i] = NULL;
-                oldch = NULL;
+                _stateCharacters[i] = nullptr;
+                oldch = nullptr;
             }
 
             if ( oldch ) // the one we have should not be there... unload!
@@ -675,7 +675,7 @@ Button::set_current_state(MouseState new_state)
                     // No onUnload handler: destroy and clear slot
                     removeInstanceProperty(*this, oldch);
                     if (!oldch->isDestroyed()) oldch->destroy();
-                    _stateCharacters[i] = NULL;
+                    _stateCharacters[i] = nullptr;
                 }
                 else
                 {
@@ -697,8 +697,8 @@ Button::set_current_state(MouseState new_state)
             {
                 removeInstanceProperty(*this, oldch);
                 if ( ! oldch->isDestroyed() ) oldch->destroy();
-                _stateCharacters[i] = NULL;
-                oldch = NULL;
+                _stateCharacters[i] = nullptr;
+                oldch = nullptr;
             }
 
             if (!oldch) {
diff --git a/libcore/Button.h b/libcore/Button.h
index 490ce01..e7b14d9 100644
--- a/libcore/Button.h
+++ b/libcore/Button.h
@@ -121,7 +121,7 @@ public:
     //
     /// @param init     An init object, which can be passed when constructing
     ///                 Buttons with attachMovie, but is never used.
-    virtual void construct(as_object* init = 0);
+    virtual void construct(as_object* init = nullptr);
 
 #ifdef USE_SWFTREE
     // Override to append button DisplayObjects info, see dox in 
DisplayObject.h
diff --git a/libcore/CharacterProxy.cpp b/libcore/CharacterProxy.cpp
index 2cf9fc1..1ec2ead 100644
--- a/libcore/CharacterProxy.cpp
+++ b/libcore/CharacterProxy.cpp
@@ -38,7 +38,7 @@ CharacterProxy::checkDangling() const
                             "(%s) for later rebinding", _ptr->getTarget(), 
typeName(*_ptr),
                 _tgt);
 #endif
-               _ptr = 0;
+               _ptr = nullptr;
        }
 }
 
@@ -61,7 +61,7 @@ CharacterProxy::setReachable() const
 DisplayObject*
 findDisplayObjectByTarget(const std::string& tgtstr, movie_root& mr)
 {
-       if (tgtstr.empty()) return 0;
+       if (tgtstr.empty()) return nullptr;
        return mr.findCharacterByTarget(tgtstr);
 }
 
diff --git a/libcore/DisplayList.cpp b/libcore/DisplayList.cpp
index 418909f..bcb967e 100644
--- a/libcore/DisplayList.cpp
+++ b/libcore/DisplayList.cpp
@@ -149,10 +149,10 @@ DisplayList::getDisplayObjectAtDepth(int depth) const
         if (ch->get_depth() == depth) return ch;
 
         // non-existent (chars are ordered by depth)
-        if (ch->get_depth() > depth) return 0;
+        if (ch->get_depth() > depth) return nullptr;
     }
 
-    return 0;
+    return nullptr;
 
 }
 
@@ -168,7 +168,7 @@ DisplayList::getDisplayObjectByName(string_table& st, const 
ObjectURI& uri,
     container_type::const_iterator it =
         std::find_if(_charsByDepth.begin(), e, NameEquals(st, uri, caseless));
 
-    if (it == e) return 0;
+    if (it == e) return nullptr;
     
     return *it;
 
diff --git a/libcore/DisplayObject.cpp b/libcore/DisplayObject.cpp
index c7c7cdf..3da7a4b 100644
--- a/libcore/DisplayObject.cpp
+++ b/libcore/DisplayObject.cpp
@@ -101,8 +101,8 @@ DisplayObject::DisplayObject(movie_root& mr, as_object* 
object,
     _volume(100),
     _ratio(0),
     m_clip_depth(noClipDepthValue),
-    _mask(0),
-    _maskee(0),
+    _mask(nullptr),
+    _maskee(nullptr),
     _blendMode(BLENDMODE_NORMAL),
     _visible(true),
     _scriptTransformed(false),
@@ -161,7 +161,7 @@ as_object*
 DisplayObject::pathElement(const ObjectURI& uri)
 {
     as_object* obj = getObject(this);
-    if (!obj) return 0;
+    if (!obj) return nullptr;
 
     string_table::key key = getName(uri);
 
@@ -177,7 +177,7 @@ DisplayObject::pathElement(const ObjectURI& uri)
             (uri, ObjectURI(NSV::PROP_THIS))) {
         return obj;
     }
-    return 0;
+    return nullptr;
 }
 
 void 
@@ -331,7 +331,7 @@ DisplayObject::set_visible(bool visible)
         assert(_object);
         movie_root& mr = stage();
         if (mr.getFocus() == this) {
-            mr.setFocus(0);
+            mr.setFocus(nullptr);
         }
     }
     _visible = visible;      
@@ -453,8 +453,8 @@ DisplayObject::unload()
     const bool unloadHandler = unloadChildren();
 
     // Unregister this DisplayObject as mask and/or maskee.
-    if (_maskee) _maskee->setMask(0);
-    if (_mask) _mask->setMaskee(0);
+    if (_maskee) _maskee->setMask(nullptr);
+    if (_mask) _mask->setMaskee(nullptr);
 
     _unloaded = true;
 
@@ -577,7 +577,7 @@ DisplayObject::getTargetPath() const
     Path path;
 
     // Build parents stack
-    const DisplayObject* topLevel = 0;
+    const DisplayObject* topLevel = nullptr;
     const DisplayObject* ch = this;
 
     string_table& st = getStringTable(*getObject(this));
@@ -742,18 +742,18 @@ DisplayObject::setMask(DisplayObject* mask)
         // on any previously registered maskee
         // so we make sure to set our _mask to 
         // NULL before getting called again
-        _mask->setMaskee(0);
+        _mask->setMaskee(nullptr);
     }
 
     // if we had a maskee, notify it to stop using
     // us as a mask
-    if (prevMaskee) prevMaskee->setMask(0);
+    if (prevMaskee) prevMaskee->setMask(nullptr);
 
     // TODO: should we reset any original clip depth
     //       specified by PlaceObject tag ?
     set_clip_depth(noClipDepthValue); 
     _mask = mask;
-    _maskee = 0;
+    _maskee = nullptr;
 
     if (_mask) {
         /// Register as as masked by the mask
@@ -769,7 +769,7 @@ DisplayObject::setMaskee(DisplayObject* maskee)
     if (_maskee) {
         // We don't want the maskee to call setMaskee(null)
         // on us again
-        _maskee->_mask = 0;
+        _maskee->_mask = nullptr;
     }
 
     _maskee = maskee;
@@ -972,7 +972,7 @@ DisplayObject::MaskRenderer::MaskRenderer(Renderer& r, 
const DisplayObject& o)
     :
     _renderer(r),
     _mask(o.visible() && o.getMask() && !o.getMask()->unloaded() ? o.getMask()
-                                                                 : 0)
+                                                                 : nullptr)
 {
     if (!_mask) return;
 
@@ -1472,7 +1472,7 @@ getGetterSetterByURI(const ObjectURI& uri, string_table& 
st)
     const GetterSetters::const_iterator it = gs.find(uri);
 
     if (it == gs.end()) {
-        static const GetterSetter none(0, 0);
+        static const GetterSetter none(nullptr, nullptr);
         return none;
     }
 
@@ -1483,7 +1483,7 @@ getGetterSetterByURI(const ObjectURI& uri, string_table& 
st)
 const GetterSetter&
 getGetterSetterByIndex(size_t index)
 {
-    const Setter n = 0;
+    const Setter n = nullptr;
 
     static const GetterSetter props[] = {
         GetterSetter(&getX, &setX),
@@ -1517,7 +1517,7 @@ getGetterSetterByIndex(size_t index)
     };
 
     if (index >= arraySize(props)) {
-        const Getter ng = 0;
+        const Getter ng = nullptr;
         static const GetterSetter none(ng, n);
         return none;
     }
@@ -1618,7 +1618,7 @@ template<typename Map>
 const Map
 getURIMap(const typename Map::key_compare& cmp)
 {
-    const Setter n = 0;
+    const Setter n = nullptr;
 
     Map ret(cmp);
     ret.insert(std::make_pair(NSV::PROP_uX, GetterSetter(&getX, &setX)));
diff --git a/libcore/DisplayObject.h b/libcore/DisplayObject.h
index 7196461..624948f 100644
--- a/libcore/DisplayObject.h
+++ b/libcore/DisplayObject.h
@@ -234,7 +234,7 @@ public:
         // MovieClip must override this
         // and any other DisplayObject will have
         // a parent!
-        assert(_parent != NULL);
+        assert(_parent != nullptr);
         return _parent->get_environment();
     }
 
@@ -263,7 +263,7 @@ public:
         _parent = parent;
     }
 
-    virtual MovieClip* to_movie() { return 0; }
+    virtual MovieClip* to_movie() { return nullptr; }
 
     int get_depth() const { return _depth; }
 
@@ -474,7 +474,7 @@ public:
     /// @ return    0 if this object is not a StaticText or contains no text.
     virtual StaticText* getStaticText(std::vector<const SWF::TextRecord*>&,
             size_t&) {
-        return 0;
+        return nullptr;
     }
 
        virtual SWFRect getBounds() const = 0;
@@ -636,7 +636,7 @@ public:
     /// Override this function for InteractiveObjects.
        virtual InteractiveObject* topmostMouseEntity(std::int32_t,
             std::int32_t) {
-        return 0;
+        return nullptr;
     }
        
     /// Find highest depth DisplayObject whose shape contains the given
@@ -650,7 +650,7 @@ public:
             return this;
         }
         
-        return 0;
+        return nullptr;
     }
 
     /// Return whether this DisplayObject has been invalidated or not
@@ -760,7 +760,7 @@ public:
     /// as the first thing.
     ///
     /// This handles all ActionScript construction and initialization events.
-    virtual void construct(as_object* /*init*/ = 0)
+    virtual void construct(as_object* /*init*/ = nullptr)
     {
         saveOriginalTarget();
     }
@@ -1159,7 +1159,7 @@ isReferenceable(const DisplayObject& d)
 inline as_object*
 getObject(const DisplayObject* d)
 {
-    return d ? d->object() : 0;
+    return d ? d->object() : nullptr;
 }
 
 /// Stream operator for DisplayObject blend mode.
diff --git a/libcore/DragState.h b/libcore/DragState.h
index 6f7eac0..37c333d 100644
--- a/libcore/DragState.h
+++ b/libcore/DragState.h
@@ -96,7 +96,7 @@ public:
 
     /// Reset drag state to its initial condition
     void reset() {
-        _displayObject = 0;
+        _displayObject = nullptr;
         _bounds.reset();
         _lock_centered = false;
     }
diff --git a/libcore/DynamicShape.cpp b/libcore/DynamicShape.cpp
index ab5c774..995acf2 100644
--- a/libcore/DynamicShape.cpp
+++ b/libcore/DynamicShape.cpp
@@ -27,7 +27,7 @@ namespace gnash {
 
 DynamicShape::DynamicShape()
        :
-       _currpath(0),
+       _currpath(nullptr),
        _currfill(0),
        _currline(0),
        _x(0),
@@ -39,7 +39,7 @@ void
 DynamicShape::clear()
 {
        _shape.clear();
-       _currpath = 0; 
+       _currpath = nullptr;
        _currfill = _currline = 0; 
        _currsubshape.clear();
        // TODO: worth setting _changed=true ? 
@@ -89,7 +89,7 @@ DynamicShape::endFill()
 
        // Remove reference to the "current" path, as
        // next drawing will happen on a different one
-       _currpath = 0;
+       _currpath = nullptr;
        // Remove fill information
        _currfill = 0;
 }
diff --git a/libcore/ExternalInterface.cpp b/libcore/ExternalInterface.cpp
index a481197..b39e5da 100644
--- a/libcore/ExternalInterface.cpp
+++ b/libcore/ExternalInterface.cpp
@@ -252,7 +252,7 @@ ExternalInterface::parseXML(const std::string &xml)
             start = end;
             end = xml.find("</number>");
             std::string str = xml.substr(start, end-start);
-            double num = strtod(str.c_str(), NULL);
+            double num = strtod(str.c_str(), nullptr);
             value.set_double(num);
         } else if (tag == "<string>") {
             start = end;
diff --git a/libcore/FillStyle.cpp b/libcore/FillStyle.cpp
index 4af450b..791677a 100644
--- a/libcore/FillStyle.cpp
+++ b/libcore/FillStyle.cpp
@@ -107,7 +107,7 @@ BitmapFill::BitmapFill(Type t, const CachedBitmap* bi, 
const SWFMatrix& m,
     _smoothingPolicy(pol),
     _matrix(m),
     _bitmapInfo(bi),
-    _md(0),
+    _md(nullptr),
     _id(0)
 {
 }
@@ -118,7 +118,7 @@ BitmapFill::BitmapFill(SWF::FillType t, movie_definition* 
md,
     _type(),
     _smoothingPolicy(),
     _matrix(m),
-    _bitmapInfo(0),
+    _bitmapInfo(nullptr),
     _md(md),
     _id(id)
 {
@@ -185,7 +185,7 @@ BitmapFill::bitmap() const
         return  _bitmapInfo.get();
     }
     if (!_md) {
-        return 0;
+        return nullptr;
     }
     _bitmapInfo = _md->getBitmap(_id);
 
diff --git a/libcore/Font.cpp b/libcore/Font.cpp
index fcba19c..4f0edab 100644
--- a/libcore/Font.cpp
+++ b/libcore/Font.cpp
@@ -117,7 +117,7 @@ Font::get_glyph(int index, bool embedded) const
     }
 
     // TODO: should we log an error here ?
-    return 0;
+    return nullptr;
 }
 
 void
@@ -330,14 +330,14 @@ Font::ftProvider() const
     if (_name.empty()) {
         log_error(_("No name associated with this font, can't use device "
                    "fonts (should I use a default one?)"));
-        return 0;
+        return nullptr;
     }
 
     _ftProvider = FreetypeGlyphsProvider::createFace(_name, _bold, _italic);
     
     if (!_ftProvider.get()) {
         log_error(_("Could not create a freetype face %s"), _name);
-        return 0;
+        return nullptr;
     }
     
     return _ftProvider.get();
diff --git a/libcore/FreetypeGlyphsProvider.cpp 
b/libcore/FreetypeGlyphsProvider.cpp
index af45102..2038197 100644
--- a/libcore/FreetypeGlyphsProvider.cpp
+++ b/libcore/FreetypeGlyphsProvider.cpp
@@ -93,7 +93,7 @@ public:
         :
         _shape(sh),
         _scale(scale),
-        _currPath(0),
+        _currPath(nullptr),
         _x(0),
         _y(0)
     {
@@ -240,7 +240,7 @@ private:
 };
 
 // statics
-FT_Library FreetypeGlyphsProvider::m_lib = 0;
+FT_Library FreetypeGlyphsProvider::m_lib = nullptr;
 boost::mutex FreetypeGlyphsProvider::m_lib_mutex;
 
 // static private
@@ -303,7 +303,7 @@ FreetypeGlyphsProvider::getFontFilename(const std::string 
&name,
     
     FcPattern* pat = FcNameParse((const FcChar8*)name.c_str());
     
-    FcConfigSubstitute (0, pat, FcMatchPattern);
+    FcConfigSubstitute (nullptr, pat, FcMatchPattern);
 
     if (italic) {
         FcPatternAddInteger (pat, FC_SLANT, FC_SLANT_ITALIC);
@@ -316,10 +316,10 @@ FreetypeGlyphsProvider::getFontFilename(const std::string 
&name,
     FcDefaultSubstitute (pat);
 
     FcPattern   *match;
-    match = FcFontMatch (0, pat, &result);
+    match = FcFontMatch (nullptr, pat, &result);
     FcPatternDestroy (pat);
 
-    FcFontSet* fs = NULL;
+    FcFontSet* fs = nullptr;
     if (match) {
         fs = FcFontSetCreate ();
         FcFontSetAdd (fs, match);
@@ -422,10 +422,10 @@ FreetypeGlyphsProvider::ascent() const
 FreetypeGlyphsProvider::FreetypeGlyphsProvider(const std::string& name,
         bool bold, bool italic)
     :
-    _face(NULL)
+    _face(nullptr)
 {
 
-    if (m_lib == NULL)
+    if (m_lib == nullptr)
     {
         init();
     }
diff --git a/libcore/Function.cpp b/libcore/Function.cpp
index 63954a2..034883b 100644
--- a/libcore/Function.cpp
+++ b/libcore/Function.cpp
@@ -72,7 +72,7 @@ Function::call(const fn_call& fn)
     // Extract caller before pushing ourself on the call stack
     VM& vm = getVM(fn); 
 
-    as_object* caller = vm.calling() ? &vm.currentCall().function() : 0;
+    as_object* caller = vm.calling() ? &vm.currentCall().function() : nullptr;
 
     // Set up local stack frame, for parameters and locals.
     FrameGuard guard(getVM(fn), *this);
@@ -127,7 +127,7 @@ Function::call(const fn_call& fn)
     setLocal(cf, NSV::PROP_THIS, fn.this_ptr ? fn.this_ptr : as_value());
 
     as_object* super = fn.super ? fn.super :
-        fn.this_ptr ? fn.this_ptr->get_super() : 0;
+        fn.this_ptr ? fn.this_ptr->get_super() : nullptr;
 
     // Add 'super' (SWF6+ only)
     if (super && swfversion > 5) {
diff --git a/libcore/Function2.cpp b/libcore/Function2.cpp
index 2e1c03b..54be093 100644
--- a/libcore/Function2.cpp
+++ b/libcore/Function2.cpp
@@ -48,7 +48,7 @@ Function2::call(const fn_call& fn)
     // Extract caller before pushing ourself on the call stack
     VM& vm = getVM(fn); 
 
-    as_object* caller = vm.calling() ? &vm.currentCall().function() : 0;
+    as_object* caller = vm.calling() ? &vm.currentCall().function() : nullptr;
 
        // Set up local stack frame, for parameters and locals.
        FrameGuard guard(getVM(fn), *this);
@@ -147,7 +147,7 @@ Function2::call(const fn_call& fn)
         // Put 'super' in a register (SWF6+ only).
         // TOCHECK: should we still set it if not available ?
         as_object* super = fn.super ? fn.super :
-            fn.this_ptr ? fn.this_ptr->get_super() : 0;
+            fn.this_ptr ? fn.this_ptr->get_super() : nullptr;
 
         if (super && (_function2Flags & PRELOAD_SUPER)) {
             cf.setLocalRegister(current_reg, super);
diff --git a/libcore/InteractiveObject.h b/libcore/InteractiveObject.h
index f6d969d..ff46e38 100644
--- a/libcore/InteractiveObject.h
+++ b/libcore/InteractiveObject.h
@@ -78,7 +78,7 @@ public:
     /// DisplayObject.
     virtual StaticText* getStaticText(std::vector<const SWF::TextRecord*>&,
             size_t&) {
-        return 0;
+        return nullptr;
     }
 
     /// Returns local, untransformed bounds of this DisplayObject in TWIPS
diff --git a/libcore/LoadVariablesThread.h b/libcore/LoadVariablesThread.h
index 2314cee..7ed34e7 100644
--- a/libcore/LoadVariablesThread.h
+++ b/libcore/LoadVariablesThread.h
@@ -102,7 +102,7 @@ public:
        bool inProgress()
        {
                // TODO: should we mutex-protect this ?
-               return ( _thread.get() != NULL );
+               return ( _thread.get() != nullptr );
        }
 
        /// Mutex-protected inspector for thread completion
diff --git a/libcore/MouseButtonState.h b/libcore/MouseButtonState.h
index 94a0f99..87ead62 100644
--- a/libcore/MouseButtonState.h
+++ b/libcore/MouseButtonState.h
@@ -39,8 +39,8 @@ public:
 
        MouseButtonState()
                :
-        activeEntity(0),
-        topmostEntity(0),
+        activeEntity(nullptr),
+        topmostEntity(nullptr),
                wasDown(false),
                isDown(false),
                wasInsideActiveEntity(false)
diff --git a/libcore/Movie.h b/libcore/Movie.h
index 4a92ce9..434a84f 100644
--- a/libcore/Movie.h
+++ b/libcore/Movie.h
@@ -86,7 +86,7 @@ public:
     /// @return         The DefinitionTag of the requested character or 0
     ///                 if the character has not yet been exported.
     virtual SWF::DefinitionTag* exportedCharacter(const std::string& /*s*/) {
-        return 0;
+        return nullptr;
     }
 
     /// Add a character to the list of known characters
diff --git a/libcore/MovieClip.cpp b/libcore/MovieClip.cpp
index d661b08..a1fbfa5 100644
--- a/libcore/MovieClip.cpp
+++ b/libcore/MovieClip.cpp
@@ -152,7 +152,7 @@ public:
     MouseEntityFinder(point wp, point pp)
         :
         _highestHiddenDepth(std::numeric_limits<int>::min()),
-        _m(NULL),
+        _m(nullptr),
         _candidates(),
         _wp(wp),
         _pp(pp),
@@ -390,7 +390,7 @@ public:
         _x(x),
         _y(y),
         _dragging(dragging),
-        _dropch(0),
+        _dropch(nullptr),
         _candidates(),
         _checked(false)
     {}
@@ -632,7 +632,7 @@ MovieClip::call_frame_actions(const as_value& frame_spec)
     //             to properly queue actions back on the global queue.
     //
     _callingFrameActions = true;
-    PoolGuard poolGuard(getVM(*getObject(this)), 0);
+    PoolGuard poolGuard(getVM(*getObject(this)), nullptr);
     const PlayList* playlist = _def->getPlaylist(frame_number);
     if (playlist) {
         PlayList::const_iterator it = playlist->begin();
@@ -666,7 +666,7 @@ MovieClip::duplicateMovieClip(const std::string& newname, 
int depth,
         IF_VERBOSE_ASCODING_ERRORS(
             log_aserror(_("Can't clone root of the movie"));
         );
-        return 0;
+        return nullptr;
     }
 
     MovieClip* parent = parent_ch->to_movie();
@@ -675,7 +675,7 @@ MovieClip::duplicateMovieClip(const std::string& newname, 
int depth,
             log_error(_("%s parent is not a movieclip, can't clone"),
                 getTarget());
         );
-        return 0;
+        return nullptr;
     }
 
     as_object* o = getObjectWithPrototype(getGlobal(*getObject(this)), 
@@ -820,8 +820,8 @@ MovieClip::pathElement(const ObjectURI& uri)
 
     // See if it's a member
     as_value tmp;
-    if (!obj->as_object::get_member(uri, &tmp)) return 0;
-    if (!tmp.is_object()) return 0;
+    if (!obj->as_object::get_member(uri, &tmp)) return nullptr;
+    if (!tmp.is_object()) return nullptr;
 
     if (tmp.is_sprite()) {
         return getObject(tmp.toDisplayObject(true));
@@ -1248,12 +1248,12 @@ MovieClip::add_display_object(const 
SWF::PlaceObject2Tag* tag,
             log_swferror(_("MovieClip::add_display_object(): "
                     "unknown cid = %d"), tag->getID());
         );
-        return NULL;
+        return nullptr;
     }
     
     DisplayObject* existing_char = 
dlist.getDisplayObjectAtDepth(tag->getDepth());
     
-    if (existing_char) return NULL;
+    if (existing_char) return nullptr;
 
     Global_as& gl = getGlobal(*getObject(this));
     VM& vm = getVM(*getObject(this));
@@ -1297,9 +1297,9 @@ MovieClip::move_display_object(const 
SWF::PlaceObject2Tag* tag, DisplayList& dli
     // clip_depth is not used in MOVE tag(at least no related tests). 
     dlist.moveDisplayObject(
         tag->getDepth(), 
-        tag->hasCxform() ? &tag->getCxform() : NULL,
-        tag->hasMatrix() ? &tag->getMatrix() : NULL,
-        tag->hasRatio() ? &ratio : NULL);
+        tag->hasCxform() ? &tag->getCxform() : nullptr,
+        tag->hasMatrix() ? &tag->getMatrix() : nullptr,
+        tag->hasRatio() ? &ratio : nullptr);
 }
 
 void
@@ -1309,7 +1309,7 @@ MovieClip::replace_display_object(const 
SWF::PlaceObject2Tag* tag,
     // A MovieClip without a definition cannot have any ControlTags, so this
     // should not be called.
     assert(_def);
-    assert(tag != NULL);
+    assert(tag != nullptr);
 
     const std::uint16_t id = tag->getID();
 
@@ -1477,7 +1477,7 @@ MovieClip::pointInHitableShape(std::int32_t x, 
std::int32_t y) const
 InteractiveObject*
 MovieClip::topmostMouseEntity(std::int32_t x, std::int32_t y)
 {
-    if (!visible()) return 0;
+    if (!visible()) return nullptr;
 
     // point is in parent's space, we need to convert it in world space
     point wp(x, y);
@@ -1493,7 +1493,7 @@ MovieClip::topmostMouseEntity(std::int32_t x, 
std::int32_t y)
 
     if (mouseEnabled()) {
         if (pointInVisibleShape(wp.x, wp.y)) return this;
-        return 0;
+        return nullptr;
     }
 
     SWFMatrix m = getMatrix(*this);
@@ -1514,9 +1514,9 @@ const DisplayObject*
 MovieClip::findDropTarget(std::int32_t x, std::int32_t y,
         DisplayObject* dragging) const
 {
-    if (this == dragging) return 0; // not here...
+    if (this == dragging) return nullptr; // not here...
 
-    if (!visible()) return 0; // isn't me !
+    if (!visible()) return nullptr; // isn't me !
 
     DropTargetFinder finder(x, y, dragging);
     _displayList.visitAll(finder);
@@ -1532,7 +1532,7 @@ MovieClip::findDropTarget(std::int32_t x, std::int32_t y,
     // does it hit us ?
     if (hitTestDrawable(x, y)) return this;
 
-    return 0;
+    return nullptr;
 }
 
 bool
@@ -1626,7 +1626,7 @@ MovieClip::getDisplayListObject(const ObjectURI& uri)
     DisplayObject* ch = _displayList.getDisplayObjectByName(st, uri,
             caseless(*obj));
 
-    if (!ch) return 0;
+    if (!ch) return nullptr;
 
     // Found object.
 
@@ -1682,7 +1682,7 @@ MovieClip::constructAsScriptObject()
         dynamic_cast<const sprite_definition*>(_def.get());
 
     // We won't "construct" top-level movies
-    as_function* ctor = def ? stage().getRegisteredClass(def) : 0;
+    as_function* ctor = def ? stage().getRegisteredClass(def) : nullptr;
 
 #ifdef GNASH_DEBUG
     log_debug("Attached movieclips %s registered class is %p",
@@ -2123,11 +2123,11 @@ MovieClip::TextFields*
 textfieldVar(MovieClip::TextFieldIndex* t, const ObjectURI& name)
 {
     // nothing allocated yet...
-    if (!t) return 0;
+    if (!t) return nullptr;
 
     // TODO: should variable name be considered case-insensitive ?
     MovieClip::TextFieldIndex::iterator it = t->find(name);
-    if (it == t->end()) return 0;
+    if (it == t->end()) return nullptr;
     return &(it->second);
 } 
 
diff --git a/libcore/MovieClip.h b/libcore/MovieClip.h
index 6618268..6c0fdc7 100644
--- a/libcore/MovieClip.h
+++ b/libcore/MovieClip.h
@@ -363,7 +363,7 @@ public:
     /// (1) Construct this instance as an ActionScript object.
     ///     See constructAsScriptObject() method, including constructing
     ///     registered class and adding properties.
-    virtual void construct(as_object* initObj = 0);
+    virtual void construct(as_object* initObj = nullptr);
 
     /// Mark this sprite as destroyed
     //
@@ -492,7 +492,7 @@ public:
     /// @param init_object
     ///     If not null, will be used to copy properties over.
     MovieClip* duplicateMovieClip(const std::string& newname,
-        int newdepth, as_object* init_object = 0);
+        int newdepth, as_object* init_object = nullptr);
 
     /// Called when a mouse event affects this MovieClip
     virtual void mouseEvent(const event_id& id) {
diff --git a/libcore/MovieFactory.cpp b/libcore/MovieFactory.cpp
index d0300e6..41ab14b 100644
--- a/libcore/MovieFactory.cpp
+++ b/libcore/MovieFactory.cpp
@@ -243,8 +243,8 @@ createSWFMovie(std::unique_ptr<IOChannel> in, const 
std::string& url,
 
     const std::string& absURL = URL(url).str();
 
-    if (!m->readHeader(std::move(in), absURL)) return 0;
-    if (startLoaderThread && !m->completeLoad()) return 0;
+    if (!m->readHeader(std::move(in), absURL)) return nullptr;
+    if (startLoaderThread && !m->completeLoad()) return nullptr;
 
     return m;
 }
diff --git a/libcore/MovieFactory.h b/libcore/MovieFactory.h
index 978101f..e920184 100644
--- a/libcore/MovieFactory.h
+++ b/libcore/MovieFactory.h
@@ -83,8 +83,8 @@ public:
     /// NOTE: when POSTing, the movies library won't be used.
     static DSOEXPORT boost::intrusive_ptr<movie_definition> makeMovie(
         const URL& url, const RunResources& runResources,
-        const char* real_url = 0, bool startLoaderThread = true,
-        const std::string* postdata = 0);
+        const char* real_url = nullptr, bool startLoaderThread = true,
+        const std::string* postdata = nullptr);
     
     /// Load a movie from an already opened stream.
     //
diff --git a/libcore/MovieLoader.cpp b/libcore/MovieLoader.cpp
index 796e61a..28aa4f1 100644
--- a/libcore/MovieLoader.cpp
+++ b/libcore/MovieLoader.cpp
@@ -131,7 +131,7 @@ MovieLoader::processRequest(Request& r)
 {
     const URL& url = r.getURL();
     bool usePost = r.usePost();
-    const std::string* postdata = usePost ? &(r.getPostData()) : 0;
+    const std::string* postdata = usePost ? &(r.getPostData()) : nullptr;
 
 #ifdef GNASH_DEBUG_LOADMOVIE_REQUESTS_PROCESSING
     log_debug("Movie loader thread processing request for target %s",
@@ -140,7 +140,7 @@ MovieLoader::processRequest(Request& r)
 
        boost::intrusive_ptr<movie_definition> md (
         MovieFactory::makeMovie(url, _movieRoot.runResources(),
-                                NULL, true, postdata)
+                                nullptr, true, postdata)
     );
     r.setCompleted(md);
 
@@ -437,7 +437,7 @@ MovieLoader::loadMovie(const std::string& urlstr,
     log_debug("MovieLoader::loadMovie(%s, %s)", url.str(), target);
 
     const std::string* postdata = (method == MovieClip::METHOD_POST) ? &data
-                                                                     : 0;
+                                                                     : nullptr;
 
 #ifdef GNASH_DEBUG_LOCKING
     log_debug("loadMovie: lock on requests: trying");
diff --git a/libcore/MovieLoader.h b/libcore/MovieLoader.h
index 3c10439..a676ef9 100644
--- a/libcore/MovieLoader.h
+++ b/libcore/MovieLoader.h
@@ -73,7 +73,7 @@ public:
     ///                 
     void loadMovie(const std::string& url, const std::string& target,
             const std::string& data, MovieClip::VariablesMethod method,
-            as_object* handler=0);
+            as_object* handler=nullptr);
 
     /// Drop all requests and kill the thread
     void clear();
@@ -97,7 +97,7 @@ private:
                 _target(t),
                 _url(u),
                 _usePost(false),
-                _mdef(0),
+                _mdef(nullptr),
                 _mutex(),
                 _handler(handler),
                 _completed(false)
diff --git a/libcore/PropertyList.cpp b/libcore/PropertyList.cpp
index c8cb05e..f510ede 100644
--- a/libcore/PropertyList.cpp
+++ b/libcore/PropertyList.cpp
@@ -146,7 +146,7 @@ PropertyList::getProperty(const ObjectURI& uri) const
     kcl.check(uri.name);
 #endif // GNASH_STATS_PROPERTY_LOOKUPS
        iterator found = iterator_find(_props, uri, getVM(_owner));
-       if (found == _props.end()) return 0;
+       if (found == _props.end()) return nullptr;
        return const_cast<Property*>(&(*found));
 }
 
@@ -277,7 +277,7 @@ PropertyList::addDestructiveGetter(const ObjectURI& uri, 
as_function& getter,
        }
 
        // destructive getter doesn't need a setter
-       Property a(uri, &getter, 0, flagsIfMissing, true);
+       Property a(uri, &getter, nullptr, flagsIfMissing, true);
 
        _props.push_back(a);
 
@@ -298,7 +298,7 @@ PropertyList::addDestructiveGetter(const ObjectURI& uri,
        if (found != _props.end()) return false; 
 
        // destructive getter doesn't need a setter
-       Property a(uri, getter, 0, flagsIfMissing, true);
+       Property a(uri, getter, nullptr, flagsIfMissing, true);
        _props.push_back(a);
 
 #ifdef GNASH_DEBUG_PROPERTY
diff --git a/libcore/SWFMovie.cpp b/libcore/SWFMovie.cpp
index 3754a12..aa9399b 100644
--- a/libcore/SWFMovie.cpp
+++ b/libcore/SWFMovie.cpp
@@ -86,9 +86,9 @@ SWF::DefinitionTag*
 SWFMovie::exportedCharacter(const std::string& symbol)
 {
     const std::uint16_t id = _def->exportID(symbol);
-    if (!id) return 0;
+    if (!id) return nullptr;
     Characters::iterator it = _characters.find(id);
-    if (it == _characters.end()) return 0;
+    if (it == _characters.end()) return nullptr;
     return _def->getDefinitionTag(id);
 }
 
diff --git a/libcore/SWFMovie.h b/libcore/SWFMovie.h
index 154208e..995d682 100644
--- a/libcore/SWFMovie.h
+++ b/libcore/SWFMovie.h
@@ -84,7 +84,7 @@ public:
        /// and then call MovieClip::construct
        ///
        /// It's intended to be called by movie_root::setLevel().
-    void construct(as_object* init = 0);
+    void construct(as_object* init = nullptr);
 
     /// Get the URL of the SWFMovie's definition.
     const std::string& url() const {
diff --git a/libcore/StaticText.cpp b/libcore/StaticText.cpp
index 875b012..147b74a 100644
--- a/libcore/StaticText.cpp
+++ b/libcore/StaticText.cpp
@@ -35,7 +35,7 @@ StaticText::getStaticText(std::vector<const 
SWF::TextRecord*>& to,
         return this;
     }
     
-    return 0;
+    return nullptr;
 }
 
 void
diff --git a/libcore/TextField.cpp b/libcore/TextField.cpp
index dc94848..f4dab42 100644
--- a/libcore/TextField.cpp
+++ b/libcore/TextField.cpp
@@ -89,7 +89,7 @@ TextField::TextField(as_object* object, DisplayObject* parent,
     _borderColor(0,0,0,255),
     _textColor(def.color()),
     _alignment(def.alignment()),
-    _font(0),
+    _font(nullptr),
     m_cursor(0u),
     _glyphcount(0u),
     _scroll(0u),
@@ -156,7 +156,7 @@ TextField::TextField(as_object* object, DisplayObject* 
parent,
     _borderColor(0, 0, 0, 255),
     _textColor(0, 0, 0, 255),
     _alignment(ALIGN_LEFT),
-    _font(0),
+    _font(nullptr),
     m_cursor(0u),
     _glyphcount(0u),
     _scroll(0u),
@@ -774,10 +774,10 @@ TextField::mouseEvent(const event_id& ev)
 InteractiveObject*
 TextField::topmostMouseEntity(std::int32_t x, std::int32_t y)
 {
-    if (!visible()) return 0;
+    if (!visible()) return nullptr;
     
     // Not selectable, so don't catch mouse events!
-    if (!_selectable) return 0;
+    if (!_selectable) return nullptr;
 
     SWFMatrix m = getMatrix(*this);
     point p(x, y);
@@ -785,7 +785,7 @@ TextField::topmostMouseEntity(std::int32_t x, std::int32_t 
y)
 
     if (_bounds.point_test(p.x, p.y)) return this;
 
-    return 0;
+    return nullptr;
 }
 
 void
@@ -1478,31 +1478,31 @@ TextField::handleChar(std::wstring::const_iterator& it,
                                         
                                                                                
(pixelsToTwips(std::strtol(
                                         
attloc->second.substr(1,attloc->second.length()-1).data(),
-                                        NULL,10))));
+                                        nullptr,10))));
                                     newrec.setYOffset(PADDING_TWIPS +
                                         newrec.textHeight() +
                                         (fontLeading - fontDescent));
                                     _fontHeight += pixelsToTwips(std::strtol(
                                         
attloc->second.substr(1,attloc->second.length()-1).data(),
-                                        NULL,10));
+                                        nullptr,10));
                                 } else if (firstchar == "-") {
                                     newrec.setTextHeight(rec.textHeight() -
                                         (pixelsToTwips(std::strtol(
                                         
attloc->second.substr(1,attloc->second.length()-1).data(),
-                                        NULL,10))));
+                                        nullptr,10))));
                                     newrec.setYOffset(PADDING_TWIPS +
                                         newrec.textHeight() +
                                         (fontLeading - fontDescent));
                                     _fontHeight -= pixelsToTwips(std::strtol(
                                         
attloc->second.substr(1,attloc->second.length()-1).data(),
-                                        NULL,10));
+                                        nullptr,10));
                                 } else {
                                     
newrec.setTextHeight(pixelsToTwips(std::strtol(
-                                        attloc->second.data(), NULL, 10)));
+                                        attloc->second.data(), nullptr, 10)));
                                     newrec.setYOffset(PADDING_TWIPS + 
newrec.textHeight() +
                                         (fontLeading - fontDescent));
                                     _fontHeight = pixelsToTwips(std::strtol(
-                                        attloc->second.data(), NULL, 10));
+                                        attloc->second.data(), nullptr, 10));
                                 }
                             }
                             handleChar(it, e, x, y, newrec, last_code,
@@ -1567,7 +1567,7 @@ TextField::handleChar(std::wstring::const_iterator& it,
                             if (attloc != attributes.end()) {
                                 //textformat BLOCKINDENT attribute
                                 setBlockIndent(pixelsToTwips(std::strtol(
-                                        attloc->second.data(), NULL, 10)));
+                                        attloc->second.data(), nullptr, 10)));
                                 if (newrec.xOffset() == std::max(0, 
originalleftmargin +
                                     originalindent + originalblockindent) + 
PADDING_TWIPS) {
                                     //if beginning of line, indent
@@ -1581,7 +1581,7 @@ TextField::handleChar(std::wstring::const_iterator& it,
                             if (attloc != attributes.end()) {
                                 //textformat INDENT attribute
                                 setIndent(pixelsToTwips(std::strtol(
-                                    attloc->second.data(), NULL, 10)));
+                                    attloc->second.data(), nullptr, 10)));
                                 if (newrec.xOffset() == std::max(0, 
originalleftmargin +
                                     originalindent + getBlockIndent()) + 
PADDING_TWIPS) {
                                     //if beginning of line, indent
@@ -1595,13 +1595,13 @@ TextField::handleChar(std::wstring::const_iterator& it,
                             if (attloc != attributes.end()) {
                                 //textformat LEADING attribute
                                 setLeading(pixelsToTwips(std::strtol(
-                                        attloc->second.data(), NULL, 10)));
+                                        attloc->second.data(), nullptr, 10)));
                             }
                             attloc = attributes.find("LEFTMARGIN");
                             if (attloc != attributes.end()) {
                                 //textformat LEFTMARGIN attribute
                                 setLeftMargin(pixelsToTwips(std::strtol(
-                                        attloc->second.data(), NULL, 10)));
+                                        attloc->second.data(), nullptr, 10)));
                                 if (newrec.xOffset() == std::max(0, 
originalleftmargin +
                                     getIndent() + getBlockIndent()) + 
PADDING_TWIPS) {
                                     //if beginning of line, indent
@@ -1615,7 +1615,7 @@ TextField::handleChar(std::wstring::const_iterator& it,
                             if (attloc != attributes.end()) {
                                 //textformat RIGHTMARGIN attribute
                                 setRightMargin(pixelsToTwips(std::strtol(
-                                        attloc->second.data(), NULL, 10)));
+                                        attloc->second.data(), nullptr, 10)));
                                 //FIXME:Should not apply this to this line if 
we are not at
                                 //beginning of line. Not sure how to do that.
                             }
@@ -1892,7 +1892,7 @@ TextField::VariableRef
 TextField::parseTextVariableRef(const std::string& variableName) const
 {
     VariableRef ret;
-    ret.first = 0;
+    ret.first = nullptr;
 
 #ifdef DEBUG_DYNTEXT_VARIABLES
     log_debug("VariableName: %s", variableName);
diff --git a/libcore/Timers.cpp b/libcore/Timers.cpp
index a44f798..289e830 100644
--- a/libcore/Timers.cpp
+++ b/libcore/Timers.cpp
@@ -56,7 +56,7 @@ Timer::Timer(as_object* this_ptr, const ObjectURI& methodName,
     :
     _interval(ms),
     _start(std::numeric_limits<unsigned long>::max()),
-    _function(0),
+    _function(nullptr),
     _methodName(methodName),
     _object(this_ptr),
     _args(args),
diff --git a/libcore/Video.cpp b/libcore/Video.cpp
index 8ed403d..6666bae 100644
--- a/libcore/Video.cpp
+++ b/libcore/Video.cpp
@@ -43,7 +43,7 @@ Video::Video(as_object* object,
        :
        DisplayObject(getRoot(*object), object, parent),
        m_def(def),
-       _ns(0),
+       _ns(nullptr),
        _embeddedStream(m_def),
        _lastDecodedVideoFrameNum(-1),
        _lastDecodedVideoFrame(),
diff --git a/libcore/Video.h b/libcore/Video.h
index de6a551..157cb99 100644
--- a/libcore/Video.h
+++ b/libcore/Video.h
@@ -64,7 +64,7 @@ public:
        virtual SWFRect getBounds() const;
 
        /// Register this video instance as a live DisplayObject
-       virtual void construct(as_object* init = 0);
+       virtual void construct(as_object* init = nullptr);
 
        virtual void display(Renderer& renderer, const Transform& xform);
 
diff --git a/libcore/as_environment.cpp b/libcore/as_environment.cpp
index dc03fc7..57c0676 100644
--- a/libcore/as_environment.cpp
+++ b/libcore/as_environment.cpp
@@ -88,7 +88,7 @@ namespace {
     as_value getVariableRaw(const as_environment& env,
         const std::string& varname,
         const as_environment::ScopeStack& scope,
-        as_object** retTarget = 0);
+        as_object** retTarget = nullptr);
 
     void setVariableRaw(const as_environment& env, const std::string& varname,
         const as_value& val, const as_environment::ScopeStack& scope);
@@ -107,8 +107,8 @@ as_environment::as_environment(VM& vm)
     :
     _vm(vm),
     _stack(_vm.getStack()),
-    _target(0),
-    _original_target(0)
+    _target(nullptr),
+    _original_target(nullptr)
 {
 }
 
@@ -135,13 +135,13 @@ findObject(const as_environment& ctx, const std::string& 
path,
     // Check if it's an absolute path
     if (*p == '/') {
 
-        MovieClip* root = 0;
+        MovieClip* root = nullptr;
         if (ctx.target()) root = ctx.target()->getAsRoot();
         else {
             if (ctx.get_original_target()) {
                 root = ctx.get_original_target()->getAsRoot();
             }
-            return 0;
+            return nullptr;
         }
 
         // If the path is just "/" return the root.
@@ -182,7 +182,7 @@ findObject(const as_environment& ctx, const std::string& 
path,
                 log_aserror(_("invalid path '%s' (p=next_slash=%s)"),
                 path, next_slash);
             );
-            return 0;
+            return nullptr;
         }
 
         if (next_slash) {
@@ -193,7 +193,7 @@ findObject(const as_environment& ctx, const std::string& 
path,
                         log_aserror(_("invalid path '%s' (dot not allowed "
                                 "after having seen a slash)"), path);
                     );
-                    return 0;
+                    return nullptr;
                 }
                 // No dot allowed after a double-dot.
                 if (next_slash[1] == '.') dot_allowed = false;
@@ -214,7 +214,7 @@ findObject(const as_environment& ctx, const std::string& 
path,
         const ObjectURI subpartURI(getURI(vm, subpart));
 
         if (!firstElementParsed) {
-            as_object* element(0);
+            as_object* element(nullptr);
 
             do {
                 // Try scope stack
@@ -252,7 +252,7 @@ findObject(const as_environment& ctx, const std::string& 
path,
 
             } while (0);
 
-            if (!element) return 0;
+            if (!element) return nullptr;
 
             env = element;
             firstElementParsed = true;
@@ -261,7 +261,7 @@ findObject(const as_environment& ctx, const std::string& 
path,
 
             assert(env);
             as_object* element = getElement(env, subpartURI);
-            if (!element) return 0;
+            if (!element) return nullptr;
             env = element;
         }
 
@@ -317,7 +317,7 @@ getVariable(const as_environment& env, const std::string& 
varname,
         if (target) {
             // ... but only if it resolves to a sprite
             DisplayObject* d = target->displayObject();
-            MovieClip* m = d ? d->to_movie() : 0;
+            MovieClip* m = d ? d->to_movie() : nullptr;
             if (m) return as_value(getObject(m));
         }
     }
@@ -539,7 +539,7 @@ getVariableRaw(const as_environment& env, const 
std::string& varname,
     // Looking for "this" 
     if (eq(key, NSV::PROP_THIS)) {
         val.set_as_object(getObject(env.get_original_target()));
-        if (retTarget) *retTarget = NULL; 
+        if (retTarget) *retTarget = nullptr;
         return val;
     }
 
@@ -549,7 +549,7 @@ getVariableRaw(const as_environment& env, const 
std::string& varname,
         log_debug("Took %s as _global, returning _global", varname);
 #endif
         // The "_global" ref was added in SWF6
-        if (retTarget) *retTarget = NULL; // correct ??
+        if (retTarget) *retTarget = nullptr; // correct ??
         return as_value(global);
     }
 
@@ -623,7 +623,7 @@ next_slash_or_dot(const char* word)
             return p;
         }
     }
-    return 0;
+    return nullptr;
 }
 
 } // unnamed namespace 
diff --git a/libcore/as_environment.h b/libcore/as_environment.h
index 2f6b677..13654fc 100644
--- a/libcore/as_environment.h
+++ b/libcore/as_environment.h
@@ -151,7 +151,7 @@ private:
 /// @param retTarget   If not null, the pointer will be set to the actual
 ///                    object containing the found variable (if found).
 as_value getVariable(const as_environment& ctx, const std::string& varname,
-    const as_environment::ScopeStack& scope, as_object** retTarget = 0);
+    const as_environment::ScopeStack& scope, as_object** retTarget = nullptr);
 
 /// Given a path to variable, set its value.
 //
@@ -206,7 +206,7 @@ DSOEXPORT bool parsePath(const std::string& var_path, 
std::string& path,
 /// @param path    Variable path. 
 /// @param scope   The Scope stack to use for lookups.
 DSOEXPORT as_object* findObject(const as_environment& ctx, const std::string& 
path,
-        const as_environment::ScopeStack* scope = 0);
+        const as_environment::ScopeStack* scope = nullptr);
 
 /// Find the DisplayObject referenced by the given path.
 //
diff --git a/libcore/as_function.cpp b/libcore/as_function.cpp
index 2a6484d..911d5d8 100644
--- a/libcore/as_function.cpp
+++ b/libcore/as_function.cpp
@@ -78,7 +78,7 @@ as_function::construct(as_object& newobj, const 
as_environment& env,
     
     // Don't set a super so that it will be constructed only if required
     // by the function.
-    fn_call fn(&newobj, env, args, 0, true);
+    fn_call fn(&newobj, env, args, nullptr, true);
     as_value ret;
 
     try {
diff --git a/libcore/as_object.cpp b/libcore/as_object.cpp
index e2c02da..183a402 100644
--- a/libcore/as_object.cpp
+++ b/libcore/as_object.cpp
@@ -84,7 +84,7 @@ public:
     /// Return the wanted property if it exists and satisfies the predicate.
     //
     /// This will abort if there is no current object.
-    Property* getProperty(as_object** owner = 0) const {
+    Property* getProperty(as_object** owner = nullptr) const {
 
         assert(_object);
         Property* prop = _object->_members.getProperty(_uri);
@@ -93,7 +93,7 @@ public:
             if (owner) *owner = _object;
             return prop;
         }
-        return 0;
+        return nullptr;
     }
 
 private:
@@ -112,7 +112,7 @@ getConstructor(as_object& o)
 {
        as_value ctorVal;
        if (!o.get_member(NSV::PROP_uuCONSTRUCTORuu, &ctorVal)) {
-               return 0;
+               return nullptr;
        }
        return ctorVal.to_function();
 }
@@ -181,11 +181,11 @@ protected:
 private:
 
     as_object* prototype() {
-        return _super ? _super->get_prototype() : 0;
+        return _super ? _super->get_prototype() : nullptr;
     }
 
     as_function* constructor() {
-        return _super ? getConstructor(*_super) : 0;
+        return _super ? getConstructor(*_super) : nullptr;
     }
 
     as_object* _super;
@@ -200,15 +200,15 @@ as_super::get_super(const ObjectURI& fname)
 
     // Our class prototype is __proto__.
     as_object* proto = get_prototype(); 
-    if (!proto) return new as_super(getGlobal(*this), 0);
+    if (!proto) return new as_super(getGlobal(*this), nullptr);
 
     if (fname.empty() || getSWFVersion(*this) <= 6) {
         return new as_super(getGlobal(*this), proto);
     }
 
-    as_object* owner = 0;
+    as_object* owner = nullptr;
     proto->findProperty(fname, &owner);
-    if (!owner) return 0;
+    if (!owner) return nullptr;
 
     if (owner == proto) return new as_super(getGlobal(*this), proto);
 
@@ -280,7 +280,7 @@ const int as_object::DefaultFlags;
 as_object::as_object(const Global_as& gl)
     :
     GcResource(getRoot(gl).gc()),
-    _displayObject(0),
+    _displayObject(nullptr),
     _array(false),
     _vm(getVM(gl)),
     _members(*this)
@@ -290,7 +290,7 @@ as_object::as_object(const Global_as& gl)
 as_object::as_object(VM& vm)
     :
     GcResource(vm.getRoot().gc()),
-    _displayObject(0),
+    _displayObject(nullptr),
     _array(false),
     _vm(vm),
     _members(*this)
@@ -452,7 +452,7 @@ as_object::get_super(const ObjectURI& fname)
     as_object* proto = get_prototype();
 
     if ( ! fname.empty() && getSWFVersion(*this) > 6) {
-        as_object* owner = 0;
+        as_object* owner = nullptr;
         findProperty(fname, &owner);
         // should be 0 if findProperty returned 0
         if (owner != this) proto = owner; 
@@ -487,7 +487,7 @@ as_object::findProperty(const ObjectURI& uri, as_object** 
owner)
     } while (pr());
 
     // No Property found
-    return 0;
+    return nullptr;
 }
 
 Property*
@@ -511,7 +511,7 @@ as_object::findUpdatableProperty(const ObjectURI& uri)
             }
         }
     }
-    return 0;
+    return nullptr;
 }
 
 void
@@ -614,7 +614,7 @@ as_object::set_member(const ObjectURI& uri, const as_value& 
val, bool ifFound)
                 if ((prop->isGetterSetter()) && visible(*prop, version)) {
                     break;
                 }
-                else prop = 0;
+                else prop = nullptr;
             }
         }
     }
@@ -934,8 +934,8 @@ as_object::get_prototype() const
     int swfVersion = getSWFVersion(*this);
     
     Property* prop = _members.getProperty(NSV::PROP_uuPROTOuu);
-    if (!prop) return 0;
-    if (!visible(*prop, swfVersion)) return 0;
+    if (!prop) return nullptr;
+    if (!visible(*prop, swfVersion)) return nullptr;
     
     const as_value& proto = prop->getValue(*this);
     
@@ -1089,8 +1089,8 @@ as_object*
 getPathElement(as_object& o, const ObjectURI& uri)
 {
     as_value tmp;
-    if (!o.get_member(uri, &tmp)) return 0;
-    if (!tmp.is_object()) return 0;
+    if (!o.get_member(uri, &tmp)) return nullptr;
+    if (!tmp.is_object()) return nullptr;
     return toObject(tmp, getVM(o));
 }
 
@@ -1110,7 +1110,7 @@ getObjectWithPrototype(Global_as& gl, const ObjectURI& c)
 {
     as_object* ctor = toObject(getMember(gl, c), getVM(gl));
     as_object* proto = ctor ? 
-        toObject(getMember(*ctor, NSV::PROP_PROTOTYPE), getVM(gl)) : 0;
+        toObject(getMember(*ctor, NSV::PROP_PROTOTYPE), getVM(gl)) : nullptr;
 
     as_object* o = createObject(gl);
     o->set_prototype(proto ? proto : as_value());
diff --git a/libcore/as_object.h b/libcore/as_object.h
index a18fb45..35a9474 100644
--- a/libcore/as_object.h
+++ b/libcore/as_object.h
@@ -199,7 +199,7 @@ public:
     ///                 an inherited property.
     /// @returns        A property if found and visible, NULL if not found or
     ///                 not visible in current VM version
-    Property* findProperty(const ObjectURI& uri, as_object** owner = 0);
+    Property* findProperty(const ObjectURI& uri, as_object** owner = nullptr);
 
     /// Return a reference to this as_object's global object.
     VM& vm() const {
@@ -468,7 +468,7 @@ public:
     void set_member_flags(const ObjectURI& uri, int setTrue, int setFalse = 0);
 
     /// Cast to a as_function, or return NULL
-    virtual as_function* to_function() { return 0; }
+    virtual as_function* to_function() { return nullptr; }
 
     /// Return true if this is a 'super' object
     virtual bool isSuper() const { return false; }
@@ -841,7 +841,7 @@ template<typename T>
 T*
 get(as_object* o)
 {
-    if (!o) return 0;
+    if (!o) return nullptr;
     return dynamic_cast<T*>(o->displayObject());
 }
 
diff --git a/libcore/as_value.cpp b/libcore/as_value.cpp
index dbb673f..62039f0 100644
--- a/libcore/as_value.cpp
+++ b/libcore/as_value.cpp
@@ -271,7 +271,7 @@ as_value::to_primitive(AsType hint) const
     // TODO: implement as_object::DefaultValue (ECMA-262 - 8.6.2.6)
 
     as_value method;
-    as_object* obj(0);
+    as_object* obj(nullptr);
 
     if (hint == NUMBER) {
         assert(_type == OBJECT);
@@ -472,24 +472,24 @@ as_value::to_object(VM& vm) const
 
         default:
             // Invalid to convert exceptions.
-            return NULL;
+            return nullptr;
     }
 }
 
 MovieClip*
 as_value::toMovieClip(bool allowUnloaded) const
 {
-    if (_type != DISPLAYOBJECT) return 0;
+    if (_type != DISPLAYOBJECT) return nullptr;
 
     DisplayObject *ch = getCharacter(allowUnloaded);
-    if (!ch) return 0;
+    if (!ch) return nullptr;
     return ch->to_movie();
 }
 
 DisplayObject*
 as_value::toDisplayObject(bool allowUnloaded) const
 {
-    if (_type != DISPLAYOBJECT) return 0;
+    if (_type != DISPLAYOBJECT) return nullptr;
     return getCharacter(allowUnloaded);
 }
 
@@ -502,7 +502,7 @@ as_value::to_function() const
         return getObj()->to_function();
     }
 
-    return 0;
+    return nullptr;
 }
 
 as_object*
@@ -512,7 +512,7 @@ as_value::get_object() const
         return getObj();
     }
 
-    return 0;
+    return nullptr;
 }
 
 void
@@ -642,7 +642,7 @@ as_value::typeOf() const
         default:
             if (is_exception()) return "exception";
             std::abort();
-            return 0;
+            return nullptr;
     }
 }
 
diff --git a/libcore/asobj/Array_as.cpp b/libcore/asobj/Array_as.cpp
index ec9c78a..2b4cdbe 100644
--- a/libcore/asobj/Array_as.cpp
+++ b/libcore/asobj/Array_as.cpp
@@ -1520,7 +1520,7 @@ array_new(const fn_call& fn)
     as_object* ao = fn.isInstantiation() ? ensure<ValidThis>(fn) :
                                            getGlobal(fn).createArray();
 
-    ao->setRelay(0);
+    ao->setRelay(nullptr);
     ao->setArray();
     ao->init_member(NSV::PROP_LENGTH, 0.0);
 
diff --git a/libcore/asobj/AsBroadcaster.cpp b/libcore/asobj/AsBroadcaster.cpp
index 198f325..88a3db6 100644
--- a/libcore/asobj/AsBroadcaster.cpp
+++ b/libcore/asobj/AsBroadcaster.cpp
@@ -217,7 +217,7 @@ AsBroadcaster::init(as_object& where, const ObjectURI& uri)
 {
     // AsBroadcaster is a class, even though it doesn't look much like one.
     // Its prototype has no properties.
-    registerBuiltinClass(where, emptyFunction, 0,
+    registerBuiltinClass(where, emptyFunction, nullptr,
             attachAsBroadcasterStaticInterface, uri);
 }
 
diff --git a/libcore/asobj/Color_as.cpp b/libcore/asobj/Color_as.cpp
index b60ec9e..ae61ea3 100644
--- a/libcore/asobj/Color_as.cpp
+++ b/libcore/asobj/Color_as.cpp
@@ -64,7 +64,7 @@ void
 color_class_init(as_object& where, const ObjectURI& uri)
 {
     as_object* cl = registerBuiltinClass(where, color_ctor,
-            attachColorInterface, 0, uri);
+            attachColorInterface, nullptr, uri);
 
     as_object* proto = toObject(
         getMember(*cl, NSV::PROP_PROTOTYPE), getVM(where));
@@ -243,7 +243,7 @@ color_ctor(const fn_call& fn)
     obj->set_member(NSV::PROP_TARGET, target);
 
     Global_as& gl = getGlobal(fn);
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, obj, null, 7);
 
        return as_value(); 
@@ -275,7 +275,7 @@ getTarget(as_object* obj, const fn_call& fn)
     if (sp) return sp;
     DisplayObject* o = findTarget(fn.env(), target.to_string());
     if (o) return o->to_movie();
-    return 0;
+    return nullptr;
 }
 
 } // anonymous namespace 
diff --git a/libcore/asobj/ContextMenuItem_as.cpp 
b/libcore/asobj/ContextMenuItem_as.cpp
index f8f11b4..5a97954 100644
--- a/libcore/asobj/ContextMenuItem_as.cpp
+++ b/libcore/asobj/ContextMenuItem_as.cpp
@@ -40,7 +40,7 @@ void
 contextmenuitem_class_init(as_object& where, const ObjectURI& uri)
 {
     registerBuiltinClass(where, contextmenuitem_ctor,
-            attachContextMenuItemInterface, 0, uri);
+            attachContextMenuItemInterface, nullptr, uri);
 }
 
 namespace {
diff --git a/libcore/asobj/ContextMenu_as.cpp b/libcore/asobj/ContextMenu_as.cpp
index 7d7f306..b8057f7 100644
--- a/libcore/asobj/ContextMenu_as.cpp
+++ b/libcore/asobj/ContextMenu_as.cpp
@@ -45,7 +45,7 @@ void
 contextmenu_class_init(as_object& where, const ObjectURI& uri)
 {
     registerBuiltinClass(where, contextmenu_ctor, attachContextMenuInterface,
-            0, uri);
+            nullptr, uri);
 }
 
 
diff --git a/libcore/asobj/Error_as.cpp b/libcore/asobj/Error_as.cpp
index 447d9fd..97d242d 100644
--- a/libcore/asobj/Error_as.cpp
+++ b/libcore/asobj/Error_as.cpp
@@ -45,7 +45,7 @@ namespace {
 void
 Error_class_init(as_object& where, const ObjectURI& uri)
 {
-    registerBuiltinClass(where, error_ctor, attachErrorInterface, 0, uri);   
+    registerBuiltinClass(where, error_ctor, attachErrorInterface, nullptr, 
uri);
 }
 
 
diff --git a/libcore/asobj/Function_as.cpp b/libcore/asobj/Function_as.cpp
index 32839a6..f276109 100644
--- a/libcore/asobj/Function_as.cpp
+++ b/libcore/asobj/Function_as.cpp
@@ -119,7 +119,7 @@ function_apply(const fn_call& fn)
         // detrimental effect on memory usage!
         // Normal supers will be created when needed in the function
         // call.
-        new_fn_call.super = 0;
+        new_fn_call.super = nullptr;
 
                // Check for second argument ('arguments' array)
                if (fn.nargs > 1) {
@@ -161,7 +161,7 @@ function_call(const fn_call& fn)
     else tp = toObject(fn.arg(0), getVM(fn));
 
     new_fn_call.this_ptr = tp;
-    new_fn_call.super = 0;
+    new_fn_call.super = nullptr;
     if (fn.nargs) new_fn_call.drop_bottom();
 
        // Call the function 
diff --git a/libcore/asobj/Global_as.h b/libcore/asobj/Global_as.h
index 89b1ff3..5fe9263 100644
--- a/libcore/asobj/Global_as.h
+++ b/libcore/asobj/Global_as.h
@@ -170,8 +170,8 @@ registerBuiltinClass(as_object& where, 
Global_as::ASFunction ctor,
 /// The call will fail harmlessly if the as_value is not callable.
 inline DSOEXPORT as_value
 invoke(const as_value& method, const as_environment& env, as_object* this_ptr,
-        fn_call::Args& args, as_object* super = 0,
-        const movie_definition* callerDef = 0)
+        fn_call::Args& args, as_object* super = nullptr,
+        const movie_definition* callerDef = nullptr)
 {
 
        as_value val;
diff --git a/libcore/asobj/Key_as.cpp b/libcore/asobj/Key_as.cpp
index dfcc9e1..66bf755 100644
--- a/libcore/asobj/Key_as.cpp
+++ b/libcore/asobj/Key_as.cpp
@@ -162,7 +162,7 @@ key_class_init(as_object& where, const ObjectURI& uri)
 
     // All properties are protected using ASSetPropFlags.
     Global_as& gl = getGlobal(where);
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, key, null, 7);
 }
 
diff --git a/libcore/asobj/LoadVars_as.cpp b/libcore/asobj/LoadVars_as.cpp
index 756d5d1..a376fda 100644
--- a/libcore/asobj/LoadVars_as.cpp
+++ b/libcore/asobj/LoadVars_as.cpp
@@ -52,7 +52,7 @@ namespace {
 void
 loadvars_class_init(as_object& where, const ObjectURI& uri)
 {
-    registerBuiltinClass(where, loadvars_ctor, attachLoadVarsInterface, 0, 
uri);
+    registerBuiltinClass(where, loadvars_ctor, attachLoadVarsInterface, 
nullptr, uri);
 }
 
 namespace {
diff --git a/libcore/asobj/LocalConnection_as.cpp 
b/libcore/asobj/LocalConnection_as.cpp
index ebfd9e0..578475a 100644
--- a/libcore/asobj/LocalConnection_as.cpp
+++ b/libcore/asobj/LocalConnection_as.cpp
@@ -483,7 +483,7 @@ void
 localconnection_class_init(as_object& where, const ObjectURI& uri)
 {
     registerBuiltinClass(where, localconnection_new,
-            attachLocalConnectionInterface, 0, uri);
+            attachLocalConnectionInterface, nullptr, uri);
 }
 
 void
@@ -687,7 +687,7 @@ removeListener(const std::string& name, SharedMem& mem)
     // No listeners if the first byte is 0.
     if (!*ptr) return;
 
-    SharedMem::iterator found = 0;
+    SharedMem::iterator found = nullptr;
 
     SharedMem::iterator next;
     
diff --git a/libcore/asobj/Mouse_as.cpp b/libcore/asobj/Mouse_as.cpp
index 79abd8c..9e162fb 100644
--- a/libcore/asobj/Mouse_as.cpp
+++ b/libcore/asobj/Mouse_as.cpp
@@ -79,7 +79,7 @@ attachMouseInterface(as_object& o)
     AsBroadcaster::initialize(o);
 
     Global_as& gl = getGlobal(o);
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, &o, null, 7);
 }
 
diff --git a/libcore/asobj/MovieClipLoader.cpp 
b/libcore/asobj/MovieClipLoader.cpp
index c1e6eee..602e268 100644
--- a/libcore/asobj/MovieClipLoader.cpp
+++ b/libcore/asobj/MovieClipLoader.cpp
@@ -73,7 +73,7 @@ moviecliploader_class_init(as_object& where, const ObjectURI& 
uri)
   
        AsBroadcaster::initialize(*proto);
 
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, proto, null, 1027);
 
        where.init_member(uri, cl, as_object::DefaultFlags); 
diff --git a/libcore/asobj/MovieClip_as.cpp b/libcore/asobj/MovieClip_as.cpp
index 4492964..f958054 100644
--- a/libcore/asobj/MovieClip_as.cpp
+++ b/libcore/asobj/MovieClip_as.cpp
@@ -311,7 +311,7 @@ movieclip_createEmptyMovieClip(const fn_call& fn)
 
     Movie* m = ptr->get_root();
     as_object* o = getObjectWithPrototype(getGlobal(fn), 
NSV::CLASS_MOVIE_CLIP);
-    MovieClip* mc = new MovieClip(o, 0, m, ptr);
+    MovieClip* mc = new MovieClip(o, nullptr, m, ptr);
 
     VM& vm = getVM(fn);
     mc->set_name(getURI(vm, fn.arg(0).to_string()));
@@ -496,7 +496,7 @@ movieclip_attachMovie(const fn_call& fn)
     newch->set_name(getURI(vm, newname));
     newch->setDynamic();
 
-    as_object* initObj(0);
+    as_object* initObj(nullptr);
 
     if (fn.nargs > 3 ) {
         initObj = toObject(fn.arg(3), getVM(fn));
@@ -1402,7 +1402,7 @@ movieclip_setMask(const fn_call& fn)
     if ( arg.is_null() || arg.is_undefined() )
     {
         // disable mask
-        maskee->setMask(0);
+        maskee->setMask(nullptr);
     }
     else
     {
@@ -2057,8 +2057,8 @@ movieclip_attachBitmap(const fn_call& fn)
 
     int depth = toInt(fn.arg(1), getVM(fn));
 
-    DisplayObject* bm = new Bitmap(getRoot(fn), 0, bd, ptr);
-    ptr->attachCharacter(*bm, depth, 0);
+    DisplayObject* bm = new Bitmap(getRoot(fn), nullptr, bd, ptr);
+    ptr->attachCharacter(*bm, depth, nullptr);
 
     return as_value();
 }
diff --git a/libcore/asobj/NetConnection_as.cpp 
b/libcore/asobj/NetConnection_as.cpp
index 96a7b9d..c5ca68d 100644
--- a/libcore/asobj/NetConnection_as.cpp
+++ b/libcore/asobj/NetConnection_as.cpp
@@ -136,7 +136,7 @@ public:
             _callbacks.erase(it);
             return callback;
         }
-        return 0;
+        return nullptr;
     }
 
 protected:
@@ -424,7 +424,7 @@ void
 netconnection_class_init(as_object& where, const ObjectURI& uri)
 {
     registerBuiltinClass(where, netconnection_new,
-            attachNetConnectionInterface, 0, uri);
+            attachNetConnectionInterface, nullptr, uri);
 }
 
 void
@@ -733,7 +733,7 @@ netconnection_call(const fn_call& fn)
 #endif
 
     // TODO: arg(1) is the response object. let it know when data comes back
-    as_object* asCallback(0);
+    as_object* asCallback(nullptr);
     if (fn.nargs > 1) {
 
         if (fn.arg(1).is_object()) {
diff --git a/libcore/asobj/NetStream_as.cpp b/libcore/asobj/NetStream_as.cpp
index 4c878ec..6383676 100644
--- a/libcore/asobj/NetStream_as.cpp
+++ b/libcore/asobj/NetStream_as.cpp
@@ -100,12 +100,12 @@ namespace {
 NetStream_as::NetStream_as(as_object* owner)
     :
     ActiveRelay(owner),
-    _netCon(0),
+    _netCon(nullptr),
     _bufferTime(100), 
     _imageframe(),
     _parser(),
     _inputPos(0),
-    _invalidatedVideoCharacter(0),
+    _invalidatedVideoCharacter(nullptr),
     _decoding_state(DEC_NONE),
     _videoDecoder(),
     _videoInfoKnown(false),
@@ -132,7 +132,7 @@ netstream_class_init(as_object& where, const ObjectURI& uri)
     // NetStream is genuinely a built-in class, but its constructor calls
     // several native functions. It also calls NetConnection.call.
     registerBuiltinClass(where, netstream_new, attachNetStreamInterface,
-            NULL, uri); 
+            nullptr, uri);
 }
 
 void
@@ -196,7 +196,7 @@ long
 NetStream_as::bufferLength()
 {
 #ifdef USE_MEDIA
-    if (_parser.get() == NULL) return 0;
+    if (_parser.get() == nullptr) return 0;
     return _parser->getBufferLength();
 #endif  // USE_MEDIA
 }
@@ -681,7 +681,7 @@ NetStream_as::decodeNextAudioFrame()
                     "no more video frames in input"),
                     this);
 #endif
-        return 0;
+        return nullptr;
     }
 
     // TODO: make the buffer cursored later ?
@@ -1453,7 +1453,7 @@ BufferedAudioStreamer::attachAuxStreamer()
         log_debug(_("attachAuxStreamer called while already attached"));
         // Let's detach first..
         _soundHandler->unplugInputStream(_auxStreamer);
-        _auxStreamer=0;
+        _auxStreamer=nullptr;
     }
 
     try {
@@ -1476,7 +1476,7 @@ BufferedAudioStreamer::detachAuxStreamer()
         return;
     }
     _soundHandler->unplugInputStream(_auxStreamer);
-    _auxStreamer = 0;
+    _auxStreamer = nullptr;
 }
 
 // audio callback, possibly running in a separate thread
@@ -1495,7 +1495,7 @@ 
BufferedAudioStreamer::BufferedAudioStreamer(sound::sound_handler* handler)
     _soundHandler(handler),
     _audioQueue(),
     _audioQueueSize(0),
-    _auxStreamer(0)
+    _auxStreamer(nullptr)
 {
 }
 
diff --git a/libcore/asobj/NetStream_as.h b/libcore/asobj/NetStream_as.h
index e61dd2a..5e98fe8 100644
--- a/libcore/asobj/NetStream_as.h
+++ b/libcore/asobj/NetStream_as.h
@@ -93,8 +93,8 @@ public:
         CursoredBuffer()
             :
             m_size(0),
-            m_data(NULL),
-            m_ptr(NULL)
+            m_data(nullptr),
+            m_ptr(nullptr)
         {}
 
         ~CursoredBuffer()
diff --git a/libcore/asobj/Object.cpp b/libcore/asobj/Object.cpp
index 3b9caa8..c1dea0b 100644
--- a/libcore/asobj/Object.cpp
+++ b/libcore/asobj/Object.cpp
@@ -222,7 +222,7 @@ object_addproperty(const fn_call& fn)
         return as_value(false);
     }
 
-    as_function* setter = NULL;
+    as_function* setter = nullptr;
     const as_value& setterval = fn.arg(2);
     if (!setterval.is_null())
     {
diff --git a/libcore/asobj/Selection_as.cpp b/libcore/asobj/Selection_as.cpp
index 9064482..1e2af65 100644
--- a/libcore/asobj/Selection_as.cpp
+++ b/libcore/asobj/Selection_as.cpp
@@ -59,7 +59,7 @@ selection_class_init(as_object& where, const ObjectURI& uri)
 
     // All properties are protected using ASSetPropFlags.
     Global_as& gl = getGlobal(where);
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, o, null, 7);
 }
 
@@ -198,7 +198,7 @@ selection_setFocus(const fn_call& fn)
 
     /// These should remove focus.
     if (focus.is_null() || focus.is_undefined()) {
-        mr.setFocus(0);
+        mr.setFocus(nullptr);
         return as_value(true);
     }
 
diff --git a/libcore/asobj/SharedObject_as.cpp 
b/libcore/asobj/SharedObject_as.cpp
index a67ff1e..d5b390e 100644
--- a/libcore/asobj/SharedObject_as.cpp
+++ b/libcore/asobj/SharedObject_as.cpp
@@ -199,7 +199,7 @@ public:
     SharedObject_as(as_object& owner)
         :
         _owner(owner),
-        _data(0),
+        _data(nullptr),
         _connected(false)
     { 
     }
@@ -479,17 +479,17 @@ SharedObjectLibrary::getLocal(const std::string& objName,
     assert (!objName.empty());
 
     // already warned about it at construction time
-    if (_solSafeDir.empty()) return 0;
+    if (_solSafeDir.empty()) return nullptr;
 
     if (rcfile.getSOLLocalDomain() && !_baseDomain.empty()) 
     {
         log_security(_("Attempting to open SOL file from non "
                        "localhost-loaded SWF"));
-        return 0;
+        return nullptr;
     }
 
     // Check that the name is valid; if not, return null
-    if (!validateName(objName)) return 0;
+    if (!validateName(objName)) return nullptr;
 
     // The 'root' argument, otherwise known as localPath, specifies where
     // in the SWF path the SOL should be stored. It cannot be outside this
@@ -514,7 +514,7 @@ SharedObjectLibrary::getLocal(const std::string& objName,
             log_security(_("SharedObject path %s is outside the SWF domain "
                         "%s. Cannot access this object."), localPath, 
                         _baseDomain);
-            return 0;
+            return nullptr;
         }
 
         requestedPath = localPath.path();
@@ -527,7 +527,7 @@ SharedObjectLibrary::getLocal(const std::string& objName,
             log_security(_("SharedObject path %s is not part of the SWF path "
                         "%s. Cannot access this object."), requestedPath, 
                         _basePath);
-            return 0;
+            return nullptr;
         }
 
     }
@@ -563,7 +563,7 @@ SharedObjectLibrary::getLocal(const std::string& objName,
 
     // Otherwise create a new one and register to the lib
     SharedObject_as* sh = createSharedObject(*_vm.getGlobal());
-    if (!sh) return 0;
+    if (!sh) return nullptr;
 
     sh->setObjectName(objName);
 
@@ -959,7 +959,7 @@ readSOL(VM& vm, const std::string& filespec)
             if (!rd(as)) {
                 log_error(_("SharedObject: error parsing SharedObject '%s'"),
                         filespec);
-                return 0;
+                return nullptr;
             }
 
             log_debug("parsed sol member named '%s' (len %s),  value '%s'",
@@ -978,7 +978,7 @@ readSOL(VM& vm, const std::string& filespec)
     catch (std::exception& e) {
         log_error(_("readSOL: Reading SharedObject %s: %s"),
                  filespec, e.what());
-        return 0;
+        return nullptr;
     }
 
 }
@@ -994,7 +994,7 @@ SharedObject_as*
 createSharedObject(Global_as& gl)
 {
     as_function* ctor = getMember(gl, NSV::CLASS_SHARED_OBJECT).to_function();
-    if (!ctor) return 0;
+    if (!ctor) return nullptr;
     as_environment env(getVM(gl));
     fn_call::Args args;
     as_object* o = constructInstance(*ctor, env, args);
diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index 3783ca5..f9f222a 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -264,7 +264,7 @@ Sound_as::Sound_as(as_object* owner)
     _mediaHandler(getRunResources(*owner).mediaHandler()),
     _startTime(0),
     _leftOverData(),
-    _leftOverPtr(0),
+    _leftOverPtr(nullptr),
     _leftOverSize(0),
     _inputStream(nullptr),
     remainingLoops(0),
@@ -378,7 +378,7 @@ Sound_as::probeAudio()
             if (!isStreaming) {
                 stopProbeTimer(); // will be re-started on Sound.start()
             }
-            bool success = _mediaParser->getAudioInfo() != 0;
+            bool success = _mediaParser->getAudioInfo() != nullptr;
             callMethod(&owner(), NSV::PROP_ON_LOAD, success);
 
             // TODO: check if this should be called anyway.
@@ -405,7 +405,7 @@ Sound_as::probeAudio()
             if ( isStreaming ) {
                 _mediaParser.reset(); // no use for this anymore...
             }
-            _inputStream = 0;
+            _inputStream = nullptr;
             _soundCompleted = false;
             stopProbeTimer();
 
@@ -564,7 +564,7 @@ Sound_as::loadSound(const std::string& file, bool streaming)
     /// the media parser
     if (_inputStream) {
         _soundHandler->unplugInputStream(_inputStream);
-        _inputStream = 0;
+        _inputStream = nullptr;
     }
     
     /// Mark sound as not being loaded
@@ -625,7 +625,7 @@ sound::InputStream*
 Sound_as::attachAuxStreamerIfNeeded()
 {
     media::AudioInfo* audioInfo =  _mediaParser->getAudioInfo();
-    if (!audioInfo) return 0;
+    if (!audioInfo) return nullptr;
 
     // the following may throw an exception
     
_audioDecoder.reset(_mediaHandler->createAudioDecoder(*audioInfo).release());
@@ -736,7 +736,7 @@ Sound_as::start(double secOff, int loops)
         _soundHandler->startSound(
                     soundId,
                     loops,
-                    0, // envelopes
+                    nullptr, // envelopes
                     true, // allow multiple instances (checked)
                     inPoint
                     );
@@ -760,7 +760,7 @@ Sound_as::stop(int si)
         if (externalSound) {
             if ( _inputStream ) {
                 _soundHandler->unplugInputStream(_inputStream);
-                _inputStream=0;
+                _inputStream=nullptr;
             }
         } else {
             if ( ! _attachedCharacter ) {
@@ -895,7 +895,7 @@ Sound_as::getAudio(std::int16_t* samples, unsigned int 
nSamples, bool& atEOF)
 
         if (_leftOverSize == 0) {
             _leftOverData.reset();
-            _leftOverPtr = 0;
+            _leftOverPtr = nullptr;
         }
 
     }
diff --git a/libcore/asobj/TextField_as.cpp b/libcore/asobj/TextField_as.cpp
index ec316ff..58aded3 100644
--- a/libcore/asobj/TextField_as.cpp
+++ b/libcore/asobj/TextField_as.cpp
@@ -90,7 +90,7 @@ createTextFieldObject(Global_as& gl)
 {
     as_value tf(getMember(gl, NSV::CLASS_TEXT_FIELD));
     as_function* ctor = tf.to_function();
-    if (!ctor) return 0;
+    if (!ctor) return nullptr;
     fn_call::Args args;
     as_environment env(getVM(gl));
     return constructInstance(*ctor, env, args);
@@ -115,7 +115,7 @@ textfield_class_init(as_object& where, const ObjectURI& uri)
     where.init_member(uri, cl, as_object::DefaultFlags);
 
     // ASSetPropFlags is called on the TextField class.
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, cl, null, 131);
 }
 
@@ -1082,7 +1082,7 @@ textfield_ctor(const fn_call& fn)
     // It's not clear why this happens. Attaching a relay would have the
     // same effect as both following statements.
     obj->setArray(false);
-    obj->setRelay(0);
+    obj->setRelay(nullptr);
 
     as_object* proto = obj->get_prototype();
 
@@ -1122,7 +1122,7 @@ attachTextFieldInterface(as_object& o)
 
     // Finally ASSetPropFlags is called on the prototype.
     Global_as& gl = getGlobal(o);
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, &o, null, 131);
 }
 
diff --git a/libcore/asobj/TextFormat_as.cpp b/libcore/asobj/TextFormat_as.cpp
index ece49af..467142c 100644
--- a/libcore/asobj/TextFormat_as.cpp
+++ b/libcore/asobj/TextFormat_as.cpp
@@ -584,7 +584,7 @@ textformat_getTextExtent(const fn_call& fn)
     // getTextExtent currently only takes account of device fonts we don't
     // need it.
 
-    Font* f = 0;
+    Font* f = nullptr;
     if (relay->font()) {
         const std::string& name = *relay->font();
         const movie_definition* md = getRoot(fn).getRootMovie().definition();
diff --git a/libcore/asobj/TextSnapshot_as.cpp 
b/libcore/asobj/TextSnapshot_as.cpp
index 9afaf3e..289de18 100644
--- a/libcore/asobj/TextSnapshot_as.cpp
+++ b/libcore/asobj/TextSnapshot_as.cpp
@@ -665,7 +665,7 @@ textsnapshot_ctor(const fn_call& fn)
 {
     as_object* ptr = ensure<ValidThis>(fn);
 
-    MovieClip* mc = (fn.nargs == 1) ? fn.arg(0).toMovieClip() : 0;
+    MovieClip* mc = (fn.nargs == 1) ? fn.arg(0).toMovieClip() : nullptr;
 
     ptr->setRelay(new TextSnapshot_as(mc));
     return as_value();
diff --git a/libcore/asobj/XMLNode_as.cpp b/libcore/asobj/XMLNode_as.cpp
index 281a065..b1e36b9 100644
--- a/libcore/asobj/XMLNode_as.cpp
+++ b/libcore/asobj/XMLNode_as.cpp
@@ -79,10 +79,10 @@ namespace {
 XMLNode_as::XMLNode_as(Global_as& gl)
     :
     _global(gl),
-    _object(0),
-    _parent(0),
+    _object(nullptr),
+    _parent(nullptr),
     _attributes(new as_object(gl)),
-    _childNodes(0),
+    _childNodes(nullptr),
     _type(Element),
     _gcMarkInProgress(false)
 {
@@ -91,10 +91,10 @@ XMLNode_as::XMLNode_as(Global_as& gl)
 XMLNode_as::XMLNode_as(const XMLNode_as& tpl, bool deep)
     :
     _global(tpl._global),
-    _object(0),
-    _parent(0), 
+    _object(nullptr),
+    _parent(nullptr),
     _attributes(new as_object(_global)),
-    _childNodes(0),
+    _childNodes(nullptr),
     _name(tpl._name),
     _value(tpl._value),
     _type(tpl._type),
@@ -120,7 +120,7 @@ XMLNode_as::~XMLNode_as()
         //       (due to updateChildNodes)
         // See https://savannah.gnu.org/bugs/?40439
         _parent->_children.remove(this);
-        _parent = 0; 
+        _parent = nullptr;
     }
 
     clearChildren();
@@ -191,7 +191,7 @@ XMLNode_as::hasChildNodes() const
 XMLNode_as*
 XMLNode_as::firstChild() const
 {
-    if (_children.empty()) return 0;
+    if (_children.empty()) return nullptr;
     return _children.front();
 }
 
@@ -206,7 +206,7 @@ XMLNode_as*
 XMLNode_as::lastChild() const
 {
        if (_children.empty()) {
-        return 0;
+        return nullptr;
        }
        return _children.back();
 }
@@ -214,7 +214,7 @@ XMLNode_as::lastChild() const
 void
 XMLNode_as::removeChild(XMLNode_as* node)
 {
-    node->setParent(0);
+    node->setParent(nullptr);
     _children.remove(node);
     updateChildNodes();
 }
@@ -257,10 +257,10 @@ XMLNode_as::insertBefore(XMLNode_as* newnode, XMLNode_as* 
pos)
 XMLNode_as*
 XMLNode_as::previousSibling() const
 {
-    if (!_parent) return 0;
-       if (_parent->_children.size() <= 1) return 0;
+    if (!_parent) return nullptr;
+       if (_parent->_children.size() <= 1) return nullptr;
 
-    XMLNode_as *previous_node = 0;
+    XMLNode_as *previous_node = nullptr;
     for (Children::iterator itx = _parent->_children.begin();
             itx != _parent->_children.end(); ++itx) {
 
@@ -269,18 +269,18 @@ XMLNode_as::previousSibling() const
         previous_node = *itx;
     }
 
-    return 0;
+    return nullptr;
 }
 
 XMLNode_as*
 XMLNode_as::nextSibling() const
 {
 
-    if (!_parent) return 0;
+    if (!_parent) return nullptr;
 
-    if (_parent->_children.size() <= 1) return 0;
+    if (_parent->_children.size() <= 1) return nullptr;
 
-    XMLNode_as *previous_node = 0;
+    XMLNode_as *previous_node = nullptr;
     for (Children::reverse_iterator itx = _parent->_children.rbegin();
             itx != _parent->_children.rend(); ++itx) {
 
@@ -288,7 +288,7 @@ XMLNode_as::nextSibling() const
                previous_node = *itx;
     }
 
-    return 0;
+    return nullptr;
 }
 
 void
@@ -395,7 +395,7 @@ XMLNode_as::clearChildren()
             it != e; ++it) {
         XMLNode_as* node = *it;
 
-        node->setParent(0);
+        node->setParent(nullptr);
         if (!node->_object) {
             // The node is not GC'd because it has no associated object. 
             // See XMLNode_as class docs.
@@ -405,7 +405,7 @@ XMLNode_as::clearChildren()
     _children.clear();
 
     // Reset so that it is reinitialized on next access.
-    _childNodes = 0;
+    _childNodes = nullptr;
 }
 
 void
diff --git a/libcore/asobj/XMLSocket_as.cpp b/libcore/asobj/XMLSocket_as.cpp
index cd506de..5d65bd8 100644
--- a/libcore/asobj/XMLSocket_as.cpp
+++ b/libcore/asobj/XMLSocket_as.cpp
@@ -279,7 +279,7 @@ void
 xmlsocket_class_init(as_object& where, const ObjectURI& uri)
 {
     registerBuiltinClass(where, xmlsocket_new, attachXMLSocketInterface,
-            0, uri);
+            nullptr, uri);
 }
 
 void
diff --git a/libcore/asobj/XML_as.cpp b/libcore/asobj/XML_as.cpp
index b13e867..a60c3bd 100644
--- a/libcore/asobj/XML_as.cpp
+++ b/libcore/asobj/XML_as.cpp
@@ -522,7 +522,7 @@ void
 xml_class_init(as_object& where, const ObjectURI& uri)
 {
     Global_as& gl = getGlobal(where);
-    as_object* cl = gl.createClass(&xml_new, 0);
+    as_object* cl = gl.createClass(&xml_new, nullptr);
 
     as_function* ctor = getMember(gl, NSV::CLASS_XMLNODE).to_function();
 
diff --git a/libcore/asobj/flash/display/BitmapData_as.cpp 
b/libcore/asobj/flash/display/BitmapData_as.cpp
index a031b6e..2d47236 100644
--- a/libcore/asobj/flash/display/BitmapData_as.cpp
+++ b/libcore/asobj/flash/display/BitmapData_as.cpp
@@ -600,7 +600,7 @@ BitmapData_as::BitmapData_as(as_object* owner,
         std::unique_ptr<image::GnashImage> im)
     :
     _owner(owner),
-    _cachedBitmap(0)
+    _cachedBitmap(nullptr)
 {
     assert(im->width() <= 2880);
     assert(im->height() <= 2880);
@@ -630,7 +630,7 @@ void
 BitmapData_as::dispose()
 {
     if (_cachedBitmap) _cachedBitmap->dispose();
-    _cachedBitmap = 0;
+    _cachedBitmap = nullptr;
     _image.reset();
     updateObjects();
 }
diff --git a/libcore/asobj/flash/external/ExternalInterface_as.cpp 
b/libcore/asobj/flash/external/ExternalInterface_as.cpp
index c102ea8..a72fd4a 100644
--- a/libcore/asobj/flash/external/ExternalInterface_as.cpp
+++ b/libcore/asobj/flash/external/ExternalInterface_as.cpp
@@ -234,7 +234,7 @@ attachExternalInterfaceStaticInterface(as_object& o)
     // here, but it seems that the properties actually are visible in SWF6
     // and SWF7, at least for the flashplayer 9. So we just make sure they
     // are read-only.
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, &o, null, 7);
 }
 
diff --git a/libcore/asobj/flash/filters/BitmapFilter_as.cpp 
b/libcore/asobj/flash/filters/BitmapFilter_as.cpp
index b201270..aa27fa0 100644
--- a/libcore/asobj/flash/filters/BitmapFilter_as.cpp
+++ b/libcore/asobj/flash/filters/BitmapFilter_as.cpp
@@ -89,7 +89,7 @@ registerBitmapClass(as_object& where, Global_as::ASFunction 
ctor,
         VM& vm = getVM(where);
         proto = constructInstance(*constructor, as_environment(vm), args);
     }
-    else proto = 0;
+    else proto = nullptr;
 
     as_object* cl = gl.createClass(ctor, createObject(gl));
     if (proto) p(*proto);
diff --git a/libcore/asobj/flash/geom/Matrix_as.cpp 
b/libcore/asobj/flash/geom/Matrix_as.cpp
index 65ef537..9cec893 100644
--- a/libcore/asobj/flash/geom/Matrix_as.cpp
+++ b/libcore/asobj/flash/geom/Matrix_as.cpp
@@ -135,7 +135,7 @@ instanceOfMatrix(const fn_call& fn)
 
     as_function* ctor = getClassConstructor(fn, "flash.geom.Matrix");
     if (obj->instanceOf(ctor)) return obj;
-    return 0;
+    return nullptr;
 }
 
 /// Return an exact copy of the matrix.
diff --git a/libcore/asobj/flash/geom/Rectangle_as.cpp 
b/libcore/asobj/flash/geom/Rectangle_as.cpp
index 4b60e0b..369260c 100644
--- a/libcore/asobj/flash/geom/Rectangle_as.cpp
+++ b/libcore/asobj/flash/geom/Rectangle_as.cpp
@@ -200,7 +200,7 @@ Rectangle_containsPoint(const fn_call& fn)
 {
     as_object* ptr = ensure<ValidThis>(fn);
 
-    as_object* arg = (fn.nargs > 0) ? toObject(fn.arg(0), getVM(fn)) : 0;
+    as_object* arg = (fn.nargs > 0) ? toObject(fn.arg(0), getVM(fn)) : nullptr;
     
     VM& vm = getVM(fn);
 
@@ -365,7 +365,7 @@ Rectangle_offsetPoint(const fn_call& fn)
 {
     as_object* ptr = ensure<ValidThis>(fn);
 
-    as_object* arg = (fn.nargs > 0) ? toObject(fn.arg(0), getVM(fn)) : 0;
+    as_object* arg = (fn.nargs > 0) ? toObject(fn.arg(0), getVM(fn)) : nullptr;
     if (!arg) return as_value();
 
     as_value xdelta = getMember(*arg, NSV::PROP_X);
diff --git a/libcore/asobj/flash/net/FileReference_as.cpp 
b/libcore/asobj/flash/net/FileReference_as.cpp
index a8b379e..b3c3b24 100644
--- a/libcore/asobj/flash/net/FileReference_as.cpp
+++ b/libcore/asobj/flash/net/FileReference_as.cpp
@@ -68,7 +68,7 @@ filereference_class_init(as_object& where, const ObjectURI& 
uri)
   
        AsBroadcaster::initialize(*proto);
 
-    as_object* null = 0;
+    as_object* null = nullptr;
     callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, proto, null, 3);
 
        where.init_member(uri, cl, as_object::DefaultFlags); 
diff --git a/libcore/asobj/flash/text/TextRenderer_as.cpp 
b/libcore/asobj/flash/text/TextRenderer_as.cpp
index c5152b9..5fec41c 100644
--- a/libcore/asobj/flash/text/TextRenderer_as.cpp
+++ b/libcore/asobj/flash/text/TextRenderer_as.cpp
@@ -43,7 +43,7 @@ namespace {
 void
 textrenderer_class_init(as_object& where, const ObjectURI& uri)
 {
-    registerBuiltinClass(where, textrenderer_ctor, 0,
+    registerBuiltinClass(where, textrenderer_ctor, nullptr,
             attachTextRendererStaticProperties, uri);
 }
 
diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 77071fb..73bd036 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -137,8 +137,8 @@ movie_root::movie_root(VirtualClock& clock, const 
RunResources& runResources)
     _gc(*this),
     _runResources(runResources),
     _vm(*this, clock),
-    _interfaceHandler(0),
-    _fsCommandHandler(0),
+    _interfaceHandler(nullptr),
+    _fsCommandHandler(nullptr),
     _stageWidth(1),
     _stageHeight(1),
     m_background_color(255, 255, 255, 255),
@@ -147,9 +147,9 @@ movie_root::movie_root(VirtualClock& clock, const 
RunResources& runResources)
     _mouseY(0),
     _lastTimerId(0),
     _lastKeyEvent(key::INVALID),
-    _currentFocus(0),
+    _currentFocus(nullptr),
     _movies(),
-    _rootMovie(0),
+    _rootMovie(nullptr),
     _invalidated(true),
     _disableScripts(false),
     _processingActionLevel(PRIORITY_SIZE),
@@ -286,7 +286,7 @@ as_function*
 movie_root::getRegisteredClass(const SWF::DefinitionTag* sprite) const
 {
     RegisteredClasses::const_iterator it = _registeredClasses.find(sprite);
-    if (it == _registeredClasses.end()) return 0;
+    if (it == _registeredClasses.end()) return nullptr;
     return it->second;
 }
 
@@ -305,7 +305,7 @@ movie_root::cleanupAndCollect()
     _vm.getStack().clear();
 
     // Reset the constant pool
-    _vm.setConstantPool(0);
+    _vm.setConstantPool(nullptr);
 
     cleanupDisplayList();
     _gc.fuzzyCollect();
@@ -315,7 +315,7 @@ movie_root::cleanupAndCollect()
 void
 movie_root::setLevel(unsigned int num, Movie* movie)
 {
-    assert(movie != NULL);
+    assert(movie != nullptr);
     assert(static_cast<unsigned int>(movie->get_depth()) ==
                             num + DisplayObject::staticDepthOffset);
 
@@ -510,7 +510,7 @@ movie_root::getLevel(unsigned int num) const
     Levels::const_iterator i =
         _movies.find(num + DisplayObject::staticDepthOffset);
 
-    if (i == _movies.end()) return 0;
+    if (i == _movies.end()) return nullptr;
 
     return i->second;
 }
@@ -1154,7 +1154,7 @@ movie_root::getActiveEntityUnderPointer() const
 DisplayObject*
 movie_root::getDraggingCharacter() const
 {
-    return _dragState ? _dragState->getCharacter() : 0;
+    return _dragState ? _dragState->getCharacter() : nullptr;
 }
 
 const DisplayObject*
@@ -1814,7 +1814,7 @@ movie_root::getTopmostMouseEntity(std::int32_t x, 
std::int32_t y) const
         if (ret) return ret;
     }
 
-    return 0;
+    return nullptr;
 }
 
 const DisplayObject *
@@ -1827,7 +1827,7 @@ movie_root::findDropTarget(std::int32_t x, std::int32_t y,
         const DisplayObject* ret = i->second->findDropTarget(x, y, dragging);
         if (ret) return ret;
     }
-    return 0;
+    return nullptr;
 }
 
 /// This should store a callback object in movie_root.
@@ -2105,7 +2105,7 @@ movie_root::set_background_alpha(float alpha)
 DisplayObject*
 movie_root::findCharacterByTarget(const std::string& tgtstr) const
 {
-    if (tgtstr.empty()) return 0;
+    if (tgtstr.empty()) return nullptr;
 
     // NOTE: getRootMovie() would be problematic in case the original
     //       root movie is replaced by a load to _level0... 
@@ -2129,7 +2129,7 @@ movie_root::findCharacterByTarget(const std::string& 
tgtstr) const
             log_debug("Evaluating DisplayObject target path: element"
                       "'%s' of path '%s' not found", part, tgtstr);
 #endif
-            return NULL;
+            return nullptr;
         }
         if (to == std::string::npos) break;
         from = to + 1;
@@ -2362,7 +2362,7 @@ isLevelTarget(int version, const std::string& name, 
unsigned int& levelno)
         return false;
     }
     // getting 0 here for "_level" is intentional
-    levelno = std::strtoul(name.c_str() + 6, NULL, 0); 
+    levelno = std::strtoul(name.c_str() + 6, nullptr, 0);
     return true;
 }
 
@@ -2555,7 +2555,7 @@ generate_mouse_button_events(movie_root& mr, 
MouseButtonState& ms)
                     ms.activeEntity->mouseEvent(
                             event_id(event_id::RELEASE_OUTSIDE));
                     // We got out of active entity
-                    ms.activeEntity = 0; // so we don't get RollOut next...
+                    ms.activeEntity = nullptr; // so we don't get RollOut 
next...
                     need_redisplay = true;
                 }
             }
@@ -2622,7 +2622,7 @@ getBuiltinObject(movie_root& mr, const ObjectURI& cl)
     Global_as& gl = *mr.getVM().getGlobal();
 
     as_value val;
-    if (!gl.get_member(cl, &val)) return 0;
+    if (!gl.get_member(cl, &val)) return nullptr;
     return toObject(val, mr.getVM());
 }
 
diff --git a/libcore/movie_root.h b/libcore/movie_root.h
index af3db25..2b16b15 100644
--- a/libcore/movie_root.h
+++ b/libcore/movie_root.h
@@ -636,7 +636,7 @@ public:
     ///                 
     void loadMovie(const std::string& url, const std::string& target,
             const std::string& data, MovieClip::VariablesMethod method,
-            as_object* handler=0)
+            as_object* handler=nullptr)
     {
         _movieLoader.loadMovie(url, target, data, method, handler);
     }
diff --git a/libcore/parser/BitmapMovieDefinition.cpp 
b/libcore/parser/BitmapMovieDefinition.cpp
index 36d15ae..c42996c 100644
--- a/libcore/parser/BitmapMovieDefinition.cpp
+++ b/libcore/parser/BitmapMovieDefinition.cpp
@@ -48,7 +48,7 @@ BitmapMovieDefinition::BitmapMovieDefinition(
        _framerate(12),
        _url(url),
        _bytesTotal(image->size()),
-       _bitmap(renderer ? renderer->createCachedBitmap(std::move(image)) : 0)
+       _bitmap(renderer ? renderer->createCachedBitmap(std::move(image)) : 
nullptr)
 {
 }
 
@@ -57,7 +57,7 @@ BitmapMovieDefinition::createDisplayObject(Global_as& /*gl*/,
         DisplayObject* /*parent*/) const
 {
     std::abort();
-    return 0;
+    return nullptr;
 }
 
 } // namespace gnash
diff --git a/libcore/parser/BitmapMovieDefinition.h 
b/libcore/parser/BitmapMovieDefinition.h
index 07f6dd3..2d7ccfb 100644
--- a/libcore/parser/BitmapMovieDefinition.h
+++ b/libcore/parser/BitmapMovieDefinition.h
@@ -106,7 +106,7 @@ public:
        }
        
        /// Create a playable Movie from this def.
-       virtual Movie* createMovie(Global_as& gl, DisplayObject* parent = 0);
+       virtual Movie* createMovie(Global_as& gl, DisplayObject* parent = 
nullptr);
 
        virtual const std::string& get_url() const {
                return _url;
diff --git a/libcore/parser/SWFMovieDefinition.cpp 
b/libcore/parser/SWFMovieDefinition.cpp
index d935e19..93713f3 100644
--- a/libcore/parser/SWFMovieDefinition.cpp
+++ b/libcore/parser/SWFMovieDefinition.cpp
@@ -94,7 +94,7 @@ SWFMovieLoader::started() const
 {
     boost::mutex::scoped_lock lock(_mutex);
 
-    return _thread.get() != NULL;
+    return _thread.get() != nullptr;
 }
 
 bool
@@ -202,7 +202,7 @@ SWFMovieDefinition::get_font(int font_id) const
 {
 
     FontMap::const_iterator it = m_fonts.find(font_id);
-    if ( it == m_fonts.end() ) return NULL;
+    if ( it == m_fonts.end() ) return nullptr;
     boost::intrusive_ptr<Font> f = it->second;
     assert(f->get_ref_count() > 1);
     return f.get();
@@ -218,14 +218,14 @@ SWFMovieDefinition::get_font(const std::string& name, 
bool bold, bool italic)
        Font* f = it->second.get();
        if ( f->matches(name, bold, italic) ) return f;
     }
-    return 0;
+    return nullptr;
 }
 
 CachedBitmap*
 SWFMovieDefinition::getBitmap(int id) const
 {
     const Bitmaps::const_iterator it = _bitmaps.find(id);
-    if (it == _bitmaps.end()) return 0;
+    if (it == _bitmaps.end()) return nullptr;
     return it->second.get();
 }
 
@@ -240,7 +240,7 @@ sound_sample*
 SWFMovieDefinition::get_sound_sample(int id) const
 {
     SoundSampleMap::const_iterator it = m_sound_samples.find(id);
-    if (it == m_sound_samples.end()) return 0;
+    if (it == m_sound_samples.end()) return nullptr;
 
     boost::intrusive_ptr<sound_sample> ch = it->second;
 
diff --git a/libcore/parser/SWFMovieDefinition.h 
b/libcore/parser/SWFMovieDefinition.h
index 6125a7c..7c18e69 100644
--- a/libcore/parser/SWFMovieDefinition.h
+++ b/libcore/parser/SWFMovieDefinition.h
@@ -309,7 +309,7 @@ public:
 #endif
 
         PlayListMap::const_iterator it = m_playlist.find(frame_number);
-        if ( it == m_playlist.end() ) return NULL;
+        if ( it == m_playlist.end() ) return nullptr;
         else return &(it->second);
     }
 
@@ -355,11 +355,11 @@ public:
     /// TOCHECK:
     /// The _root reference of the newly created movie_root
     /// will be set to a newly created Movie.
-    Movie* createMovie(Global_as& gl, DisplayObject* parent = 0);
+    Movie* createMovie(Global_as& gl, DisplayObject* parent = nullptr);
 
     virtual DisplayObject* createDisplayObject(Global_as&, DisplayObject*)
         const {
-        return 0;
+        return nullptr;
     }
 
     virtual const std::string& get_url() const { return _url; }
diff --git a/libcore/parser/SWFParser.cpp b/libcore/parser/SWFParser.cpp
index d897efd..ecf689f 100644
--- a/libcore/parser/SWFParser.cpp
+++ b/libcore/parser/SWFParser.cpp
@@ -83,7 +83,7 @@ SWFParser::read(std::streamsize bytes)
                 return false;
             }
 
-            SWF::TagLoadersTable::TagLoader lf = 0;
+            SWF::TagLoadersTable::TagLoader lf = nullptr;
 
             if (_tag == SWF::SHOWFRAME) {
                 // show frame tag -- advance to the next frame.
diff --git a/libcore/parser/action_buffer.h b/libcore/parser/action_buffer.h
index 46270b6..6ebd125 100644
--- a/libcore/parser/action_buffer.h
+++ b/libcore/parser/action_buffer.h
@@ -151,14 +151,14 @@ public:
        /// Return a value from the constant pool
        const char* dictionary_get(size_t n) const
        {
-        if ( _pools.empty() ) return 0;
+        if ( _pools.empty() ) return nullptr;
 
         // We'll query the last inserted one for now (highest PC)
         const ConstantPool& pool = _pools.rbegin()->second;
 
         if ( n < pool.size() ) return pool[n];
 
-        else return 0;
+        else return nullptr;
        }
 
        /// Read an SWF::ACTION_CONSTANTPOOL opcode and return as a dictionary
diff --git a/libcore/parser/filter_factory.cpp 
b/libcore/parser/filter_factory.cpp
index 50f9eb5..83f7e19 100644
--- a/libcore/parser/filter_factory.cpp
+++ b/libcore/parser/filter_factory.cpp
@@ -56,7 +56,7 @@ filter_factory::read(SWFStream& in, bool read_multiple, 
Filters* store)
 
     for (int i = 0; i < count; ++i)
     {
-        BitmapFilter *the_filter = NULL;
+        BitmapFilter *the_filter = nullptr;
 
         in.ensureBytes(1);
         filter_types filter_type = static_cast<filter_types> (in.read_u8());
diff --git a/libcore/parser/movie_definition.h 
b/libcore/parser/movie_definition.h
index 3e47fd0..6d615c8 100644
--- a/libcore/parser/movie_definition.h
+++ b/libcore/parser/movie_definition.h
@@ -140,9 +140,9 @@ public:
        /// SWFMovieDefinition is one such example, future examples
        /// should include jpeg_movie_def and similar..
        ///
-       virtual Movie* createMovie(Global_as& /*gl*/, DisplayObject* 
/*parent*/=0)
+       virtual Movie* createMovie(Global_as& /*gl*/, DisplayObject* 
/*parent*/=nullptr)
        {
-               return NULL;
+               return nullptr;
        }
 
     virtual void incrementLoadedFrames() {}
@@ -158,7 +158,7 @@ public:
        ///
        virtual const PlayList* getPlaylist(size_t /*frame_number*/) const
        {
-               return 0;
+               return nullptr;
        }
 
 
@@ -195,7 +195,7 @@ public:
        ///         (this is the default)
        virtual DefinitionTag* getDefinitionTag(std::uint16_t /*id*/) const
        {
-               return NULL;
+               return nullptr;
        }
 
        /// Get 0-based index of the frame with given label.
@@ -252,14 +252,14 @@ public:
        ///
        virtual Font* get_font(int /*id*/) const
        {
-               return NULL;
+               return nullptr;
        }
 
        /// Find a font from the movie (not shared) lib
        virtual Font* get_font(const std::string& /*name*/,
             bool /*bold*/, bool /*italic*/) const
        {
-               return 0;
+               return nullptr;
        }
 
        /// Add an ControlTag to this movie_definition's playlist
@@ -310,7 +310,7 @@ public:
        ///
        virtual image::JpegInput* get_jpeg_loader() const
        {
-               return NULL;
+               return nullptr;
        }
 
        /// \brief
@@ -328,7 +328,7 @@ public:
        ///
        virtual CachedBitmap* getBitmap(int /*DisplayObject_id*/) const
        {
-               return 0;
+               return nullptr;
        }
 
        /// \brief
@@ -350,7 +350,7 @@ public:
        ///
        virtual sound_sample* get_sound_sample(int /*DisplayObject_id*/) const
        {
-               return NULL;
+               return nullptr;
        }
 
        /// \brief
diff --git a/libcore/parser/sprite_definition.h 
b/libcore/parser/sprite_definition.h
index 21f2f05..1aa0177 100644
--- a/libcore/parser/sprite_definition.h
+++ b/libcore/parser/sprite_definition.h
@@ -250,7 +250,7 @@ private:
                //assert(frame_number < m_loading_frame);
 
                PlayListMap::const_iterator it = m_playlist.find(frame_number);
-               if ( it == m_playlist.end() ) return NULL;
+               if ( it == m_playlist.end() ) return nullptr;
                else return &(it->second);
        }
 
diff --git a/libcore/swf/DefineBitsTag.cpp b/libcore/swf/DefineBitsTag.cpp
index aa222c0..8135550 100644
--- a/libcore/swf/DefineBitsTag.cpp
+++ b/libcore/swf/DefineBitsTag.cpp
@@ -574,10 +574,10 @@ inflateWrapper(SWFStream& in, void* buffer, size_t 
buffer_bytes)
 
     z_stream d_stream;
 
-    d_stream.zalloc = 0;
-    d_stream.zfree = 0;
-    d_stream.opaque = 0;
-    d_stream.next_in  = 0;
+    d_stream.zalloc = nullptr;
+    d_stream.zfree = nullptr;
+    d_stream.opaque = nullptr;
+    d_stream.next_in  = nullptr;
     d_stream.avail_in = 0;
 
     d_stream.next_out = static_cast<Byte*>(buffer);
diff --git a/libcore/swf/DefineButtonSoundTag.h 
b/libcore/swf/DefineButtonSoundTag.h
index ffba85a..fa412e4 100644
--- a/libcore/swf/DefineButtonSoundTag.h
+++ b/libcore/swf/DefineButtonSoundTag.h
@@ -50,7 +50,7 @@ public:
                ButtonSound()
                        :
                        soundID(0),
-                       sample(0)
+                       sample(nullptr)
                {}
 
        };
diff --git a/libcore/swf/DefineButtonTag.h b/libcore/swf/DefineButtonTag.h
index 68a2a81..8ec4f20 100644
--- a/libcore/swf/DefineButtonTag.h
+++ b/libcore/swf/DefineButtonTag.h
@@ -61,7 +61,7 @@ public:
         _down(false),
         _over(false),
         _up(false),
-        _definitionTag(0),
+        _definitionTag(nullptr),
         _buttonLayer(0)
     {
     }
diff --git a/libcore/swf/DefineMorphShapeTag.cpp 
b/libcore/swf/DefineMorphShapeTag.cpp
index 107b26e..50382ac 100644
--- a/libcore/swf/DefineMorphShapeTag.cpp
+++ b/libcore/swf/DefineMorphShapeTag.cpp
@@ -69,7 +69,7 @@ DisplayObject*
 DefineMorphShapeTag::createDisplayObject(Global_as& gl,
         DisplayObject* parent) const
 {
-    return new MorphShape(getRoot(gl), 0, this, parent);
+    return new MorphShape(getRoot(gl), nullptr, this, parent);
 }
 
 void
diff --git a/libcore/swf/DefineShapeTag.cpp b/libcore/swf/DefineShapeTag.cpp
index ddda58e..b51e2a6 100644
--- a/libcore/swf/DefineShapeTag.cpp
+++ b/libcore/swf/DefineShapeTag.cpp
@@ -66,7 +66,7 @@ DefineShapeTag::loader(SWFStream& in, TagType tag, 
movie_definition& m,
 DisplayObject*
 DefineShapeTag::createDisplayObject(Global_as& gl, DisplayObject* parent) const
 {
-       return new Shape(getRoot(gl), 0, this, parent);
+       return new Shape(getRoot(gl), nullptr, this, parent);
 }
     
 bool
diff --git a/libcore/swf/DefineTextTag.cpp b/libcore/swf/DefineTextTag.cpp
index b3bd856..2f38af2 100644
--- a/libcore/swf/DefineTextTag.cpp
+++ b/libcore/swf/DefineTextTag.cpp
@@ -59,7 +59,7 @@ DisplayObject*
 DefineTextTag::createDisplayObject(Global_as& gl, DisplayObject* parent)
     const
 {
-    return new StaticText(getRoot(gl), 0, this, parent);
+    return new StaticText(getRoot(gl), nullptr, this, parent);
 }
 
 bool
diff --git a/libcore/swf/StartSoundTag.cpp b/libcore/swf/StartSoundTag.cpp
index b6a9eb2..1b49e22 100644
--- a/libcore/swf/StartSoundTag.cpp
+++ b/libcore/swf/StartSoundTag.cpp
@@ -91,7 +91,7 @@ StartSoundTag::executeActions(MovieClip* m, DisplayList& /* 
dlist */) const
         else {
 
             const sound::SoundEnvelopes* env = 
-                _soundInfo.envelopes.empty() ? 0 : &_soundInfo.envelopes;
+                _soundInfo.envelopes.empty() ? nullptr : &_soundInfo.envelopes;
 
             handler->startSound(m_handler_id,
                     _soundInfo.loopCount,
diff --git a/libcore/swf/TextRecord.h b/libcore/swf/TextRecord.h
index 50d2bfb..bf2a278 100644
--- a/libcore/swf/TextRecord.h
+++ b/libcore/swf/TextRecord.h
@@ -64,7 +64,7 @@ public:
         _hasYOffset(false),
         _xOffset(0.0f),
         _yOffset(0.0f),
-        _font(0),
+        _font(nullptr),
         _underline(false)
     {}
           
diff --git a/libcore/vm/ASHandlers.cpp b/libcore/vm/ASHandlers.cpp
index e62b086..0018fb8 100644
--- a/libcore/vm/ASHandlers.cpp
+++ b/libcore/vm/ASHandlers.cpp
@@ -462,7 +462,7 @@ ActionNextFrame(ActionExec& thread)
 #endif
 
     DisplayObject* tgtch = env.target();
-    MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
+    MovieClip* tgt = tgtch ? tgtch->to_movie() : nullptr;
     if (tgt) tgt->goto_frame(tgt->get_current_frame() + 1);
     else {
         log_debug("ActionNextFrame: as_environment target is null "
@@ -480,7 +480,7 @@ ActionPrevFrame(ActionExec& thread)
 #endif
 
     DisplayObject* tgtch = env.target();
-    MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
+    MovieClip* tgt = tgtch ? tgtch->to_movie() : nullptr;
     if (tgt) tgt->goto_frame(tgt->get_current_frame() - 1);
     else log_debug("ActionPrevFrame: as_environment target is null or not a 
sprite");
 }
@@ -495,7 +495,7 @@ ActionPlay(ActionExec& thread)
 #endif
 
     DisplayObject* tgtch = env.target();
-    MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
+    MovieClip* tgt = tgtch ? tgtch->to_movie() : nullptr;
     if (tgt) tgt->setPlayState(MovieClip::PLAYSTATE_PLAY);
     else log_debug("ActionPlay: as_environment target is null or not a 
sprite");
 }
@@ -510,7 +510,7 @@ ActionStop(ActionExec& thread)
 #endif
 
     DisplayObject* tgtch = env.target();
-    MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
+    MovieClip* tgt = tgtch ? tgtch->to_movie() : nullptr;
     if (tgt) tgt->setPlayState(MovieClip::PLAYSTATE_STOP);
     else log_debug("ActionStop: as_environment target is null or not a 
sprite");
 }
@@ -553,7 +553,7 @@ ActionGotoFrame(ActionExec& thread)
     size_t frame = code.read_int16(thread.getCurrentPC() + 3);
 
     DisplayObject* tgtch = env.target();
-    MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
+    MovieClip* tgt = tgtch ? tgtch->to_movie() : nullptr;
 
     // frame number within this tag is hard-coded and 0-based
     if (tgt) tgt->goto_frame(frame);
@@ -624,7 +624,7 @@ ActionWaitForFrame(ActionExec& thread)
     std::uint8_t skip = code[thread.getCurrentPC()+5];
 
     DisplayObject* target = env.target();
-    MovieClip* target_sprite = target ? target->to_movie() : 0;
+    MovieClip* target_sprite = target ? target->to_movie() : nullptr;
     if (!target_sprite) {
         log_error(_("%s: environment target is null or not a MovieClip"),
                 __FUNCTION__);
@@ -674,7 +674,7 @@ ActionGotoLabel(ActionExec& thread)
 
     const char* frame_label = code.read_string(thread.getCurrentPC()+3);
     DisplayObject *target = env.target();
-    MovieClip *target_sprite = target ? target->to_movie() : 0;
+    MovieClip *target_sprite = target ? target->to_movie() : nullptr;
     if (!target_sprite) {
         log_error(_("GotoLabel: environment target is null or not a "
                     "MovieClip"));
@@ -1690,7 +1690,7 @@ ActionWaitForFrameExpression(ActionExec& thread)
     as_value framespec = env.pop();
 
     DisplayObject* tgtch = env.target();
-    MovieClip* target_sprite = tgtch ? tgtch->to_movie() : 0;
+    MovieClip* target_sprite = tgtch ? tgtch->to_movie() : nullptr;
     if (!target_sprite) {
         log_error(_("%s: environment target is null or not a MovieClip"),
             __FUNCTION__);
@@ -1963,7 +1963,7 @@ ActionCallFrame(ActionExec& thread)
     std::string target_path;
     std::string frame_var;
 
-    DisplayObject* target = 0;
+    DisplayObject* target = nullptr;
     if (parsePath(target_frame, target_path, frame_var)) {
         target = findTarget(env, target_path);
     }
@@ -1974,7 +1974,7 @@ ActionCallFrame(ActionExec& thread)
 
     env.drop(1);
 
-    MovieClip* target_sprite = target ? target->to_movie() : 0;
+    MovieClip* target_sprite = target ? target->to_movie() : nullptr;
     if (target_sprite) {
         target_sprite->call_frame_actions(frame_var);
     }
@@ -2013,7 +2013,7 @@ ActionGotoExpression(ActionExec& thread)
     std::string target_path;
     std::string frame_var;
 
-    DisplayObject* target = NULL;
+    DisplayObject* target = nullptr;
     if (parsePath(target_frame, target_path, frame_var)) {
         target = findTarget(env, target_path);
     }
@@ -2026,7 +2026,7 @@ ActionGotoExpression(ActionExec& thread)
         frame_var = target_frame;
     }
 
-    MovieClip *target_sprite = target ? target->to_movie() : NULL;
+    MovieClip *target_sprite = target ? target->to_movie() : nullptr;
     if (target_sprite) {
         size_t frame_number;
         if (!target_sprite->get_frame_number(frame_var, frame_number)) {
@@ -2076,7 +2076,7 @@ ActionDelete(ActionExec& thread)
 
     std::string propertyname = env.top(0).to_string();
 
-    as_object* obj(0);
+    as_object* obj(nullptr);
 
     // Behaviour is different according to version. For SWF7 and above,
     // the delete fails if there aren't two items on the stack. For SWF6
@@ -2210,7 +2210,7 @@ ActionCallFunction(ActionExec& thread)
     // is dropped from the stack.
     const std::string& funcname = env.pop().to_string();
 
-    as_object* super(0);
+    as_object* super(nullptr);
 
     as_object* this_ptr;
     as_value function = thread.getVariable(funcname, &this_ptr);
@@ -2734,7 +2734,7 @@ ActionCallMethod(ActionExec& thread)
     as_object* method_obj; // The method to call, as an object
 
     // The object to be the 'this' pointer during the call.
-    as_object* this_ptr(0);
+    as_object* this_ptr(nullptr);
 
     // Will be used to find super later
     ObjectURI methURI;
@@ -2797,7 +2797,7 @@ ActionCallMethod(ActionExec& thread)
     if (func && func->isBuiltin()) {
         // Do not construct super if method is a builtin
         // TODO: check if this is correct!!
-        super = 0;
+        super = nullptr;
     }
     else {
         super = obj->get_super(methURI);
@@ -2915,7 +2915,7 @@ ActionInstanceOf(ActionExec& thread)
 
     // Get the "instance" (but avoid implicit conversion of primitive values!)
     as_object* instance = env.top(1).is_object() ?
-        safeToObject(getVM(thread.env), env.top(1)) : 0;
+        safeToObject(getVM(thread.env), env.top(1)) : nullptr;
 
     // Invalid args!
     if (!super || ! instance) {
@@ -3253,7 +3253,7 @@ ActionTry(ActionExec& thread)
     std::uint16_t catchSize = code.read_uint16(i); i += 2;
     std::uint16_t finallySize = code.read_uint16(i); i += 2;
 
-    const char* catchName = NULL;
+    const char* catchName = nullptr;
     std::uint8_t catchRegister = 0;
 
     if (!doFinally) finallySize = 0;
@@ -3451,7 +3451,7 @@ safeToObject(VM& vm, const as_value& val)
         return toObject(val, vm);
     }
     catch (const GnashException&) {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -3565,7 +3565,7 @@ commonGetURL(as_environment& env, as_value target,
             sendVarsMethod, loadTargetFlag, loadVariableFlag);
 
     DisplayObject* target_ch = findTarget(env, target_string);
-    MovieClip* target_movie = target_ch ? target_ch->to_movie() : 0;
+    MovieClip* target_movie = target_ch ? target_ch->to_movie() : nullptr;
 
     if (loadVariableFlag) {
         log_debug("getURL2 loadVariable");
diff --git a/libcore/vm/ActionExec.cpp b/libcore/vm/ActionExec.cpp
index e6f4b23..3816099 100644
--- a/libcore/vm/ActionExec.cpp
+++ b/libcore/vm/ActionExec.cpp
@@ -69,7 +69,7 @@ ActionExec::ActionExec(const Function& func, as_environment& 
newEnv,
     _func(&func),
     _this_ptr(this_ptr),
     _initialStackSize(0),
-    _originalTarget(0),
+    _originalTarget(nullptr),
     _origExecSWFVersion(0),
     _tryList(),
     _returning(false),
@@ -106,13 +106,13 @@ ActionExec::ActionExec(const action_buffer& abuf, 
as_environment& newEnv,
     :
     code(abuf),
     env(newEnv),
-    retval(0),
+    retval(nullptr),
     _withStack(),
     _scopeStack(),
-    _func(0),
-    _this_ptr(0),
+    _func(nullptr),
+    _this_ptr(nullptr),
     _initialStackSize(0),
-    _originalTarget(0),
+    _originalTarget(nullptr),
     _origExecSWFVersion(0),
     _tryList(),
     _returning(false),
@@ -146,7 +146,7 @@ ActionExec::operator()()
     IF_VERBOSE_ACTION (
             log_action(_("at ActionExec operator() start, pc=%d"
                    ", stop_pc=%d, code.size=%d, func=%d, codeVersion=%d"),
-                pc, stop_pc, code.size(), _func ? _func : 0, codeVersion);
+                pc, stop_pc, code.size(), _func ? _func : nullptr, 
codeVersion);
         std::stringstream ss;
         getVM(env).dumpState(ss, STACK_DUMP_LIMIT);
            log_action(_("%s"), ss.str());
@@ -531,7 +531,7 @@ ActionExec::cleanupAfterRun()
     VM& vm = getVM(env);
 
     env.set_target(_originalTarget);
-    _originalTarget = NULL;
+    _originalTarget = nullptr;
 
     vm.setSWFVersion(_origExecSWFVersion);
 
diff --git a/libcore/vm/ActionExec.h b/libcore/vm/ActionExec.h
index 7a57f75..85c00db 100644
--- a/libcore/vm/ActionExec.h
+++ b/libcore/vm/ActionExec.h
@@ -159,7 +159,7 @@ public:
        as_value* retval;
 
        /// Is this execution thread a function call ?
-       bool isFunction() const { return _func != 0; }
+       bool isFunction() const { return _func != nullptr; }
 
        /// Get the current 'this' pointer, for use in function calls
        as_object* getThisPointer();
@@ -205,7 +205,7 @@ public:
        ///                     containing any found variable. If you aren't 
interested,
     ///                 pass null (default). If the variable does not belong
     ///                 to an object, target will be set to null.
-       as_value getVariable(const std::string& name, as_object** target = 0);
+       as_value getVariable(const std::string& name, as_object** target = 
nullptr);
 
        /// Get current target.
        //
diff --git a/libcore/vm/CallStack.h b/libcore/vm/CallStack.h
index 3ccb1df..c14f64c 100644
--- a/libcore/vm/CallStack.h
+++ b/libcore/vm/CallStack.h
@@ -85,7 +85,7 @@ public:
     /// @return     A pointer to the value in the register or 0 if no such
     ///             register exists.
     const as_value* getLocalRegister(size_t i) const {
-        if (i >= _registers.size()) return 0;
+        if (i >= _registers.size()) return nullptr;
         return &_registers[i];
     }
 
diff --git a/libcore/vm/ExecutableCode.h b/libcore/vm/ExecutableCode.h
index db1014d..a14ddd3 100644
--- a/libcore/vm/ExecutableCode.h
+++ b/libcore/vm/ExecutableCode.h
@@ -121,7 +121,7 @@ public:
             // still might be also guarded by unloaded()
             if (target()->isDestroyed()) break;
 
-            PoolGuard guard(getVM(target()->get_environment()), 0);
+            PoolGuard guard(getVM(target()->get_environment()), nullptr);
             ActionExec exec(*(*it), target()->get_environment(), false);
             exec();
         }
diff --git a/libcore/vm/VM.cpp b/libcore/vm/VM.cpp
index b25e4c8..6c13142 100644
--- a/libcore/vm/VM.cpp
+++ b/libcore/vm/VM.cpp
@@ -59,7 +59,7 @@ VM::VM(movie_root& root, VirtualClock& clock)
        _stack(),
     _shLib(new SharedObjectLibrary(*this)),
     _rng(clock.elapsed()),
-    _constantPool(0)
+    _constantPool(nullptr)
 {
        NSV::loadStrings(_stringTable);
     _global->registerClasses();
@@ -199,7 +199,7 @@ VM::getRegister(size_t index)
 
     // Otherwise it can be in the global registers.
     if (index < _globalRegisters.size()) return &_globalRegisters[index];
-    return 0;
+    return nullptr;
 }
 
 void
@@ -276,9 +276,9 @@ NativeFunction*
 VM::getNative(unsigned int x, unsigned int y) const
 {
     AsNativeTable::const_iterator row = _asNativeTable.find(x);
-    if (row == _asNativeTable.end()) return 0;
+    if (row == _asNativeTable.end()) return nullptr;
     FuncMap::const_iterator col = row->second.find(y);
-    if (col == row->second.end()) return 0;
+    if (col == row->second.end()) return nullptr;
     Global_as::ASFunction fun = col->second;
 
     NativeFunction* f = new NativeFunction(*_global, fun);
diff --git a/libcore/vm/fn_call.h b/libcore/vm/fn_call.h
index 6d234f3..389dd21 100644
--- a/libcore/vm/fn_call.h
+++ b/libcore/vm/fn_call.h
@@ -119,12 +119,12 @@ public:
     ///                     calculated from the this pointer (if that is not
     ///                     null) whenever a function requires it.
     fn_call(as_object* this_in, const as_environment& env_in,
-            Args& args, as_object* sup = 0, bool isNew = false)
+            Args& args, as_object* sup = nullptr, bool isNew = false)
         :
         this_ptr(this_in),
         super(sup),
         nargs(args.size()),
-        callerDef(0),
+        callerDef(nullptr),
         _env(env_in),
         _new(isNew)
     {
@@ -134,9 +134,9 @@ public:
     fn_call(as_object* this_in, const as_environment& env_in)
         :
         this_ptr(this_in),
-        super(0),
+        super(nullptr),
         nargs(0),
-        callerDef(0),
+        callerDef(nullptr),
         _env(env_in),
         _new(false)
        {
@@ -252,7 +252,7 @@ struct IsDisplayObject
 {
     typedef T value_type;
     value_type* operator()(const as_object* o) const {
-        if (!o) return 0;
+        if (!o) return nullptr;
         return dynamic_cast<T*>(o->displayObject());
     }
 };
diff --git a/libdevice/DeviceGlue.cpp b/libdevice/DeviceGlue.cpp
index 30dae4f..4f454f8 100644
--- a/libdevice/DeviceGlue.cpp
+++ b/libdevice/DeviceGlue.cpp
@@ -51,7 +51,7 @@ DeviceGlue::setDevice(renderer::GnashDevice::dtype_t dtype)
 #ifdef BUILD_RAWFB_DEVICE
         case renderer::GnashDevice::RAWFB:
         {
-            _device.reset(new renderer::rawfb::RawFBDevice(0, 0));
+            _device.reset(new renderer::rawfb::RawFBDevice(0, nullptr));
             break;
         }
 #endif
diff --git a/libdevice/GnashDevice.h b/libdevice/GnashDevice.h
index 3e46198..c809823 100644
--- a/libdevice/GnashDevice.h
+++ b/libdevice/GnashDevice.h
@@ -113,10 +113,10 @@ struct GnashDevice
     // These are only used for the Framebuffer
 
     /// Get the memory from the real framebuffer
-    virtual std::uint8_t *getFBMemory() { return 0; };
+    virtual std::uint8_t *getFBMemory() { return nullptr; };
     
     /// Get the memory from an offscreen buffer to support Double Buffering
-    virtual std::uint8_t *getOffscreenBuffer() { return 0; };
+    virtual std::uint8_t *getOffscreenBuffer() { return nullptr; };
 
     virtual size_t getFBMemSize() { return 0; };
 
diff --git a/libdevice/events/EventDevice.cpp b/libdevice/events/EventDevice.cpp
index 9307f9a..8dc72f2 100644
--- a/libdevice/events/EventDevice.cpp
+++ b/libdevice/events/EventDevice.cpp
@@ -108,7 +108,7 @@ EventDevice::init(const std::string &filespec, size_t /* 
size */)
     log_debug(_("The device on %s says its name is %s"), filespec, name);
     // /dev/mxc_ts is the Touchscreen driver used by the Freescale Babbage 
board
     // For some reason it has an empty device info structure other than the 
name.
-    if (strstr(name, "mxc_ts") != 0) {
+    if (strstr(name, "mxc_ts") != nullptr) {
         _device_info.bustype = BUS_HOST;
     }
     log_debug(_("vendor %04hx product %04hx version %04hx"),
@@ -162,10 +162,10 @@ EventDevice::init(const std::string &filespec, size_t /* 
size */)
       case BUS_I8042:
           // This is for keyboards and mice
           log_debug(_("is an I8042 bus type"));
-          if (strstr(name, "keyboard") != 0) {
+          if (strstr(name, "keyboard") != nullptr) {
               _type = InputDevice::KEYBOARD;
           } else {
-              if (strstr(name, "Mouse") != 0) {
+              if (strstr(name, "Mouse") != nullptr) {
                   _type = InputDevice::MOUSE;
               }
           }
@@ -194,11 +194,11 @@ EventDevice::init(const std::string &filespec, size_t /* 
size */)
       case BUS_HOST:
           // log_debug("is Host bus type");
           // ON the Babbage board, this is the evdev driver version 1.0.0 
-          if (strstr(name, "mxc_ts") != 0) {
+          if (strstr(name, "mxc_ts") != nullptr) {
               log_debug(_("Babbage Touchscreen found!"));
               _type = InputDevice::TABLET;
           }
-          if (strstr(name, "mxckpd") != 0) {
+          if (strstr(name, "mxckpd") != nullptr) {
               log_debug(_("Babbage Power Button found!"));
               _type = InputDevice::POWERBUTTON;
           }
diff --git a/libdevice/events/InputDevice.cpp b/libdevice/events/InputDevice.cpp
index 0cf2e39..5f1a5ed 100644
--- a/libdevice/events/InputDevice.cpp
+++ b/libdevice/events/InputDevice.cpp
@@ -126,7 +126,7 @@ InputDevice::readData(size_t size)
     tval.tv_sec  = 0;
     tval.tv_usec = 1;
     errno = 0;
-    int ret = ::select(_fd+1, &fdset, NULL, NULL, &tval);
+    int ret = ::select(_fd+1, &fdset, nullptr, nullptr, &tval);
     if (ret == 0) {
 //            log_debug(_("The pipe for fd #%d timed out waiting to read"), 
fd);
         return inbuf;
diff --git a/libdevice/events/TouchDevice.cpp b/libdevice/events/TouchDevice.cpp
index 7b8bdd9..6c37f44 100644
--- a/libdevice/events/TouchDevice.cpp
+++ b/libdevice/events/TouchDevice.cpp
@@ -85,7 +85,7 @@ TouchDevice::init(const std::string &filespec, size_t /* size 
*/)
     }
     
     _tsDev = ts_open(devname, 1);  //Open tslib non-blocking
-    if (_tsDev == 0) {
+    if (_tsDev == nullptr) {
         log_error(_("Could not open touchscreen %s: %s"), devname,
                   strerror(errno));
         return false;
@@ -114,7 +114,7 @@ TouchDevice::check()
     // Tslib should be setup so the output is pretty clean.
     struct ts_sample event;
     
-    if (_tsDev == 0) {
+    if (_tsDev == nullptr) {
         return false;           // No tslib device initialized, exit!
     }
     
@@ -299,7 +299,7 @@ TouchDevice::scanForDevices()
     struct ts_types touch[] = {
         {InputDevice::TOUCHSCREEN, "/dev/input/ts0"},
         {InputDevice::TOUCHSCREEN, "/dev/ts"},
-        {InputDevice::UNKNOWN, 0}
+        {InputDevice::UNKNOWN, nullptr}
     };
 
     int i = 0;
diff --git a/libdevice/events/UinputDevice.cpp 
b/libdevice/events/UinputDevice.cpp
index 033ef4a..51007c3 100644
--- a/libdevice/events/UinputDevice.cpp
+++ b/libdevice/events/UinputDevice.cpp
@@ -65,7 +65,7 @@ UinputDevice::scanForDevice()
         "/dev/input/event4",
         "/dev/uinput",
         "/dev/input/uinput",
-        0
+        nullptr
     };
 
     int i = 0;
@@ -192,7 +192,7 @@ UinputDevice::moveTo(int x, int y)
 
     input_event ev = input_event();
     
-    gettimeofday(&ev.time, NULL);
+    gettimeofday(&ev.time, nullptr);
     ev.type = EV_ABS;
     ev.code = ABS_X;
     ev.value = x;
diff --git a/libdevice/rawfb/RawFBDevice.cpp b/libdevice/rawfb/RawFBDevice.cpp
index 7c79e6b..ee9bb6e 100644
--- a/libdevice/rawfb/RawFBDevice.cpp
+++ b/libdevice/rawfb/RawFBDevice.cpp
@@ -44,7 +44,7 @@ static LogFile& dbglogfile = LogFile::getDefaultInstance();
 
 RawFBDevice::RawFBDevice()
     : _fd(0),
-      _fbmem(0)
+      _fbmem(nullptr)
 {
     // GNASH_REPORT_FUNCTION;
 
@@ -53,19 +53,19 @@ RawFBDevice::RawFBDevice()
 
 RawFBDevice::RawFBDevice(int /* vid */)
     : _fd(0),
-      _fbmem(0),
+      _fbmem(nullptr),
       _cmap()
 {
     // GNASH_REPORT_FUNCTION;
 
-    if (!initDevice(0, 0)) {
+    if (!initDevice(0, nullptr)) {
         log_error(_("Couldn't initialize RAWFB device!"));
     }
 }
 
 RawFBDevice::RawFBDevice(int /* argc */ , char ** /* argv */)
     : _fd(0),
-      _fbmem(0),
+      _fbmem(nullptr),
       _cmap()
 {
     // GNASH_REPORT_FUNCTION;
@@ -91,7 +91,7 @@ RawFBDevice::~RawFBDevice()
     if (_fbmem) {
         munmap(_fbmem, 0);
         log_debug(_("Freeing framebuffer memory"));
-        _fbmem = 0;
+        _fbmem = nullptr;
     }
     
     if (_offscreen_buffer) {
@@ -110,7 +110,7 @@ RawFBDevice::initDevice(int /* argc */, char **/* argv[] */)
 {
     GNASH_REPORT_FUNCTION;
     
-    const char *devname = 0;
+    const char *devname = nullptr;
     // Open the framebuffer device
 #ifdef ENABLE_FAKE_FRAMEBUFFER
     _fd = open(FAKEFB, O_RDWR);
@@ -179,7 +179,7 @@ RawFBDevice::setGrayscaleLUT8()
     _cmap.red = (__u16*)malloc(CMAP_SIZE);
     _cmap.green = (__u16*)malloc(CMAP_SIZE);
     _cmap.blue = (__u16*)malloc(CMAP_SIZE);
-    _cmap.transp = NULL;
+    _cmap.transp = nullptr;
 
     for (i=0; i<256; i++) {
         int r = i;
@@ -217,7 +217,7 @@ RawFBDevice::attachWindow(GnashDevice::native_window_t 
window)
     // of the opened device. EGL wants the descriptor here too, so
     // this way we work in a similar manner.
     if (window) {
-        _fbmem = reinterpret_cast<std::uint8_t *>(mmap(0, _fixinfo.smem_len,
+        _fbmem = reinterpret_cast<std::uint8_t *>(mmap(nullptr, 
_fixinfo.smem_len,
                                         PROT_READ|PROT_WRITE, MAP_SHARED,
                                         window, 0));
     }
@@ -260,7 +260,7 @@ RawFBDevice::swapBuffers()
 const char *
 RawFBDevice::getErrorString(int /* error */)
 {
-    return 0;
+    return nullptr;
 }
 
 // Create an RAWFB window to render in. This is only used by testing
diff --git a/libmedia/AudioDecoder.h b/libmedia/AudioDecoder.h
index 87949ed..fe36e18 100644
--- a/libmedia/AudioDecoder.h
+++ b/libmedia/AudioDecoder.h
@@ -88,13 +88,13 @@ inline std::uint8_t*
 AudioDecoder::decode(const std::uint8_t*, std::uint32_t, std::uint32_t&,
         std::uint32_t&)
 {
-    return 0;
+    return nullptr;
 }
 
 inline std::uint8_t*
 AudioDecoder::decode(const EncodedAudioFrame&, std::uint32_t&)
 {
-    return 0;
+    return nullptr;
 }
        
 } // gnash.media namespace 
diff --git a/libmedia/AudioDecoderSimple.cpp b/libmedia/AudioDecoderSimple.cpp
index 74f05d6..e4d71eb 100644
--- a/libmedia/AudioDecoderSimple.cpp
+++ b/libmedia/AudioDecoderSimple.cpp
@@ -368,7 +368,7 @@ AudioDecoderSimple::decode(const std::uint8_t* input, 
std::uint32_t inputSize,
         std::uint32_t& outputSize, std::uint32_t& decodedBytes)
 {
 
-       unsigned char* decodedData = NULL;
+       unsigned char* decodedData = nullptr;
        std::uint32_t outsize = 0;
 
     switch (_codec) {
@@ -461,7 +461,7 @@ AudioDecoderSimple::decode(const std::uint8_t* input, 
std::uint32_t inputSize,
        // If we need to convert samplerate or/and from mono to stereo...
        if (outsize > 0 && (_sampleRate != 44100 || !_stereo)) {
 
-               std::int16_t* adjusted_data = 0;
+               std::int16_t* adjusted_data = nullptr;
                int     adjusted_size = 0;
                int sample_count = outsize / (_stereo ? 4 : 2); // samples are 
of size 2
 
@@ -478,7 +478,7 @@ AudioDecoderSimple::decode(const std::uint8_t* input, 
std::uint32_t inputSize,
                        delete[] tmp_raw_buffer;
                        outputSize = 0;
                        decodedBytes = 0;
-                       return NULL;
+                       return nullptr;
                }
 
                // Move the new data to the sound-struct
diff --git a/libmedia/AudioDecoderSpeex.cpp b/libmedia/AudioDecoderSpeex.cpp
index 9cb85bf..9367c0a 100644
--- a/libmedia/AudioDecoderSpeex.cpp
+++ b/libmedia/AudioDecoderSpeex.cpp
@@ -112,7 +112,7 @@ AudioDecoderSpeex::decode(const EncodedAudioFrame& input,
         }
 
         
-        std::int16_t* conv_data = 0;
+        std::int16_t* conv_data = nullptr;
 
 #ifdef RESAMPLING_SPEEX
                spx_uint32_t conv_size = 0;
diff --git a/libmedia/MediaParser.cpp b/libmedia/MediaParser.cpp
index 5bd454e..1da97fa 100644
--- a/libmedia/MediaParser.cpp
+++ b/libmedia/MediaParser.cpp
@@ -140,7 +140,7 @@ MediaParser::peekNextVideoFrame() const
        }
 #endif
 
-       if (!_videoInfo.get() || _videoFrames.empty()) return 0;
+       if (!_videoInfo.get() || _videoFrames.empty()) return nullptr;
        return _videoFrames.front();
 }
 
@@ -266,7 +266,7 @@ MediaParser::peekNextAudioFrame() const
                const_cast<MediaParser*>(this)->parseNextChunk();
        }
 #endif
-       if (!_audioInfo.get() || _audioFrames.empty()) return 0;
+       if (!_audioInfo.get() || _audioFrames.empty()) return nullptr;
        return _audioFrames.front();
 }
 
diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index 59ebbd2..56b5248 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -36,9 +36,9 @@ namespace ffmpeg {
     
 AudioDecoderFfmpeg::AudioDecoderFfmpeg(const AudioInfo& info)
     :
-    _audioCodec(NULL),
-    _audioCodecCtx(NULL),
-    _parser(NULL),
+    _audioCodec(nullptr),
+    _audioCodecCtx(nullptr),
+    _parser(nullptr),
     _needsParsing(false)
 {
     setup(info);
@@ -56,9 +56,9 @@ AudioDecoderFfmpeg::AudioDecoderFfmpeg(const AudioInfo& info)
 
 AudioDecoderFfmpeg::AudioDecoderFfmpeg(SoundInfo& info)
     :
-    _audioCodec(NULL),
-    _audioCodecCtx(NULL),
-    _parser(NULL)
+    _audioCodec(nullptr),
+    _audioCodecCtx(nullptr),
+    _parser(nullptr)
 {
     setup(info);
 
@@ -137,13 +137,13 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
     }
 
 #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
-    int ret = avcodec_open2(_audioCodecCtx, _audioCodec, NULL);
+    int ret = avcodec_open2(_audioCodecCtx, _audioCodec, nullptr);
 #else
     int ret = avcodec_open(_audioCodecCtx, _audioCodec);
 #endif
     if (ret < 0) {
         av_free(_audioCodecCtx);
-        _audioCodecCtx=0;
+        _audioCodecCtx=nullptr;
         boost::format err = boost::format(
             _("AudioDecoderFfmpeg: avcodec_open failed to initialize "
             "FFmpeg codec %s (%d)")) % _audioCodec->name % (int)codec_id;
@@ -258,7 +258,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
     }
 
     _parser = av_parser_init(codec_id);
-    _needsParsing = (_parser != NULL);
+    _needsParsing = (_parser != nullptr);
 
     // Create an audioCodecCtx from the ffmpeg parser if exists/possible
 #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
@@ -317,14 +317,14 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
     log_debug("  Opening codec");
 #endif // GNASH_DEBUG_AUDIO_DECODING
 #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
-    int ret = avcodec_open2(_audioCodecCtx, _audioCodec, NULL);
+    int ret = avcodec_open2(_audioCodecCtx, _audioCodec, nullptr);
 #else
     int ret = avcodec_open(_audioCodecCtx, _audioCodec);
 #endif
     if (ret < 0) {
         //avcodec_close(_audioCodecCtx);
         av_free(_audioCodecCtx);
-        _audioCodecCtx = 0;
+        _audioCodecCtx = nullptr;
 
         boost::format err = boost::format(
             _("AudioDecoderFfmpeg: avcodec_open failed to initialize "
@@ -352,7 +352,7 @@ AudioDecoderFfmpeg::decode(const std::uint8_t* input,
     decodedBytes = 0; // nothing decoded yet
     while (decodedBytes < inputSize)
     {
-        const std::uint8_t* frame=0; // parsed frame (pointer into input)
+        const std::uint8_t* frame=nullptr; // parsed frame (pointer into input)
         int framesize; // parsed frame size
 
         int consumed = parseInput(input+decodedBytes,
@@ -482,7 +482,7 @@ AudioDecoderFfmpeg::decodeFrame(const std::uint8_t* input,
     if (!output.get()) {
         log_error(_("failed to allocate audio buffer."));
         outputSize = 0;
-        return NULL;
+        return nullptr;
     }
 
     std::int16_t* outPtr = output.get();
@@ -503,7 +503,7 @@ AudioDecoderFfmpeg::decodeFrame(const std::uint8_t* input,
     std::unique_ptr<AVFrame, decltype(av_free)*> frm ( FRAMEALLOC(), av_free );
     if (!frm.get()) {
         log_error(_("failed to allocate frame."));
-        return NULL;
+        return nullptr;
     }
     int tmp = avcodec_decode_audio4(_audioCodecCtx, frm.get(), &got_frm, &pkt);
 
@@ -522,7 +522,7 @@ AudioDecoderFfmpeg::decodeFrame(const std::uint8_t* input,
         if (static_cast<int>(outSize) < data_size) {
             log_error(_("output buffer size is too small for the current frame 
"
                 "(%d < %d)"), outSize, data_size);
-            return NULL;
+            return nullptr;
         }
 
         memcpy(outPtr, frm->extended_data[0], plane_size);
@@ -552,7 +552,7 @@ AudioDecoderFfmpeg::decodeFrame(const std::uint8_t* input,
                 "data."), outputSize, inputSize);
         log_error(_("Upgrading ffmpeg/libavcodec might fix this issue."));
         outputSize = 0;
-        return NULL;
+        return nullptr;
     }
 
     // Resampling is needed.
diff --git a/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp 
b/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp
index ce80d89..0b0dc6c 100644
--- a/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp
@@ -30,7 +30,7 @@ namespace media {
 namespace ffmpeg {
 
 AudioResamplerFfmpeg::AudioResamplerFfmpeg()
-       :_context(NULL)
+       :_context(nullptr)
 {
 }
 AudioResamplerFfmpeg::~AudioResamplerFfmpeg() {
diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp 
b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
index 842f722..0550445 100644
--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
@@ -323,12 +323,12 @@ MediaParserFfmpeg::getBytesLoaded() const
 MediaParserFfmpeg::MediaParserFfmpeg(std::unique_ptr<IOChannel> stream)
        :
        MediaParser(std::move(stream)),
-       _inputFmt(0),
-       _formatCtx(0),
+       _inputFmt(nullptr),
+       _formatCtx(nullptr),
        _videoStreamIndex(-1),
-       _videoStream(0),
+       _videoStream(nullptr),
        _audioStreamIndex(-1),
-       _audioStream(0),
+       _audioStream(nullptr),
        _lastParsedPosition(0)
 {
        initializeParser();
@@ -376,7 +376,7 @@ MediaParserFfmpeg::initializeParser()
                  0, // write flags
                  this, // opaque pointer to pass to the callbacks
                  MediaParserFfmpeg::readPacketWrapper, // packet reader 
callback
-                 NULL, // packet writer callback
+                 nullptr, // packet writer callback
                  MediaParserFfmpeg::seekMediaWrapper // seeker callback
                  );
     
@@ -405,7 +405,7 @@ MediaParserFfmpeg::initializeParser()
 
     _formatCtx->pb = _avIOCxt;
 
-    if (avformat_open_input(&_formatCtx, "", _inputFmt, NULL) < 0)
+    if (avformat_open_input(&_formatCtx, "", _inputFmt, nullptr) < 0)
 #endif
     {
         throw IOException("MediaParserFfmpeg couldn't open input stream");
@@ -422,7 +422,7 @@ MediaParserFfmpeg::initializeParser()
 #else
     AVDictionary* md = _formatCtx->metadata;
     if (md) {
-        AVDictionaryEntry* tag = av_dict_get(md, "album", 0,
+        AVDictionaryEntry* tag = av_dict_get(md, "album", nullptr,
                 AV_DICT_MATCH_CASE);
 #endif
         if (tag && tag->value) {
diff --git a/libmedia/ffmpeg/VideoConverterFfmpeg.cpp 
b/libmedia/ffmpeg/VideoConverterFfmpeg.cpp
index 7a30d95..74aa55f 100644
--- a/libmedia/ffmpeg/VideoConverterFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoConverterFfmpeg.cpp
@@ -147,8 +147,8 @@ VideoConverterFfmpeg::convert(const ImgBuf& src)
     if (!_swsContext.get()) {
 
         _swsContext.reset(new SwsContextWrapper(sws_getContext(width, height,
-            src_pixFmt, width, height, dst_pixFmt, SWS_BILINEAR, NULL, NULL,
-            NULL)));
+            src_pixFmt, width, height, dst_pixFmt, SWS_BILINEAR, nullptr, 
nullptr,
+            nullptr)));
 
         if (!_swsContext->getContext()) {
 
@@ -162,7 +162,7 @@ VideoConverterFfmpeg::convert(const ImgBuf& src)
 #endif
 
 
-    AVPicture srcpicture = {{src.data, 0, 0, 0},
+    AVPicture srcpicture = {{src.data, nullptr, nullptr, nullptr},
         {static_cast<int>(src.stride[0]), 0, 0, 0}};
     
     
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
index cbd1920..d111e4f 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
@@ -50,7 +50,7 @@ namespace {
     VaapiContextFfmpeg* get_vaapi_context(AVCodecContext* avctx);
     void set_vaapi_context(AVCodecContext* avctx, VaapiContextFfmpeg* vactx);
     void clear_vaapi_context(AVCodecContext* avctx);
-    void reset_context(AVCodecContext* avctx, VaapiContextFfmpeg* vactx = 0);
+    void reset_context(AVCodecContext* avctx, VaapiContextFfmpeg* vactx = 
nullptr);
     PixelFormat get_format(AVCodecContext* avctx, const PixelFormat* fmt);
 #if LIBAVCODEC_VERSION_MAJOR >= 55
     int get_buffer(AVCodecContext* avctx, AVFrame* pic, int flags);
@@ -117,7 +117,7 @@ private:
 
 VideoDecoderFfmpeg::VideoDecoderFfmpeg(videoCodecType format, int width, int 
height)
     :
-    _videoCodec(NULL)
+    _videoCodec(nullptr)
 {
 
     CODECID codec_id = flashToFfmpegCodec(format);
@@ -127,7 +127,7 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(videoCodecType 
format, int width, int hei
 
 VideoDecoderFfmpeg::VideoDecoderFfmpeg(const VideoInfo& info)
     :
-    _videoCodec(NULL)
+    _videoCodec(nullptr)
 {
 
     CODECID codec_id = AV_CODEC_ID_NONE;
@@ -146,7 +146,7 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(const VideoInfo& 
info)
         throw MediaException(msg.str());
     }
 
-    std::uint8_t* extradata=0;
+    std::uint8_t* extradata=nullptr;
     int extradataSize=0;
     if (info.extra.get())
     {
@@ -218,7 +218,7 @@ VideoDecoderFfmpeg::init(enum CODECID codecId, int 
/*width*/, int /*height*/,
 #endif
 
 #if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
-    int ret = avcodec_open2(ctx, _videoCodec, NULL);
+    int ret = avcodec_open2(ctx, _videoCodec, nullptr);
 #else
     int ret = avcodec_open(ctx, _videoCodec);
 #endif
@@ -293,7 +293,7 @@ VideoDecoderFfmpeg::frameToImage(AVCodecContext* srcCtx,
 
         _swsContext.reset(new SwsContextWrapper(
             sws_getContext(width, height, srcPixFmt, width, height,
-                pixFmt, SWS_BILINEAR, NULL, NULL, NULL)
+                pixFmt, SWS_BILINEAR, nullptr, nullptr, nullptr)
         ));
         
         // Check that the context was assigned.
@@ -464,7 +464,7 @@ get_vaapi_context(AVCodecContext* avctx)
     return static_cast<VaapiContextFfmpeg *>(avctx->hwaccel_context);
 #else
     UNUSED(avctx);
-       return 0;
+       return nullptr;
 #endif
 }
 
@@ -501,7 +501,7 @@ reset_context(AVCodecContext* avctx, VaapiContextFfmpeg* 
vactx)
     set_vaapi_context(avctx, vactx);
 
     avctx->thread_count = 1;
-    avctx->draw_horiz_band = 0;
+    avctx->draw_horiz_band = nullptr;
     if (vactx) {
         avctx->slice_flags = SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD;
     }
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.h 
b/libmedia/ffmpeg/VideoDecoderFfmpeg.h
index f0ea97e..5d05810 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.h
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.h
@@ -84,7 +84,7 @@ private:
             const AVFrame& srcFrame);
 
     void init(enum CODECID format, int width, int height,
-            std::uint8_t* extradata=0, int extradataSize=0);
+            std::uint8_t* extradata=nullptr, int extradataSize=0);
 
     std::unique_ptr<image::GnashImage> decode(const std::uint8_t* input,
             std::uint32_t input_size);
diff --git a/libmedia/gst/AudioDecoderGst.cpp b/libmedia/gst/AudioDecoderGst.cpp
index 68811f9..ea275c9 100644
--- a/libmedia/gst/AudioDecoderGst.cpp
+++ b/libmedia/gst/AudioDecoderGst.cpp
@@ -32,7 +32,7 @@ namespace gst {
 AudioDecoderGst::AudioDecoderGst(SoundInfo& info)
 {
     // init GStreamer. TODO: what about doing this in MediaHandlerGst ctor?
-    gst_init (NULL, NULL);
+    gst_init (nullptr, nullptr);
 
     GstCaps* srccaps = gst_caps_new_simple ("audio/mpeg",
                "mpegversion", G_TYPE_INT, 1,
@@ -48,9 +48,9 @@ AudioDecoderGst::AudioDecoderGst(SoundInfo& info)
 AudioDecoderGst::AudioDecoderGst(const AudioInfo& info)
 {
     // init GStreamer. TODO: what about doing this in MediaHandlerGst ctor?
-    gst_init (NULL, NULL);
+    gst_init (nullptr, nullptr);
 
-    GstCaps* srccaps=0;
+    GstCaps* srccaps=nullptr;
 
     if (info.type == CODEC_TYPE_FLASH && info.codec == AUDIO_CODEC_MP3)
     {
@@ -225,7 +225,7 @@ AudioDecoderGst::pullBuffers(std::uint32_t&  outputSize)
   
     if (!outputSize) {
         log_debug(_("Pushed data, but there's nothing to pull (yet)"));
-        return 0;   
+        return nullptr;
     }
     
     std::uint8_t* rbuf = new std::uint8_t[outputSize];
@@ -261,7 +261,7 @@ AudioDecoderGst::decode(const std::uint8_t* input, 
std::uint32_t inputSize,
     bool success = swfdec_gst_decoder_push(&_decoder, gstbuf);
     if (!success) {
         log_error(_("AudioDecoderGst: buffer push failed."));
-        return 0;
+        return nullptr;
     }
 
     decodedData = inputSize;
@@ -289,7 +289,7 @@ AudioDecoderGst::decode(const EncodedAudioFrame& ef, 
std::uint32_t& outputSize)
     bool success = swfdec_gst_decoder_push(&_decoder, gstbuf);
     if (!success) {
         log_error(_("AudioDecoderGst: buffer push failed."));
-        return 0;
+        return nullptr;
     }
 
     return pullBuffers(outputSize);
diff --git a/libmedia/gst/AudioInputGst.cpp b/libmedia/gst/AudioInputGst.cpp
index 7f8887b..0f5217e 100644
--- a/libmedia/gst/AudioInputGst.cpp
+++ b/libmedia/gst/AudioInputGst.cpp
@@ -42,24 +42,24 @@ namespace media {
 namespace gst {
 
 GnashAudio::GnashAudio() {
-    _element = NULL;
-    _devLocation = NULL;
-    _gstreamerSrc = NULL;
-    _productName = NULL;
+    _element = nullptr;
+    _devLocation = nullptr;
+    _gstreamerSrc = nullptr;
+    _productName = nullptr;
 }
 
 GnashAudioPrivate::GnashAudioPrivate() {
-    audioSource = NULL;
-    audioEnc = NULL;
-    _audioDevice = NULL;
-    _deviceName = NULL;
-    _pipeline = NULL;
-    _audioMainBin = NULL;
-    _audioPlaybackBin = NULL;
-    _audioSourceBin = NULL;
-    _audioSaveBin = NULL;
+    audioSource = nullptr;
+    audioEnc = nullptr;
+    _audioDevice = nullptr;
+    _deviceName = nullptr;
+    _pipeline = nullptr;
+    _audioMainBin = nullptr;
+    _audioPlaybackBin = nullptr;
+    _audioSourceBin = nullptr;
+    _audioSaveBin = nullptr;
     _pipelineIsPlaying = false;
-    _mux = NULL;
+    _mux = nullptr;
 }
 
 AudioInputGst::AudioInputGst() 
@@ -73,7 +73,7 @@ AudioInputGst::AudioInputGst()
     _silenceTimeout(2000), 
     _useEchoSuppression(false)
 {
-    gst_init(NULL,NULL);
+    gst_init(nullptr,nullptr);
     
     findAudioDevs();
     
@@ -98,7 +98,7 @@ AudioInputGst::findAudioDevs()
     GstElement *element;
     element = gst_element_factory_make ("audiotestsrc", "audtestsrc");
     
-    if (element == NULL) {
+    if (element == nullptr) {
         log_error(_("%s: Could not create audio test source"), __FUNCTION__);
        return;
     } else {
@@ -112,7 +112,7 @@ AudioInputGst::findAudioDevs()
     //detect pulse audio sources
     GstPropertyProbe *probe;
     GValueArray *devarr;
-    element = NULL;
+    element = nullptr;
 
     element = gst_element_factory_make ("pulsesrc", "pulsesrc");
     if ( ! element ) {
@@ -126,9 +126,9 @@ AudioInputGst::findAudioDevs()
         return;
     }
     devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
-    for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
+    for (size_t i = 0; devarr != nullptr && i < devarr->n_values; ++i) {
         GValue *val;
-        gchar *dev_name = NULL;
+        gchar *dev_name = nullptr;
         
         val = g_value_array_get_nth (devarr, i);
         g_object_set (element, "device", g_value_get_string (val), NULL);
@@ -136,7 +136,7 @@ AudioInputGst::findAudioDevs()
         g_object_get (element, "device-name", &dev_name, NULL);
         gst_element_set_state (element, GST_STATE_NULL);
         if ((strcmp(dev_name, "null") == 0) ||
-                (std::strstr(dev_name, "Monitor") != NULL)) {
+                (std::strstr(dev_name, "Monitor") != nullptr)) {
             log_debug("No pulse audio input devices.");
         }
         else { 
@@ -195,7 +195,7 @@ AudioInputGst::getSelectedCaps(int devselect)
 
     GstElement *pipeline;
     gchar *command;
-    GError *error = NULL;
+    GError *error = nullptr;
     GstStateChangeReturn return_val;
     GstBus *bus;
     GstMessage *message;
@@ -206,11 +206,11 @@ AudioInputGst::getSelectedCaps(int devselect)
     command = g_strdup_printf ("%s name=src device=%s ! fakesink",
         data_struct->getGstreamerSrc(), data_struct->getDevLocation());
     pipeline = gst_parse_launch(command, &error);
-    if ((pipeline != NULL) && (error == NULL)) {
+    if ((pipeline != nullptr) && (error == nullptr)) {
         //Wait at most 5 seconds for the pipeline to start playing
         gst_element_set_state (pipeline, GST_STATE_PLAYING);
         return_val = 
-            gst_element_get_state (pipeline, NULL, NULL, 5 * GST_SECOND);
+            gst_element_get_state (pipeline, nullptr, nullptr, 5 * GST_SECOND);
         
         //errors on bus?
         bus = gst_element_get_bus (pipeline);
@@ -223,7 +223,7 @@ AudioInputGst::getSelectedCaps(int devselect)
                 __FUNCTION__);
         }
         //if everything above worked properly, begin probing for values
-        if ((return_val == GST_STATE_CHANGE_SUCCESS) && (message == NULL)) {
+        if ((return_val == GST_STATE_CHANGE_SUCCESS) && (message == nullptr)) {
             GstElement *src;
             GstPad *pad;
             GstCaps *caps;
@@ -273,7 +273,7 @@ AudioInputGst::transferToPrivate(int devselect) {
         exit (EXIT_FAILURE);
     }
     GnashAudioPrivate *audio = new GnashAudioPrivate;
-    if (audio != NULL) {
+    if (audio != nullptr) {
         audio->setAudioDevice(_audioVect[devselect]);
         audio->setDeviceName(_audioVect[devselect]->getProductName());
         _globalAudio = audio;
@@ -286,8 +286,8 @@ AudioInputGst::transferToPrivate(int devselect) {
 gboolean
 AudioInputGst::audioChangeSourceBin(GnashAudioPrivate *audio)
 {
-    GError *error = NULL;
-    gchar *command = NULL;
+    GError *error = nullptr;
+    gchar *command = nullptr;
     
     if (audio->_pipelineIsPlaying == true) {
         audioStop(audio);
@@ -295,10 +295,10 @@ AudioInputGst::audioChangeSourceBin(GnashAudioPrivate 
*audio)
     
     //delete the old source bin if necessary (please don't delete the == NULL
     //here as it breaks things.)
-    if (!(GST_ELEMENT_PARENT(audio->_audioSourceBin) == NULL)) {
+    if (!(GST_ELEMENT_PARENT(audio->_audioSourceBin) == nullptr)) {
         gst_bin_remove(GST_BIN(audio->_audioMainBin),
                 audio->_audioSourceBin);
-        audio->_audioSourceBin = NULL;
+        audio->_audioSourceBin = nullptr;
     }
     
     if (strcmp(audio->_deviceName, "audiotest") == 0) {
@@ -322,7 +322,7 @@ AudioInputGst::audioChangeSourceBin(GnashAudioPrivate 
*audio)
     
     audio->_audioSourceBin = gst_parse_bin_from_description(command, TRUE,
                                 &error);
-    if (audio->_audioSourceBin == NULL) {
+    if (audio->_audioSourceBin == nullptr) {
         log_error(_("%s: Creation of the audioSourceBin failed"),
             __FUNCTION__);
         log_error(_("the error was %s"), error->message);
@@ -356,8 +356,8 @@ AudioInputGst::audioChangeSourceBin(GnashAudioPrivate 
*audio)
 gboolean
 AudioInputGst::audioCreateSourceBin(GnashAudioPrivate *audio) 
 {
-    GError *error = NULL;
-    gchar *command = NULL;
+    GError *error = nullptr;
+    gchar *command = nullptr;
     if(strcmp(audio->_deviceName, "audiotest") == 0) {
         log_debug("%s: You don't have any mics chosen, using audiotestsrc",
             __FUNCTION__);
@@ -378,7 +378,7 @@ AudioInputGst::audioCreateSourceBin(GnashAudioPrivate 
*audio)
     
     audio->_audioSourceBin = gst_parse_bin_from_description(command, TRUE,
                                 &error);
-    if (audio->_audioSourceBin == NULL) {
+    if (audio->_audioSourceBin == nullptr) {
         log_error(_("%s: Creation of the audioSourceBin failed"),
             __FUNCTION__);
         log_error(_("the error was %s"), error->message);
@@ -408,16 +408,16 @@ AudioInputGst::audioCreateMainBin(GnashAudioPrivate 
*audio)
         log_error(_("%s: audioCreateSourceBin failed!"), __FUNCTION__);
         return false;
     }
-    if ((tee = gst_element_factory_make ("tee", "tee")) == NULL) {
+    if ((tee = gst_element_factory_make ("tee", "tee")) == nullptr) {
         log_error(_("%s: problem creating tee element"), __FUNCTION__);
         return false;
     }
-    if ((saveQueue = gst_element_factory_make("queue", "saveQueue")) == NULL) {
+    if ((saveQueue = gst_element_factory_make("queue", "saveQueue")) == 
nullptr) {
         log_error(_("%s: problem creating save_queue element"), __FUNCTION__);
         return false;
     }
     if ((audioPlaybackQueue = 
-        gst_element_factory_make("queue", "audioPlaybackQueue")) == NULL) {
+        gst_element_factory_make("queue", "audioPlaybackQueue")) == nullptr) {
         log_error(_("%s: problem creating audioPlaybackQueue element"), 
__FUNCTION__);
         return false;
     }
@@ -443,7 +443,7 @@ AudioInputGst::audioCreateMainBin(GnashAudioPrivate *audio)
    
     //add ghostpad to saveQueue (allows connections between bins)
     pad = gst_element_get_pad (saveQueue, "src");
-    if (pad == NULL) {
+    if (pad == nullptr) {
         log_error(_("%s: couldn't get saveQueueSrcPad"), __FUNCTION__);
         return false;
     }
@@ -453,7 +453,7 @@ AudioInputGst::audioCreateMainBin(GnashAudioPrivate *audio)
     
     //add ghostpad to video_display_queue
     pad = gst_element_get_pad (audioPlaybackQueue, "src");
-    if (pad == NULL) {
+    if (pad == nullptr) {
         log_error(_("%s: couldn't get audioPlaybackQueue"), __FUNCTION__);
         return false;
     }
@@ -479,7 +479,7 @@ AudioInputGst::audioCreatePlaybackBin(GnashAudioPrivate 
*audio)
     
     audio->_audioPlaybackBin = gst_bin_new("playbackBin");
     
-    if ((autosink = gst_element_factory_make ("autoaudiosink", "audiosink")) 
== NULL) {
+    if ((autosink = gst_element_factory_make ("autoaudiosink", "audiosink")) 
== nullptr) {
         log_error(_("%s: There was a problem making the audiosink!"), 
__FUNCTION__);
          return false;
     }
@@ -498,7 +498,7 @@ AudioInputGst::audioCreatePlaybackBin(GnashAudioPrivate 
*audio)
 gboolean
 AudioInputGst::makeAudioSourcePlaybackLink(GnashAudioPrivate *audio) 
 {
-    if (gst_bin_get_by_name(GST_BIN(audio->_pipeline), "playbackBin") == NULL) 
{
+    if (gst_bin_get_by_name(GST_BIN(audio->_pipeline), "playbackBin") == 
nullptr) {
         gst_object_ref(audio->_audioPlaybackBin);
         gst_bin_add(GST_BIN(audio->_pipeline), audio->_audioPlaybackBin);
     }
@@ -597,19 +597,19 @@ AudioInputGst::audioCreateSaveBin(GnashAudioPrivate* 
audio)
     
     audio->_audioSaveBin = gst_bin_new ("audioSaveBin");
     
-    if ((audioConvert = gst_element_factory_make("audioconvert", 
"audio_convert")) == NULL) {
+    if ((audioConvert = gst_element_factory_make("audioconvert", 
"audio_convert")) == nullptr) {
         log_error(_("%s: Couldn't make audioconvert element"), __FUNCTION__);
         return false;
     }
-    if ((audioEnc = gst_element_factory_make("vorbisenc", "audio_enc")) == 
NULL){
+    if ((audioEnc = gst_element_factory_make("vorbisenc", "audio_enc")) == 
nullptr){
         log_error(_("%s: Couldn't make vorbisenc element"), __FUNCTION__);
         return false;
     }
-    if ((audio->_mux = gst_element_factory_make("oggmux", "mux")) == NULL) {
+    if ((audio->_mux = gst_element_factory_make("oggmux", "mux")) == nullptr) {
         log_error(_("%s: Couldn't make oggmux element"), __FUNCTION__);
         return false;
     }
-    if ((filesink = gst_element_factory_make("filesink", "filesink")) == NULL) 
{
+    if ((filesink = gst_element_factory_make("filesink", "filesink")) == 
nullptr) {
         log_error(_("%s: Couldn't make filesink element"), __FUNCTION__);
         return false;
     } else {
@@ -639,7 +639,7 @@ AudioInputGst::audioCreateSaveBin(GnashAudioPrivate* audio)
 gboolean
 AudioInputGst::makeAudioSourceSaveLink (GnashAudioPrivate* audio) 
 {
-    if (gst_bin_get_by_name(GST_BIN(audio->_pipeline), "audioSaveBin") == 
NULL) {
+    if (gst_bin_get_by_name(GST_BIN(audio->_pipeline), "audioSaveBin") == 
nullptr) {
         gst_object_ref(audio->_audioSaveBin);
         gst_bin_add(GST_BIN(audio->_pipeline), audio->_audioSaveBin);
     }
diff --git a/libmedia/gst/GstUtil.cpp b/libmedia/gst/GstUtil.cpp
index 8fced8a..580bc11 100644
--- a/libmedia/gst/GstUtil.cpp
+++ b/libmedia/gst/GstUtil.cpp
@@ -58,8 +58,8 @@ GstElement* GstUtil::get_audiosink_element()
     
     if(sAudioSink.find('!') != std::string::npos) //Found a non-trivial 
pipeline - bin it
     {
-        element = gst_parse_bin_from_description(sAudioSink.c_str(), true, 
NULL);
-        if(element != NULL)
+        element = gst_parse_bin_from_description(sAudioSink.c_str(), true, 
nullptr);
+        if(element != nullptr)
         {
            std::ostringstream o;
            o << numGnashRcSinks++;
@@ -68,20 +68,20 @@ GstElement* GstUtil::get_audiosink_element()
     }
     else //Found a trivial pipeline that doesn't need a bin
     {
-        element = gst_element_factory_make(sAudioSink.c_str(), NULL);
+        element = gst_element_factory_make(sAudioSink.c_str(), nullptr);
     }
     
     if(!element)
     {
         log_debug(_("Unable to retrieve a valid audio sink from ~/.gnashrc"));
         
-        element = gst_element_factory_make("autoaudiosink", NULL);
+        element = gst_element_factory_make("autoaudiosink", nullptr);
         
         if(!element)
         {
             log_debug(_("Unable to retrieve a valid audio sink from 
autoaudiosink"));
             
-            element = gst_element_factory_make("gconfaudiosink", NULL);
+            element = gst_element_factory_make("gconfaudiosink", nullptr);
             
             if(!element)
                 log_error(_("Unable to retrieve a valid audio sink from 
gconfaudiosink\n%s"),
@@ -124,9 +124,9 @@ GstUtil::check_missing_plugins(GstCaps* caps)
         return false;
     }
 
-    char* details[] =  { detail, 0 };
+    char* details[] =  { detail, nullptr };
 
-    GstInstallPluginsReturn ret = gst_install_plugins_sync(details, NULL);
+    GstInstallPluginsReturn ret = gst_install_plugins_sync(details, nullptr);
     g_free(details[0]);
 
     // FIXME: what about partial success?
diff --git a/libmedia/gst/MediaHandlerGst.cpp b/libmedia/gst/MediaHandlerGst.cpp
index d87a2de..046f2a4 100644
--- a/libmedia/gst/MediaHandlerGst.cpp
+++ b/libmedia/gst/MediaHandlerGst.cpp
@@ -97,7 +97,7 @@ MediaHandlerGst::createVideoDecoder(const VideoInfo& info)
     int width = info.width;
     int height = info.height;
 
-    std::uint8_t* extradata = 0;
+    std::uint8_t* extradata = nullptr;
     size_t datasize = 0;
 
     ExtraVideoInfoFlv* extrainfo = 
dynamic_cast<ExtraVideoInfoFlv*>(info.extra.get());
diff --git a/libmedia/gst/MediaParserGst.cpp b/libmedia/gst/MediaParserGst.cpp
index 2cf1a6a..6fc6b15 100644
--- a/libmedia/gst/MediaParserGst.cpp
+++ b/libmedia/gst/MediaParserGst.cpp
@@ -40,20 +40,20 @@ namespace gst {
 
 MediaParserGst::MediaParserGst(std::unique_ptr<IOChannel> stream)
     : MediaParser(std::move(stream)),
-      _bin(NULL),
-      _srcpad(NULL),
-      _audiosink(NULL),
-      _videosink(NULL),
+      _bin(nullptr),
+      _srcpad(nullptr),
+      _audiosink(nullptr),
+      _videosink(nullptr),
       _demux_probe_ended(false)
 {
-    gst_init (NULL, NULL);
+    gst_init (nullptr, nullptr);
 
     _bin = gst_bin_new ("NULL");
     if (!_bin) {
         throw GnashException(_("MediaParserGst couldn't create a bin"));
     }
 
-    GstElement* typefind = gst_element_factory_make("typefind", NULL);
+    GstElement* typefind = gst_element_factory_make("typefind", nullptr);
     if (!typefind) {
         throw GnashException(_("MediaParserGst couldn't create a typefind 
element."));
     }
@@ -251,7 +251,7 @@ print_caps(GstCaps* caps)
 void
 MediaParserGst::link_to_fakesink(GstPad* pad)
 {
-    GstElement* fakesink = gst_element_factory_make("fakesink", NULL);
+    GstElement* fakesink = gst_element_factory_make("fakesink", nullptr);
     
     if (!fakesink) {
         throw MediaException(_("MediaParserGst Failed to create fakesink."));
@@ -380,7 +380,7 @@ void MediaParserGst::cb_pad_added(GstElement* /* element 
*/, GstPad* new_pad,
     
     bool already_parsed = parsed || framed;
     
-    GstPad* final_pad = 0;
+    GstPad* final_pad = nullptr;
     
     if (already_parsed) {
         final_pad = new_pad;
@@ -396,7 +396,7 @@ void MediaParserGst::cb_pad_added(GstElement* /* element 
*/, GstPad* new_pad,
             return;
         }
 
-        GstElement* parserel = gst_element_factory_create (parserfactory, 
NULL);
+        GstElement* parserel = gst_element_factory_create (parserfactory, 
nullptr);
         gst_object_unref (parserfactory);
         if (!parserel) {
             log_error(_("MediaParserGst: Failed to find a parser. We'll 
continue, "
@@ -523,7 +523,7 @@ MediaParserGst::cb_chain_func_video (GstPad *pad, GstBuffer 
*buffer)
         frame_num = GST_BUFFER_OFFSET(buffer);
     }
 
-    EncodedVideoFrame* frame = new EncodedVideoFrame(NULL, 
GST_BUFFER_SIZE(buffer), frame_num, timestamp);
+    EncodedVideoFrame* frame = new EncodedVideoFrame(nullptr, 
GST_BUFFER_SIZE(buffer), frame_num, timestamp);
 
     frame->extradata.reset(new EncodedExtraGstData(buffer));
     
diff --git a/libmedia/gst/VideoConverterGst.cpp 
b/libmedia/gst/VideoConverterGst.cpp
index 26c8916..7778b4c 100644
--- a/libmedia/gst/VideoConverterGst.cpp
+++ b/libmedia/gst/VideoConverterGst.cpp
@@ -30,9 +30,9 @@ namespace gst {
 VideoConverterGst::VideoConverterGst(ImgBuf::Type4CC srcFormat, 
ImgBuf::Type4CC dstFormat)
     : VideoConverter(srcFormat, dstFormat)
 {
-    _decoder.bin = 0;
+    _decoder.bin = nullptr;
 
-    gst_init (NULL, NULL);
+    gst_init (nullptr, nullptr);
     
     GstElementFactory* colorspacefactory = gst_element_factory_find 
("ffmpegcolorspace");
     if (!colorspacefactory) {
@@ -153,7 +153,7 @@ VideoConverterGst::convert(const ImgBuf& src)
     ret.reset(new ImgBuf(_dst_fmt, GST_BUFFER_DATA(retbuffer),
                          GST_BUFFER_SIZE(retbuffer), src.width, src.height));
 
-    GST_BUFFER_MALLOCDATA(retbuffer) = 0; // don't free
+    GST_BUFFER_MALLOCDATA(retbuffer) = nullptr; // don't free
     gst_buffer_unref(retbuffer);
     
     ret->dealloc = g_free;
diff --git a/libmedia/gst/VideoDecoderGst.cpp b/libmedia/gst/VideoDecoderGst.cpp
index 61a50f8..27d6a59 100644
--- a/libmedia/gst/VideoDecoderGst.cpp
+++ b/libmedia/gst/VideoDecoderGst.cpp
@@ -33,7 +33,7 @@ VideoDecoderGst::VideoDecoderGst(GstCaps* caps)
     _height(0)
 {
     // init GStreamer. TODO: what about doing this in MediaHandlerGst ctor?
-    gst_init (NULL, NULL);
+    gst_init (nullptr, nullptr);
 
     setup(caps);
 }
@@ -59,14 +59,14 @@ VideoDecoderGst::VideoDecoderGst(videoCodecType codec_type,
     _height(0)
 {
     // init GStreamer. TODO: what about doing this in MediaHandlerGst ctor?
-    gst_init (NULL, NULL);
+    gst_init (nullptr, nullptr);
 
   GstCaps* caps;  
   switch (codec_type) {
     case VIDEO_CODEC_H264:
     {
       caps = gst_caps_new_simple ("video/x-h264",
-                                      NULL);
+                                      nullptr);
 
       if (extradata && extradatasize) {
 
@@ -78,20 +78,20 @@ VideoDecoderGst::VideoDecoderGst(videoCodecType codec_type,
     } 
     case VIDEO_CODEC_H263:
       caps = gst_caps_new_simple ("video/x-flash-video",
-                                      NULL);
+                                      nullptr);
       break;
     case VIDEO_CODEC_VP6:
       caps = gst_caps_new_simple ("video/x-vp6-flash",
-                                      NULL);
+                                      nullptr);
       break;
     case VIDEO_CODEC_VP6A:
       caps = gst_caps_new_simple ("video/x-vp6-alpha",
-                                      NULL);
+                                      nullptr);
       break;      
     case VIDEO_CODEC_SCREENVIDEO:
     case VIDEO_CODEC_SCREENVIDEO2:
       caps = gst_caps_new_simple ("video/x-flash-screen",
-                                      NULL);
+                                      nullptr);
       break;
     case NO_VIDEO_CODEC:
       throw MediaException(_("Video codec is zero.  Streaming video expected 
later."));
diff --git a/libmedia/gst/VideoDecoderGst.h b/libmedia/gst/VideoDecoderGst.h
index b86e02c..193a309 100644
--- a/libmedia/gst/VideoDecoderGst.h
+++ b/libmedia/gst/VideoDecoderGst.h
@@ -41,7 +41,7 @@ class gnashGstBuffer : public image::ImageRGB
 {
 public:
   gnashGstBuffer(GstBuffer* buf, int width, int height)
-  : image::ImageRGB(NULL, width, height),
+  : image::ImageRGB(nullptr, width, height),
     _buffer(buf)
   {}
   
diff --git a/libmedia/gst/VideoInputGst.cpp b/libmedia/gst/VideoInputGst.cpp
index b68f598..82a319b 100644
--- a/libmedia/gst/VideoInputGst.cpp
+++ b/libmedia/gst/VideoInputGst.cpp
@@ -277,7 +277,7 @@ void
 VideoInputGst::getNames(std::vector<std::string>& names)
 {
     // Make sure gst is initialized
-    gst_init(NULL, NULL);
+    gst_init(nullptr, nullptr);
     
     std::vector<GnashWebcam*> cams;
     // Check for devices
@@ -305,7 +305,7 @@ VideoInputGst::VideoInputGst()
     _muted(true),
     _quality(0)
 {
-    gst_init(NULL,NULL);
+    gst_init(nullptr,nullptr);
     
     // TODO: there is really no need to store all the cameras, as a
     // VideoInput class should correspond to one camera.
@@ -365,7 +365,7 @@ VideoInputGst::findVidDevs(std::vector<GnashWebcam*>& 
cameraList)
     GstElement *element;
     element = gst_element_factory_make ("videotestsrc", "vidtestsrc");
     
-    if (element == NULL) {
+    if (element == nullptr) {
         log_error(_("%s: Could not create video test source."), __FUNCTION__);
        return;
     } else {
@@ -380,7 +380,7 @@ VideoInputGst::findVidDevs(std::vector<GnashWebcam*>& 
cameraList)
     //find v4l devices
     GstPropertyProbe *probe;
     GValueArray *devarr;
-    element = NULL;
+    element = nullptr;
     
     element = gst_element_factory_make ("v4lsrc", "v4lvidsrc");
     if ( ! element ) {
@@ -394,9 +394,9 @@ VideoInputGst::findVidDevs(std::vector<GnashWebcam*>& 
cameraList)
         return;
     }
     devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
-    for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
+    for (size_t i = 0; devarr != nullptr && i < devarr->n_values; ++i) {
         GValue *val;
-        gchar *dev_name = NULL;
+        gchar *dev_name = nullptr;
         
         val = g_value_array_get_nth (devarr, i);
         g_object_set (element, "device", g_value_get_string (val), NULL);
@@ -425,16 +425,16 @@ VideoInputGst::findVidDevs(std::vector<GnashWebcam*>& 
cameraList)
     }
     
     //find v4l2 devices
-    probe = NULL;
-    devarr = NULL;
-    element = NULL;
+    probe = nullptr;
+    devarr = nullptr;
+    element = nullptr;
     
     element = gst_element_factory_make ("v4l2src", "v4l2vidsrc");
     probe = GST_PROPERTY_PROBE (element);
     devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
-    for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
+    for (size_t i = 0; devarr != nullptr && i < devarr->n_values; ++i) {
         GValue *val;
-        gchar *dev_name = NULL;
+        gchar *dev_name = nullptr;
         
         val = g_value_array_get_nth (devarr, i);
         g_object_set (element, "device", g_value_get_string (val), NULL);
@@ -645,7 +645,7 @@ VideoInputGst::getSelectedCaps(gint dev_select)
 {
     GstElement *pipeline;
     gchar *command;
-    GError *error = NULL;
+    GError *error = nullptr;
     GstStateChangeReturn return_val;
     GstBus *bus;
     GstMessage *message;
@@ -669,11 +669,11 @@ VideoInputGst::getSelectedCaps(gint dev_select)
             data_struct->getGstreamerSrc(), data_struct->getDevLocation());
     }
     pipeline = gst_parse_launch(command, &error);
-    if ((pipeline != NULL) && (error == NULL)) {
+    if ((pipeline != nullptr) && (error == nullptr)) {
         //Wait at most 5 seconds for the pipeline to start playing
         gst_element_set_state (pipeline, GST_STATE_PLAYING);
         return_val = 
-            gst_element_get_state (pipeline, NULL, NULL, 5 * GST_SECOND);
+            gst_element_get_state (pipeline, nullptr, nullptr, 5 * GST_SECOND);
         
         //errors on bus?
         bus = gst_element_get_bus (pipeline);
@@ -687,7 +687,7 @@ VideoInputGst::getSelectedCaps(gint dev_select)
         }
         
         //if everything above worked properly, begin probing for values
-        if ((return_val == GST_STATE_CHANGE_SUCCESS) && (message == NULL)) {
+        if ((return_val == GST_STATE_CHANGE_SUCCESS) && (message == nullptr)) {
             GstElement *src;
             GstPad *pad;
             GstCaps *caps;
@@ -831,12 +831,12 @@ VideoInputGst::setWebcam(size_t dev_select)
 gboolean
 VideoInputGst::webcamCreateSourceBin() 
 {
-    GError *error = NULL;
-    gchar *command = NULL;
+    GError *error = nullptr;
+    gchar *command = nullptr;
     
     GnashWebcamPrivate* webcam = _globalWebcam;
 
-    if(webcam->_webcamDevice == NULL) {
+    if(webcam->_webcamDevice == nullptr) {
         log_debug("%s: You don't have any webcams chosen, using videotestsrc",
             __FUNCTION__);
         webcam->_webcamSourceBin = gst_parse_bin_from_description (
@@ -846,7 +846,7 @@ VideoInputGst::webcamCreateSourceBin()
             capsfilter name=capsfilter");
     }
     else {
-        WebcamVidFormat *format = NULL;
+        WebcamVidFormat *format = nullptr;
         
         std::ostringstream ss;
         ss << _width << 'x' << _height;
@@ -883,10 +883,10 @@ VideoInputGst::webcamCreateSourceBin()
         
         //if format isn't set, something is still going wrong, make generic
         //components and see if they work!
-        if (format == NULL) {
-            if (error != NULL) {
+        if (format == nullptr) {
+            if (error != nullptr) {
                 g_error_free (error);
-                error = NULL;
+                error = nullptr;
             }
             webcam->_webcamSourceBin = 
                 gst_parse_bin_from_description ("videotestsrc 
name=video_source",
@@ -896,7 +896,7 @@ VideoInputGst::webcamCreateSourceBin()
                 "video_source");
             
             //if there are still errors, something's up, return out of function
-            if (error != NULL) {
+            if (error != nullptr) {
                 g_error_free (error);
                 return false;
             }
@@ -927,7 +927,7 @@ VideoInputGst::webcamCreateSourceBin()
             
             webcam->_webcamSourceBin =
                 gst_parse_bin_from_description (command, TRUE, &error);
-            if (webcam->_webcamSourceBin == NULL) {
+            if (webcam->_webcamSourceBin == nullptr) {
                 log_error(_("%s: Creation of the webcam_source_bin failed"),
                     __FUNCTION__);
                 log_error(_("the error was %s"), error->message);
@@ -974,8 +974,8 @@ 
VideoInputGst::checkForSupportedFramerate(GnashWebcamPrivate *webcam,
 gboolean
 VideoInputGst::webcamChangeSourceBin() 
 {
-    GError *error = NULL;
-    gchar *command = NULL;
+    GError *error = nullptr;
+    gchar *command = nullptr;
     
     assert(_globalWebcam);
 
@@ -986,11 +986,11 @@ VideoInputGst::webcamChangeSourceBin()
     //delete the old source bin
     gst_bin_remove(GST_BIN(_globalWebcam->_webcamMainBin),
             _globalWebcam->_webcamSourceBin);
-    _globalWebcam->_webcamSourceBin = NULL;
+    _globalWebcam->_webcamSourceBin = nullptr;
     
     GnashWebcamPrivate* webcam = _globalWebcam;
     
-    if(webcam->_webcamDevice == NULL) {
+    if(webcam->_webcamDevice == nullptr) {
         log_debug("%s: You don't have any webcams chosen, using videotestsrc",
             __FUNCTION__);
         webcam->_webcamSourceBin = gst_parse_bin_from_description (
@@ -1000,7 +1000,7 @@ VideoInputGst::webcamChangeSourceBin()
             capsfilter name=capsfilter");
     }
     else {
-        WebcamVidFormat *format = NULL;
+        WebcamVidFormat *format = nullptr;
         
         std::ostringstream ss;
         ss << _width << 'x' << _height;
@@ -1056,10 +1056,10 @@ VideoInputGst::webcamChangeSourceBin()
         
         //if format isn't set, something is still going wrong, make generic
         //components and see if they work!
-        if (format == NULL) {
-            if (error != NULL) {
+        if (format == nullptr) {
+            if (error != nullptr) {
                 g_error_free (error);
-                error = NULL;
+                error = nullptr;
             }
             webcam->_webcamSourceBin = 
                 gst_parse_bin_from_description ("videotestsrc 
name=video_source",
@@ -1069,7 +1069,7 @@ VideoInputGst::webcamChangeSourceBin()
                 "video_source");
             
             //if there are still errors, something's up, return out of function
-            if (error != NULL) {
+            if (error != nullptr) {
                 g_error_free (error);
                 return false;
             }
@@ -1100,7 +1100,7 @@ VideoInputGst::webcamChangeSourceBin()
             
             webcam->_webcamSourceBin =
                 gst_parse_bin_from_description (command, TRUE, &error);
-            if (webcam->_webcamSourceBin == NULL) {
+            if (webcam->_webcamSourceBin == nullptr) {
                 log_error(_("%s: Creation of the webcam_source_bin failed"),
                     __FUNCTION__);
                 log_error(_("the error was %s"), error->message);
@@ -1172,16 +1172,16 @@ VideoInputGst::webcamCreateMainBin()
 
     assert(webcam->_webcamSourceBin);
     
-    if ((tee = gst_element_factory_make ("tee", "tee")) == NULL) {
+    if ((tee = gst_element_factory_make ("tee", "tee")) == nullptr) {
         log_error(_("%s: problem creating tee element"), __FUNCTION__);
         return false;
     }
-    if ((save_queue = gst_element_factory_make("queue", "save_queue")) == 
NULL) {
+    if ((save_queue = gst_element_factory_make("queue", "save_queue")) == 
nullptr) {
         log_error(_("%s: problem creating save_queue element"), __FUNCTION__);
         return false;
     }
     if ((video_display_queue = 
-        gst_element_factory_make("queue", "video_display_queue")) == NULL) {
+        gst_element_factory_make("queue", "video_display_queue")) == nullptr) {
         log_error(_("%s: problem creating video_display_queue element"),
                   __FUNCTION__);
         return false;
@@ -1214,7 +1214,7 @@ VideoInputGst::webcamCreateMainBin()
     
     //add ghostpad to save_queue (allows connections between bins)
     pad = gst_element_get_pad (save_queue, "src");
-    if (pad == NULL) {
+    if (pad == nullptr) {
         log_error(_("%s: couldn't get save_queue_src_pad"), __FUNCTION__);
         return false;
     }
@@ -1224,7 +1224,7 @@ VideoInputGst::webcamCreateMainBin()
     
     //add ghostpad to video_display_queue
     pad = gst_element_get_pad (video_display_queue, "src");
-    if (pad == NULL) {
+    if (pad == nullptr) {
         log_error(_("%s: couldn't get video_display_queue_pad"), __FUNCTION__);
         return false;
     }
@@ -1254,13 +1254,13 @@ VideoInputGst::webcamCreateDisplayBin()
     
     webcam->_videoDisplayBin = gst_bin_new("video_display_bin");
     
-    if (webcam->_videoDisplayBin == NULL) {
+    if (webcam->_videoDisplayBin == nullptr) {
         log_error(_("%s: something went wrong creating the new 
video_display_bin"),
             __FUNCTION__);
         return false;
     }
     
-    if ((video_scale = gst_element_factory_make("videoscale", "video_scale")) 
== NULL) {
+    if ((video_scale = gst_element_factory_make("videoscale", "video_scale")) 
== nullptr) {
         log_error(_("%s: problem creating video_scale element"), __FUNCTION__);
         return false;
     }
@@ -1269,7 +1269,7 @@ VideoInputGst::webcamCreateDisplayBin()
         g_object_set (video_scale, "method", 1, NULL);
     }
     
-    if ((video_sink = gst_element_factory_make("autovideosink", "video_sink")) 
== NULL) {
+    if ((video_sink = gst_element_factory_make("autovideosink", "video_sink")) 
== nullptr) {
         log_error(_("%s: problem creating the video_sink element"), 
__FUNCTION__);
         return false;
     }
@@ -1303,7 +1303,7 @@ VideoInputGst::webcamMakeVideoDisplayLink()
 
     GnashWebcamPrivate* webcam = _globalWebcam;
 
-    if (gst_bin_get_by_name(GST_BIN(webcam->_pipeline), "video_display_bin") 
== NULL) {
+    if (gst_bin_get_by_name(GST_BIN(webcam->_pipeline), "video_display_bin") 
== nullptr) {
         gst_object_ref(webcam->_videoDisplayBin);
         gst_bin_add (GST_BIN(webcam->_pipeline), webcam->_videoDisplayBin);
     }
@@ -1366,7 +1366,7 @@ VideoInputGst::webcamMakeVideoSaveLink()
 {
     GnashWebcamPrivate* webcam = _globalWebcam;
 
-    if (gst_bin_get_by_name(GST_BIN(webcam->_pipeline), "video_save_bin") == 
NULL) {
+    if (gst_bin_get_by_name(GST_BIN(webcam->_pipeline), "video_save_bin") == 
nullptr) {
         gst_object_ref(webcam->_videoSaveBin);
         gst_bin_add(GST_BIN(webcam->_pipeline), webcam->_videoSaveBin);
     }
@@ -1449,34 +1449,34 @@ VideoInputGst::webcamCreateSaveBin()
     
     if ((video_save_csp =
         gst_element_factory_make("ffmpegcolorspace", "video_save_csp"))
-            == NULL) {
+            == nullptr) {
         log_error(_("%s: problem with creating video_save_csp element"),
             __FUNCTION__);
         return false;
     }
-    if ((video_enc = gst_element_factory_make("theoraenc", "video_enc")) == 
NULL) {
+    if ((video_enc = gst_element_factory_make("theoraenc", "video_enc")) == 
nullptr) {
         log_error(_("%s: problem with creating video_enc element"), 
__FUNCTION__);
         return false;
     } else {
         g_object_set (video_enc, "keyframe-force", 1, NULL);
     }
     
-    if ((video_save_rate = gst_element_factory_make("videorate", 
"video_save_rate")) == NULL) {
+    if ((video_save_rate = gst_element_factory_make("videorate", 
"video_save_rate")) == nullptr) {
         log_error(_("%s: problem with creating video_save_rate element"), 
__FUNCTION__);
         return false;
     }
-    if ((video_save_scale = gst_element_factory_make("videoscale", 
"video_save_scale")) == NULL) {
+    if ((video_save_scale = gst_element_factory_make("videoscale", 
"video_save_scale")) == nullptr) {
         log_error(_("%s: problem with creating video_save_scale element"), 
__FUNCTION__);
         return false;
     } else {
         //Use bilinear scaling
         g_object_set (video_save_scale, "method", 1, NULL);
     }
-    if ((mux = gst_element_factory_make("oggmux", "mux")) == NULL) {
+    if ((mux = gst_element_factory_make("oggmux", "mux")) == nullptr) {
         log_error(_("%s: problem with creating mux element"), __FUNCTION__);
         return false;
     }
-    if ((webcam->_videoFileSink = gst_element_factory_make("filesink", 
"video_file_sink")) == NULL) {
+    if ((webcam->_videoFileSink = gst_element_factory_make("filesink", 
"video_file_sink")) == nullptr) {
         log_error(_("%s: problem with creating video_file_sink element"), 
__FUNCTION__);
         return false;
     } else {
@@ -1578,7 +1578,7 @@ WebcamVidFormat::WebcamVidFormat() {
     width = -1;
     height = -1;
     numFramerates = -1;
-    framerates = NULL;
+    framerates = nullptr;
 }
 
 /// Default constructor for the FramerateFraction class. This constructor 
prepares
@@ -1601,8 +1601,8 @@ FramerateFraction::FramerateFraction(gint num, gint 
denom) {
 /// structure for data that will come in later. Also creates a blank hash table
 /// and array.
 GnashWebcam::GnashWebcam() {
-    setElementPtr(NULL);
-    supportedResolutions = g_hash_table_new_full (g_str_hash, g_str_equal, 
g_free, NULL);
+    setElementPtr(nullptr);
+    supportedResolutions = g_hash_table_new_full (g_str_hash, g_str_equal, 
g_free, nullptr);
     videoFormats = g_array_new (FALSE, FALSE, sizeof (WebcamVidFormat));
     numVideoFormats = 0;
 }
@@ -1610,20 +1610,20 @@ GnashWebcam::GnashWebcam() {
 /// Constructor that initializes all GnashWebcamPrivate variables to have
 /// data dropped in later.
 GnashWebcamPrivate::GnashWebcamPrivate() {
-    _pipeline = NULL;
-    _webcamSourceBin = NULL;
-    _webcamMainBin = NULL;
-    _videoDisplayBin = NULL;
-    _videoSaveBin = NULL;
-    _videoSource = NULL;
-    _capsFilter = NULL;
-    _videoFileSink = NULL;
-    _videoEnc = NULL;
+    _pipeline = nullptr;
+    _webcamSourceBin = nullptr;
+    _webcamMainBin = nullptr;
+    _videoDisplayBin = nullptr;
+    _videoSaveBin = nullptr;
+    _videoSource = nullptr;
+    _capsFilter = nullptr;
+    _videoFileSink = nullptr;
+    _videoEnc = nullptr;
     
     _pipelineIsPlaying = false;
-    _webcamDevice = NULL;
+    _webcamDevice = nullptr;
        
-    _currentFormat = NULL;
+    _currentFormat = nullptr;
     _eosTimeoutId = 0;
 };
 
diff --git a/librender/GnashTexture.cpp b/librender/GnashTexture.cpp
index b4026f8..72c7403 100644
--- a/librender/GnashTexture.cpp
+++ b/librender/GnashTexture.cpp
@@ -80,7 +80,7 @@ static bool check_extension(const char *name, const char *ext)
     const char *end;
     int name_len, n;
 
-    if (name == NULL || ext == NULL)
+    if (name == nullptr || ext == nullptr)
         return false;
 
     end = ext + strlen(ext);
@@ -158,7 +158,7 @@ bool GnashTexture::init()
 
     glPixelStorei(GL_UNPACK_ALIGNMENT, internal_format() == GL_RGBA ? 4 : 1);
     glTexImage2D(GL_TEXTURE_2D, 0, internal_format(), _width, _height, 0,
-                 format(), GL_UNSIGNED_BYTE, NULL);
+                 format(), GL_UNSIGNED_BYTE, nullptr);
     release();
     return true;
 }
diff --git a/librender/agg/Renderer_agg.cpp b/librender/agg/Renderer_agg.cpp
index 83d7305..6b20151 100644
--- a/librender/agg/Renderer_agg.cpp
+++ b/librender/agg/Renderer_agg.cpp
@@ -333,7 +333,7 @@ public:
 
     AlphaMask(int width, int height)
         :
-        _rbuf(0, width, height, width),
+        _rbuf(nullptr, width, height, width),
         _pixf(_rbuf),
         _rbase(_pixf),
         _amask(_rbuf),
@@ -2065,7 +2065,7 @@ bool is_little_endian_host() {
 DSOEXPORT Renderer_agg_base*  create_Renderer_agg(const char *pixelformat)
 {
 
-  if (!pixelformat) return NULL;
+  if (!pixelformat) return nullptr;
 
   if (is_little_endian_host())
     log_debug("Framebuffer pixel format is %s (little-endian host)", 
pixelformat);
@@ -2115,11 +2115,11 @@ DSOEXPORT Renderer_agg_base*  create_Renderer_agg(const 
char *pixelformat)
 #endif
   {
       log_error(_("Unknown pixelformat: %s\n"), pixelformat);
-    return NULL;
+    return nullptr;
     //abort();
   }
   
-  return NULL; // avoid compiler warning
+  return nullptr; // avoid compiler warning
 }
 
 
@@ -2200,7 +2200,7 @@ DSOEXPORT const char *agg_detect_pixel_format(unsigned 
int rofs,
    
   }
   
-  return NULL; // unknown format
+  return nullptr; // unknown format
   
 }
 
diff --git a/librender/agg/Renderer_agg.h b/librender/agg/Renderer_agg.h
index fd5fdb0..e8c20d5 100644
--- a/librender/agg/Renderer_agg.h
+++ b/librender/agg/Renderer_agg.h
@@ -34,7 +34,7 @@ private:
     
 public:
     
-    Renderer_agg_base() : _testBuffer(0) { }  
+    Renderer_agg_base() : _testBuffer(nullptr) { }
     
     // virtual classes should have virtual destructors
     virtual ~Renderer_agg_base() {
@@ -53,7 +53,7 @@ public:
         int size = width * height * getBytesPerPixel();
         
         unsigned char *tmp = static_cast<unsigned char *>(realloc(_testBuffer, 
size));
-        if (tmp == NULL) {
+        if (tmp == nullptr) {
             log_error(_("Memory reallocation error"));
             return false;
         } else {
diff --git a/librender/cairo/PathParser.h b/librender/cairo/PathParser.h
index c6f4dc6..82df0b3 100644
--- a/librender/cairo/PathParser.h
+++ b/librender/cairo/PathParser.h
@@ -37,7 +37,7 @@ struct UnivocalPath
     FILL_LEFT
   };
   
-  UnivocalPath() : _path(NULL), _fill_type(FILL_LEFT) {}
+  UnivocalPath() : _path(nullptr), _fill_type(FILL_LEFT) {}
 
   UnivocalPath(const Path* path, fill_type filltype)
     : _path(path),
diff --git a/librender/cairo/Renderer_cairo.cpp 
b/librender/cairo/Renderer_cairo.cpp
index ba25e5c..9253ed2 100644
--- a/librender/cairo/Renderer_cairo.cpp
+++ b/librender/cairo/Renderer_cairo.cpp
@@ -266,7 +266,7 @@ struct StyleHandler : 
boost::static_visitor<cairo_pattern_t*>
             }
         }
         // We should never get here.
-        return 0;
+        return nullptr;
     }
 
     cairo_pattern_t* operator()(const SolidFill& f) const {
@@ -344,7 +344,7 @@ public:
   : PathParser(paths, FillStyles.size()),
     _renderer(renderer),
     _cr(context),
-    _pattern(0),
+    _pattern(nullptr),
     _FillStyles(FillStyles)
   {
   }
@@ -371,7 +371,7 @@ public:
     // Surfaces are owned by const bitmap_info_cairo
     if (cairo_pattern_get_type(_pattern) != CAIRO_PATTERN_TYPE_SURFACE) {
       cairo_pattern_destroy(_pattern);
-      _pattern = 0;
+      _pattern = nullptr;
     }
   }
 
@@ -450,7 +450,7 @@ Renderer_cairo::Renderer_cairo()
     : _video_bufsize(0),
       _drawing_mask(false)
 {    
-    _cr = cairo_create(NULL);
+    _cr = cairo_create(nullptr);
     cairo_matrix_init_scale(&_stage_mat, 1/20.0f, 1/20.0f);
 }
   
diff --git a/librender/cairo/Renderer_cairo.h b/librender/cairo/Renderer_cairo.h
index 27f7674..b69d9b6 100644
--- a/librender/cairo/Renderer_cairo.h
+++ b/librender/cairo/Renderer_cairo.h
@@ -59,7 +59,7 @@ public:
     void set_invalidated_regions(const InvalidatedRanges& ranges);
       
     virtual Renderer* startInternalRender(image::GnashImage& /*im*/) {
-        return 0;
+        return nullptr;
     }
 
     virtual void endInternalRender() {}
diff --git a/librender/opengl/Renderer_ogl.cpp 
b/librender/opengl/Renderer_ogl.cpp
index 7e12fda..1885920 100644
--- a/librender/opengl/Renderer_ogl.cpp
+++ b/librender/opengl/Renderer_ogl.cpp
@@ -957,7 +957,7 @@ private:
 public:
       
     virtual Renderer* startInternalRender(image::GnashImage& /*im*/) {
-        return 0;
+        return nullptr;
     }
 
     virtual void endInternalRender() {}
@@ -1296,7 +1296,7 @@ public:
 
     if (target_x == to_connect.ap.x &&
         target_y == to_connect.ap.y) {
-      return NULL;
+      return nullptr;
     }
   
     for (std::list<const Path*>::const_iterator it = path_refs.begin(), end = 
path_refs.end();
@@ -1320,7 +1320,7 @@ public:
     }
   
   
-    return NULL;  
+    return nullptr;
   }
   
   PathVec normalize_paths(const PathVec &paths)
diff --git a/libsound/NullSoundHandler.h b/libsound/NullSoundHandler.h
index 518c6cc..ac4d4b2 100644
--- a/libsound/NullSoundHandler.h
+++ b/libsound/NullSoundHandler.h
@@ -39,7 +39,7 @@ public:
 
     sound_handler* _mixer;
 
-    NullSoundHandler(media::MediaHandler* m, sound_handler* mixer=0)
+    NullSoundHandler(media::MediaHandler* m, sound_handler* mixer=nullptr)
         :
         sound_handler(m),
         _mixer(mixer)
diff --git a/libsound/sdl/sound_handler_sdl.cpp 
b/libsound/sdl/sound_handler_sdl.cpp
index e379e1a..57ee6ea 100644
--- a/libsound/sdl/sound_handler_sdl.cpp
+++ b/libsound/sdl/sound_handler_sdl.cpp
@@ -86,7 +86,7 @@ SDL_sound_handler::openAudio()
     //512 - not enough for  videostream
     audioSpec.samples = 1024;   
 
-    if (SDL_OpenAudio(&audioSpec, NULL) < 0) {
+    if (SDL_OpenAudio(&audioSpec, nullptr) < 0) {
             boost::format fmt = boost::format(_("Couldn't open SDL audio: %s"))
                 % SDL_GetError();
         throw SoundException(fmt.str());
diff --git a/libsound/sound_handler.cpp b/libsound/sound_handler.cpp
index 6c6fe48..33516d3 100644
--- a/libsound/sound_handler.cpp
+++ b/libsound/sound_handler.cpp
@@ -156,7 +156,7 @@ sound_handler::delete_sound(int handle)
     
     stopEmbedSoundInstances(*def);
     delete def;
-    _sounds[handle] = 0;
+    _sounds[handle] = nullptr;
 
 }
 
@@ -204,7 +204,7 @@ sound_handler::get_sound_info(int handle) const
     if (validHandle(_streamingSounds, handle)) {
         return &_streamingSounds[handle]->soundinfo;
     } 
-    return 0;
+    return nullptr;
 }
 
 void
@@ -644,7 +644,7 @@ sound_handler::fetchSamples(std::int16_t* to, unsigned int 
nSamples)
 void
 sound_handler::setAudioDump(const std::string& wavefile)
 {
-    bool wasDumping = (_wavWriter.get() != 0);
+    bool wasDumping = (_wavWriter.get() != nullptr);
 
     if (!wavefile.empty()) {
         _wavWriter.reset(new WAVWriter(wavefile));
diff --git a/plugin/npapi/external.cpp b/plugin/npapi/external.cpp
index e70bbe0..a1c199e 100644
--- a/plugin/npapi/external.cpp
+++ b/plugin/npapi/external.cpp
@@ -294,10 +294,10 @@ ExternalInterface::parseXML(const std::string &xml)
             end = xml.find("</number>");
             std::string str = xml.substr(start, end-start);
             if (str.find(".") != std::string::npos) {
-                double num = strtod(str.c_str(), NULL);
+                double num = strtod(str.c_str(), nullptr);
                 DOUBLE_TO_NPVARIANT(num, value);
             } else {
-                int num = strtol(str.c_str(), NULL, 0);
+                int num = strtol(str.c_str(), nullptr, 0);
                 INT32_TO_NPVARIANT(num, value);
             }
         } else if (tag == "<string>") {
@@ -323,7 +323,7 @@ ExternalInterface::parseXML(const std::string &xml)
               for (it=props.begin(); it != props.end(); ++it) {
                   NPIdentifier id = NPN_GetStringIdentifier(it->first.c_str());
                   GnashNPVariant& value = it->second;
-                  NPN_SetProperty(NULL, obj, id, &value.get());
+                  NPN_SetProperty(nullptr, obj, id, &value.get());
               }
               OBJECT_TO_NPVARIANT(obj, value);
             }
@@ -339,7 +339,7 @@ ExternalInterface::parseXML(const std::string &xml)
               for (it=props.begin(); it != props.end(); ++it) {
                   NPIdentifier id = NPN_GetStringIdentifier(it->first.c_str());
                   GnashNPVariant& value = it->second;
-                  NPN_SetProperty(NULL, obj, id, &value.get());
+                  NPN_SetProperty(nullptr, obj, id, &value.get());
               }
               OBJECT_TO_NPVARIANT(obj, value);
             }
diff --git a/plugin/npapi/mozilla-sdk/np_entry.cpp 
b/plugin/npapi/mozilla-sdk/np_entry.cpp
index 35f4b0c..5573ff5 100644
--- a/plugin/npapi/mozilla-sdk/np_entry.cpp
+++ b/plugin/npapi/mozilla-sdk/np_entry.cpp
@@ -43,7 +43,7 @@ NP_Shutdown()
 NPError
 fillPluginFunctionTable(NPPluginFuncs* aNPPFuncs)
 {
-    if(aNPPFuncs == NULL) {
+    if(aNPPFuncs == nullptr) {
         return NPERR_INVALID_FUNCTABLE_ERROR;
     }
     
@@ -93,7 +93,7 @@ fillNetscapeFunctionTable(NPNetscapeFuncs* aNPNFuncs)
 {
     int i = 0, n;
     
-    if(aNPNFuncs == NULL) {
+    if(aNPNFuncs == nullptr) {
         return NPERR_INVALID_FUNCTABLE_ERROR;
     }
     
diff --git a/plugin/npapi/mozilla-sdk/npn_gate.cpp 
b/plugin/npapi/mozilla-sdk/npn_gate.cpp
index ef41572..3778ebe 100644
--- a/plugin/npapi/mozilla-sdk/npn_gate.cpp
+++ b/plugin/npapi/mozilla-sdk/npn_gate.cpp
@@ -165,7 +165,7 @@ NPN_Status(NPP instance, const char *message)
 const char *
 NPN_UserAgent(NPP instance)
 {
-    const char * rv = NULL;
+    const char * rv = nullptr;
     rv = NPNFuncs.uagent(instance);
     return rv;
 }
@@ -173,7 +173,7 @@ NPN_UserAgent(NPP instance)
 void *
 NPN_MemAlloc(uint32_t size)
 {
-    void * rv = NULL;
+    void * rv = nullptr;
     rv = NPNFuncs.memalloc(size);
     return rv;
 }
diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index 642a6e7..cebee7b 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -147,10 +147,10 @@ static const char* getPluginDescription();
 static const char*
 getPluginDescription() 
 {
-    static const char* desc = NULL;
+    static const char* desc = nullptr;
     if (!desc) {
         desc = std::getenv("GNASH_PLUGIN_DESCRIPTION");
-        if (desc == NULL) desc = PLUGIN_DESCRIPTION;
+        if (desc == nullptr) desc = PLUGIN_DESCRIPTION;
     }
     return desc;
 }
@@ -215,7 +215,7 @@ NS_PluginInitialize()
     // First, check for XEmbed support. The NPAPI Gnash plugin
     // only works with XEmbed, so tell the plugin API to fail if
     // XEmbed is not found.
-    err = NPN_GetValue(NULL,NPNVSupportsXEmbedBool,
+    err = NPN_GetValue(nullptr,NPNVSupportsXEmbedBool,
                        (void *)&supportsXEmbed);
 
     if (err != NPERR_NO_ERROR || !supportsXEmbed) {
@@ -228,7 +228,7 @@ NS_PluginInitialize()
     // GTK is not strictly required, but we do use the Glib main event loop,
     // so lack of GTK means reduced functionality.
     NPNToolkitType toolkit;
-    err = NPN_GetValue(NULL, NPNVToolkit, &toolkit);
+    err = NPN_GetValue(nullptr, NPNVToolkit, &toolkit);
 
     if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2) {
         gnash::log_error("NPAPI ERROR: No GTK2 support in this browser! Have 
version %d", (int)toolkit);
@@ -240,7 +240,7 @@ NS_PluginInitialize()
     Check for environment variables.
     */
     char* opts = std::getenv("GNASH_OPTIONS");
-    if (opts != NULL) {
+    if (opts != nullptr) {
         gnash::log_debug("GNASH_OPTIONS: %s", opts);
         
         // Should the plugin wait for gdb to be attached?
@@ -265,7 +265,7 @@ NS_PluginInitialize()
     newGnashRc.append("/gnashpluginrc");
 #endif
 
-    const char *home = NULL;
+    const char *home = nullptr;
 #if defined(__amigaos4__)
     //on AmigaOS we have a GNASH: assign that point to program dir
     home = "/gnash";
@@ -398,7 +398,7 @@ NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
     // gnash::log_debug(__PRETTY_FUNCTION__);
 
     if(!aCreateDataStruct) {
-        return NULL;
+        return nullptr;
     }
 
     return new gnash::nsPluginInstance(aCreateDataStruct);
diff --git a/plugin/npapi/pluginScriptObject.cpp 
b/plugin/npapi/pluginScriptObject.cpp
index caa58fc..e40665b 100644
--- a/plugin/npapi/pluginScriptObject.cpp
+++ b/plugin/npapi/pluginScriptObject.cpp
@@ -247,7 +247,7 @@ GnashPluginScriptObject::initializeIdentifiers()
 
 // Constructor
 GnashPluginScriptObject::GnashPluginScriptObject()
-    : _nppinstance (0),
+    : _nppinstance (nullptr),
       _controlfd(-1),
       _hostfd(-1)
 {
diff --git a/utilities/findmicrophones.cpp b/utilities/findmicrophones.cpp
index 4849f2d..ff12763 100644
--- a/utilities/findmicrophones.cpp
+++ b/utilities/findmicrophones.cpp
@@ -48,8 +48,8 @@ class data {
 };
 
 data::data() {
-    deviceName = NULL;
-    deviceType = NULL;
+    deviceName = nullptr;
+    deviceType = nullptr;
 };
 
 gint findAudioDevs(std::vector<data*>& audioVect) {
@@ -59,8 +59,8 @@ gint findAudioDevs(std::vector<data*>& audioVect) {
     GstElement *element;
     element = gst_element_factory_make ("audiotestsrc", "audiotestsrc");
     
-    if (element == NULL) {
-        audioVect.push_back(NULL);
+    if (element == nullptr) {
+        audioVect.push_back(nullptr);
         numdevs += 1;
     } else {
         audioVect.push_back(new data);
@@ -72,14 +72,14 @@ gint findAudioDevs(std::vector<data*>& audioVect) {
     //pulseaudio src
     GstPropertyProbe *probe;
     GValueArray *devarr;
-    element = NULL;
+    element = nullptr;
     
     element = gst_element_factory_make ("pulsesrc", "pulsesrc");
     probe = GST_PROPERTY_PROBE (element);
     devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
-    for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
+    for (size_t i = 0; devarr != nullptr && i < devarr->n_values; ++i) {
         GValue *val;
-        gchar *dev_name = NULL;
+        gchar *dev_name = nullptr;
         
         val = g_value_array_get_nth (devarr, i);
         g_object_set (element, "device", g_value_get_string (val), NULL);
@@ -89,7 +89,7 @@ gint findAudioDevs(std::vector<data*>& audioVect) {
         if (strcmp(dev_name, "null") == 0) {
             g_print("no pulse audio sources found\n");
         }
-        else if ((strstr(dev_name, "Monitor") != NULL)) {
+        else if ((strstr(dev_name, "Monitor") != nullptr)) {
             g_print("ignoring monitor (audio output)");
         }
         else { 
@@ -107,7 +107,7 @@ gint findAudioDevs(std::vector<data*>& audioVect) {
 
 int main () {
     //initialize gstreamer to probe for devs
-    gst_init(NULL, NULL);
+    gst_init(nullptr, nullptr);
     gint numdevs = 0;
     std::vector<data*> audioVector;
     gint i;
@@ -120,9 +120,9 @@ int main () {
         g_print("\nFound %d audio input devices: \n\n", numdevs);
         for (i = 0; i < numdevs; ++i)
         {
-            if (i == 0 && (audioVector[i] != 0)) {
+            if (i == 0 && (audioVector[i] != nullptr)) {
                 g_print("%d. device[%d] = Audio Test Source (audiotestsrc)\n", 
i, i);
-            } else if (i == 0 && (audioVector[i] == 0)) {
+            } else if (i == 0 && (audioVector[i] == nullptr)) {
                 g_print("no test audio device available\n");
             } else {
                 g_print("%d. device[%d] = %s (%s)\n", i, i, 
audioVector[i]->deviceName,
diff --git a/utilities/findwebcams.cpp b/utilities/findwebcams.cpp
index f3ba993..e3bcf63 100644
--- a/utilities/findwebcams.cpp
+++ b/utilities/findwebcams.cpp
@@ -45,8 +45,8 @@ class data {
 };
 
 data::data() {
-    deviceName = NULL;
-    deviceType = NULL;
+    deviceName = nullptr;
+    deviceType = nullptr;
     deviceNumber = -1;
     duplicate = false;
 };
@@ -60,8 +60,8 @@ size_t findVidDevs(std::vector<data*>& vidVect) {
     GstElement *element;
     element = gst_element_factory_make ("videotestsrc", "vidtestsrc");
     
-    if (element == NULL) {
-        vidVect.push_back(NULL);
+    if (element == nullptr) {
+        vidVect.push_back(nullptr);
         numdevs += 1;
     } else {
         vidVect.push_back(new data);
@@ -74,14 +74,14 @@ size_t findVidDevs(std::vector<data*>& vidVect) {
     //video4linux source
     GstPropertyProbe *probe;
     GValueArray *devarr;
-    element = NULL;
+    element = nullptr;
     
     element = gst_element_factory_make ("v4lsrc", "v4lvidsrc");
     probe = GST_PROPERTY_PROBE (element);
     devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
-    for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
+    for (size_t i = 0; devarr != nullptr && i < devarr->n_values; ++i) {
         GValue *val;
-        gchar *dev_name = NULL;
+        gchar *dev_name = nullptr;
         
         val = g_value_array_get_nth (devarr, i);
         g_object_set (element, "device", g_value_get_string (val), NULL);
@@ -105,16 +105,16 @@ size_t findVidDevs(std::vector<data*>& vidVect) {
     
     
     //video4linux2 source
-    probe = NULL;
-    element = NULL;
-    devarr = NULL;
+    probe = nullptr;
+    element = nullptr;
+    devarr = nullptr;
     
     element = gst_element_factory_make ("v4l2src", "v4l2vidsrc");
     probe = GST_PROPERTY_PROBE (element);
     devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
-    for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
+    for (size_t i = 0; devarr != nullptr && i < devarr->n_values; ++i) {
         GValue *val;
-        gchar *dev_name = NULL;
+        gchar *dev_name = nullptr;
         
         val = g_value_array_get_nth (devarr, i);
         g_object_set (element, "device", g_value_get_string (val), NULL);
@@ -149,7 +149,7 @@ size_t findVidDevs(std::vector<data*>& vidVect) {
 
 int main () {
     //initialize gstreamer to probe for devs
-    gst_init(NULL, NULL);
+    gst_init(nullptr, nullptr);
     size_t numdevs = 0;
     std::vector<data*> vidVector;
     
@@ -177,11 +177,11 @@ int main () {
         gint counter = 0;
         for (size_t i = 0; i < numdevs; ++i)
         {
-            if (i == 0 && (vidVector[i] != 0)) {
+            if (i == 0 && (vidVector[i] != nullptr)) {
                 std::cout << "    " << i
                      << ". Video Test Source (videotestsrc)" << std::endl;
                 counter++;
-            } else if (i == 0 && (vidVector[i] == 0)) {
+            } else if (i == 0 && (vidVector[i] == nullptr)) {
                 std::cout << "no test video device available";
             } else {
                 if (vidVector[i]->duplicate != true) {
diff --git a/utilities/soldumper.cpp b/utilities/soldumper.cpp
index dfba4ab..cace760 100644
--- a/utilities/soldumper.cpp
+++ b/utilities/soldumper.cpp
@@ -163,19 +163,19 @@ main(int argc, char *argv[])
         } else {
             dirname = rcfile.getSOLSafeDir().c_str();
         }
-        DIR *library_dir = NULL;
+        DIR *library_dir = nullptr;
         library_dir = opendir (dirname);
-        if (library_dir != NULL) {
+        if (library_dir != nullptr) {
             // By convention, the first two entries in each directory are
             // for . and .. (``dot'' and ``dot dot''), so we ignore those. The
             // next directory read will get a real file, if any exists.
             entry = readdir(library_dir);
             entry = readdir(library_dir);
         }
-        if (library_dir != NULL) {
+        if (library_dir != nullptr) {
             for (i=0; entry>static_cast<struct dirent *>(0); i++) {
                 entry = readdir(library_dir);
-                if (entry != NULL) {
+                if (entry != nullptr) {
                     //string::size_type pos;
                     if (strstr(entry->d_name, ".sol")) {
                         cout << "Found SOL: " << entry->d_name << endl;

-----------------------------------------------------------------------

Summary of changes:
 cygnal/cgi-bin/oflaDemo/oflaDemo.cpp               |    2 +-
 cygnal/http_server.cpp                             |   10 +-
 cygnal/libamf/amf.cpp                              |   12 +-
 cygnal/libamf/buffer.cpp                           |   10 +-
 cygnal/libamf/element.cpp                          |   30 +++---
 cygnal/libamf/lcshm.cpp                            |   22 ++--
 cygnal/libamf/sol.cpp                              |    4 +-
 cygnal/libnet/diskstream.cpp                       |   46 ++++----
 cygnal/libnet/http.cpp                             |   10 +-
 cygnal/libnet/lirc.cpp                             |    4 +-
 cygnal/libnet/network.cpp                          |   30 +++---
 cygnal/libnet/rtmp.cpp                             |   30 +++---
 cygnal/libnet/rtmp_client.cpp                      |    6 +-
 cygnal/libnet/rtmp_msg.cpp                         |    2 +-
 cygnal/proc.cpp                                    |    4 +-
 cygnal/rtmp_server.cpp                             |   18 ++--
 extensions/fileio/fileio.cpp                       |    6 +-
 extensions/mysql/mysql_db.cpp                      |   18 ++--
 gui/Player.cpp                                     |    8 +-
 gui/dump/dump.cpp                                  |    2 +-
 gui/fb/fb.cpp                                      |    4 +-
 gui/fb/fb_glue_agg.cpp                             |   10 +-
 gui/gnash.cpp                                      |    2 +-
 gui/gtk/gtk.cpp                                    |   50 ++++----
 gui/gtk/gtk_canvas.cpp                             |    4 +-
 gui/gtk/gtk_glue.h                                 |    2 +-
 gui/gtk/gtk_glue_agg.cpp                           |    6 +-
 gui/gtk/gtk_glue_cairo.cpp                         |   24 ++--
 gui/gtk/gtk_glue_gtkglext.cpp                      |    6 +-
 gui/gui.cpp                                        |   10 +-
 gui/pythonmod/gnash-view.cpp                       |   44 ++++----
 gui/qt/Qt4Glue.h                                   |    2 +-
 gui/qt/Qt4GlueAgg.cpp                              |    2 +-
 gui/qt/Qt4GlueCairo.cpp                            |    6 +-
 gui/qt/Qt4GlueOgl.cpp                              |    2 +-
 gui/sdl/sdl_agg_glue.cpp                           |   10 +-
 gui/sdl/sdl_cairo_glue.cpp                         |   14 +-
 libbase/ClockTime.cpp                              |    2 +-
 libbase/GC.cpp                                     |    2 +-
 libbase/GnashFactory.h                             |    4 +-
 libbase/GnashImageGif.cpp                          |    2 +-
 libbase/GnashImageJpeg.cpp                         |   10 +-
 libbase/GnashImagePng.cpp                          |   22 ++--
 libbase/GnashSleep.h                               |    2 +-
 libbase/NetworkAdapter.cpp                         |    6 +-
 libbase/RTMP.cpp                                   |    4 +-
 libbase/SharedMem.cpp                              |    6 +-
 libbase/Socket.cpp                                 |    8 +-
 libbase/URL.cpp                                    |    2 +-
 libbase/arg_parser.cpp                             |    2 +-
 libbase/extension.cpp                              |    2 +-
 libbase/log.cpp                                    |    2 +-
 libbase/log.h                                      |    2 +-
 libbase/memory.cpp                                 |    4 +-
 libbase/noseek_fd_adapter.cpp                      |    6 +-
 libbase/noseek_fd_adapter.h                        |    2 +-
 libbase/rc.cpp                                     |    6 +-
 libbase/sharedlib.cpp                              |   16 ++--
 libbase/tree.hh                                    |  116 +++++++++---------
 libbase/tu_file.cpp                                |    2 +-
 libbase/utf8.cpp                                   |    2 +-
 libbase/utility.h                                  |    2 +-
 libbase/zlib_adapter.cpp                           |    4 +-
 libcore/AMFConverter.cpp                           |    2 +-
 libcore/Bitmap.cpp                                 |    6 +-
 libcore/Bitmap.h                                   |    2 +-
 libcore/BitmapMovie.cpp                            |    2 +-
 libcore/Button.cpp                                 |   18 ++--
 libcore/Button.h                                   |    2 +-
 libcore/CharacterProxy.cpp                         |    4 +-
 libcore/DisplayList.cpp                            |    6 +-
 libcore/DisplayObject.cpp                          |   34 +++---
 libcore/DisplayObject.h                            |   14 +-
 libcore/DragState.h                                |    2 +-
 libcore/DynamicShape.cpp                           |    6 +-
 libcore/ExternalInterface.cpp                      |    2 +-
 libcore/FillStyle.cpp                              |    6 +-
 libcore/Font.cpp                                   |    6 +-
 libcore/FreetypeGlyphsProvider.cpp                 |   14 +-
 libcore/Function.cpp                               |    4 +-
 libcore/Function2.cpp                              |    4 +-
 libcore/InteractiveObject.h                        |    2 +-
 libcore/LoadVariablesThread.h                      |    2 +-
 libcore/MouseButtonState.h                         |    4 +-
 libcore/Movie.h                                    |    2 +-
 libcore/MovieClip.cpp                              |   44 ++++----
 libcore/MovieClip.h                                |    4 +-
 libcore/MovieFactory.cpp                           |    4 +-
 libcore/MovieFactory.h                             |    4 +-
 libcore/MovieLoader.cpp                            |    6 +-
 libcore/MovieLoader.h                              |    4 +-
 libcore/PropertyList.cpp                           |    6 +-
 libcore/SWFMovie.cpp                               |    4 +-
 libcore/SWFMovie.h                                 |    2 +-
 libcore/StaticText.cpp                             |    2 +-
 libcore/TextField.cpp                              |   34 +++---
 libcore/Timers.cpp                                 |    2 +-
 libcore/Video.cpp                                  |    2 +-
 libcore/Video.h                                    |    2 +-
 libcore/as_environment.cpp                         |   28 ++--
 libcore/as_environment.h                           |    4 +-
 libcore/as_function.cpp                            |    2 +-
 libcore/as_object.cpp                              |   38 +++---
 libcore/as_object.h                                |    6 +-
 libcore/as_value.cpp                               |   16 ++--
 libcore/asobj/Array_as.cpp                         |    2 +-
 libcore/asobj/AsBroadcaster.cpp                    |    2 +-
 libcore/asobj/Color_as.cpp                         |    6 +-
 libcore/asobj/ContextMenuItem_as.cpp               |    2 +-
 libcore/asobj/ContextMenu_as.cpp                   |    2 +-
 libcore/asobj/Error_as.cpp                         |    2 +-
 libcore/asobj/Function_as.cpp                      |    4 +-
 libcore/asobj/Global_as.h                          |    4 +-
 libcore/asobj/Key_as.cpp                           |    2 +-
 libcore/asobj/LoadVars_as.cpp                      |    2 +-
 libcore/asobj/LocalConnection_as.cpp               |    4 +-
 libcore/asobj/Mouse_as.cpp                         |    2 +-
 libcore/asobj/MovieClipLoader.cpp                  |    2 +-
 libcore/asobj/MovieClip_as.cpp                     |   10 +-
 libcore/asobj/NetConnection_as.cpp                 |    6 +-
 libcore/asobj/NetStream_as.cpp                     |   16 ++--
 libcore/asobj/NetStream_as.h                       |    4 +-
 libcore/asobj/Object.cpp                           |    2 +-
 libcore/asobj/Selection_as.cpp                     |    4 +-
 libcore/asobj/SharedObject_as.cpp                  |   20 ++--
 libcore/asobj/Sound_as.cpp                         |   16 ++--
 libcore/asobj/TextField_as.cpp                     |    8 +-
 libcore/asobj/TextFormat_as.cpp                    |    2 +-
 libcore/asobj/TextSnapshot_as.cpp                  |    2 +-
 libcore/asobj/XMLNode_as.cpp                       |   40 +++---
 libcore/asobj/XMLSocket_as.cpp                     |    2 +-
 libcore/asobj/XML_as.cpp                           |    2 +-
 libcore/asobj/flash/display/BitmapData_as.cpp      |    4 +-
 .../asobj/flash/external/ExternalInterface_as.cpp  |    2 +-
 libcore/asobj/flash/filters/BitmapFilter_as.cpp    |    2 +-
 libcore/asobj/flash/geom/Matrix_as.cpp             |    2 +-
 libcore/asobj/flash/geom/Rectangle_as.cpp          |    4 +-
 libcore/asobj/flash/net/FileReference_as.cpp       |    2 +-
 libcore/asobj/flash/text/TextRenderer_as.cpp       |    2 +-
 libcore/movie_root.cpp                             |   32 +++---
 libcore/movie_root.h                               |    2 +-
 libcore/parser/BitmapMovieDefinition.cpp           |    4 +-
 libcore/parser/BitmapMovieDefinition.h             |    2 +-
 libcore/parser/SWFMovieDefinition.cpp              |   10 +-
 libcore/parser/SWFMovieDefinition.h                |    6 +-
 libcore/parser/SWFParser.cpp                       |    2 +-
 libcore/parser/action_buffer.h                     |    4 +-
 libcore/parser/filter_factory.cpp                  |    2 +-
 libcore/parser/movie_definition.h                  |   18 ++--
 libcore/parser/sprite_definition.h                 |    2 +-
 libcore/swf/DefineBitsTag.cpp                      |    8 +-
 libcore/swf/DefineButtonSoundTag.h                 |    2 +-
 libcore/swf/DefineButtonTag.h                      |    2 +-
 libcore/swf/DefineMorphShapeTag.cpp                |    2 +-
 libcore/swf/DefineShapeTag.cpp                     |    2 +-
 libcore/swf/DefineTextTag.cpp                      |    2 +-
 libcore/swf/StartSoundTag.cpp                      |    2 +-
 libcore/swf/TextRecord.h                           |    2 +-
 libcore/vm/ASHandlers.cpp                          |   40 +++---
 libcore/vm/ActionExec.cpp                          |   14 +-
 libcore/vm/ActionExec.h                            |    4 +-
 libcore/vm/CallStack.h                             |    2 +-
 libcore/vm/ExecutableCode.h                        |    2 +-
 libcore/vm/VM.cpp                                  |    8 +-
 libcore/vm/fn_call.h                               |   10 +-
 libdevice/DeviceGlue.cpp                           |    2 +-
 libdevice/GnashDevice.h                            |    4 +-
 libdevice/events/EventDevice.cpp                   |   10 +-
 libdevice/events/InputDevice.cpp                   |    2 +-
 libdevice/events/TouchDevice.cpp                   |    6 +-
 libdevice/events/UinputDevice.cpp                  |    4 +-
 libdevice/rawfb/RawFBDevice.cpp                    |   18 ++--
 libmedia/AudioDecoder.h                            |    4 +-
 libmedia/AudioDecoderSimple.cpp                    |    6 +-
 libmedia/AudioDecoderSpeex.cpp                     |    2 +-
 libmedia/MediaParser.cpp                           |    4 +-
 libmedia/ffmpeg/AudioDecoderFfmpeg.cpp             |   32 +++---
 libmedia/ffmpeg/AudioResamplerFfmpeg.cpp           |    2 +-
 libmedia/ffmpeg/MediaParserFfmpeg.cpp              |   14 +-
 libmedia/ffmpeg/VideoConverterFfmpeg.cpp           |    6 +-
 libmedia/ffmpeg/VideoDecoderFfmpeg.cpp             |   16 ++--
 libmedia/ffmpeg/VideoDecoderFfmpeg.h               |    2 +-
 libmedia/gst/AudioDecoderGst.cpp                   |   12 +-
 libmedia/gst/AudioInputGst.cpp                     |   90 +++++++-------
 libmedia/gst/GstUtil.cpp                           |   14 +-
 libmedia/gst/MediaHandlerGst.cpp                   |    2 +-
 libmedia/gst/MediaParserGst.cpp                    |   20 ++--
 libmedia/gst/VideoConverterGst.cpp                 |    6 +-
 libmedia/gst/VideoDecoderGst.cpp                   |   14 +-
 libmedia/gst/VideoDecoderGst.h                     |    2 +-
 libmedia/gst/VideoInputGst.cpp                     |  128 ++++++++++----------
 librender/GnashTexture.cpp                         |    4 +-
 librender/agg/Renderer_agg.cpp                     |   10 +-
 librender/agg/Renderer_agg.h                       |    4 +-
 librender/cairo/PathParser.h                       |    2 +-
 librender/cairo/Renderer_cairo.cpp                 |    8 +-
 librender/cairo/Renderer_cairo.h                   |    2 +-
 librender/opengl/Renderer_ogl.cpp                  |    6 +-
 libsound/NullSoundHandler.h                        |    2 +-
 libsound/sdl/sound_handler_sdl.cpp                 |    2 +-
 libsound/sound_handler.cpp                         |    6 +-
 plugin/npapi/external.cpp                          |    8 +-
 plugin/npapi/mozilla-sdk/np_entry.cpp              |    4 +-
 plugin/npapi/mozilla-sdk/npn_gate.cpp              |    4 +-
 plugin/npapi/plugin.cpp                            |   14 +-
 plugin/npapi/pluginScriptObject.cpp                |    2 +-
 utilities/findmicrophones.cpp                      |   22 ++--
 utilities/findwebcams.cpp                          |   30 +++---
 utilities/soldumper.cpp                            |    8 +-
 209 files changed, 1001 insertions(+), 1001 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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