--- src/biff.cc 2009-05-20 11:10:24 +0400 +++ src/biff.fixed.cc 2009-05-20 11:14:01 +0400 @@ -701,16 +701,16 @@ void Biff::save_parameters (std::map &map, std::string block) { - const gchar *fmt = "%*s\n", *name; + const gchar *fmt = "%*s\n"; gchar *esc; if (block.size () > 0) save_newblock (block.c_str ()); std::map::iterator it = map.begin (); while (it != map.end ()) { - name = it->first.c_str (); - esc = g_markup_printf_escaped(fmt, save_blocks.size()*2, "", name, - 28-strlen(name)-save_blocks.size()*2, + esc = g_markup_printf_escaped(fmt, save_blocks.size()*2, "", + it->first.c_str(), + 28-it->first.size()-save_blocks.size()*2, "", it->second.c_str ()); save_file << esc; g_free(esc); --- src/socket.cc 2009-05-20 11:46:07 +0400 +++ src/socket.fixed.cc 2009-05-20 11:51:51 +0400 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -132,7 +133,7 @@ Socket::open (std::string hostname, } // Setting socket info for connection - memset ((char *)&sin, 0, sizeof(sin)); + std::memset ((char *)&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons (port_); @@ -154,7 +155,7 @@ Socket::open (std::string hostname, } // This way of filling sin_addr field avoid 'incompatible types in assignment' problems - memcpy ((void *) &sin.sin_addr, *(host->h_addr_list), host->h_length); + std::memcpy ((void *) &sin.sin_addr, *(host->h_addr_list), host->h_length); } else sin.sin_addr = address; @@ -410,7 +411,7 @@ Socket::read (std::string &line, gboolea break; default: g_message ("[%d] RECV ERROR(%s:%d): %s", uin_, hostname_.c_str(), - port_, strerror(status)); + port_, std::strerror(status)); break; } } @@ -440,5 +441,5 @@ Socket::set_read_timeout(gint timeout) tv.tv_usec = 0; if (setsockopt(sd_, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) g_warning (_("Could not set read timeout on socket: %s"), - strerror(errno)); + std::strerror(errno)); } --- src/ui-applet.cc 2009-05-20 18:37:07 +0400 +++ src/ui-applet.fixed.cc 2009-05-20 18:37:36 +0400 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -142,7 +143,7 @@ Applet::execute_command (std::string opt std::string command = biff_->value_string (option_command); if (!command.empty ()) { command += " &"; - int result = system (command.c_str ()); + int result = std::system (command.c_str ()); if (result == -1) g_warning ("Cannot execute command \"%s\".", command.c_str()); }