Removed warnings mesgs

Doesn't compile due to missing bufstream


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-07-25 08:31:39 +00:00
parent f701d7abc1
commit bd7d06f23d
20 changed files with 135 additions and 118 deletions

View File

@@ -95,12 +95,12 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
{} {}
void MyFrame::OnQuit(wxCommandEvent& event) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{ {
Close(TRUE); Close(TRUE);
} }
void MyFrame::OnAbout(wxCommandEvent& event) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
{ {
wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box",
"About Minimal", wxYES_NO|wxCANCEL); "About Minimal", wxYES_NO|wxCANCEL);

View File

@@ -184,13 +184,13 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(GRID_QUIT, MyFrame::Quit) EVT_MENU(GRID_QUIT, MyFrame::Quit)
END_EVENT_TABLE() END_EVENT_TABLE()
void MyFrame::ToggleEditable(wxCommandEvent& event) void MyFrame::ToggleEditable(wxCommandEvent& WXUNUSED(event))
{ {
grid->SetEditable(!grid->GetEditable()); grid->SetEditable(!grid->GetEditable());
grid->Refresh(); grid->Refresh();
} }
void MyFrame::ToggleRowLabel(wxCommandEvent& event) void MyFrame::ToggleRowLabel(wxCommandEvent& WXUNUSED(event))
{ {
if (grid->GetLabelSize(wxVERTICAL) > 0) if (grid->GetLabelSize(wxVERTICAL) > 0)
grid->SetLabelSize(wxVERTICAL, 0); grid->SetLabelSize(wxVERTICAL, 0);
@@ -199,7 +199,7 @@ void MyFrame::ToggleRowLabel(wxCommandEvent& event)
grid->Refresh(); grid->Refresh();
} }
void MyFrame::ToggleColLabel(wxCommandEvent& event) void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event))
{ {
if (grid->GetLabelSize(wxHORIZONTAL) > 0) if (grid->GetLabelSize(wxHORIZONTAL) > 0)
grid->SetLabelSize(wxHORIZONTAL, 0); grid->SetLabelSize(wxHORIZONTAL, 0);
@@ -208,7 +208,7 @@ void MyFrame::ToggleColLabel(wxCommandEvent& event)
grid->Refresh(); grid->Refresh();
} }
void MyFrame::ToggleDividers(wxCommandEvent& event) void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event))
{ {
if (!grid->GetDividerPen()) if (!grid->GetDividerPen())
grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID)); grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
@@ -217,25 +217,25 @@ void MyFrame::ToggleDividers(wxCommandEvent& event)
grid->Refresh(); grid->Refresh();
} }
void MyFrame::LeftCell(wxCommandEvent& event) void MyFrame::LeftCell(wxCommandEvent& WXUNUSED(event))
{ {
grid->SetCellAlignment(wxLEFT); grid->SetCellAlignment(wxLEFT);
grid->Refresh(); grid->Refresh();
} }
void MyFrame::CentreCell(wxCommandEvent& event) void MyFrame::CentreCell(wxCommandEvent& WXUNUSED(event))
{ {
grid->SetCellAlignment(wxCENTRE); grid->SetCellAlignment(wxCENTRE);
grid->Refresh(); grid->Refresh();
} }
void MyFrame::RightCell(wxCommandEvent& event) void MyFrame::RightCell(wxCommandEvent& WXUNUSED(event))
{ {
grid->SetCellAlignment(wxRIGHT); grid->SetCellAlignment(wxRIGHT);
grid->Refresh(); grid->Refresh();
} }
void MyFrame::ColourLabelBackground(wxCommandEvent& event) void MyFrame::ColourLabelBackground(wxCommandEvent& WXUNUSED(event))
{ {
wxColourData data; wxColourData data;
data.SetChooseFull(TRUE); data.SetChooseFull(TRUE);
@@ -249,7 +249,7 @@ void MyFrame::ColourLabelBackground(wxCommandEvent& event)
} }
} }
void MyFrame::ColourLabelText(wxCommandEvent& event) void MyFrame::ColourLabelText(wxCommandEvent& WXUNUSED(event))
{ {
wxColourData data; wxColourData data;
data.SetChooseFull(TRUE); data.SetChooseFull(TRUE);
@@ -263,14 +263,14 @@ void MyFrame::ColourLabelText(wxCommandEvent& event)
} }
} }
void MyFrame::NormalLabelColouring(wxCommandEvent& event) void MyFrame::NormalLabelColouring(wxCommandEvent& WXUNUSED(event))
{ {
grid->SetLabelBackgroundColour(*wxLIGHT_GREY); grid->SetLabelBackgroundColour(*wxLIGHT_GREY);
grid->SetLabelTextColour(*wxBLACK); grid->SetLabelTextColour(*wxBLACK);
grid->Refresh(); grid->Refresh();
} }
void MyFrame::ColourCellBackground(wxCommandEvent& event) void MyFrame::ColourCellBackground(wxCommandEvent& WXUNUSED(event))
{ {
wxColourData data; wxColourData data;
data.SetChooseFull(TRUE); data.SetChooseFull(TRUE);
@@ -284,7 +284,7 @@ void MyFrame::ColourCellBackground(wxCommandEvent& event)
} }
} }
void MyFrame::ColourCellText(wxCommandEvent& event) void MyFrame::ColourCellText(wxCommandEvent& WXUNUSED(event))
{ {
wxColourData data; wxColourData data;
data.SetChooseFull(TRUE); data.SetChooseFull(TRUE);
@@ -298,14 +298,14 @@ void MyFrame::ColourCellText(wxCommandEvent& event)
} }
} }
void MyFrame::NormalCellColouring(wxCommandEvent& event) void MyFrame::NormalCellColouring(wxCommandEvent& WXUNUSED(event))
{ {
grid->SetCellBackgroundColour(*wxWHITE); grid->SetCellBackgroundColour(*wxWHITE);
grid->SetCellTextColour(*wxBLACK); grid->SetCellTextColour(*wxBLACK);
grid->Refresh(); grid->Refresh();
} }
void MyFrame::Quit(wxCommandEvent& event) void MyFrame::Quit(wxCommandEvent& WXUNUSED(event))
{ {
this->Close(TRUE); this->Close(TRUE);
} }

View File

@@ -133,18 +133,18 @@ MyFrame::MyFrame(wxFrame *frame, const char *title, int x, int y, int w, int h)
{ {
} }
void MyFrame::OnQuit(wxCommandEvent& event) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{ {
Close(TRUE); Close(TRUE);
} }
void MyFrame::OnAbout(wxCommandEvent& event) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{ {
wxMessageDialog(this, _("I18n sample\n<EFBFBD> Vadim Zeitlin & Julian Smart"), wxMessageDialog(this, _("I18n sample\n<EFBFBD> Vadim Zeitlin & Julian Smart"),
_("About Internat"), wxOK | wxICON_INFORMATION).ShowModal(); _("About Internat"), wxOK | wxICON_INFORMATION).ShowModal();
} }
void MyFrame::OnPlay(wxCommandEvent& event) void MyFrame::OnPlay(wxCommandEvent& WXUNUSED(event))
{ {
wxString str = wxGetTextFromUser(_("Enter your number:"), wxString str = wxGetTextFromUser(_("Enter your number:"),
_("Try to guess my number!"), _("Try to guess my number!"),

View File

@@ -181,7 +181,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_SIZE(MyFrame::OnSize) EVT_SIZE(MyFrame::OnSize)
END_EVENT_TABLE() END_EVENT_TABLE()
void MyFrame::LoadFile(wxCommandEvent& event) void MyFrame::LoadFile(wxCommandEvent& WXUNUSED(event) )
{ {
char *s = wxFileSelector("Load text file", NULL, NULL, NULL, "*.txt"); char *s = wxFileSelector("Load text file", NULL, NULL, NULL, "*.txt");
if (s) if (s)
@@ -192,47 +192,47 @@ void MyFrame::LoadFile(wxCommandEvent& event)
} }
} }
void MyFrame::Quit(wxCommandEvent& event) void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) )
{ {
this->Close(TRUE); this->Close(TRUE);
} }
void MyFrame::TestSizers(wxCommandEvent& event) void MyFrame::TestSizers(wxCommandEvent& WXUNUSED(event) )
{ {
SizerFrame *newFrame = new SizerFrame(NULL, "Sizer Test Frame", 50, 50, 500, 500); SizerFrame *newFrame = new SizerFrame(NULL, "Sizer Test Frame", 50, 50, 500, 500);
newFrame->Show(TRUE); newFrame->Show(TRUE);
} }
void MyFrame::About(wxCommandEvent& event) void MyFrame::About(wxCommandEvent& WXUNUSED(event) )
{ {
(void)wxMessageBox("wxWindows GUI library layout demo\n", (void)wxMessageBox("wxWindows GUI library layout demo\n",
"About Layout Demo", wxOK|wxCENTRE); "About Layout Demo", wxOK|wxCENTRE);
} }
// Size the subwindows when the frame is resized // Size the subwindows when the frame is resized
void MyFrame::OnSize(wxSizeEvent& event) void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) )
{ {
Layout(); Layout();
} }
void MyFrame::Draw(wxDC& dc, bool draw_bitmaps) void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) )
{ {
dc.SetPen(wxGREEN_PEN); dc.SetPen(wxGREEN_PEN);
dc.DrawLine(0.0, 0.0, 200.0, 200.0); dc.DrawLine(0, 0, 200, 200);
dc.DrawLine(200.0, 0.0, 0.0, 200.0); dc.DrawLine(200, 0, 0, 200);
dc.SetBrush(wxCYAN_BRUSH); dc.SetBrush(wxCYAN_BRUSH);
dc.SetPen(wxRED_PEN); dc.SetPen(wxRED_PEN);
dc.DrawRectangle(100.0, 100.0, 100.0, 50.0); dc.DrawRectangle(100, 100, 100, 50);
dc.DrawRoundedRectangle(150.0, 150.0, 100.0, 50.0,20.0); dc.DrawRoundedRectangle(150, 150, 100, 50, 20);
dc.DrawEllipse(250.0, 250.0, 100.0, 50.0); dc.DrawEllipse(250, 250, 100, 50);
dc.DrawSpline(50.0, 200.0, 50.0, 100.0, 200.0, 10.0); dc.DrawSpline(50, 200, 50, 100, 200, 10);
dc.DrawLine(50.0, 230.0, 200.0, 230.0); dc.DrawLine(50, 230, 200, 230);
dc.SetPen(wxBLACK_PEN); dc.SetPen(wxBLACK_PEN);
dc.DrawArc(50.0, 300.0, 100.0, 250.0, 100.0, 300.0); dc.DrawArc(50, 300, 100, 250, 100, 300 );
} }
BEGIN_EVENT_TABLE(MyWindow, wxWindow) BEGIN_EVENT_TABLE(MyWindow, wxWindow)
@@ -250,7 +250,7 @@ MyWindow::~MyWindow(void)
} }
// Define the repainting behaviour // Define the repainting behaviour
void MyWindow::OnPaint(wxPaintEvent& event) void MyWindow::OnPaint(wxPaintEvent& WXUNUSED(event) )
{ {
wxPaintDC dc(this); wxPaintDC dc(this);
frame->Draw(dc,TRUE); frame->Draw(dc,TRUE);

View File

@@ -80,8 +80,8 @@ bool MyApp::OnInit(void)
// Show the frame // Show the frame
frame->Show(TRUE); frame->Show(TRUE);
// wxDebugContext::SetCheckpoint(); wxDebugContext::SetCheckpoint();
// wxDebugContext::SetFile("debug.log"); wxDebugContext::SetFile("debug.log");
wxString *thing = new wxString; // WXDEBUG_NEW wxString; wxString *thing = new wxString; // WXDEBUG_NEW wxString;
wxDate* date = new wxDate; wxDate* date = new wxDate;
@@ -92,9 +92,9 @@ bool MyApp::OnInit(void)
const char *data = (const char*) thing ; const char *data = (const char*) thing ;
// wxDebugContext::PrintClasses(); wxDebugContext::PrintClasses();
// wxDebugContext::Dump(); wxDebugContext::Dump();
// wxDebugContext::PrintStatistics(); wxDebugContext::PrintStatistics();
// Don't delete these two objects, to force wxApp to flag a memory leak. // Don't delete these two objects, to force wxApp to flag a memory leak.
// delete thing; // delete thing;

View File

@@ -100,12 +100,12 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
{} {}
void MyFrame::OnQuit(wxCommandEvent& event) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{ {
Close(TRUE); Close(TRUE);
} }
void MyFrame::OnAbout(wxCommandEvent& event) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
{ {
wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box",
"About Minimal", wxYES_NO|wxCANCEL); "About Minimal", wxYES_NO|wxCANCEL);

View File

@@ -57,10 +57,10 @@ LIB_CPP_SRC=\
common/timercmn.cpp \ common/timercmn.cpp \
common/utilscmn.cpp \ common/utilscmn.cpp \
common/stream.cpp \ common/stream.cpp \
common/datstrm.cpp \
common/fstream.cpp \ common/fstream.cpp \
common/mstream.cpp \ common/mstream.cpp \
common/zstream.cpp \ common/zstream.cpp \
common/datstrm.cpp \
common/objstrm.cpp \ common/objstrm.cpp \
\ \
gtk/app.cpp \ gtk/app.cpp \

View File

@@ -387,7 +387,9 @@ int wxMemStruct::ValidateNode ()
ErrorMsg ("Object already deleted"); ErrorMsg ("Object already deleted");
else { else {
// Can't use the error routines as we have no recognisable object. // Can't use the error routines as we have no recognisable object.
// wxTrace("Can't verify memory struct - all bets are off!\n"); #ifndef __WXGTK__
wxTrace("Can't verify memory struct - all bets are off!\n");
#endif
} }
return 0; return 0;
} }
@@ -627,7 +629,7 @@ bool wxDebugContext::PrintList (void)
if (!HasStream()) if (!HasStream())
return FALSE; return FALSE;
TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : NULL)); TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL));
return TRUE; return TRUE;
#else #else
@@ -649,10 +651,10 @@ bool wxDebugContext::Dump(void)
{ {
appNameStr = wxTheApp->GetAppName(); appNameStr = wxTheApp->GetAppName();
appName = (char*) (const char*) appNameStr; appName = (char*) (const char*) appNameStr;
wxTrace("Memory dump of %s at %s:\n", appName, wxNow()); wxTrace("Memory dump of %s at %s:\n", appName, WXSTRINGCAST wxNow() );
} }
} }
TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : NULL)); TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL));
return TRUE; return TRUE;
#else #else
@@ -700,7 +702,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
wxDebugStatsStruct *list = NULL; wxDebugStatsStruct *list = NULL;
wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL); wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL );
if (!from) if (!from)
from = wxDebugContext::GetHead (); from = wxDebugContext::GetHead ();
@@ -819,7 +821,7 @@ int wxDebugContext::Check(bool checkAll)
{ {
int nFailures = 0; int nFailures = 0;
wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL); wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL );
if (!from || checkAll) if (!from || checkAll)
from = wxDebugContext::GetHead (); from = wxDebugContext::GetHead ();
@@ -918,7 +920,7 @@ void operator delete[] (void * buf)
#endif #endif
// TODO: store whether this is a vector or not. // TODO: store whether this is a vector or not.
void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect) void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) )
{ {
// If not in debugging allocation mode, do the normal thing // If not in debugging allocation mode, do the normal thing
// so we don't leave any trace of ourselves in the node list. // so we don't leave any trace of ourselves in the node list.
@@ -969,7 +971,7 @@ void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bo
} }
// TODO: check whether was allocated as a vector // TODO: check whether was allocated as a vector
void wxDebugFree(void * buf, bool isVect) void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
{ {
if (!buf) if (!buf)
return; return;

View File

@@ -159,7 +159,7 @@ bool wxObjectInputStream::ReadObjectDef(wxObjectStreamInfo *info)
sig[WXOBJ_BEG_LEN] = 0; sig[WXOBJ_BEG_LEN] = 0;
if (wxString(sig) != WXOBJ_BEGIN) if (wxString(sig) != WXOBJ_BEGIN)
return FALSE; return FALSE;
info->object = wxCreateDynamicObject((char *)data_s.ReadString()); info->object = wxCreateDynamicObject( WXSTRINGCAST data_s.ReadString());
info->object_name = data_s.ReadString(); info->object_name = data_s.ReadString();
info->n_children = data_s.Read8(); info->n_children = data_s.Read8();
info->children = wxList(); info->children = wxList();

View File

@@ -483,7 +483,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
FILE *file; FILE *file;
unsigned char *data, *ptr; unsigned char *data, *ptr;
int pc, c, i, j, k, ncolors, cpp, comment, transp, quote, int pc, c, i, j, k, ncolors, cpp, comment, transp, quote,
context, len, token, done; context, len, /*token,*/ done;
char line[65536], s[65536], tok[65536], col[65536]; char line[65536], s[65536], tok[65536], col[65536];
XColor xcol; XColor xcol;
struct _cmap struct _cmap
@@ -495,8 +495,12 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
*cmap; *cmap;
int lookup[128][128]; int lookup[128][128];
i = 0;
j = 0;
transp = 0; transp = 0;
done = 0; done = 0;
cmap = NULL;
file = fopen(f, "r"); file = fopen(f, "r");
if (!file) if (!file)
@@ -574,7 +578,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
/* Color Table */ /* Color Table */
if (j < ncolors) if (j < ncolors)
{ {
int colptr = 0; /* int colptr = 0; not used */
int slen; int slen;
tok[0] = 0; tok[0] = 0;
@@ -645,10 +649,10 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
{ {
if (cpp == 1) if (cpp == 1)
for (i = 0; i < ncolors; i++) for (i = 0; i < ncolors; i++)
lookup[cmap[i].str[0]][cmap[i].str[1]] = i; lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i;
if (cpp == 2) if (cpp == 2)
for (i = 0; i < ncolors; i++) for (i = 0; i < ncolors; i++)
lookup[cmap[i].str[0]][cmap[i].str[1]] = i; lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i;
context++; context++;
} }
} }
@@ -667,7 +671,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
for (i = 0; ((i < 65536) && (line[i])); i++) for (i = 0; ((i < 65536) && (line[i])); i++)
{ {
col[0] = line[i]; col[0] = line[i];
if (cmap[lookup[col[0]][0]].transp) if (cmap[lookup[(int)col[0]][0]].transp)
{ {
*ptr++ = 255; *ptr++ = 255;
*ptr++ = 0; *ptr++ = 0;
@@ -675,9 +679,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
} }
else else
{ {
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b;
} }
} }
} }
@@ -686,9 +690,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
for (i = 0; ((i < 65536) && (line[i])); i++) for (i = 0; ((i < 65536) && (line[i])); i++)
{ {
col[0] = line[i]; col[0] = line[i];
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b;
} }
} }
} }
@@ -700,7 +704,7 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
{ {
col[0] = line[i++]; col[0] = line[i++];
col[1] = line[i]; col[1] = line[i];
if (cmap[lookup[col[0]][col[1]]].transp) if (cmap[lookup[(int)col[0]][(int)col[1]]].transp)
{ {
*ptr++ = 255; *ptr++ = 255;
*ptr++ = 0; *ptr++ = 0;
@@ -708,9 +712,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
} }
else else
{ {
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b;
} }
} }
} }
@@ -720,9 +724,9 @@ g_LoadXPM(char *f, int *w, int *h, int *t)
{ {
col[0] = line[i++]; col[0] = line[i++];
col[1] = line[i]; col[1] = line[i];
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b;
} }
} }
} }

View File

@@ -524,7 +524,7 @@ gdk_imlib_init_params(GdkImlibInitParams * p)
XWindowAttributes xwa; XWindowAttributes xwa;
XVisualInfo xvi, *xvir; XVisualInfo xvi, *xvir;
char *homedir; char *homedir;
char file[4096]; /* char file[4096]; */
char s[4096], *s1, *s2; char s[4096], *s1, *s2;
FILE *f; FILE *f;
int override = 0; int override = 0;
@@ -533,7 +533,7 @@ gdk_imlib_init_params(GdkImlibInitParams * p)
int num; int num;
int i, max, maxn; int i, max, maxn;
int clas; int clas;
char *palfile; char *palfile = NULL;
int loadpal; int loadpal;
int vis; int vis;
int newcm; int newcm;

View File

@@ -204,7 +204,7 @@ grender_shaped_15_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage *
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
int jmp; int jmp;
@@ -262,7 +262,7 @@ grender_15_fast_dither(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, *ter, ex, er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
int jmp; int jmp;
@@ -308,7 +308,7 @@ grender_15_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
@@ -414,7 +414,7 @@ grender_shaped_16_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage *
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
int jmp; int jmp;
@@ -519,7 +519,7 @@ grender_16_fast_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
@@ -635,7 +635,7 @@ grender_shaped_15_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =
@@ -728,7 +728,7 @@ grender_15_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =
@@ -822,7 +822,7 @@ grender_shaped_16_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =
@@ -915,7 +915,7 @@ grender_16_dither_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =
@@ -2816,7 +2816,7 @@ grender_shaped_15_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XIma
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
int jmp; int jmp;
@@ -2926,7 +2926,7 @@ grender_15_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xi
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
@@ -3038,7 +3038,7 @@ grender_shaped_16_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XIma
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
int jmp; int jmp;
@@ -3149,7 +3149,7 @@ grender_16_fast_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xi
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned short *img; unsigned short *img;
@@ -3200,7 +3200,7 @@ grender_shaped_15_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage *
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =
@@ -3255,7 +3255,7 @@ grender_15_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =
@@ -3300,7 +3300,7 @@ grender_shaped_16_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage *
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex,*/ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =
@@ -3355,7 +3355,7 @@ grender_16_dither_mod_ordered(GdkImlibImage * im, int w, int h, XImage * xim,
XImage * sxim, int *er1, int *er2, int *xarray, XImage * sxim, int *er1, int *er2, int *xarray,
unsigned char **yarray) unsigned char **yarray)
{ {
int x, y, val, r, g, b, *ter, ex, er, eg, eb; int x, y, val, r, g, b, /* *ter, ex, */ er, eg, eb;
unsigned char *ptr2; unsigned char *ptr2;
unsigned char dither[4][4] = unsigned char dither[4][4] =

View File

@@ -83,7 +83,7 @@ gdk_imlib_save_image(GdkImlibImage * im, char *file, GdkImlibSaveInfo * info)
{ {
int bx, by, bxx, byy; int bx, by, bxx, byy;
int w, h; int w, h;
int sx, sy; int sx = 0, sy = 0;
int tx = 35, ty = 35; int tx = 35, ty = 35;
int x, y; int x, y;
unsigned char *ptr; unsigned char *ptr;

View File

@@ -935,7 +935,7 @@ gdk_imlib_create_image_from_xpm_data(char **data)
{ {
GdkImlibImage *im; GdkImlibImage *im;
unsigned char *ptr; unsigned char *ptr;
int pc, c, i, j, k, ncolors, cpp, comment, transp, quote, int /* pc, */ c, i, j, k, ncolors, cpp, comment, transp, quote,
context, len, count, done; context, len, count, done;
int w, h; int w, h;
char *line, s[65536], tok[65536], col[65536]; char *line, s[65536], tok[65536], col[65536];
@@ -947,8 +947,11 @@ gdk_imlib_create_image_from_xpm_data(char **data)
int r, g, b; int r, g, b;
} }
*cmap; *cmap;
int lookup[128][128]; int lookup[128][128];
cmap = NULL;
j = 0;
if (!data) if (!data)
return NULL; return NULL;
im = malloc(sizeof(GdkImlibImage)); im = malloc(sizeof(GdkImlibImage));
@@ -1133,10 +1136,10 @@ gdk_imlib_create_image_from_xpm_data(char **data)
{ {
if (cpp == 1) if (cpp == 1)
for (i = 0; i < ncolors; i++) for (i = 0; i < ncolors; i++)
lookup[cmap[i].str[0]][cmap[i].str[1]] = i; lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i;
if (cpp == 2) if (cpp == 2)
for (i = 0; i < ncolors; i++) for (i = 0; i < ncolors; i++)
lookup[cmap[i].str[0]][cmap[i].str[1]] = i; lookup[(int)cmap[i].str[0]][(int)cmap[i].str[1]] = i;
context++; context++;
} }
} }
@@ -1154,7 +1157,7 @@ gdk_imlib_create_image_from_xpm_data(char **data)
for (i = 0; ((i < 65536) && (line[i])); i++) for (i = 0; ((i < 65536) && (line[i])); i++)
{ {
col[0] = line[i]; col[0] = line[i];
if (cmap[lookup[col[0]][0]].transp) if (cmap[lookup[(int)col[0]][0]].transp)
{ {
*ptr++ = 255; *ptr++ = 255;
*ptr++ = 0; *ptr++ = 0;
@@ -1162,9 +1165,9 @@ gdk_imlib_create_image_from_xpm_data(char **data)
} }
else else
{ {
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b;
} }
} }
} }
@@ -1173,9 +1176,9 @@ gdk_imlib_create_image_from_xpm_data(char **data)
for (i = 0; ((i < 65536) && (line[i])); i++) for (i = 0; ((i < 65536) && (line[i])); i++)
{ {
col[0] = line[i]; col[0] = line[i];
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][0]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][0]].b;
} }
} }
} }
@@ -1187,7 +1190,7 @@ gdk_imlib_create_image_from_xpm_data(char **data)
{ {
col[0] = line[i++]; col[0] = line[i++];
col[1] = line[i]; col[1] = line[i];
if (cmap[lookup[col[0]][col[1]]].transp) if (cmap[lookup[(int)col[0]][(int)col[1]]].transp)
{ {
*ptr++ = 255; *ptr++ = 255;
*ptr++ = 0; *ptr++ = 0;
@@ -1195,9 +1198,9 @@ gdk_imlib_create_image_from_xpm_data(char **data)
} }
else else
{ {
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b;
} }
} }
} }
@@ -1207,9 +1210,9 @@ gdk_imlib_create_image_from_xpm_data(char **data)
{ {
col[0] = line[i++]; col[0] = line[i++];
col[1] = line[i]; col[1] = line[i];
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].r; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].r;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].g; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].g;
*ptr++ = (unsigned char)cmap[lookup[col[0]][col[1]]].b; *ptr++ = (unsigned char)cmap[lookup[(int)col[0]][(int)col[1]]].b;
} }
} }
} }

View File

@@ -719,7 +719,7 @@ bool wxTreeCtrl::SelectItem(long itemId)
return TRUE; return TRUE;
}; };
void wxTreeCtrl::SelectItem(wxGenericTreeItem *item) void wxTreeCtrl::SelectItem(wxGenericTreeItem *item, bool bDoEvents )
{ {
if (m_current != item) if (m_current != item)
{ {
@@ -732,7 +732,7 @@ void wxTreeCtrl::SelectItem(wxGenericTreeItem *item)
m_current->SetHilight( TRUE ); m_current->SetHilight( TRUE );
RefreshLine( m_current ); RefreshLine( m_current );
m_current->SendSelected( this ); if (bDoEvents) m_current->SendSelected( this );
} }
} }

View File

@@ -26,6 +26,8 @@
#include <../iodbc/hstmt.h> #include <../iodbc/hstmt.h>
#include <../iodbc/itrace.h> #include <../iodbc/itrace.h>
#include <strings.h>
#include <stdio.h>
extern char* _iodbcdm_getkeyvalbydsn(); extern char* _iodbcdm_getkeyvalbydsn();
extern char* _iodbcdm_getkeyvalinstr(); extern char* _iodbcdm_getkeyvalinstr();
@@ -292,7 +294,7 @@ RETCODE _iodbcdm_driverunload( HDBC hdbc )
GENV_t FAR* genv; GENV_t FAR* genv;
HPROC hproc; HPROC hproc;
RETCODE retcode = SQL_SUCCESS; RETCODE retcode = SQL_SUCCESS;
int sqlstat = en_00000; /* int sqlstat = en_00000; */
if( hdbc == SQL_NULL_HDBC ) if( hdbc == SQL_NULL_HDBC )
{ {
@@ -952,16 +954,16 @@ RETCODE SQL_API SQLBrowseConnect (
SWORD FAR* pcbConnStrOut ) SWORD FAR* pcbConnStrOut )
{ {
DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; DBC_t FAR* pdbc = (DBC_t FAR*)hdbc;
HDLL hdll; /* HDLL hdll; */
char FAR* drv; char FAR* drv;
char drvbuf[1024]; char drvbuf[1024];
char FAR* dsn; char FAR* dsn;
char dsnbuf[SQL_MAX_DSN_LENGTH + 1]; char dsnbuf[SQL_MAX_DSN_LENGTH + 1];
UCHAR cnstr2drv[1024]; /* UCHAR cnstr2drv[1024]; */
HPROC hproc, dialproc; HPROC hproc /*, dialproc*/ ;
int sqlstat = en_00000; /* int sqlstat = en_00000; */
RETCODE retcode = SQL_SUCCESS; RETCODE retcode = SQL_SUCCESS;
RETCODE setopterr = SQL_SUCCESS; RETCODE setopterr = SQL_SUCCESS;

View File

@@ -32,7 +32,7 @@ HPROC _iodbcdm_getproc( HDBC hdbc, int idx )
{ {
DBC_t FAR* pdbc = (DBC_t FAR*)hdbc; DBC_t FAR* pdbc = (DBC_t FAR*)hdbc;
ENV_t FAR* penv; ENV_t FAR* penv;
HDLL hdll; /* HDLL hdll; */
HPROC FAR* phproc; HPROC FAR* phproc;
if( idx <= 0 || idx > SQL_EXT_API_LAST ) if( idx <= 0 || idx > SQL_EXT_API_LAST )

View File

@@ -28,6 +28,8 @@
#include <../iodbc/itrace.h> #include <../iodbc/itrace.h>
#include "../iodbc/herr.ci" #include "../iodbc/herr.ci"
#include <strings.h>
#include <stdio.h>
static HERR _iodbcdm_popsqlerr( HERR herr ) static HERR _iodbcdm_popsqlerr( HERR herr )
{ {

View File

@@ -27,6 +27,9 @@
#include <../iodbc/itrace.h> #include <../iodbc/itrace.h>
#include <strings.h>
#include <stdio.h>
RETCODE SQL_API SQLDataSources( RETCODE SQL_API SQLDataSources(
HENV henv, HENV henv,
UWORD fDir, UWORD fDir,
@@ -118,7 +121,7 @@ RETCODE SQL_API SQLGetInfo(
HPROC hproc; HPROC hproc;
RETCODE retcode = SQL_SUCCESS; RETCODE retcode = SQL_SUCCESS;
DWORD dword; DWORD dword = 0;
int size = 0, len = 0; int size = 0, len = 0;
char buf[16] = { '\0' }; char buf[16] = { '\0' };

View File

@@ -19,6 +19,7 @@
#include <../iodbc/isqlext.h> #include <../iodbc/isqlext.h>
#include <stdio.h> #include <stdio.h>
#include <strings.h>
static int static int
upper_strneq( upper_strneq(
@@ -26,8 +27,8 @@ upper_strneq(
char* s2, char* s2,
int n ) int n )
{ {
int i; int i;
char c1, c2; char c1 = 0, c2 = 0;
for(i=1;i<n;i++) for(i=1;i<n;i++)
{ {
@@ -108,7 +109,7 @@ readtoken(
static char* static char*
getinitfile(char* buf, int size) getinitfile(char* buf, int size)
{ {
int i, j; int /* i, */ j;
char* ptr; char* ptr;
j = STRLEN("/odbc.ini") + 1; j = STRLEN("/odbc.ini") + 1;