tags 385525 + patch kthxbye Attached is a patch to fix the FTFBS. It builds completely with the patch.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only Screw you, AACS LA: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff -ur libibtk.old/src/ibox.cpp libibtk-0.0.14/src/ibox.cpp
--- libibtk.old/src/ibox.cpp 1999-12-20 23:34:56.000000000 +0000
+++ libibtk-0.0.14/src/ibox.cpp 2007-06-28 14:17:01.000000000 +0000
@@ -17,6 +17,8 @@
\**************************************************************************/
+#include <algorithm>
+
#include <string.h>
#include <stdio.h>
#include <X11/Xlib.h>
@@ -184,7 +186,7 @@
XFillRectangle(Win->GetDisplay(), Img[1], Win->GetGC(), 2, 3,xsize-4,ysize-4);
if(Wrk[disabled] != None) {
XCopyArea(Win->GetDisplay(), Wrk[disabled], Img[disabled], Win->GetGC(),
- xscroll, 0, Wlen<?(xsize-4), ysize-4, 2, 2);
+ xscroll, 0, std::min(Wlen, (xsize-4)), ysize-4, 2, 2);
}
Redraw();
if(!hidden) Win->Redraw(xpos, ypos, xsize, ysize);
diff -ur libibtk.old/src/ibutton.cpp libibtk-0.0.14/src/ibutton.cpp
--- libibtk.old/src/ibutton.cpp 1999-12-20 23:34:56.000000000 +0000
+++ libibtk-0.0.14/src/ibutton.cpp 2007-06-28 14:17:52.000000000 +0000
@@ -17,6 +17,8 @@
\**************************************************************************/
+#include <algorithm>
+
#include <stdio.h>
#include <string.h>
@@ -120,7 +122,7 @@
void IButton::Redraw() {
if(!hidden) {
- XCopyArea(Win->GetDisplay(), Img[state<?2], Win->GetWindowBuffer(), Win->GetGC(),
+ XCopyArea(Win->GetDisplay(), Img[std::min(state,2)], Win->GetWindowBuffer(), Win->GetGC(),
0, 0, xsize, ysize, xpos, ypos);
Win->Redraw(xpos, ypos, xsize, ysize);
}
diff -ur libibtk.old/src/ilistbox.cpp libibtk-0.0.14/src/ilistbox.cpp
--- libibtk.old/src/ilistbox.cpp 1999-12-20 23:34:56.000000000 +0000
+++ libibtk-0.0.14/src/ilistbox.cpp 2007-06-28 14:19:31.000000000 +0000
@@ -17,6 +17,8 @@
\**************************************************************************/
+#include <algorithm>
+
#include <stdio.h>
#include <string.h>
@@ -95,7 +97,7 @@
XSetBackground(disp, gc, p);
XSetForeground(disp, gc, b);
XDrawImageString(disp, Wrk[ctr], gc, 0, as, txt[ctr], strlen(txt[ctr]));
- dy = dy>?ht;
+ dy = std::max(dy, ht);
}
}
if(dy>0) lines = (ysize-6)/dy;
@@ -121,9 +123,9 @@
XSetForeground(disp, gc, Win->GetPaperColor());
XFillRectangle(disp, Img, gc, 2, 2, xsize-4, ysize-4);
XSetForeground(disp, gc, Win->GetSelectColor());
- for(ctr=0; ctr<(lines<?nent); ctr++) {
+ for(ctr=0; ctr<std::min(lines, nent); ctr++) {
XCopyArea(disp, Wrk[ctr], Img, gc, 0, 0,
- wx[ctr], (wy[ctr])<?(xsize-6), 3, 3+(dy*ctr));
+ wx[ctr], std::min((wy[ctr]), (xsize-6)), 3, 3+(dy*ctr));
for(ctr2=0; ctr2<selmax; ctr2++) {
if(sel[ctr2] == ctr) {
ctr2 = selmax;
diff -ur libibtk.old/src/isbutton.cpp libibtk-0.0.14/src/isbutton.cpp
--- libibtk.old/src/isbutton.cpp 1999-12-20 23:34:56.000000000 +0000
+++ libibtk-0.0.14/src/isbutton.cpp 2007-06-28 14:20:42.000000000 +0000
@@ -17,6 +17,8 @@
\**************************************************************************/
+#include <algorithm>
+
#include <string.h>
#include "isbutton.h"
@@ -35,7 +37,7 @@
void ISButton::Redraw() {
if(!hidden) {
- XCopyArea(Win->GetDisplay(), Img[state<?2], Win->GetWindowBuffer(), Win->GetGC(),
+ XCopyArea(Win->GetDisplay(), Img[std::min(state, 2)], Win->GetWindowBuffer(), Win->GetGC(),
0, 0, xsize, ysize, xpos, ypos);
Win->Redraw(xpos, ypos, xsize, ysize);
}
diff -ur libibtk.old/src/islider.cpp libibtk-0.0.14/src/islider.cpp
--- libibtk.old/src/islider.cpp 1999-12-20 23:34:56.000000000 +0000
+++ libibtk-0.0.14/src/islider.cpp 2007-06-28 14:21:34.000000000 +0000
@@ -17,6 +17,8 @@
\**************************************************************************/
+#include <algorithm>
+
#include <stdio.h>
#include <string.h>
@@ -128,7 +130,7 @@
if(max > min && (((value-min)*(xsize-4))/(max-min)) > 0) {
- int xbar = (xsize-4) <? (((value-min)*(xsize-4))/(max-min));
+ int xbar = std::min((xsize-4), (((value-min)*(xsize-4))/(max-min)));
Wrk[0] = XCreatePixmap(disp, w, xbar, ysize-4, DefaultDepth(disp, 0));
Wrk[1] = XCreatePixmap(disp, w, xbar, ysize-4, DefaultDepth(disp, 0));
diff -ur libibtk.old/src/istatbar.cpp libibtk-0.0.14/src/istatbar.cpp
--- libibtk.old/src/istatbar.cpp 1999-12-20 23:34:56.000000000 +0000
+++ libibtk-0.0.14/src/istatbar.cpp 2007-06-28 14:22:26.000000000 +0000
@@ -17,6 +17,8 @@
\**************************************************************************/
+#include <algorithm>
+
#include <stdio.h>
#include <string.h>
@@ -93,7 +95,7 @@
(ysize+ysize-(as+des-2))>>1, txt, strlen(txt));
if(total > 0 && ((progress*(xsize-4))/total) > 0) {
- int xbar = (xsize-4) <? ((progress*(xsize-4))/total);
+ int xbar = std::min((xsize-4), ((progress*(xsize-4))/total));
Pixmap Wrk = XCreatePixmap(disp, w, xbar, ysize-4, DefaultDepth(disp, 0));
XSetForeground(disp, gc, Win->GetSelectColor());
XFillRectangle(disp, Wrk, gc, 0, 0, xbar, ysize-4);
diff -ur libibtk.old/src/iwindow.cpp libibtk-0.0.14/src/iwindow.cpp
--- libibtk.old/src/iwindow.cpp 1999-12-20 23:34:56.000000000 +0000
+++ libibtk-0.0.14/src/iwindow.cpp 2007-06-28 14:24:30.000000000 +0000
@@ -19,6 +19,8 @@
#include "iwindow.h"
+#include <algorithm>
+
#define DEFAULT_NAME "IBTK v0.0"
#include <X11/X.h>
@@ -555,12 +557,12 @@
void IWindow::Redraw(int x, int y, int xs, int ys) {
// XClearArea(Disp, Win, x, y, xs<?(bufxs-x), ys<?(bufys-y), False);
- XCopyArea(Disp, WinBuf, Win, gc, x, y, xs<?(bufxs-x), ys<?(bufys-y), x, y);
+ XCopyArea(Disp, WinBuf, Win, gc, x, y, std::min(xs,(bufxs-x)), std::min(ys,(bufys-y)), x, y);
}
void IWindow::Redraw() {
XClearWindow(Disp, Win);
- XCopyArea(Disp, WinBuf, Win, gc, 0, 0, xsize<?bufxs, ysize<?bufys, 0, 0);
+ XCopyArea(Disp, WinBuf, Win, gc, 0, 0, std::min(xsize, bufxs), std::min(ysize, bufys), 0, 0);
}
void IWindow::Rebuild(int x, int y, int xs, int ys) {
signature.asc
Description: Digital signature

