From owner-freebsd-ports Fri Sep 6 23: 2:14 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54E0937B400; Fri, 6 Sep 2002 23:02:01 -0700 (PDT) Received: from dibbler.ne.client2.attbi.com (dibbler.ne.client2.attbi.com [24.61.41.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9945843E4A; Fri, 6 Sep 2002 23:02:00 -0700 (PDT) (envelope-from rodrigc@attbi.com) Received: from dibbler.ne.client2.attbi.com (localhost [127.0.0.1]) by dibbler.ne.client2.attbi.com (8.12.5/8.12.5) with ESMTP id g87B4Mgr034496; Sat, 7 Sep 2002 07:04:23 -0400 (EDT) (envelope-from rodrigc@dibbler.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.ne.client2.attbi.com (8.12.5/8.12.5/Submit) id g87B4MXL034495; Sat, 7 Sep 2002 07:04:22 -0400 (EDT) Date: Sat, 7 Sep 2002 07:04:21 -0400 From: Craig Rodrigues To: freebsd-ports@freebsd.org Cc: petef@freebsd.org Subject: games/eboard fixes for new compiler Message-ID: <20020907070421.A34464@attbi.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Attached are patches for games/eboard which allow the port to be compiled with GCC 3.2. Please apply. Thanks. -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-network.cc" --- network.cc.orig Sat Jul 6 17:05:11 2002 +++ network.cc Sat Sep 7 05:38:21 2002 @@ -26,6 +26,7 @@ #include +#include #include #include #include @@ -135,7 +136,7 @@ return(strstr(dump,match)!=0); } -int BufferedConnection::consume(int handle, int amount=128) { +int BufferedConnection::consume(int handle, int amount) { int i,j; char sm[2048]; if (amount>2048) amount=2048; @@ -398,8 +399,8 @@ handshake.erase(); } -PipeConnection::PipeConnection(char *helperbin,char *arg1=0,char *arg2=0, - char *arg3=0,char *arg4=0) { +PipeConnection::PipeConnection(char *helperbin,char *arg1,char *arg2, + char *arg3,char *arg4) { init(); opmode=0; strncpy(HelperBin,helperbin,511); --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-aa --- board.cc.orig Sat Sep 7 04:44:49 2002 +++ board.cc Sat Sep 7 04:45:29 2002 @@ -626,7 +626,7 @@ queueRepaint(); } -void Board::update(bool sndflag=false) { +void Board::update(bool sndflag) { int i,j,k,rate; AnimatedPiece *ap; Position rpv; @@ -2005,7 +2005,7 @@ // ------------- targets -DropSource::DropSource(piece p, int x1,int y1,int w,int h,bool d=true) { +DropSource::DropSource(piece p, int x1,int y1,int w,int h,bool d) { X=x1; Y=y1; X2=X+w; Y2=Y+h; P=p; --- chess.cc.orig Sat Sep 7 04:48:12 2002 +++ chess.cc Sat Sep 7 05:05:27 2002 @@ -257,7 +257,7 @@ void ChessGame::updatePosition(Position &p,int movenum,int blacktomove, int wclock,int bclock,char *infoline, - bool sndflag=false) { + bool sndflag) { char z[32]; global.debug("ChessGame","updatePosition"); @@ -738,7 +738,7 @@ pgn.set("FEN", moves.front().getFEN() ); } -bool ChessGame::savePGN(char *filename, bool append=false) { +bool ChessGame::savePGN(char *filename, bool append) { char z[512]; const char *cp; list::iterator li; @@ -827,8 +827,8 @@ char * filename, bool indexonly, int gameid, - variant v = REGULAR, - ChessGame *updatee = NULL) { + variant v, + ChessGame *updatee) { /* ok, now (0.4.x) we do this in a DFA-like manner 0 = state 0 (whitespace before movetext) --- global.cc.orig Sat Sep 7 05:10:22 2002 +++ global.cc Sat Sep 7 05:22:37 2002 @@ -260,11 +260,11 @@ } } -void Global::appendGame(ChessGame *cg,bool RenumberDupes=true) { +void Global::appendGame(ChessGame *cg,bool RenumberDupes) { if (RenumberDupes) clearDupes(cg); GameList.push_back(cg); } -void Global::prependGame(ChessGame *cg, bool RenumberDupes=true) { +void Global::prependGame(ChessGame *cg, bool RenumberDupes) { if (RenumberDupes) clearDupes(cg); GameList.push_front(cg); } @@ -669,7 +669,7 @@ (*i)->setPasswordMode(pm); } -void Global::debug(char *klass,char *method,char *data=0) { +void Global::debug(char *klass,char *method,char *data) { char z[256]; time_t now; string rm; @@ -1068,7 +1068,7 @@ panes.push_back(op); } -void ChannelSplitter::appendToChannel(int ch,char *msg,int color,Importance im=IM_NORMAL) { +void ChannelSplitter::appendToChannel(int ch,char *msg,int color,Importance im) { int i,j; ensurePane(ch); j=panes.size(); --- mainwindow.cc.orig Sat Sep 7 05:26:34 2002 +++ mainwindow.cc Sat Sep 7 05:26:51 2002 @@ -997,7 +997,7 @@ } } -void MainWindow::openEngine(EngineProtocol *xpp, EngineBookmark *ebm=0) { +void MainWindow::openEngine(EngineProtocol *xpp, EngineBookmark *ebm) { int i; global.debug("MainWindow","openEngine"); disconnect(); --- movelist.cc.orig Sat Sep 7 05:29:31 2002 +++ movelist.cc Sat Sep 7 05:31:51 2002 @@ -95,8 +95,8 @@ } void MoveListWindow::updateList(list &moves, - int over=0,GameResult result=UNDEF, - char *reason=0) { + int over,GameResult result, + char *reason) { populate_clist(moves,over,result,reason); } --- notebook.cc.orig Sat Sep 7 05:39:39 2002 +++ notebook.cc Sat Sep 7 05:47:21 2002 @@ -48,7 +48,7 @@ gtk_widget_show(label); } -Page::Page(int _number,GtkWidget *_content, char *_title, bool _removable=false) { +Page::Page(int _number,GtkWidget *_content, char *_title, bool _removable) { GtkWidget *b,*p; @@ -166,7 +166,7 @@ (gpointer)this); } -void Notebook::addPage(GtkWidget *what,char *title,int id,bool removable=false) { +void Notebook::addPage(GtkWidget *what,char *title,int id,bool removable) { Page *pg; global.debug("Notebook","addPage",title); pg=new Page(id,what,title,removable); @@ -205,7 +205,7 @@ return( pages[i]->number ); } -void Notebook::setTabColor(int pageid,int color,Importance imp=IM_TOP) { +void Notebook::setTabColor(int pageid,int color,Importance imp) { vector::iterator pi; int i; global.debug("Notebook","setTabColor","1"); @@ -217,7 +217,7 @@ } void Notebook::setTabColor(int page_num,int color,int poly, - Importance imp=IM_TOP) { + Importance imp) { vector::iterator pi; GdkColor nc; GtkStyle *style; --- pieces.cc.orig Sat Sep 7 05:49:05 2002 +++ pieces.cc Sat Sep 7 05:49:52 2002 @@ -1198,7 +1198,7 @@ global.destroy("VectorPieces"); } -void VectorPieces::drawSquares(GdkPixmap *dest,GdkGC *gc,int sqside, int dx=0, int dy=0) { +void VectorPieces::drawSquares(GdkPixmap *dest,GdkGC *gc,int sqside, int dx, int dy) { int i,j; for(i=0;i<8;i++) for(j=0;j<8;j++) { --- position.cc.orig Sat Sep 7 05:51:51 2002 +++ position.cc Sat Sep 7 05:59:32 2002 @@ -257,7 +257,7 @@ return(LastMove); } -void Position::moveAnyNotation(char *m,piece color,variant Vr=REGULAR) { +void Position::moveAnyNotation(char *m,piece color,variant Vr) { int i,x,y,ml; piece pr; char xlate[12]; @@ -317,7 +317,7 @@ } } -void Position::moveStdNotation(char *m,piece color,variant Vr=REGULAR) { +void Position::moveStdNotation(char *m,piece color,variant Vr) { int from[2],to[2]; int istake, isdrop; piece what, prom; @@ -449,7 +449,7 @@ } void Position::locate(piece p,int *src,int *dest,int istake, - variant Vr=REGULAR) { + variant Vr) { int minx,maxx,miny,maxy; int i,j,dc,dr,m,n; piece kind,color; @@ -563,8 +563,8 @@ } void Position::moveCartesian(int x1,int y1,int x2,int y2, - variant Vr=REGULAR, - bool resolvepromotion=false) + variant Vr, + bool resolvepromotion) { piece color; @@ -664,7 +664,7 @@ stdNotationForMove(x1,y1,x2,y2,prom,dest); } -void Position::stdNotationForMove(int x1,int y1,int x2,int y2,piece prom,char *m,variant Vr=REGULAR) { +void Position::stdNotationForMove(int x1,int y1,int x2,int y2,piece prom,char *m,variant Vr) { Position after; stdNotationForMoveInternal(x1,y1,x2,y2,m); switch(prom) { @@ -1003,7 +1003,7 @@ return(HouseString); } -string & Position::getMaterialString(variant Vr=REGULAR) { +string & Position::getMaterialString(variant Vr) { int w=0,b=0,i,j,v; char tmp[64]; @@ -1179,7 +1179,7 @@ } // dc = defender color -bool Position::isSquareInCheck(int x,int y,piece dc,variant Vr=REGULAR) { +bool Position::isSquareInCheck(int x,int y,piece dc,variant Vr) { int i,j; // cerr << "is square in check " << (char)('a'+x) << (y+1) << " "; @@ -1208,7 +1208,7 @@ return false; } -bool Position::isInCheck(piece c,variant Vr=REGULAR) { +bool Position::isInCheck(piece c,variant Vr) { int i,j,kx,ky; // FIXME: check rules for giveaway and losers variants @@ -1228,7 +1228,7 @@ return(isSquareInCheck(kx,ky,c,Vr)); } -bool Position::isMate(piece c,variant Vr=REGULAR) { +bool Position::isMate(piece c,variant Vr) { int i,j,m,n; Position after; --- proto_xboard.cc.orig Sat Sep 7 06:04:17 2002 +++ proto_xboard.cc Sat Sep 7 06:05:10 2002 @@ -267,7 +267,7 @@ } void XBoardProtocol::gameOver(ExtPatternMatcher &pm,GameResult gr, - int hasreason=1) + int hasreason) { char reason[64]; ChessGame *refgame; --- text.cc.orig Sat Sep 7 06:09:53 2002 +++ text.cc Sat Sep 7 06:11:44 2002 @@ -198,14 +198,14 @@ gtk_widget_show(widget); } -void Text::append(char *msg,int color,Importance imp=IM_NORMAL) { +void Text::append(char *msg,int color,Importance imp) { if (Filter.accept(msg)) { pushLevel(imp); gtk_ftext_append(GTK_FTEXT(text),msg,-1,color); } } -void Text::append(char *msg,char *msg2,int color, Importance imp=IM_NORMAL) { +void Text::append(char *msg,char *msg2,int color, Importance imp) { char *d; d=(char *)g_malloc0(strlen(msg)+strlen(msg2)+1); strcpy(d,msg); @@ -253,13 +253,13 @@ } } -void TextSet::append(char *msg,int color,Importance imp=IM_NORMAL) { +void TextSet::append(char *msg,int color,Importance imp) { list::iterator ti; for(ti=targets.begin();ti!=targets.end();ti++) (*ti)->append(msg,color,imp); } -void TextSet::append(char *msg,char *msg2,int color,Importance imp=IM_NORMAL) { +void TextSet::append(char *msg,char *msg2,int color,Importance imp) { list::iterator ti; for(ti=targets.begin();ti!=targets.end();ti++) (*ti)->append(msg,msg2,color,imp); --- tstring.cc.orig Sat Sep 7 06:13:19 2002 +++ tstring.cc Sat Sep 7 06:13:46 2002 @@ -72,7 +72,7 @@ return(&ptoken); } -int tstring::tokenvalue(char *t, int base=10) { +int tstring::tokenvalue(char *t, int base) { string *v; int n; v=token(t); --1yeeQ81UyVL57Vl7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message