Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2

build. I sure hope that this doesn't break the build for anyone else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28992 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2009-01-23 03:05:15 +00:00
parent 7e359a9b53
commit fb3e35fcec
60 changed files with 399 additions and 342 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ All rights reserved.
#define __OPEN_HASH_TABLE__ #define __OPEN_HASH_TABLE__
#include <malloc.h> #include <malloc.h>
#include <new.h> #include <new>
// don't include <Debug.h> // don't include <Debug.h>
#define ASSERT(E) (void)0 #define ASSERT(E) (void)0
@@ -4,7 +4,7 @@
*/ */
#include "MasterServerDevice.h" #include "MasterServerDevice.h"
#include <fstream.h> #include <fstream>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -133,7 +133,7 @@ public:
typedef HashTableLink<ThisType> HashLink; typedef HashTableLink<ThisType> HashLink;
typedef typename Addressing::AddressType AddressType; typedef typename Addressing::AddressType AddressType;
typedef MulticastFilter<Addressing> Filter; typedef MulticastFilter<Addressing> Filter;
typedef AddressSet<AddressType> AddressSet; typedef ::AddressSet<AddressType> AddressSet;
enum FilterMode { enum FilterMode {
kInclude, kInclude,
@@ -96,7 +96,7 @@ public:
bool IsActive() const { return fActive; } bool IsActive() const { return fActive; }
void SetActive(bool newValue) { fActive = newValue; } void SetActive(bool newValue) { fActive = newValue; }
HashTableLink<UdpEndpoint> *HashTableLink() { return &fLink; } ::HashTableLink<UdpEndpoint> *HashTableLink() { return &fLink; }
private: private:
UdpDomainSupport *fManager; UdpDomainSupport *fManager;
@@ -143,7 +143,7 @@ struct UdpHashDefinition {
&& endpoint->PeerAddress().EqualTo(key.second, true); && endpoint->PeerAddress().EqualTo(key.second, true);
} }
HashTableLink<UdpEndpoint> *GetLink(UdpEndpoint *endpoint) const ::HashTableLink<UdpEndpoint> *GetLink(UdpEndpoint *endpoint) const
{ {
return endpoint->HashTableLink(); return endpoint->HashTableLink();
} }
@@ -90,7 +90,7 @@ public:
return fAddress; return fAddress;
} }
HashTableLink<UnixEndpoint>* HashTableLink() ::HashTableLink<UnixEndpoint>* HashTableLink()
{ {
return &fAddressHashLink; return &fAddressHashLink;
} }
@@ -1,7 +1,7 @@
//--------This file shamelessly stolen from Jeremy Friesner's excellent MUSCLE--------- //--------This file shamelessly stolen from Jeremy Friesner's excellent MUSCLE---------
/* This file is Copyright 2000 Level Control Systems. See the included LICENSE.txt file for details. */ /* This file is Copyright 2000 Level Control Systems. See the included LICENSE.txt file for details. */
#include <new.h> #include <new>
#include <stdio.h> #include <stdio.h>
#include "StringMatcher.h" #include "StringMatcher.h"
@@ -6,6 +6,7 @@
#include <Autolock.h> #include <Autolock.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#define TRACE_THIS 0 #define TRACE_THIS 0
#if TRACE_THIS #if TRACE_THIS
@@ -6,6 +6,7 @@
#include "OggFormats.h" #include "OggFormats.h"
#include <Autolock.h> #include <Autolock.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#define TRACE_THIS 0 #define TRACE_THIS 0
#if TRACE_THIS #if TRACE_THIS
@@ -1,5 +1,6 @@
#include "OggTrack.h" #include "OggTrack.h"
#include <stdio.h> #include <stdio.h>
#include <string.h>
#define TRACE_THIS 0 #define TRACE_THIS 0
#if TRACE_THIS #if TRACE_THIS
+205 -203
View File
@@ -1,203 +1,205 @@
// Sun, 18 Jun 2000 // Sun, 18 Jun 2000
// Y.Takagi // Y.Takagi
#include <Button.h> #include <string.h>
#include <Rect.h>
#include <TextControl.h> #include <Button.h>
#include <View.h> #include <Rect.h>
#include <Directory.h> #include <TextControl.h>
#include <Alert.h> #include <View.h>
#include <Directory.h>
#include "URL.h" #include <Alert.h>
#include "IppContent.h"
#include "IppURLConnection.h" #include "URL.h"
#include "IppSetupDlg.h" #include "IppContent.h"
#include "IppDefs.h" #include "IppURLConnection.h"
#include "DbgMsg.h" #include "IppSetupDlg.h"
#include "IppDefs.h"
#define DLG_WIDTH 350 #include "DbgMsg.h"
#define DLG_HEIGHT 80
#define DLG_WIDTH 350
#define BUTTON_WIDTH 70 #define DLG_HEIGHT 80
#define BUTTON_HEIGHT 20
#define BUTTON_WIDTH 70
#define URL_H 10 #define BUTTON_HEIGHT 20
#define URL_V 10
#define URL_WIDTH (DLG_WIDTH - URL_H - URL_H) #define URL_H 10
#define URL_HEIGHT 20 #define URL_V 10
#define URL_TEXT "URL" #define URL_WIDTH (DLG_WIDTH - URL_H - URL_H)
#define URL_HEIGHT 20
#define OK_H (DLG_WIDTH - BUTTON_WIDTH - 11) #define URL_TEXT "URL"
#define OK_V (DLG_HEIGHT - BUTTON_HEIGHT - 11)
#define OK_TEXT "OK" #define OK_H (DLG_WIDTH - BUTTON_WIDTH - 11)
#define OK_V (DLG_HEIGHT - BUTTON_HEIGHT - 11)
#define CANCEL_H (OK_H - BUTTON_WIDTH - 12) #define OK_TEXT "OK"
#define CANCEL_V OK_V
#define CANCEL_TEXT "Cancel" #define CANCEL_H (OK_H - BUTTON_WIDTH - 12)
#define CANCEL_V OK_V
#define CANCEL_TEXT "Cancel"
const BRect URL_RECT(
URL_H,
URL_V, const BRect URL_RECT(
URL_H + URL_WIDTH, URL_H,
URL_V + URL_HEIGHT); URL_V,
URL_H + URL_WIDTH,
const BRect OK_RECT( URL_V + URL_HEIGHT);
OK_H,
OK_V, const BRect OK_RECT(
OK_H + BUTTON_WIDTH, OK_H,
OK_V + BUTTON_HEIGHT); OK_V,
OK_H + BUTTON_WIDTH,
const BRect CANCEL_RECT( OK_V + BUTTON_HEIGHT);
CANCEL_H,
CANCEL_V, const BRect CANCEL_RECT(
CANCEL_H + BUTTON_WIDTH, CANCEL_H,
CANCEL_V + BUTTON_HEIGHT); CANCEL_V,
CANCEL_H + BUTTON_WIDTH,
enum MSGS { CANCEL_V + BUTTON_HEIGHT);
M_CANCEL = 1,
M_OK enum MSGS {
}; M_CANCEL = 1,
M_OK
};
class IppSetupView : public BView {
public:
IppSetupView(BRect, BDirectory *); class IppSetupView : public BView {
~IppSetupView() {} public:
virtual void AttachedToWindow(); IppSetupView(BRect, BDirectory *);
bool UpdateViewData(); ~IppSetupView() {}
virtual void AttachedToWindow();
private: bool UpdateViewData();
BTextControl *url;
BDirectory *dir; private:
}; BTextControl *url;
BDirectory *dir;
IppSetupView::IppSetupView(BRect frame, BDirectory *d) };
: BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW), dir(d)
{ IppSetupView::IppSetupView(BRect frame, BDirectory *d)
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); : BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW), dir(d)
} {
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
void IppSetupView::AttachedToWindow() }
{
/* url box */ void IppSetupView::AttachedToWindow()
{
url = new BTextControl(URL_RECT, "", URL_TEXT, "", NULL); /* url box */
AddChild(url);
url->SetDivider(StringWidth(URL_TEXT) + 10); url = new BTextControl(URL_RECT, "", URL_TEXT, "", NULL);
AddChild(url);
/* cancel */ url->SetDivider(StringWidth(URL_TEXT) + 10);
BButton *button = new BButton(CANCEL_RECT, "", CANCEL_TEXT, new BMessage(M_CANCEL)); /* cancel */
AddChild(button);
BButton *button = new BButton(CANCEL_RECT, "", CANCEL_TEXT, new BMessage(M_CANCEL));
/* ok */ AddChild(button);
button = new BButton(OK_RECT, "", OK_TEXT, new BMessage(M_OK)); /* ok */
AddChild(button);
button->MakeDefault(true); button = new BButton(OK_RECT, "", OK_TEXT, new BMessage(M_OK));
} AddChild(button);
button->MakeDefault(true);
bool IppSetupView::UpdateViewData() }
{
string error_msg; bool IppSetupView::UpdateViewData()
{
if (*url->Text()) { string error_msg;
IppContent *request = new IppContent;
request->setOperationId(IPP_GET_PRINTER_ATTRIBUTES); if (*url->Text()) {
request->setDelimiter(IPP_OPERATION_ATTRIBUTES_TAG); IppContent *request = new IppContent;
request->setCharset("attributes-charset", "utf-8"); request->setOperationId(IPP_GET_PRINTER_ATTRIBUTES);
request->setNaturalLanguage("attributes-natural-language", "en-us"); request->setDelimiter(IPP_OPERATION_ATTRIBUTES_TAG);
request->setURI("printer-uri", url->Text()); request->setCharset("attributes-charset", "utf-8");
request->setDelimiter(IPP_END_OF_ATTRIBUTES_TAG); request->setNaturalLanguage("attributes-natural-language", "en-us");
request->setURI("printer-uri", url->Text());
IppURLConnection conn(URL(url->Text())); request->setDelimiter(IPP_END_OF_ATTRIBUTES_TAG);
conn.setIppRequest(request);
conn.setRequestProperty("Connection", "close"); IppURLConnection conn(URL(url->Text()));
conn.setIppRequest(request);
HTTP_RESPONSECODE response_code = conn.getResponseCode(); conn.setRequestProperty("Connection", "close");
if (response_code == HTTP_OK) {
const char *content_type = conn.getContentType(); HTTP_RESPONSECODE response_code = conn.getResponseCode();
if (content_type && !strncasecmp(content_type, "application/ipp", 15)) { if (response_code == HTTP_OK) {
const IppContent *ipp_response = conn.getIppResponse(); const char *content_type = conn.getContentType();
if (ipp_response->good()) { if (content_type && !strncasecmp(content_type, "application/ipp", 15)) {
dir->WriteAttr(IPP_URL, B_STRING_TYPE, 0, url->Text(), strlen(url->Text()) + 1); const IppContent *ipp_response = conn.getIppResponse();
return true; if (ipp_response->good()) {
} else { dir->WriteAttr(IPP_URL, B_STRING_TYPE, 0, url->Text(), strlen(url->Text()) + 1);
error_msg = ipp_response->getStatusMessage(); return true;
} } else {
} else { error_msg = ipp_response->getStatusMessage();
error_msg = "cannot get a IPP response."; }
} } else {
} else if (response_code != HTTP_UNKNOWN) { error_msg = "cannot get a IPP response.";
error_msg = conn.getResponseMessage(); }
} else { } else if (response_code != HTTP_UNKNOWN) {
error_msg = "cannot connect to the IPP server."; error_msg = conn.getResponseMessage();
} } else {
} else { error_msg = "cannot connect to the IPP server.";
error_msg = "please input the printer URL."; }
} } else {
error_msg = "please input the printer URL.";
BAlert *alert = new BAlert("", error_msg.c_str(), "OK"); }
alert->Go();
return false; BAlert *alert = new BAlert("", error_msg.c_str(), "OK");
} alert->Go();
return false;
IppSetupDlg::IppSetupDlg(BDirectory *dir) }
: BWindow(BRect(100, 100, 100 + DLG_WIDTH, 100 + DLG_HEIGHT),
"IPP Setup", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL, IppSetupDlg::IppSetupDlg(BDirectory *dir)
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE) : BWindow(BRect(100, 100, 100 + DLG_WIDTH, 100 + DLG_HEIGHT),
{ "IPP Setup", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
result = 0; B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE)
{
Lock(); result = 0;
IppSetupView *view = new IppSetupView(Bounds(), dir);
AddChild(view); Lock();
Unlock(); IppSetupView *view = new IppSetupView(Bounds(), dir);
AddChild(view);
semaphore = create_sem(0, "IppSetupSem"); Unlock();
}
semaphore = create_sem(0, "IppSetupSem");
bool IppSetupDlg::QuitRequested() }
{
result = B_ERROR; bool IppSetupDlg::QuitRequested()
release_sem(semaphore); {
return true; result = B_ERROR;
} release_sem(semaphore);
return true;
void IppSetupDlg::MessageReceived(BMessage *msg) }
{
bool success; void IppSetupDlg::MessageReceived(BMessage *msg)
{
switch (msg->what) { bool success;
case M_OK:
Lock(); switch (msg->what) {
success = ((IppSetupView *)ChildAt(0))->UpdateViewData(); case M_OK:
Unlock(); Lock();
if (success) { success = ((IppSetupView *)ChildAt(0))->UpdateViewData();
result = B_NO_ERROR; Unlock();
release_sem(semaphore); if (success) {
} result = B_NO_ERROR;
break; release_sem(semaphore);
}
case M_CANCEL: break;
result = B_ERROR;
release_sem(semaphore); case M_CANCEL:
break; result = B_ERROR;
release_sem(semaphore);
default: break;
BWindow::MessageReceived(msg);
break; default:
} BWindow::MessageReceived(msg);
} break;
}
int IppSetupDlg::Go() }
{
Show(); int IppSetupDlg::Go()
acquire_sem(semaphore); {
delete_sem(semaphore); Show();
int value = result; acquire_sem(semaphore);
Lock(); delete_sem(semaphore);
Quit(); int value = result;
return value; Lock();
} Quit();
return value;
}
@@ -8,6 +8,7 @@
#include <pwd.h> #include <pwd.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include "URL.h" #include "URL.h"
+103 -102
View File
@@ -1,102 +1,103 @@
// Sun, 18 Jun 2000 // Sun, 18 Jun 2000
// Y.Takagi // Y.Takagi
#include <cstring> #include <cstring>
#include "URL.h" #include <stdlib.h>
#include "URL.h"
URL::URL(const char *spec)
{ URL::URL(const char *spec)
// __protocol = "http"; {
// __host = "localhost"; // __protocol = "http";
// __file = "/"; // __host = "localhost";
__port = -1; // __file = "/";
__port = -1;
if (spec) {
char *temp_spec = new char[strlen(spec) + 1]; if (spec) {
strcpy(temp_spec, spec); char *temp_spec = new char[strlen(spec) + 1];
strcpy(temp_spec, spec);
char *p1;
char *p2; char *p1;
char *p3; char *p2;
char *p4; char *p3;
char *p4;
p1 = strstr(temp_spec, "//");
if (p1) { p1 = strstr(temp_spec, "//");
*p1 = '\0'; if (p1) {
p1 += 2; *p1 = '\0';
__protocol = temp_spec; p1 += 2;
} else { __protocol = temp_spec;
p1 = temp_spec; } else {
} p1 = temp_spec;
}
p3 = strstr(p1, "/");
if (p3) { p3 = strstr(p1, "/");
p4 = strstr(p3, "#"); if (p3) {
if (p4) { p4 = strstr(p3, "#");
__ref = p4 + 1; if (p4) {
*p4 = '\0'; __ref = p4 + 1;
} *p4 = '\0';
__file = p3; }
*p3 = '\0'; __file = p3;
} else { *p3 = '\0';
__file = "/"; } else {
} __file = "/";
}
p2 = strstr(p1, ":");
if (p2) { p2 = strstr(p1, ":");
__port = atoi(p2 + 1); if (p2) {
*p2 = '\0'; __port = atoi(p2 + 1);
} *p2 = '\0';
}
__host = p1;
delete [] temp_spec; __host = p1;
} delete [] temp_spec;
}
// if (__port == -1) {
// if (__protocol == "http") { // if (__port == -1) {
// __port = 80; // if (__protocol == "http") {
// } else if (__protocol == "ipp") { // __port = 80;
// __port = 631; // } else if (__protocol == "ipp") {
// } // __port = 631;
// } // }
} // }
}
URL::URL(const char *protocol, const char *host, int port, const char *file)
{ URL::URL(const char *protocol, const char *host, int port, const char *file)
__protocol = protocol; {
__host = host; __protocol = protocol;
__file = file; __host = host;
__port = port; __file = file;
} __port = port;
}
URL::URL(const char *protocol, const char *host, const char *file)
{ URL::URL(const char *protocol, const char *host, const char *file)
__protocol = protocol; {
__host = host; __protocol = protocol;
__file = file; __host = host;
} __file = file;
}
URL::URL(const URL &url)
{ URL::URL(const URL &url)
__protocol = url.__protocol; {
__host = url.__host; __protocol = url.__protocol;
__file = url.__file; __host = url.__host;
__ref = url.__ref; __file = url.__file;
__port = url.__port; __ref = url.__ref;
} __port = url.__port;
}
URL &URL::operator = (const URL &url)
{ URL &URL::operator = (const URL &url)
__protocol = url.__protocol; {
__host = url.__host; __protocol = url.__protocol;
__file = url.__file; __host = url.__host;
__ref = url.__ref; __file = url.__file;
__port = url.__port; __ref = url.__ref;
return *this; __port = url.__port;
} return *this;
}
bool URL::operator == (const URL &url)
{ bool URL::operator == (const URL &url)
return (__protocol == url.__protocol) && (__host == url.__host) && (__file == url.__file) && {
(__ref == url.__ref) && (__port == url.__port); return (__protocol == url.__protocol) && (__host == url.__host) && (__file == url.__file) &&
} (__ref == url.__ref) && (__port == url.__port);
}
@@ -9,6 +9,7 @@
#include <Alert.h> #include <Alert.h>
#include <algorithm> #include <algorithm>
#include <string.h>
#include "LpsClient.h" #include "LpsClient.h"
#include "LprSetupDlg.h" #include "LprSetupDlg.h"
@@ -9,9 +9,10 @@
#include <netdb.h> #include <netdb.h>
#include <pwd.h> #include <pwd.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
#include "LpsClient.h" #include "LpsClient.h"
#include "LprSetupDlg.h" #include "LprSetupDlg.h"
@@ -8,7 +8,9 @@
# include <net/socket.h> # include <net/socket.h>
# include <net/netdb.h> # include <net/netdb.h>
#endif #endif
#include <errno.h> #include <errno.h>
#include <string.h>
#include <iomanip> #include <iomanip>
#include <algorithm> #include <algorithm>
@@ -10,6 +10,7 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include "Socket.h" #include "Socket.h"
@@ -9,6 +9,7 @@
#include "BMPTranslator.h" #include "BMPTranslator.h"
#include "BMPView.h" #include "BMPView.h"
#include <algorithm>
#include <new> #include <new>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -16,6 +17,7 @@
using std::nothrow; using std::nothrow;
using std::min;
//#define INFO(x) printf(x); //#define INFO(x) printf(x);
#define INFO(x) #define INFO(x)
@@ -1706,12 +1708,12 @@ BMPTranslator::translate_from_bmp(BPositionIO *inSource, uint32 outType,
if (!frommsformat && os2skip) if (!frommsformat && os2skip)
inSource->Seek(os2skip, SEEK_CUR); inSource->Seek(os2skip, SEEK_CUR);
rd = min(1024, fileHeader.fileSize - rdtotal); rd = min((size_t)1024, fileHeader.fileSize - rdtotal);
rd = inSource->Read(buf, rd); rd = inSource->Read(buf, rd);
while (rd > 0) { while (rd > 0) {
outDestination->Write(buf, rd); outDestination->Write(buf, rd);
rdtotal += rd; rdtotal += rd;
rd = min(1024, fileHeader.fileSize - rdtotal); rd = min((size_t)1024, fileHeader.fileSize - rdtotal);
rd = inSource->Read(buf, rd); rd = inSource->Read(buf, rd);
} }
if (rd == 0) if (rd == 0)
@@ -17,6 +17,7 @@
#include <String.h> #include <String.h>
#include <UTF8.h> #include <UTF8.h>
#include <algorithm>
#include <new> #include <new>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
@@ -24,6 +25,7 @@
using namespace BPrivate; using namespace BPrivate;
using namespace std;
#define READ_BUFFER_SIZE 32768 #define READ_BUFFER_SIZE 32768
@@ -970,7 +972,7 @@ translate_from_stxt(BPositionIO *inSource, BPositionIO *outDestination,
// When outputting B_STYLED_TEXT_FORMAT, the loop stops when all // When outputting B_STYLED_TEXT_FORMAT, the loop stops when all
// of the data from inSource has been read and written. // of the data from inSource has been read and written.
if (btoplain) if (btoplain)
nreed = min(READ_BUFFER_SIZE, nreed = min((size_t)READ_BUFFER_SIZE,
txtheader.header.data_size - ntotalread); txtheader.header.data_size - ntotalread);
else else
nreed = READ_BUFFER_SIZE; nreed = READ_BUFFER_SIZE;
@@ -982,7 +984,7 @@ translate_from_stxt(BPositionIO *inSource, BPositionIO *outDestination,
if (btoplain) { if (btoplain) {
ntotalread += nread; ntotalread += nread;
nreed = min(READ_BUFFER_SIZE, nreed = min((size_t)READ_BUFFER_SIZE,
txtheader.header.data_size - ntotalread); txtheader.header.data_size - ntotalread);
} else } else
nreed = READ_BUFFER_SIZE; nreed = READ_BUFFER_SIZE;
+3
View File
@@ -1,5 +1,8 @@
#include "FtpClient.h" #include "FtpClient.h"
#include <stdlib.h>
#include <string.h>
FtpClient::FtpClient() FtpClient::FtpClient()
: FileUploadClient(), : FileUploadClient(),
fState(0), fState(0),
+1 -1
View File
@@ -12,7 +12,7 @@
#include <Debug.h> #include <Debug.h>
#include <String.h> #include <String.h>
#include <ostream.h> #include <ostream>
#include <list> #include <list>
#include <utility> #include <utility>
+1 -1
View File
@@ -22,7 +22,7 @@
#include "ImportContext.h" #include "ImportContext.h"
#include "ExportContext.h" #include "ExportContext.h"
#include <ostream.h> #include <ostream>
#include "cortex_defs.h" #include "cortex_defs.h"
__BEGIN_CORTEX_NAMESPACE __BEGIN_CORTEX_NAMESPACE
+3 -1
View File
@@ -8,9 +8,10 @@
*/ */
#include "InfoWindow.h" #include "InfoWindow.h"
#include <pair.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <time.h> #include <time.h>
#include <utility>
#include <vector> #include <vector>
#include <StringView.h> #include <StringView.h>
@@ -22,6 +23,7 @@
using std::string; using std::string;
using std::vector; using std::vector;
using std::pair;
LeftView::LeftView(BRect frame, BBitmap* icon) LeftView::LeftView(BRect frame, BBitmap* icon)
: BView(frame, NULL, B_FOLLOW_NONE, B_WILL_DRAW), : BView(frame, NULL, B_FOLLOW_NONE, B_WILL_DRAW),
+3
View File
@@ -8,6 +8,9 @@
*/ */
#include "Scanner.h" #include "Scanner.h"
#include <stdlib.h>
#include <string.h>
#include <Directory.h> #include <Directory.h>
#include "Common.h" #include "Common.h"
+1
View File
@@ -9,6 +9,7 @@
#include "Snapshot.h" #include "Snapshot.h"
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <Directory.h> #include <Directory.h>
#include <Mime.h> #include <Mime.h>
@@ -9,7 +9,7 @@
#ifndef COMMAND_STACK_H #ifndef COMMAND_STACK_H
#define COMMAND_STACK_H #define COMMAND_STACK_H
#include <stack.h> #include <stack>
#include <Locker.h> #include <Locker.h>
@@ -39,7 +39,7 @@ class CommandStack : public BLocker,
private: private:
status_t _AddCommand(Command* command); status_t _AddCommand(Command* command);
typedef stack<Command*> command_stack; typedef std::stack<Command*> command_stack;
command_stack fUndoHistory; command_stack fUndoHistory;
command_stack fRedoHistory; command_stack fRedoHistory;
@@ -9,7 +9,7 @@
#include "ScrollView.h" #include "ScrollView.h"
#include <algobase.h> #include <algorithm>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -24,6 +24,7 @@
#include "Scrollable.h" #include "Scrollable.h"
#include "ScrollCornerBitmaps.h" #include "ScrollCornerBitmaps.h"
using namespace std;
// #pragma mark - InternalScrollBar // #pragma mark - InternalScrollBar
@@ -8,11 +8,13 @@
#include "Scrollable.h" #include "Scrollable.h"
#include <algobase.h> #include <algorithm>
#include <stdio.h> #include <stdio.h>
#include "Scroller.h" #include "Scroller.h"
using namespace std;
// constructor // constructor
Scrollable::Scrollable() Scrollable::Scrollable()
: fDataRect(0.0, 0.0, 0.0, 0.0), : fDataRect(0.0, 0.0, 0.0, 0.0),
@@ -8,6 +8,8 @@
#include "StateView.h" #include "StateView.h"
#include <new>
#include <Message.h> #include <Message.h>
#include <MessageFilter.h> #include <MessageFilter.h>
#include <TextView.h> #include <TextView.h>
@@ -8,6 +8,7 @@
#include "PathListView.h" #include "PathListView.h"
#include <new>
#include <stdio.h> #include <stdio.h>
#include <Application.h> #include <Application.h>
@@ -8,6 +8,7 @@
#include "StyleListView.h" #include "StyleListView.h"
#include <new>
#include <stdio.h> #include <stdio.h>
#include <Application.h> #include <Application.h>
+2
View File
@@ -8,6 +8,8 @@
#include "StyleView.h" #include "StyleView.h"
#include <new>
#if __HAIKU__ #if __HAIKU__
# include "GridLayout.h" # include "GridLayout.h"
# include "GroupLayout.h" # include "GroupLayout.h"
@@ -9,6 +9,7 @@
#include "Exporter.h" #include "Exporter.h"
#include <fs_attr.h> #include <fs_attr.h>
#include <new>
#include <stdio.h> #include <stdio.h>
#include <Alert.h> #include <Alert.h>
@@ -9,6 +9,7 @@
#include "RDefExporter.h" #include "RDefExporter.h"
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <DataIO.h> #include <DataIO.h>
@@ -9,6 +9,7 @@
#include "SourceExporter.h" #include "SourceExporter.h"
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <DataIO.h> #include <DataIO.h>
@@ -19,6 +19,7 @@
#include <Window.h> #include <Window.h>
#include <map> #include <map>
#include <string.h>
#include "TransportButton.h" #include "TransportButton.h"
#include "DrawingTidbits.h" #include "DrawingTidbits.h"
@@ -1,6 +1,6 @@
// PlaybackManager.cpp // PlaybackManager.cpp
#include <algobase.h> #include <algorithm>
#include <stdio.h> #include <stdio.h>
#include <Message.h> #include <Message.h>
@@ -13,6 +13,8 @@
#include "PlaybackManager.h" #include "PlaybackManager.h"
using namespace std;
//#define TRACE_NODE_MANAGER //#define TRACE_NODE_MANAGER
#ifdef TRACE_NODE_MANAGER #ifdef TRACE_NODE_MANAGER
# define TRACE(x...) printf(x) # define TRACE(x...) printf(x)
@@ -5,7 +5,6 @@
#include "AudioAdapter.h" #include "AudioAdapter.h"
#include <new> #include <new>
#include <algobase.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -5,7 +5,6 @@
#include "AudioChannelConverter.h" #include "AudioChannelConverter.h"
#include <new> #include <new>
#include <algobase.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -6,8 +6,6 @@
#include "AudioFormatConverter.h" #include "AudioFormatConverter.h"
#include <algobase.h>
#include <ByteOrder.h> #include <ByteOrder.h>
#include <MediaDefs.h> #include <MediaDefs.h>
@@ -2,11 +2,13 @@
* Copyright © 2000-2006 Ingo Weinhold <ingo_weinhold@gmx.de> * Copyright © 2000-2006 Ingo Weinhold <ingo_weinhold@gmx.de>
* All rights reserved. Distributed under the terms of the MIT licensce. * All rights reserved. Distributed under the terms of the MIT licensce.
*/ */
#include <algobase.h> #include <algorithm>
#include <string.h> #include <string.h>
#include "AudioReader.h" #include "AudioReader.h"
using std::swap;
AudioReader::AudioReader() AudioReader::AudioReader()
: fFormat(), : fFormat(),
@@ -4,7 +4,6 @@
*/ */
#include "AudioResampler.h" #include "AudioResampler.h"
#include <algobase.h>
#include <stdio.h> #include <stdio.h>
#include "SampleBuffer.h" #include "SampleBuffer.h"
+1 -1
View File
@@ -22,7 +22,7 @@
#include "Playlist.h" #include "Playlist.h"
#include <debugger.h> #include <debugger.h>
#include <new.h> #include <new>
#include <stdio.h> #include <stdio.h>
#include <Autolock.h> #include <Autolock.h>
@@ -6,15 +6,14 @@
#include "MediaTrackAudioSupplier.h" #include "MediaTrackAudioSupplier.h"
#include <new> #include <new>
#include <algobase.h> #include <algorithm>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <MediaFile.h> #include <MediaFile.h>
#include <MediaTrack.h> #include <MediaTrack.h>
using std::nothrow; using namespace std;
//#define TRACE_AUDIO_SUPPLIER //#define TRACE_AUDIO_SUPPLIER
#ifdef TRACE_AUDIO_SUPPLIER #ifdef TRACE_AUDIO_SUPPLIER
@@ -4,7 +4,7 @@
*/ */
#include "ProxyAudioSupplier.h" #include "ProxyAudioSupplier.h"
#include <algobase.h> #include <algorithm>
#include <new> #include <new>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -18,6 +18,7 @@
#include "PlaybackManager.h" #include "PlaybackManager.h"
using std::nothrow; using std::nothrow;
using std::swap;
//#define TRACE_PROXY_AUDIO_SUPPLIER //#define TRACE_PROXY_AUDIO_SUPPLIER
+2 -2
View File
@@ -8,7 +8,7 @@
#ifndef COMMAND_STACK_H #ifndef COMMAND_STACK_H
#define COMMAND_STACK_H #define COMMAND_STACK_H
#include <stack.h> #include <stack>
#include "Notifier.h" #include "Notifier.h"
@@ -38,7 +38,7 @@ class CommandStack : public Notifier {
RWLocker* fLocker; RWLocker* fLocker;
typedef stack<Command*> command_stack; typedef std::stack<Command*> command_stack;
command_stack fUndoHistory; command_stack fUndoHistory;
command_stack fRedoHistory; command_stack fRedoHistory;
+1
View File
@@ -9,6 +9,7 @@
#include <SupportDefs.h> #include <SupportDefs.h>
#include <stdlib.h>
template<class T> class Stack { template<class T> class Stack {
public: public:
+2
View File
@@ -11,6 +11,8 @@
#include "SudokuSolver.h" #include "SudokuSolver.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
SudokuGenerator::SudokuGenerator() SudokuGenerator::SudokuGenerator()
{ {
+1 -1
View File
@@ -46,7 +46,7 @@ const uint32 kMsgExportAs = 'expt';
class GenerateSudoku { class GenerateSudoku {
public: public:
GenerateSudoku(SudokuField& target, int32 level, BMessenger progress, GenerateSudoku(SudokuField& field, int32 level, BMessenger progress,
BMessenger target); BMessenger target);
~GenerateSudoku(); ~GenerateSudoku();
+1
View File
@@ -10,6 +10,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <string> #include <string>
#include <string.h>
#include <debugger.h> #include <debugger.h>
+2
View File
@@ -9,6 +9,8 @@
#include "TypeHandler.h" #include "TypeHandler.h"
#include <string.h>
#include "Context.h" #include "Context.h"
#include "MemoryReader.h" #include "MemoryReader.h"
#include "Syscall.h" #include "Syscall.h"
+2
View File
@@ -8,6 +8,8 @@
#include "AddOnMonitorHandler.h" #include "AddOnMonitorHandler.h"
#include <string.h>
#include <Directory.h> #include <Directory.h>
+1
View File
@@ -7,6 +7,7 @@
#include <InterfaceDefs.h> #include <InterfaceDefs.h>
#include <math.h> #include <math.h>
#include <memory> #include <memory>
#include <string.h>
#include "Halftone.h" #include "Halftone.h"
#include "ValidRect.h" #include "ValidRect.h"
#include "DbgMsg.h" #include "DbgMsg.h"
+3 -3
View File
@@ -10,8 +10,8 @@
#include <Bitmap.h> #include <Bitmap.h>
#include <stdio.h> #include <stdio.h>
#include <algo.h> #include <algorithm>
#include <stack.h> #include <stack>
#include "DrawState.h" #include "DrawState.h"
#include "GlyphLayoutEngine.h" #include "GlyphLayoutEngine.h"
@@ -489,7 +489,7 @@ DrawingEngine::CopyRegion(/*const*/ BRegion* region,
} }
} }
// put all nodes onto a stack that have an "indegree" count of zero // put all nodes onto a stack that have an "indegree" count of zero
stack<node*> inDegreeZeroNodes; std::stack<node*> inDegreeZeroNodes;
for (int32 i = 0; i < count; i++) { for (int32 i = 0; i < count; i++) {
if (nodes[i].in_degree == 0) { if (nodes[i].in_degree == 0) {
inDegreeZeroNodes.push(&nodes[i]); inDegreeZeroNodes.push(&nodes[i]);
+2
View File
@@ -17,6 +17,8 @@
#include <netdb.h> #include <netdb.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <new> #include <new>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <vector> #include <vector>
@@ -6,6 +6,7 @@
#include <map> #include <map>
#include <new> #include <new>
#include <set> #include <set>
#include <string.h>
#include <AutoDeleter.h> #include <AutoDeleter.h>
#include <Autolock.h> #include <Autolock.h>
+2
View File
@@ -22,6 +22,8 @@
#include <Roster.h> #include <Roster.h>
#include <storage_support.h> #include <storage_support.h>
#include <string.h>
#define DBG(x) (x) #define DBG(x) (x)
//#define DBG(x) //#define DBG(x)
#define OUT printf #define OUT printf
@@ -4,6 +4,7 @@
*/ */
#include <new> #include <new>
#include <string.h>
#include <signal.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
+1
View File
@@ -24,6 +24,7 @@
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "AppInfoListMessagingTargetSet.h" #include "AppInfoListMessagingTargetSet.h"
#include "Debug.h" #include "Debug.h"
@@ -11,6 +11,7 @@
#include "CreateAppMetaMimeThread.h" #include "CreateAppMetaMimeThread.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <AppFileInfo.h> #include <AppFileInfo.h>
#include <Bitmap.h> #include <Bitmap.h>
@@ -9,6 +9,9 @@
#include "UpdateMimeInfoThread.h" #include "UpdateMimeInfoThread.h"
#include <stdlib.h>
#include <string.h>
#include <AppFileInfo.h> #include <AppFileInfo.h>
#include <Bitmap.h> #include <Bitmap.h>
#include <fs_attr.h> #include <fs_attr.h>