head	1.19;
access;
symbols
	pkgsrc-2013Q2:1.19.0.12
	pkgsrc-2013Q2-base:1.19
	pkgsrc-2012Q4:1.19.0.10
	pkgsrc-2012Q4-base:1.19
	pkgsrc-2011Q4:1.19.0.8
	pkgsrc-2011Q4-base:1.19
	pkgsrc-2011Q2:1.19.0.6
	pkgsrc-2011Q2-base:1.19
	pkgsrc-2009Q4:1.19.0.4
	pkgsrc-2009Q4-base:1.19
	pkgsrc-2008Q4:1.19.0.2
	pkgsrc-2008Q4-base:1.19
	pkgsrc-2008Q3:1.18.0.34
	pkgsrc-2008Q3-base:1.18
	cube-native-xorg:1.18.0.32
	cube-native-xorg-base:1.18
	pkgsrc-2008Q2:1.18.0.30
	pkgsrc-2008Q2-base:1.18
	cwrapper:1.18.0.28
	pkgsrc-2008Q1:1.18.0.26
	pkgsrc-2008Q1-base:1.18
	pkgsrc-2007Q4:1.18.0.24
	pkgsrc-2007Q4-base:1.18
	pkgsrc-2007Q3:1.18.0.22
	pkgsrc-2007Q3-base:1.18
	pkgsrc-2007Q2:1.18.0.20
	pkgsrc-2007Q2-base:1.18
	pkgsrc-2007Q1:1.18.0.18
	pkgsrc-2007Q1-base:1.18
	pkgsrc-2006Q4:1.18.0.16
	pkgsrc-2006Q4-base:1.18
	pkgsrc-2006Q3:1.18.0.14
	pkgsrc-2006Q3-base:1.18
	pkgsrc-2006Q2:1.18.0.12
	pkgsrc-2006Q2-base:1.18
	pkgsrc-2006Q1:1.18.0.10
	pkgsrc-2006Q1-base:1.18
	pkgsrc-2005Q4:1.18.0.8
	pkgsrc-2005Q4-base:1.18
	pkgsrc-2005Q3:1.18.0.6
	pkgsrc-2005Q3-base:1.18
	pkgsrc-2005Q2:1.18.0.4
	pkgsrc-2005Q2-base:1.18
	pkgsrc-2005Q1:1.18.0.2
	pkgsrc-2005Q1-base:1.18
	pkgsrc-2004Q4:1.17.0.10
	pkgsrc-2004Q4-base:1.17
	pkgsrc-2004Q3:1.17.0.8
	pkgsrc-2004Q3-base:1.17
	pkgsrc-2004Q2:1.17.0.6
	pkgsrc-2004Q2-base:1.17
	pkgsrc-2004Q1:1.17.0.4
	pkgsrc-2004Q1-base:1.17
	pkgsrc-2003Q4:1.17.0.2
	pkgsrc-2003Q4-base:1.17
	netbsd-1-6-1:1.14.0.2
	netbsd-1-6-1-base:1.14
	netbsd-1-6:1.8.0.8
	netbsd-1-6-RELEASE-base:1.8
	pkgviews:1.8.0.4
	pkgviews-base:1.8
	buildlink2-base:1.8
	buildlink2:1.8.0.2
	pkgsrc-base:1.1.1.1
	TNF:1.1.1;
locks; strict;
comment	@# @;


1.19
date	2008.11.02.00.11.13;	author snj;	state dead;
branches;
next	1.18;

1.18
date	2005.02.27.10.40.04;	author rillig;	state Exp;
branches;
next	1.17;

1.17
date	2003.11.25.08.43.51;	author tron;	state dead;
branches;
next	1.16;

1.16
date	2003.04.06.11.48.25;	author tron;	state Exp;
branches;
next	1.15;

1.15
date	2003.03.31.07.57.24;	author tron;	state Exp;
branches;
next	1.14;

1.14
date	2002.12.30.02.09.26;	author dmcmahill;	state Exp;
branches;
next	1.13;

1.13
date	2002.12.23.22.46.56;	author tron;	state dead;
branches;
next	1.12;

1.12
date	2002.12.19.11.45.21;	author tron;	state Exp;
branches;
next	1.11;

1.11
date	2002.10.27.21.54.26;	author tron;	state dead;
branches;
next	1.10;

1.10
date	2002.10.12.12.25.56;	author tron;	state Exp;
branches;
next	1.9;

1.9
date	2002.09.15.06.34.04;	author martin;	state dead;
branches;
next	1.8;

1.8
date	2002.06.12.21.51.28;	author tron;	state Exp;
branches
	1.8.2.1;
next	1.7;

1.7
date	2002.06.12.13.55.06;	author tron;	state Exp;
branches;
next	1.6;

1.6
date	2002.03.22.21.59.57;	author tron;	state dead;
branches;
next	1.5;

1.5
date	2001.11.21.22.40.06;	author tron;	state Exp;
branches;
next	1.4;

1.4
date	2001.10.07.22.44.21;	author tron;	state Exp;
branches;
next	1.3;

1.3
date	2001.10.07.22.17.20;	author tron;	state Exp;
branches;
next	1.2;

1.2
date	2001.10.07.08.29.44;	author tron;	state dead;
branches;
next	1.1;

1.1
date	2001.09.22.05.38.22;	author jlam;	state Exp;
branches
	1.1.1.1;
next	;

1.8.2.1
date	2002.06.12.21.51.28;	author jlam;	state dead;
branches;
next	1.8.2.2;

1.8.2.2
date	2002.06.23.18.53.00;	author jlam;	state Exp;
branches;
next	;

1.1.1.1
date	2001.09.22.05.38.22;	author jlam;	state Exp;
branches;
next	;


desc
@@


1.19
log
@Remove bidwatcher.  It has been unmaintained for years and does not work
after (years ago) one of eBay's many site changes.
@
text
@$NetBSD: patch-aa,v 1.18 2005/02/27 10:40:04 rillig Exp $

The header file uses the FILE type without including <cstdio>.
This breaks (at least) on NetBSD-1.6.2.

--- bidwatcher.h.orig	Fri Feb 18 04:30:20 2005
+++ bidwatcher.h	Sat Feb 26 14:15:23 2005
@@@@ -29,6 +29,7 @@@@
 #include "config.h"
 #endif
 
+#include <cstdio>
 #include <string>
 
 using namespace std;
@


1.18
log
@Added a patch to make bidwatcher build on NetBSD-1.6.2. Reviewed by tron.
@
text
@d1 1
a1 1
$NetBSD$
@


1.17
log
@Update "bidwatcher" package to version 1.3.11rc1.
Changes since version 1.3.10:
- Fixed Bug #779784 Keeps updating finished auctions
- More portable build (builds with Compaq's C++ compiler)
- Removed some dead code.
- Details window shows all available information.
- Fixed BuyItNow autodeletion bug.
- Added basic proxy authentication.
- Fixed some BuyItNow handling.
- GetUserListings fixes.
- Better compatibility with Purchase Only auctions.
- Fixed quantity amount in detail window.
- Fixed bigUpdate: timeToNextEnd was > 5 mins, so it wouldn't fire.
- Fixed the idempotent header defines in bidwatcher.h
- Added functionality to open to a specific ebay country website.
- Fixed GMTIME BSD specific code.
- Don't try to bid if we failed to get the snipe key
- Fixed "Bid too low" message
- Fixed "You are highest bidder" message
- Fixed "Outbid" detection
- Added Pragma headers to coerce proxies into refreshing the content
- Printout log messages since they currently disappear in the statusbar.
- Changed needelessly complex status bar operations.
- Fixed pre-bid on ended auctions error message
- Fixed pre-bid/snipe URL+headers
- Fixed updating after snipe
- Updated User-Agent
- Handy --enable-debug configure option
@
text
@d1 1
a1 1
$NetBSD: patch-aa,v 1.16 2003/04/06 11:48:25 tron Exp $
d3 7
a9 8
--- bidwatcher.cpp.orig	2002-12-23 08:49:08.000000000 +0100
+++ bidwatcher.cpp	2003-03-31 09:53:56.000000000 +0200
@@@@ -4093,7 +4093,7 @@@@
       
       if (strlen(HtmlBuff) < 1000) {
 #ifdef DEBUG_NETWORK
-	fprintf(stderr, "Short web page (%d bytes) from ebay's time web page, retrying... (%d)\n", strlen(HtmlBuff), i);
+	fprintf(stderr, "Short web page (%ld bytes) from ebay's time web page, retrying... (%d)\n", (long int)strlen(HtmlBuff), i);
d11 5
a15 2
 	continue;
       }
@


1.16
log
@Back out timezone fix from revision 1. It doesn't work properly when
California an Central Europe are both on DST. Bump package revision again.
@
text
@d1 1
a1 1
$NetBSD: patch-aa,v 1.15 2003/03/31 07:57:24 tron Exp $
@


1.15
log
@Fix time difference problem which shows up when the local system is on
DST and eBay is not. Based on a suggestion from Bernd Ernesti.
@
text
@d1 1
a1 1
$NetBSD$
a13 13
@@@@ -4139,7 +4139,11 @@@@
   int local_timeDiff;
   
 #if defined(HAVE_GMTIME)
-  gmt_time = time_now - mktime(gmtime(&time_now));
+  struct tm gmt_tm;
+
+  gmt_tm = *gmtime(&time_now);
+  gmt_tm.tm_isdst = -1;
+  gmt_time = time_now - mktime(&gmt_tm);
 #elif defined(HAVE_TM_ZONE)
   struct tm * timeStruct = localtime(&time_now);
   gmt_time = timeStruct->tm_gmtoff;
@


1.14
log
@fix some format string bugs on 64 bit systems.
@
text
@d3 3
a5 3
--- bidwatcher.cpp.orig	Mon Dec 23 02:49:08 2002
+++ bidwatcher.cpp
@@@@ -4093,7 +4093,7 @@@@ void TimeSync()
d14 13
@


1.13
log
@Update "bidwatcher" package to version 1.3.7. Changes since version 1.3.6:
- Fix the bigdelay callback
- Fix eBay breakage.
- Added autogen.sh to CVS for easier building.
@
text
@d1 1
a1 1
$NetBSD: patch-aa,v 1.12 2002/12/19 11:45:21 tron Exp $
d3 10
a12 70
--- helpers.cpp.orig	Mon Oct 21 03:56:16 2002
+++ helpers.cpp	Thu Dec 19 12:42:54 2002
@@@@ -49,21 +49,25 @@@@
 
 char *CheckPrice="0123456789.$,";      // Characters allowed in a price   
 
-char *SearchOps[2][16]={{ "Starts at",           // 1:  +1
-			  "Currently",           // 2:  +1
-			  "First bid",           // 3:  +1
-			  "Quantity",            // 4:  +1
-			  "# of bids",           // 5:  +1
-			  "Time left",           // 6:  +1
-			  "Location",            // 7:  +1
-			  "Started",             // 8:  +1
-			  "Ends",                // 9:  +1
-			  "Seller (Rating)",     // 10: +1
-			  "High bid",            // 11: +1
-			  "Bid increment",       // 12: +1
-			  "This is a ",          // 13: +1
-			  "Lowest",              // 14: +1
-			  "(reserve ",           // 15:
+char *SearchOps[2][20]={{ "Starts at",           // 1
+			  "Currently",           // 2
+			  "First bid",           // 3
+			  "Quantity",            // 4
+			  "# of bids",           // 5
+			  "Time left",           // 6
+			  "Location",            // 7
+			  "Started",             // 8
+			  "Ends",                // 9
+			  "Seller (Rating)",     // 10
+			  "High bid",            // 11
+			  "Bid increment",       // 12
+			  "This is a ",          // 13
+			  "Lowest",              // 14
+			  "(reserve ",           // 15
+			  "Current bid",	 // 16
+			  "Starting bid",	 // 17
+			  "Seller (rating)",	 // 18
+			  "High bidder",	 // 19
 			  "*"},
 			/* eBay Motors */
 			{ "Currently",           // 1
@@@@ -183,6 +187,8 @@@@
     if (!strcmp(temp, "nbsp") || !strcmp(temp, "copy") || 
 	!strcmp(temp, "#8260") || !strcmp(temp, "#12288"))
       return ' ';
+    if (!strcmp(temp, "middot")) // This should be trademark
+      return ' ';
     if (!strcmp(temp, "#8482")) // This should be trademark
       return ' ';
     if (!strcmp(temp, "#8220")) // lower double-quote
@@@@ -622,13 +628,13 @@@@
 }
 
 // returns a 0-terminated array of ids of auctions in which we've participated
-unsigned int * ParseList2(char * Buff)
+unsigned long * ParseList2(char * Buff)
 {
   char lineBuff[2048];
   int nlpos;
   
-  unsigned int ids[512], numids=0;
-  unsigned int *retval;
+  unsigned long ids[512], numids=0;
+  unsigned long *retval;
   unsigned int i;
   
   
@@@@ -648,7 +654,7 @@@@
a13 38
     }
   
-  retval = (unsigned int *) malloc(sizeof(unsigned int)*(numids+1));
+  retval = (unsigned long *) malloc(sizeof(unsigned long)*(numids+1));
   for(i=0; i < numids; i++) retval[i] = ids[i];
   retval[i] = 0;
   return retval;
@@@@ -1010,6 +1016,7 @@@@
        case TYPE_EBAY:
 	 switch (ReturnBidVarNum(LineData, auc_type)) {
 	 case 1: 
+	 case 16:
 	 case 14: // "Lowest" -shows up on motorsnotcars
 	 case 2: // current price
 	   if (CurrentBid==0) {
@@@@ -1027,6 +1034,7 @@@@
 		 streamBuff.unget();
 	   }
 	   break;
+	 case 17:
 	 case 3:  // first bid
 	   if (!FirstBid) {
 	     streamBuff.getline(LineData, 1024, '\n');
@@@@ -1085,12 +1093,14 @@@@
 	     translate_date(Ends);
 	   }
 	   break;
+	 case 18:
 	 case 10: // seller id
 	   if (!Seller[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
 	     strncpy(Seller, LineData, 75);
 	   }
 	   break;
+	 case 19:
 	 case 11: // high bidder id
 	   if (!HighBidder[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
@


1.12
log
@Use a patch from the CVS repository to fix problem with adding auctions.
Bump package revision.
@
text
@d1 1
a1 1
$NetBSD$
@


1.11
log
@Update "bidwatcher" to version 1.3.6. Changes since version 1.3.5:
- Added Comment field.
- Fixed ebay time sync'ing.
- Fix bad "Host:" entity-header if a proxy server was used. It used
  to send "Host: proxy.do.main" instead of "Host: whatever.ebay.com".
- It now sends an "User-Agent" string which looks like Mozilla 1.1
  including the real operating system and machine.
- It support using "POST" for the actual bid. I've succesfully tested
  this by bidding on an auction.
- Fixed stupid bug introduced in 1.3.5 for certain ebay motors auctions
- Fixed handling bad DNS responses.
@
text
@d1 1
a1 1
$NetBSD: patch-aa,v 1.10 2002/10/12 12:25:56 tron Exp $
d3 84
a86 3
--- helpers.cpp.orig	Sat Oct 12 11:07:22 2002
+++ helpers.cpp	Sat Oct 12 11:07:43 2002
@@@@ -1000,12 +1000,12 @@@@
d89 2
a90 14
 	     streamBuff.getline(LineData, 1024, '\n');
-	     parseprice(LineData,this,FALSE);
+	     parseprice(LineData, this, FALSE);
 	     
 	     streamBuff.getline(LineData, 1024, '\n');
-	     if (strstr(LineData,"reserve not") != NULL)
+	     if (strstr(LineData, "reserve not"))
 	       reserveMet = 'n';
-	     else if (strstr(LineData,"reserve met") != NULL)
+	     else if (strstr(LineData, "reserve met"))
 	       reserveMet = 'y';
 	     else
 	       // Not a reserve auction, put the chars back.
@@@@ -1014,92 +1014,92 @@@@
d93 1
d95 1
a95 27
-	   if (FirstBid==0) {
+	   if (!FirstBid) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     parseprice(LineData,this,TRUE);
-	     /*	     CheckBadChars(LineData,CheckPrice);
-		     strncpy(FirstBid,LineData,14); */
+	     parseprice(LineData, this, TRUE);
+	     /*	     CheckBadChars(LineData, CheckPrice);
+		     strncpy(FirstBid, LineData, 14); */
 	   }
 	   break;
 	 case 4: // quantity
-	   if (Quantity==0) {
+	   if (!Quantity) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     CheckBadChars(LineData,"0123456789");
-	     //	     strncpy(Quantity,LineData,14);
-	     Quantity=atoi(LineData);
+	     CheckBadChars(LineData, "0123456789");
+	     //	     strncpy(Quantity, LineData, 14);
+	     Quantity = atoi(LineData);
 	   }
 	   break;
 	 case 5: // bid count
-	   if (BidCount==0) {
+	   if (!BidCount) {
 	     char bc[80];
d97 1
a97 50
-	     for(cnt=0;(((LineData[cnt]!=' ') && 
-			 (LineData[cnt]!=0)) && (cnt<14));++cnt)
-	       bc[cnt]=LineData[cnt];
-	     bc[cnt]=0;
-	     BidCount=atoi(bc);
+	     for(cnt=0; (((LineData[cnt]!=' ') && 
+			  (LineData[cnt]!=0)) && (cnt<14)); ++cnt)
+	       bc[cnt] = LineData[cnt];
+	     bc[cnt] = 0;
+	     BidCount = atoi(bc);
 	   }
 	   break;
 	 case 6: // time left
-	   if (TimeLeft[0]==0) {
+	   if (!TimeLeft[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(TimeLeft,LineData,50);
-	     if (strstr(LineData, "Auction has ended") != NULL ) { //DBS
-	       ended_early = 1;					   //DBS
+	     strncpy(TimeLeft, LineData, 50);
+	     if (strstr(LineData, "Auction has ended")) { //DBS
+	       ended_early = 1;				  //DBS
 	       showError("Auction has ended.");
 	     }
 	     
 	   }
 	   break;
 	 case 7: // location
-	   if (Location[0]==0) {
+	   if (!Location[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(Location,LineData,100);
+	     strncpy(Location, LineData, 100);
 	   }
 	   break;
 	 case 8: // time started
-	   if (Started[0]==0) {
+	   if (!Started[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(Started,LineData,50);
+	     strncpy(Started, LineData,50);
 	     translate_date(Started);
 	   }
 	   break;
 	 case 9: // time ending
-	   if (Ends[0]==0) {
+	   if (!Ends[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(Ends,LineData,50);
+	     strncpy(Ends, LineData, 50);
d101 1
d103 1
a103 2
-	   if (Seller[0]==0) {
+	   if (!Seller[0]) {
d105 1
a105 2
-	     strncpy(Seller,LineData,75);
+	     strncpy(Seller, LineData, 75);
d108 1
d110 1
a110 47
-	   if (HighBidder[0]==0) {
+	   if (!HighBidder[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(HighBidder,LineData,76);
+	     strncpy(HighBidder, LineData, 76);
 	     HighBidder[75] = '\0';
 	   }
 	   break;
 	   
-	   //case 12: idx=GetLineOfData(idx,1024,LineData,Buff);
-	   //         CheckBadChars(LineData,CheckPrice);
-	   //         strncpy(BidInc,LineData,14);
+	   //case 12: idx=GetLineOfData(idx, 1024, LineData, Buff);
+	   //         CheckBadChars(LineData, CheckPrice);
+	   //         strncpy(BidInc, LineData, 14);
 	   //         break;
 	      
 	 case 13: // dutch auction
 	   streamBuff.getline(LineData, 1024, '\n');
-	   if (strcmp(LineData, "Dutch Auction") == 0)
+	   if (!strcmp(LineData, "Dutch Auction"))
 	     strcpy(HighBidder, "Dutch Auction");
 	   break;
 
 	 case 15: // reserve auctions
-	   if (strstr(LineData,"reserve not") != NULL)
+	   if (strstr(LineData,"reserve not"))
 	     reserveMet = 'n';
-	   else if (strstr(LineData,"reserve met") != NULL)
+	   else if (strstr(LineData,"reserve met"))
 	     reserveMet = 'y';
 
 	 default:;
@@@@ -1109,78 +1109,78 @@@@
 
        case TYPE_EBAYMOTORSCAR:
 	 //printf("LD:%s:%i\n", LineData, strlen(LineData));
-	 switch(ReturnBidVarNum(LineData,auc_type)) {
+	 switch(ReturnBidVarNum(LineData, auc_type)) {
 	 case 9:
 	 case 1:  // Current Bid
-	   if (CurrentBid==0) {
+	   if (!CurrentBid) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     parseprice(LineData,this,FALSE);
+	     parseprice(LineData, this, FALSE);
 	     
a111 180
-	     if (strstr(LineData,"reserve not") != NULL)
+	     if (strstr(LineData, "reserve not"))
 	       reserveMet = 'n';
-	     else if (strstr(LineData,"reserve met") != NULL)
+	     else if (strstr(LineData, "reserve met"))
 	       reserveMet = 'y';
-	     else if (strstr(LineData,"Time left") != NULL)
+	     else if (strstr(LineData, "Time left"))
 	       TimeLeft[0] = '0';
 	   }
 	   break;
 	    
 	 case 2: //Time left
-	   if (TimeLeft[0]==0) {
+	   if (!TimeLeft[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(TimeLeft,LineData,50);
+	     strncpy(TimeLeft, LineData, 50);
 	   }
 	   break;
 	 case 3: //Seller
-	   if (Seller[0]==0) {
+	   if (!Seller[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(Seller,LineData,75);
+	     strncpy(Seller, LineData, 75);
 	   }
 	   break;
 	 case 4: //High bid
-	   if (HighBidder[0]==0) {
+	   if (!HighBidder[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(HighBidder,LineData,76);
+	     strncpy(HighBidder, LineData, 76);
 	     HighBidder[75] = '\0';
 	   }
 	   break;
 	 case 5: //Number of bids
-	   if (BidCount==0) {
+	   if (!BidCount) {
 	     char bc[80];
 	     streamBuff.getline(LineData, 1024, '\n');
-	     for(cnt=0;(((LineData[cnt]!=' ') && 
-			 (LineData[cnt]!=0)) && (cnt<14));++cnt)
-	       bc[cnt]=LineData[cnt];
-	     bc[cnt]=0;
-	     BidCount=atoi(bc);
+	     for(cnt=0; (((LineData[cnt]!=' ') && 
+			  (LineData[cnt]!=0)) && (cnt<14)); ++cnt)
+	       bc[cnt] = LineData[cnt];
+	     bc[cnt] = 0;
+	     BidCount = atoi(bc);
 	   }
 	   break;
 	 case 6: //Location
-	   if (Location[0]==0) {
+	   if (!Location[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(Location,LineData,100);
+	     strncpy(Location, LineData, 100);
 	   }
 	   break;
 	 case 7: //Started
-	   if (Started[0]==0) {
+	   if (!Started[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(Started,LineData,50);
-	     translate_date( Started );
+	     strncpy(Started, LineData, 50);
+	     translate_date(Started);
 	   }
 	   break;
 	 case 8: //Ends
-	   if (Ends[0]==0) {
+	   if (!Ends[0]) {
 	     streamBuff.getline(LineData, 1024, '\n');
-	     strncpy(Ends,LineData,50);
-	     translate_date( Ends );
+	     strncpy(Ends, LineData, 50);
+	     translate_date(Ends);
 	   }
 	   break;
 
 	 case 10: // reserve auctions
-	   if (strstr(LineData,"reserve not") != NULL)
+	   if (strstr(LineData, "reserve not"))
 	     reserveMet = 'n';
-	   else if (strstr(LineData,"reserve met") != NULL)
+	   else if (strstr(LineData, "reserve met"))
 	     reserveMet = 'y';
 	   
 	 default:;
@@@@ -1210,16 +1210,16 @@@@
    if (!scratch) return FALSE;
 
    strcpy(Seller, scratch);
-   scratch = strtok(0,")");
+   scratch = strtok(0, ")");
 
    if (scratch) {
       strcpy(SellerRate, scratch);
       strcat(SellerRate, ")");
    }
 
-   if ((strcmp(HighBidder, "Dutch Auction") == 0) ||
-       (strcmp(HighBidder, "see Dutch high bidders") == 0) ||
-       (strcmp(HighBidder, "--") == 0) ) {
+   if ((!strcmp(HighBidder, "Dutch Auction")) ||
+       (!strcmp(HighBidder, "see Dutch high bidders")) ||
+       (!strcmp(HighBidder, "--")) ) {
      return TRUE;
    } else {
      strcpy(newName, HighBidder);
@@@@ -1228,7 +1228,7 @@@@
      if (!scratch) return FALSE;
      
      strcpy(HighBidder, scratch);
-     scratch = strtok(0,")");
+     scratch = strtok(0, ")");
      if (scratch) {
        strcpy(BidderRate, scratch);
        strcat(BidderRate, ")");
@@@@ -1303,12 +1303,24 @@@@
    ebay_time.tm_isdst = 0;
    while(streamBuff) {
      streamBuff.getline(lineBuff, 1024, '\n');
-     if (strstr(lineBuff, 
-		"Look here to see what time eBay thinks it is") != NULL ) {
+     /*
+     if (strstr(lineBuff, "Look here to see what time eBay thinks it is")) {
        scratch = strtok(lineBuff, ">");
        if (scratch) scratch = strtok(0, ">");
        if (scratch) scratch = strtok(0, ">");
        if (scratch) scratch = strtok(0, " ");
+     */
+
+     scratch = strstr(lineBuff, "Monday");
+     if (!scratch) scratch = strstr(lineBuff, "Tuesday");
+     if (!scratch) scratch = strstr(lineBuff, "Wednesday");
+     if (!scratch) scratch = strstr(lineBuff, "Thursday");     
+     if (!scratch) scratch = strstr(lineBuff, "Friday");     
+     if (!scratch) scratch = strstr(lineBuff, "Saturday");     
+     if (!scratch) scratch = strstr(lineBuff, "Sunday");     
+
+     if (scratch) {
+       scratch = strtok(scratch, " "); 
        if (scratch) scratch = strtok(0, " ");
        if (scratch) strcpy(chMonth, scratch);
        scratch = strtok(0, " ");
@@@@ -1335,18 +1347,18 @@@@
                        ((int(chSec[strlen(chSec) - 1])) - 48);
    ebay_time.tm_mday = atoi(chDay); 
    if (strcmp("Jan", chMonth) == 0) ebay_time.tm_mon = 0 ;
-   else if (strcmp("Feb", chMonth) == 0) ebay_time.tm_mon = 1 ;
-   else if (strcmp("Mar", chMonth) == 0) ebay_time.tm_mon = 2 ;
-   else if (strcmp("Apr", chMonth) == 0) ebay_time.tm_mon = 3 ;
-   else if (strcmp("May", chMonth) == 0) ebay_time.tm_mon = 4 ;
-   else if (strcmp("Jun", chMonth) == 0) ebay_time.tm_mon = 5 ;
-   else if (strcmp("Jul", chMonth) == 0) ebay_time.tm_mon = 6 ;
-   else if (strcmp("Aug", chMonth) == 0) ebay_time.tm_mon = 7 ;
-   else if (strcmp("Sep", chMonth) == 0) ebay_time.tm_mon = 8 ;
-   else if (strcmp("Oct", chMonth) == 0) ebay_time.tm_mon = 9 ;
-   else if (strcmp("Nov", chMonth) == 0) ebay_time.tm_mon = 10 ;
-   else ebay_time.tm_mon = 11;   
-   ebay_time.tm_year = atoi(chYear) - 1900;  
+   else if (strcmp("Feb", chMonth) == 0) ebay_time.tm_mon = 1;
+   else if (strcmp("Mar", chMonth) == 0) ebay_time.tm_mon = 2;
+   else if (strcmp("Apr", chMonth) == 0) ebay_time.tm_mon = 3;
+   else if (strcmp("May", chMonth) == 0) ebay_time.tm_mon = 4;
+   else if (strcmp("Jun", chMonth) == 0) ebay_time.tm_mon = 5;
+   else if (strcmp("Jul", chMonth) == 0) ebay_time.tm_mon = 6;
+   else if (strcmp("Aug", chMonth) == 0) ebay_time.tm_mon = 7;
+   else if (strcmp("Sep", chMonth) == 0) ebay_time.tm_mon = 8;
+   else if (strcmp("Oct", chMonth) == 0) ebay_time.tm_mon = 9;
+   else if (strcmp("Nov", chMonth) == 0) ebay_time.tm_mon = 10;
+   else ebay_time.tm_mon = 11;
+   ebay_time.tm_year = atoi(chYear) - 1900;
 
    time_t theTime = mktime(&ebay_time) - new_time_t;
 
@


1.10
log
@Add changes from the "bidwatcher" CVS repository which fixes the problem
with the time synchronization. Bump package revision to 1.
@
text
@d1 1
a1 1
$NetBSD$
@


1.9
log
@Ooops, botched last update. Remove patch-aa, which is now already integrated
into the distribution.
@
text
@d1 1
a1 1
$NetBSD: patch-aa,v 1.8 2002/06/12 21:51:28 tron Exp $
d3 135
a137 5
--- netstuff.cpp.orig	Thu Jun  6 03:52:08 2002
+++ netstuff.cpp	Wed Jun 12 23:46:36 2002
@@@@ -247,6 +247,8 @@@@
    fd_set fds;
    struct timeval tm;
d139 122
a260 4
+   *Buff = NULL;
+
    GTimer * time_since_start=g_timer_new();
    g_timer_start(time_since_start);
d262 3
a264 1
@@@@ -330,7 +332,7 @@@@
d267 75
a341 3
    // send our request for the web page.
-   sprintf(lineBuff, "GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: bidwatcher\r\n%s\r\n", url->url, url->hostinfo->h_name, cookie);
+   sprintf(lineBuff, "GET %s HTTP/1.1\r\nConnection: close\r\nHost: %s\r\nUser-Agent: bidwatcher\r\n%s\r\n", url->url, url->hostinfo->h_name, cookie);
a342 2
    if (send(socketID, lineBuff, strlen(lineBuff), 0) < 0) {
 #ifdef DEBUG_NETWORK
@


1.8
log
@"bidwatcher" tries to use HTTP/1.1 but is not able to handle persistant
connections. Use "Connection: close" in HTTP request headers to avoid
network timeout caused by this bug. Bump version number to 1.3.4nb2.
@
text
@d1 1
a1 1
$NetBSD$
@


1.8.2.1
log
@file patch-aa was added on branch buildlink2 on 2002-06-23 18:53:00 +0000
@
text
@d1 22
@


1.8.2.2
log
@Merge from pkgsrc-current to buildlink2 branch.
@
text
@a0 22
$NetBSD: patch-aa,v 1.8.2.1 2002/06/23 18:53:00 jlam Exp $

--- netstuff.cpp.orig	Thu Jun  6 03:52:08 2002
+++ netstuff.cpp	Wed Jun 12 23:46:36 2002
@@@@ -247,6 +247,8 @@@@
    fd_set fds;
    struct timeval tm;
 
+   *Buff = NULL;
+
    GTimer * time_since_start=g_timer_new();
    g_timer_start(time_since_start);
 
@@@@ -330,7 +332,7 @@@@
    }
 
    // send our request for the web page.
-   sprintf(lineBuff, "GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: bidwatcher\r\n%s\r\n", url->url, url->hostinfo->h_name, cookie);
+   sprintf(lineBuff, "GET %s HTTP/1.1\r\nConnection: close\r\nHost: %s\r\nUser-Agent: bidwatcher\r\n%s\r\n", url->url, url->hostinfo->h_name, cookie);
 
    if (send(socketID, lineBuff, strlen(lineBuff), 0) < 0) {
 #ifdef DEBUG_NETWORK
@


1.7
log
@Initialize buffer point to "NULL" in fetchURL() to avoid problem when
free(3) is used later.
@
text
@d4 1
a4 1
+++ netstuff.cpp	Wed Jun 12 15:51:57 2002
d14 9
@


1.6
log
@Update "bidwatcher" package to version 1.3.3. Changes since version 1.3.0:
- many bug fixes
- improved GUI
- experimental bidding daemon
@
text
@d1 1
a1 1
$NetBSD: patch-aa,v 1.5 2001/11/21 22:40:06 tron Exp $
d3 5
a7 13
--- bidwatcher.cpp.orig	Thu Jul  5 02:31:54 2001
+++ bidwatcher.cpp	Wed Nov 21 23:34:17 2001
@@@@ -5,6 +5,7 @@@@
 // Tom McNair  (tmcnair@@cyberhighway.net)
 // Wayne Schlitt (wayne@@midwestcs.com)
 // Ben Byer (bushing@@users.sourceforge.net)
+// Kevin Dwyer (kevin@@pheared.net)
 // 
 // use of this code is restricted to the terms
 // of the GNU GPL, which should have been included in this
@@@@ -61,6 +62,8 @@@@
 char * banner2 = "help us: please report ALL bugs at "
                  "http://sourceforge.net/projects/bidwatcher";
d9 1
a9 1
+const char * const bw_subdir = ".bidwatcher";
d11 2
a12 27
 unsigned int * ParseList2(char *);
 void WriteAucFile2(void);
 void ReadAucFile2(void);
@@@@ -137,15 +140,15 @@@@
   int i;
   for(i=0;i<aucIdx;i++) {
     if(auction[i]==NULL) {
-      printf("auction[%d] was null at %d\n",i,line);
+      printf("auction[%lu] was null at %d\n",i,line);
       die();
     }
     /*    if(auction[i]->infourl==NULL) {
-      printf("auction[%d]->infourl was invalid at %d\n",i,line);
+      printf("auction[%lu]->infourl was invalid at %d\n",i,line);
       die();
       } */
     if(auction[i]->magic!=12345) {
-      printf("auction[%d]->magic was %d at %d\n",i,auction[i]->magic,line);
+      printf("auction[%lu]->magic was %d at %d\n",i,auction[i]->magic,line);
       die();
     }
   }
@@@@ -256,9 +259,10 @@@@
 {
   if (updateInProgress ) return;
   updateInProgress = TRUE;
+  int retval;
a13 556
-  if(strlen(authID)>1) switch(GetUserBids2()) {
-  case 1:
+  if(strlen(authID)>1) switch(retval=GetUserBids2()) {
+  case GUA_SUCCESS:
     GetUserListings();
     UpdateList();
     break;
@@@@ -267,7 +271,7 @@@@
     break;
   default:
     showError("Update failed: Network error");
-			 
+    printf("getuserbids2 returned %d\n",retval);
   }
   
   if ( aucIdx != 0 ) UpdateAll(FALSE);
@@@@ -335,7 +339,7 @@@@
   myBidQuantity=quantity;
   printf("myBidAmount set to %f\n",bid);
   bidurl=new URL(g_strdup_printf("http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?"
-				  "MakeBid&item=%d&maxbid=%.2f&quant=%d",
+				  "MakeBid&item=%lu&maxbid=%.2f&quant=%d",
 				  ItemNumber,bid,quantity),proxyurl);
   int returnVal = fetchURL(bidurl, &Buff, TIMEOUT);
   if ( returnVal != 1 )
@@@@ -352,19 +356,19 @@@@
 
   switch(returnVal) {
   case PBS_BIDTOOLOW:
-    sprintf(lineBuff,"Pre-bid on %d for %.2f FAILED: bid below asking price",
+    sprintf(lineBuff,"Pre-bid on %lu for %.2f FAILED: bid below asking price",
 	    ItemNumber,snipeAmount);
     showBidStatus(lineBuff);
     free(Buff);
     break;
   case PBS_BADQUANTITY:
-    sprintf(lineBuff,"Pre-bid on %d FAILED: Bad quantity '%d'",
+    sprintf(lineBuff,"Pre-bid on %lu FAILED: Bad quantity '%d'",
 	    ItemNumber,snipeQty);
     showBidStatus(lineBuff);
     free(Buff);
     break;
   case PBS_AUCTIONOVER:
-    sprintf(lineBuff,"Pre-bid on %d FAILED: Auction already ended",ItemNumber);
+    sprintf(lineBuff,"Pre-bid on %lu FAILED: Auction already ended",ItemNumber);
     showBidStatus(lineBuff);
     free(Buff);
     break;
@@@@ -375,13 +379,13 @@@@
     scratch = strtok(0,"\"");
     printf("Snipe key is %s\n",scratch);
     strcpy(snipeKey, scratch);
-    sprintf(lineBuff,"Pre-bid on %d SUCCEEDED: %d at %.2f",
+    sprintf(lineBuff,"Pre-bid on %lu SUCCEEDED: %d at %.2f",
 	    ItemNumber,snipeQty, snipeAmount);
     showBidStatus(lineBuff);
     free(Buff);
     break;
   default:
-    sprintf(lineBuff,"Pre-bid on %d FAILED: Unknown error %d",
+    sprintf(lineBuff,"Pre-bid on %lu FAILED: Unknown error %d",
 	    ItemNumber,returnVal);
     showBidStatus(lineBuff);
   }
@@@@ -396,7 +400,7 @@@@
   char *end=strstr(url,"?");
   end[1]='\0';
   
-  sprintf(bidurl->url,"%sAcceptBid&item=%d&key=%s"
+  sprintf(bidurl->url,"%sAcceptBid&item=%lu&key=%s"
 	  "&userid=%s&pass=%s&maxbid=%.2f&quant=%d",url,
 	  ItemNumber,snipeKey,authID,authPASS,snipeAmount,
 	  snipeQty);
@@@@ -406,7 +410,7 @@@@
   retval = fetchURL(bidurl, &Buff, TIMEOUT);
   
   if(retval!=NET_SUCCESS) {
-    sprintf(lineBuff,"Bid on %d FAILED: Error %d connecting to eBay",
+    sprintf(lineBuff,"Bid on %lu FAILED: Error %d connecting to eBay",
 	    ItemNumber, retval);
     showBidStatus(lineBuff);
     return NET_NETERROR;
@@@@ -415,42 +419,46 @@@@
   if(windows && retval==PBS_SUCCESS) {
     switch(returnVal) {
     case PB_HIGHBID: 
-      sprintf(lineBuff,"Bid on %d SUCCEEDED: You are the high bidder",
+      sprintf(lineBuff,"Bid on %lu SUCCEEDED: You are the high bidder",
 	      ItemNumber);
       showBidStatus(lineBuff);
       break;
     case PB_OUTBID:
-      sprintf(lineBuff,"Bid on %d LOST: Someone has outbid you",
+      sprintf(lineBuff,"Bid on %lu LOST: Someone has outbid you",
 	      ItemNumber);
       showBidStatus(lineBuff);
       break;
     case PB_BIDTOOLOW:
-      sprintf(lineBuff,"Bid on %d FAILED: Bid below current asking price",
+      sprintf(lineBuff,"Bid on %lu FAILED: Bid below current asking price",
 	      ItemNumber);
       showBidStatus(lineBuff);
       break;
     case PB_BADQUANTITY: 
-      sprintf(lineBuff,"Bid on %d FAILED: Bad quantity '%d'",
+      sprintf(lineBuff,"Bid on %lu FAILED: Bad quantity '%d'",
 	      ItemNumber,snipeQty);
       showBidStatus(lineBuff);
       break;
     case PB_AUCTIONOVER:
-      sprintf(lineBuff,"Bid on %d FAILED: Auction already ended",
+      sprintf(lineBuff,"Bid on %lu FAILED: Auction already ended",
 	      ItemNumber);
       showBidStatus(lineBuff);
       break;
     case PB_BADUSER:
-      sprintf(lineBuff,"Bid on %d FAILED: Invalid username or password!",
+      sprintf(lineBuff,"Bid on %lu FAILED: Invalid username or password!",
 	      ItemNumber);
       showBidStatus(lineBuff);
       break;
     default:
-      sprintf(lineBuff,"Pre-bid on %d FAILED: Unknown error %d",
+      sprintf(lineBuff,"Pre-bid on %lu FAILED: Unknown error %d",
 	      ItemNumber,returnVal);
       showBidStatus(lineBuff);
       if(returnVal>6 || returnVal<1) {
-	FILE *erfile=fopen(g_strdup_printf("%s/.bidwatcher/error-%d",
-					   getenv("HOME"),ItemNumber),"w");
+ 	FILE *erfile=fopen(g_strdup_printf("%s/%s/error-%d",
+ 					   getenv("HOME"),bw_subdir,ItemNumber),
+			   "w");
+        //FILE *erfile=fopen(g_strdup_printf("%s/.bidwatcher/error-%lu",
+	//	             getenv("HOME"),ItemNumber),"w");
+
 	fprintf(erfile,"Error: could not parse answer.\n%s\n",bidurl->url);
 	fprintf(erfile,"%s",Buff);
 	fclose(erfile);
@@@@ -619,9 +627,18 @@@@
   snipeDelay=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
 						  (confwindow->
 						   snipespin));
+
+  //if (strcmp(gtk_entry_get_text(GTK_ENTRY(confwindow->useridtext)), "") == 0)
+  //  gtk_entry_set_text(GTK_ENTRY(confwindow->useridtext), "!");
+
   strcpy(authID,
-	 gtk_entry_get_text(GTK_ENTRY(confwindow->useridtext)));
+  	 gtk_entry_get_text(GTK_ENTRY(confwindow->useridtext)));
+
   char encpassword[76];
+
+  //if (strcmp(gtk_entry_get_text(GTK_ENTRY(confwindow->passwordtext)), "") == 0)
+  //gtk_entry_set_text(GTK_ENTRY(confwindow->passwordtext), "!");
+
   encode_password(encpassword,gtk_entry_get_text(GTK_ENTRY(confwindow
 							   ->passwordtext)));
   strcpy(authPASS,encpassword);
@@@@ -639,7 +656,7 @@@@
 
   if(proxyurl!=NULL) delete(proxyurl);
   if(strlen(proxystring)>2)
-    proxyurl=new URL(g_strdup_printf("http://%s",proxystring),NULL);
+    proxyurl=new URL(g_strdup_printf("http://%s/",proxystring),NULL);
   else proxyurl=NULL;
   
   if(timesyncurl!=NULL) delete(timesyncurl);
@@@@ -661,6 +678,7 @@@@
   proxylabel=gtk_label_new("Proxy server: (ex: foo.bar.com:8080)");
   useridtext=gtk_entry_new();
   passwordtext=gtk_entry_new();
+  gtk_entry_set_visibility(GTK_ENTRY(passwordtext), FALSE);
   browsertext=gtk_entry_new();
   mailclienttext=gtk_entry_new();
   proxytext=gtk_entry_new();
@@@@ -741,8 +759,19 @@@@
 
   char plainpassword[76];
   decode_password(plainpassword,authPASS);
+
+  //  if (strcmp(authID, "!") == 0)
+  //	  gtk_entry_set_text(GTK_ENTRY(useridtext),"");
+  //else
+
   gtk_entry_set_text(GTK_ENTRY(useridtext),authID);
+
+  //if (strcmp(plainpassword,"!") == 0)
+  //  gtk_entry_set_text(GTK_ENTRY(passwordtext),"");
+  //else
+	 
   gtk_entry_set_text(GTK_ENTRY(passwordtext),plainpassword);
+
   gtk_entry_set_text(GTK_ENTRY(browsertext),browserPATH);
   gtk_entry_set_text(GTK_ENTRY(mailclienttext),emailPATH);
   gtk_entry_set_text(GTK_ENTRY(proxytext),proxystring);
@@@@ -839,6 +868,7 @@@@
 		  "Wayne Schlitt <wayne@@midwestcs.com>\n"
 		  "Larry Gilbert (dischead@@users.sourceforge.net)\n"
 		  "Ben Byer <bushing@@users.sourceforge.net>\n"
+		  "Kevin Dwyer <kevin@@pheared.net>\n"
 		  "\n"
 		  "All copyrights under the GNU GPL 1998-2001.\n"
 		  "See the enclosed file COPYING for more details, or\n"
@@@@ -949,7 +979,7 @@@@
     if ( myauc ->TimeLeft[0] != 0 ) infoState = 3;
     else infoState = 2;
   }   
-  sprintf(info, "Item Number : %d",myauc->ItemNumber);
+  sprintf(info, "Item Number : %lu",myauc->ItemNumber);
   gtk_window_set_title(GTK_WINDOW(window),info);  
   
   strcpy(info, "Current Bid : ");
@@@@ -992,7 +1022,8 @@@@
   }
   if ( infoState == 3 )
     {
-      strcpy(info,myauc->Seller);
+      strcpy(info," ");
+      strcat(info,myauc->Seller);
       strcat(info,myauc->SellerRate);
       strcat(info,"\n ");
       strcat(info,myauc->Location);
@@@@ -1065,7 +1096,7 @@@@
   gtk_container_set_border_width(GTK_CONTAINER(window),10);
   char currentbid[80],chTemp[80];
   
-  gtk_window_set_title(GTK_WINDOW(window),g_strdup_printf("Item Number : %d",
+  gtk_window_set_title(GTK_WINDOW(window),g_strdup_printf("Item Number : %lu",
 							  myauc->ItemNumber));  
   
   sprintf(currentbid, "Current Bid : %s%.2f",myauc->currency,
@@@@ -1203,11 +1234,11 @@@@
   }
   char fileName[200];
   if(issnipes) {
-    MakeFileName("/.bidwatcher/snipe", fileName, iscurrent);
+    MakeFileName(g_strdup_printf("/%s/snipe", bw_subdir), fileName, iscurrent);
     gtk_window_set_title(GTK_WINDOW(window),iscurrent?"This month's snipes":
 			 "Last month's snipes");
   } else {
-    MakeFileName("/.bidwatcher/log", fileName, iscurrent);
+    MakeFileName(g_strdup_printf("/%s/log", bw_subdir), fileName, iscurrent);
     gtk_window_set_title(GTK_WINDOW(window),iscurrent?
 			 "This month's ended auctions":
 			 "Last month's ended auctions");
@@@@ -1380,8 +1411,18 @@@@
 #endif
   tooltips=gtk_tooltips_new();
 
-  authID[0] = 0; authPASS[0] = 0;
-  proxystring[0]='\0';
+  //strcpy(authID, "!");
+  //strcpy(authPASS, "!");
+  //strcpy(proxystring, "!");
+
+  //authID[0] = '\0';
+  //authPASS[0] = '\0';
+  //proxystring[0] = '\0';
+
+  memset(authID, 0, sizeof(authID));
+  memset(authPASS, 0, sizeof(authPASS));
+  memset(proxystring, 0, sizeof(proxystring));
+
   strcpy(browserPATH, "netscape");
   strcpy(emailPATH, "xterm -e pine");
   
@@@@ -1592,8 +1633,8 @@@@
 
   GtkWidget *scrolled_window=gtk_scrolled_window_new(NULL,NULL);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
-				 GTK_POLICY_AUTOMATIC,
-				 GTK_POLICY_AUTOMATIC);
+  			 GTK_POLICY_AUTOMATIC,
+  			 GTK_POLICY_AUTOMATIC);
 
   aucList=gtk_clist_new_with_titles( 5,titles);
   gtk_clist_column_titles_passive(GTK_CLIST(aucList));
@@@@ -1605,6 +1646,7 @@@@
 			       GTK_SELECTION_SINGLE);
   gtk_clist_set_shadow_type(GTK_CLIST(aucList),
 			    GTK_SHADOW_NONE);
+  gtk_clist_set_background(GTK_CLIST(aucList),0,&black);
   // make right button select, too
   gtk_clist_set_button_actions(GTK_CLIST(aucList),1,GTK_BUTTON_SELECTS);
   gtk_clist_set_button_actions(GTK_CLIST(aucList),2,GTK_BUTTON_SELECTS);
@@@@ -1622,14 +1664,15 @@@@
   gtk_signal_connect(GTK_OBJECT(aucList), "drag_data_received",
 		     GTK_SIGNAL_FUNC(drophandler),NULL);
   
+  scrolled_window = gtk_scrolled_window_new(NULL,NULL);
+  gtk_container_add(GTK_CONTAINER(scrolled_window),aucList);
 
-  gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window),
-					aucList);
   gtk_box_pack_start(GTK_BOX(vbox),scrolled_window,TRUE,TRUE,0);
   gtk_box_pack_start(GTK_BOX(vbox),errorbox,FALSE,FALSE,0);
 
   gtk_widget_set_style(aucList,clean14style);
   gtk_widget_show(aucList);
+  
   gtk_widget_show(scrolled_window);
 
   gtk_container_add(GTK_CONTAINER (window),vbox);
@@@@ -1637,7 +1680,8 @@@@
   char fileName[200];
   char * homeDir = getenv("HOME");
   strcpy(fileName, homeDir);
-  strcat(fileName, "/.bidwatcher");
+  strcat(fileName, "/");
+  strcat(fileName, bw_subdir);
   mkdir(fileName, 0700);
 
   ReadAucFile();
@@@@ -1671,7 +1715,9 @@@@
   char fileName[200];
   char * homeDir = getenv("HOME");
   strcpy(fileName, homeDir);
-  strcat(fileName, "/.bidwatcher/bw.cfg");
+  strcat(fileName, "/");
+  strcat(fileName, bw_subdir);
+  strcat(fileName, "/bw.cfg");
   outFile.open(fileName);
   if ( outFile )
     {
@@@@ -1701,7 +1747,7 @@@@
 {
   FILE *file;
   char fileName[200];
-  sprintf(fileName,"%s/.bidwatcher/bw2.cfg",getenv("HOME"));
+  sprintf(fileName,"%s/%s/bw2.cfg",getenv("HOME"),bw_subdir);
   file=fopen(fileName,"w");
   if(file==NULL) {
     printf("Error opening configuration file %s!\n",fileName);
@@@@ -1712,14 +1758,30 @@@@
   fprintf(file,"option trackbids %s\n", trackBids?"yes":"no");
   fprintf(file,"option updateonstartup %s\n", doStartup?"yes":"no");
   fprintf(file,"option autodelete %s\n", autoDelete?"yes":"no");
-  fprintf(file,"option snipedelay %.2f\n", snipeDelay);
+  fprintf(file,"option snipedelay %i\n", snipeDelay);
   if(clockIsSet) fprintf(file,"option timediff %d\n",timeDiff);
-  fprintf(file, "user %s %s\n",authID,authPASS);
-  fprintf(file, "option browser %s\n",browserPATH);
-  fprintf(file, "option proxy %s\n",proxystring);
+  //  fprintf(file, "user %s %s\n",authID,authPASS);
+  //  fprintf(file, "option browser %s\n",browserPATH);
+  //  fprintf(file, "option emailclient %s\n",emailPATH);
+  //  fprintf(file, "option proxy %s\n",proxystring);
+
+  if (authID[0]!='\0')
+    fprintf(file, "user %s ", authID);
+  if (authPASS[0]!='\0')
+    fprintf(file, "%s\n", authPASS);
+  else
+    fprintf(file, "nopass\n");
+
+  if (browserPATH[0]!='\0')
+    fprintf(file, "option browser %s\n",browserPATH);
+  if (emailPATH[0]!='\0')
+    fprintf(file, "option emailclient %s\n",emailPATH);
+  if (proxystring[0]!='\0')
+     fprintf(file, "option proxy %s\n",proxystring);
+
   for ( int i=0; i < aucIdx; i++ )
     {
-      fprintf(file,"auction %u\n",auction[i]->ItemNumber);
+      fprintf(file,"auction %lu\n",auction[i]->ItemNumber);
       fprintf(file, " desc %s\n",auction[i]->Description);
       fprintf(file, " ends %ld\n",auction[i]->EndsValue);
       fprintf(file, " mybid %.2f %d\n",auction[i]->myBidAmount, auction[i]->myBidQuantity); 
@@@@ -1764,12 +1826,12 @@@@
   
   else if ( (strstr(browserPATH, "scape") != NULL) && hit )
     {
-      sprintf(commandLine, "exec %s -remote \"openURL(http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=%d,new-window)\"",browserPATH,auction[choice]->ItemNumber);
+      sprintf(commandLine, "exec %s -remote \"openURL(http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=%lu,new-window)\"",browserPATH,auction[choice]->ItemNumber);
       system(commandLine);
     }
   else
     {
-      sprintf(commandLine, "exec %s \"http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=%d\" &",browserPATH,auction[choice]->ItemNumber);
+      sprintf(commandLine, "exec %s \"http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=%lu\" &",browserPATH,auction[choice]->ItemNumber);
       system(commandLine);
     } 
 }
@@@@ -2411,14 +2473,14 @@@@
   char * scratch;
   ifstream inFile;
 
-  sprintf(fileName,"%s/.bidwatcher/bw2.cfg",getenv("HOME"));
+  sprintf(fileName,"%s/%s/bw2.cfg",getenv("HOME"),bw_subdir);
   FILE *file=fopen(fileName,"r");
   if(file) {
     fclose(file);
     ReadAucFile2();
     return;
   }
-  sprintf(fileName,"%s/.bidwatcher/bw.cfg",getenv("HOME"));
+  sprintf(fileName,"%s/%s/bw.cfg",getenv("HOME"),bw_subdir);
   inFile.open(fileName, ios::in);
   if ( inFile )
     {
@@@@ -2508,7 +2570,7 @@@@
 
   if(proxyurl!=NULL) delete(proxyurl);
   if(strlen(proxystring)>2)
-    proxyurl=new URL(g_strdup_printf("http://%s",proxystring),NULL);
+    proxyurl=new URL(g_strdup_printf("http://%s/",proxystring),NULL);
   else proxyurl=NULL;
   
   if(timesyncurl!=NULL) delete(timesyncurl);
@@@@ -2524,7 +2586,7 @@@@
 {
   FILE *file;
   char fileName[200];
-  sprintf(fileName,"%s/.bidwatcher/bw2.cfg",getenv("HOME"));
+  sprintf(fileName,"%s/%s/bw2.cfg",getenv("HOME"),bw_subdir);
   file=fopen(fileName,"r");
   if(file==NULL) {
     printf("Error opening configuration file %s!\n",fileName);
@@@@ -2564,7 +2626,7 @@@@
       }
 
       if(!strcasecmp(which,"snipedelay")) {
-	fscanf(file,"%.2f",&snipeDelay);
+	fscanf(file,"%i",&snipeDelay);
 	recognized=1;
       }
 
@@@@ -2575,12 +2637,17 @@@@
       }
       
       if(!strcasecmp(which,"browser")) {
-	fscanf(file,"%199[^\n]",browserPATH);
+	fscanf(file,"%199s[^\n]",browserPATH);
+	recognized=1;
+      }
+
+      if(!strcasecmp(which,"emailclient")) {
+	fscanf(file," %199[^\n]",emailPATH);
 	recognized=1;
       }
 
       if(!strcasecmp(which,"proxy")) {
-	fscanf(file,"%199[^\n]",proxystring);
+	fscanf(file,"%199s[^\n]",proxystring);
 	recognized=1;
 	if(strspn(proxystring," ")==strlen(proxystring)) proxystring[0]='\0';
       }
@@@@ -2590,7 +2657,7 @@@@
       char which[20];
       char done=0;
       auction[aucIdx]=new auctioninfo();
-      fscanf(file,"%d",&auction[aucIdx]->ItemNumber);
+      fscanf(file,"%lu",&auction[aucIdx]->ItemNumber);
 
       while(!feof(file)) {
 	fscanf(file,"%19s",which);
@@@@ -2618,7 +2685,7 @@@@
   fclose(file);
   if(proxyurl!=NULL) delete(proxyurl);
   if(strlen(proxystring)>2)
-    proxyurl=new URL(g_strdup_printf("http://%s",proxystring),NULL);
+    proxyurl=new URL(g_strdup_printf("http://%s/",proxystring),NULL);
   else proxyurl=NULL;
   
   if(timesyncurl!=NULL) delete(timesyncurl);
@@@@ -2673,7 +2740,7 @@@@
     sprintf(mybid,"%s%.2f",auction[i]->currency,auction[i]->myBidAmount);
   } else strcpy(mybid,"");
 
-  gchar *item[]={g_strdup_printf("%u",auction[i]->ItemNumber),price,chTemp,mybid,
+  gchar *item[]={g_strdup_printf("%lu",auction[i]->ItemNumber),price,chTemp,mybid,
 		   auction[i]->Description};
   int j;for(j=0;j<5;j++) 
     gtk_clist_set_text(GTK_CLIST(aucList),i,j,item[j]);
@@@@ -2855,9 +2922,10 @@@@
   unsigned int * ids;
 
   if ( !trackBids ) return GUA_SUCCESS;
-
-  if ( strlen(authID) < 2 ) return -1;
-  if ( strlen(authID) > 64 ) return -2;
+  /* XXX FIXME remove when we fix this subroutine */
+  return GUA_SUCCESS;
+  if ( strlen(authID) < 2 ) return GUA_BADUSER;
+  if ( strlen(authID) > 64 ) return GUA_BADUSER;
   
   showStatus(" getting bids");
   greenLED();
@@@@ -3020,7 +3088,7 @@@@
     sprintf(mybid,"%s%.2f",auction[i]->currency,auction[i]->myBidAmount);
   } else strcpy(mybid,"");
   
-  gchar *item[]={g_strdup_printf("%u",auction[i]->ItemNumber),price,chTemp,mybid,
+  gchar *item[]={g_strdup_printf("%lu",auction[i]->ItemNumber),price,chTemp,mybid,
 		       auction[i]->Description};
       gtk_clist_insert(GTK_CLIST(aucList),i,item);
       if(auction[i]->isSnipe) { 
@@@@ -3047,6 +3115,9 @@@@
       }
 
       gtk_clist_set_foreground(GTK_CLIST(aucList),i,theColor);
+
+      //gtk_clist_set_background(GTK_CLIST(aucList),i,&black);
+
   /* bid column color: 
    * green - I have bid and am the high bidder
      yellow - I will snipe and (afaik) will be the high bidder 
@@@@ -3112,14 +3183,14 @@@@
   char *HtmlBuff;
   if(infourl==NULL) 
     infourl=new URL(g_strdup_printf("http://cgi.ebay.com/aw-cgi/eBayISAPI.dll"
-				    "?ViewItem&item=%u",ItemNumber),
+				    "?ViewItem&item=%lu",ItemNumber),
 		    proxyurl);
   greenLED();
   returnVal = fetchURL(infourl,&HtmlBuff,TIMEOUT);
   //  puts(HtmlBuff);
   if(returnVal==NET_NETERROR || returnVal==NET_TIMEOUT) { // maybe proxy settings changed
     infourl=new URL(g_strdup_printf("http://cgi.ebay.com/aw-cgi/eBayISAPI.dll"
-				    "?ViewItem&item=%u",ItemNumber),
+				    "?ViewItem&item=%lu",ItemNumber),
 		    proxyurl);
     returnVal = fetchURL(infourl,&HtmlBuff, TIMEOUT);
   }
@@@@ -3356,7 +3427,7 @@@@
       MakeFileName("/.bidwatcher/log", fileName, TRUE);
       reportOut.open(fileName, ios::app);
       char truncDesc[300];
-      sprintf(truncDesc,"%u - %s\nHigh Bidder: %s\n High Bid: %.2f",
+      sprintf(truncDesc,"%lu - %s\nHigh Bidder: %s\n High Bid: %.2f",
 	      auction[index]->ItemNumber,auction[index]->Description,
 	      auction[index]->HighBidder,auction[index]->CurrentBid);
       strcat( truncDesc, "\n-----------------------------------------------------\n");
@@@@ -3385,7 +3456,7 @@@@
   MakeFileName("/.bidwatcher/snipe", fileName, TRUE);
   reportOut.open(fileName, ios::app);
   char truncDesc[1024];
-  sprintf( truncDesc, "%u %s%.2f %s",
+  sprintf( truncDesc, "%lu %s%.2f %s",
 	   auction[index]->ItemNumber,auction[index]->currency,
 	   auction[index]->snipeAmount,
 	   auction[index]->Description );
@@@@ -3448,9 +3519,9 @@@@
   }
 #ifdef DEBUG_NETWORK
     ofstream outFile;
-    sprintf( fileName, "%s/.bidwatcher/snipe_fail_%u",
-	     getenv("HOME"), auction[index]->ItemNumber );
-    
+    sprintf( fileName, "%s/%s/snipe_fail_%u",
+	     getenv("HOME"), bw_subdir, auction[index]->ItemNumber );
+
     outFile.open(fileName);
     outFile.close();
 #endif
@


1.5
log
@Pull in latest bug fixes from the CVS repository which fix e.g problems
with loading the configuration and updating auctions. Bump version number
to 1.3.0.99 as this is now close to what will be the 1.3.1 release.
@
text
@d1 1
a1 1
$NetBSD$
@


1.4
log
@Don't write empty configuration strings to the configuration file like
e.g. an empty proxy setting because the very optimistic parse can't
handle those.
@
text
@d4 202
a205 2
+++ bidwatcher.cpp	Mon Oct  8 00:42:19 2001
@@@@ -639,7 +639,7 @@@@
d214 167
a380 1
@@@@ -1712,11 +1712,15 @@@@
d385 1
a385 1
+  fprintf(file,"option snipedelay %.d\n", snipeDelay);
d387 1
a387 1
   fprintf(file, "user %s %s\n",authID,authPASS);
d390 12
d405 1
a405 1
+    fprintf(file, "option email %s\n",emailPATH);
d408 1
d411 38
a448 2
       fprintf(file,"auction %u\n",auction[i]->ItemNumber);
@@@@ -2508,7 +2512,7 @@@@
d457 10
a466 1
@@@@ -2564,7 +2568,7 @@@@
d471 1
a471 1
+	fscanf(file,"%d",&snipeDelay);
d475 1
a475 1
@@@@ -2575,12 +2579,17 @@@@
d484 2
a485 2
+      if(!strcasecmp(which,"email")) {
+	fscanf(file,"%199s[^\n]",emailPATH);
d495 10
a504 1
@@@@ -2618,7 +2627,7 @@@@
d513 90
@


1.3
log
@Fix saving and loading of the configuration file and make the proxy support
work
@
text
@d4 1
a4 1
+++ bidwatcher.cpp	Mon Oct  8 00:10:20 2001
d14 1
a14 1
@@@@ -1712,10 +1712,11 @@@@
d22 8
a29 3
   fprintf(file, "option browser %s\n",browserPATH);
+  fprintf(file, "option email %s\n",emailPATH);
   fprintf(file, "option proxy %s\n",proxystring);
d32 2
a33 1
@@@@ -2508,7 +2509,7 @@@@
d42 1
a42 1
@@@@ -2564,7 +2565,7 @@@@
d51 1
a51 1
@@@@ -2575,12 +2576,17 @@@@
d56 1
a56 1
+	fscanf(file," %199[^\n]",browserPATH);
d61 1
a61 1
+	fscanf(file," %199[^\n]",emailPATH);
d67 1
a67 1
+	fscanf(file," %199[^\n]",proxystring);
d71 1
a71 1
@@@@ -2618,7 +2624,7 @@@@
@


1.2
log
@Update "bidwatcher" package to version 1.3.0 beta.
Changes since version 1.1.7:
- Conversion to use the gtk+ toolkit, making this version 100% GPL clean!
- Support for auctions in foreign currencies.
- Cleaner ebay access-- i.e. instead of hardcoded IPs, we now
  do DNS lookups and follow 302 redirects
- HTTP proxy server support
- Support for eBay motors
- Uses the GNU Autoconf (configure) system
- Drag-n-drop support
@
text
@d1 1
a1 1
$NetBSD: patch-aa,v 1.1 2001/09/22 05:38:22 jlam Exp $
d3 71
a73 104
--- Makefile.orig	Fri Jun  9 17:12:46 2000
+++ Makefile
@@@@ -5,71 +5,49 @@@@
 # Tom McNair   (tmcnair@@cyberhighway.net)
 # Wayne Schlitt (wayne@@midwestcs.com)
 #
-# Makefile
+# Makefile for FreeBSD courtesy of Will Andrews <andrews@@technologist.com>
 #
 # CHANGE WHAT YOU NEED TO, THE MOST LIKELY CANDIDATES FOR CHANGE ARE:
 # QTDIR, SYSCONF_CFLAGS_X11, SYSCONF_LFLAGS_X11, SYSCONF_MOC
 
-#
-# You might want to add one of these defines to the OPTIONS variable:
-#
-# Bidwatcher needs to determine the local time on the west coast of
-# the US in order to figure out when auctions will end.  To do this,
-# it first needs to know the time as GMT.  Apparently, there is no
-# good portable way to do this, so you may have to select one of these
-# options if compiles fail.
-#
-# -DHAVE_GMTIME		Define if you want to use the BSD gmtime() function
-# -DHAVE_TIMEZONE	Define if you want to use the SVID localtime function
-# -DHAVE_GMTOFF		Define if you want to use the tm_gmtoff 
-#
-#
-# -DDEBUG_NETWORK	Define if you want network debuging spewed to stderr
-#	
-
-#OPTIONS= -DHAVE_GMTOFF  -DDEBUG_NETWORK
-OPTIONS= -DHAVE_GMTOFF
-
-SYSCONF_CC		= g++
+SYSCONF_CC		= ${CXX}
 
-QTDIR = /usr/include/qt
-SYSCONF_CFLAGS_X11	= -I/usr/X11R6/include
-SYSCONF_CFLAGS_QT	= -I$(QTDIR)
-SYSCONF_CFLAGS_OPENGL	= -I/usr/X11R6/include
+#QTDIR = /usr/include/qt2
+SYSCONF_CFLAGS_X11	= -I@@BUILDLINK_X11_DIR@@/include
+SYSCONF_CFLAGS_QT	= -I$(QTDIR)/include
+SYSCONF_CFLAGS_OPENGL	= -I@@BUILDLINK_DIR@@/include -I@@BUILDLINK_X11_DIR@@/include
 
 # Compiline YACC output
 SYSCONF_CFLAGS_YACC     = -Wno-unused -Wno-parentheses
 
 # X11
-SYSCONF_LFLAGS_X11	= -L/usr/X11R6/lib
-SYSCONF_LIBS_X11	= -lX11 -lXext
+SYSCONF_LFLAGS_X11	= -L@@BUILDLINK_X11_DIR@@/lib
+SYSCONF_LIBS_X11	= -lXext -lX11 -lm
 # Qt, Qt+OpenGL
 SYSCONF_LFLAGS_QT	= -L$(QTDIR)/lib
 SYSCONF_LIBS_QT		= -lqt
-#static# SYSCONF_LIBS_QT		= -lqt -lpng -lz
-#SYSCONF_LIBS_QT_OPENGL	= -lqgl
+SYSCONF_LIBS_QT_OPENGL	= 
 # OpenGL
-#SYSCONF_LFLAGS_OPENGL	= -L/usr/X11R6/lib
-#SYSCONF_LIBS_OPENGL	= -lMesaGL -lMesaGLU -lXmu -lXext -lm
+SYSCONF_LFLAGS_OPENGL	= -L@@BUILDLINK_DIR@@/lib -L@@BUILDLINK_X11_DIR@@/lib
+SYSCONF_LIBS_OPENGL	= -lGL -lGLU -lXmu
 
 # Linking applications
-SYSCONF_LINK		= g++
-SYSCONF_LFLAGS		=
-#static# SYSCONF_LFLAGS		= -static
+SYSCONF_LINK		= ${CXX}
+SYSCONF_LFLAGS		= ${LDFLAGS}
 SYSCONF_LIBS		= 
 
 # Link flags shared objects
 SYSCONF_LFLAGS_SHOBJ	= -shared
 
 # Meta-object compiler
-SYSCONF_MOC		= /usr/bin/moc
+SYSCONF_MOC		= ${QTDIR}/bin/moc
 
 # Linking shared libraries
 #   - Build the $(TARGET) library, eg. lib$(TARGET).so.0.0
 #   - Place target in $(DESTDIR) - which has a trailing /
 #   - Usually needs to incorporate $(VER_MAJ) and $(VER_MIN)
 #
-SYSCONF_LINK_SHLIB	= g++
+SYSCONF_LINK_SHLIB	= ${CXX} 
 SYSCONF_LINK_TARGET_SHARED	= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
 SYSCONF_LINK_LIB_SHARED	=  $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
 				     $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
@@@@ -90,11 +68,11 @@@@
 				 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
 # Compiling application source
 #SYSCONF_CFLAGS		= -Wall -g $(OPTIONS)
-SYSCONF_CFLAGS		= -O2 -Wall $(OPTIONS)
+SYSCONF_CFLAGS		= ${CXXFLAGS} $(OPTIONS)
 # Compiling library source
-SYSCONF_CFLAGS_LIB	= -O2 -fno-strength-reduce -fPIC
+SYSCONF_CFLAGS_LIB	= ${CXXFLAGS} -fno-strength-reduce -fPIC
 # Compiling shared-object source
-SYSCONF_CFLAGS_SHOBJ	= -O2 -fno-strength-reduce -fPIC
+SYSCONF_CFLAGS_SHOBJ	= ${CXXFLAGS} -fno-strength-reduce -fPIC
 # Default link type (stati linking is still be used where required)
 SYSCONF_LINK_LIB	= $(SYSCONF_LINK_LIB_SHARED)
 SYSCONF_LINK_TARGET	= $(SYSCONF_LINK_TARGET_SHARED)
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
$NetBSD$
@


1.1.1.1
log
@BidWatcher is a tool for people using the giant eBay auction site.  It
uses your eBay id and password to track your eBay listings, items that you
have bid on, and items that you enter by hand.   It also has an integrated
snipe tool.

This was initially provided by Brad Knotwell <knotwell@@ix.netcom.com> in
pkg/13128 but has been heavily modified to remove FreeBSDisms and to use
buildlink.mk files.
@
text
@@
