summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2002-10-12 12:25:55 +0000
committertron <tron@pkgsrc.org>2002-10-12 12:25:55 +0000
commit45be4ae561a80b399fa87ac63e598b256f015797 (patch)
tree6859a9ce114dcc3c4b9c131e90eb50329e60447e /misc
parentf58e9e7271807ed252f67247ea4df324c124f15e (diff)
downloadpkgsrc-45be4ae561a80b399fa87ac63e598b256f015797.tar.gz
Add changes from the "bidwatcher" CVS repository which fixes the problem
with the time synchronization. Bump package revision to 1.
Diffstat (limited to 'misc')
-rw-r--r--misc/bidwatcher/Makefile3
-rw-r--r--misc/bidwatcher/distinfo3
-rw-r--r--misc/bidwatcher/patches/patch-aa342
3 files changed, 346 insertions, 2 deletions
diff --git a/misc/bidwatcher/Makefile b/misc/bidwatcher/Makefile
index f6cbc43a86a..3818cc0d2bb 100644
--- a/misc/bidwatcher/Makefile
+++ b/misc/bidwatcher/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2002/09/14 15:11:31 martin Exp $
+# $NetBSD: Makefile,v 1.14 2002/10/12 12:25:55 tron Exp $
DISTNAME= bidwatcher-1.3.5
CATEGORIES= misc
+PKGREVISION= 1
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bidwatcher/}
PATCHFILES= bidwatcher-1.3.5-p1.diff
diff --git a/misc/bidwatcher/distinfo b/misc/bidwatcher/distinfo
index 3ee05664505..f07659bc33d 100644
--- a/misc/bidwatcher/distinfo
+++ b/misc/bidwatcher/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.13 2002/09/15 06:34:03 martin Exp $
+$NetBSD: distinfo,v 1.14 2002/10/12 12:25:55 tron Exp $
SHA1 (bidwatcher-1.3.5.tar.gz) = ac214aec04bb5cd7a3ba44b7b260c8f4a6b20b4a
Size (bidwatcher-1.3.5.tar.gz) = 146807 bytes
SHA1 (bidwatcher-1.3.5-p1.diff) = f1173d61c6bd592b0db404a5e8ae05bd5e793423
Size (bidwatcher-1.3.5-p1.diff) = 2131 bytes
+SHA1 (patch-aa) = e0efcb1b5f5c07b01cb53ae2d76de25b70eab370
diff --git a/misc/bidwatcher/patches/patch-aa b/misc/bidwatcher/patches/patch-aa
new file mode 100644
index 00000000000..7f282687cb1
--- /dev/null
+++ b/misc/bidwatcher/patches/patch-aa
@@ -0,0 +1,342 @@
+$NetBSD: patch-aa,v 1.10 2002/10/12 12:25:56 tron Exp $
+
+--- helpers.cpp.orig Sat Oct 12 11:07:22 2002
++++ helpers.cpp Sat Oct 12 11:07:43 2002
+@@ -1000,12 +1000,12 @@
+ case 2: // current price
+ if (CurrentBid==0) {
+ 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 @@
+ }
+ break;
+ case 3: // first bid
+- 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];
+ 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: // 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);
+ translate_date(Ends);
+ }
+ break;
+ case 10: // seller id
+- if (Seller[0]==0) {
++ if (!Seller[0]) {
+ streamBuff.getline(LineData, 1024, '\n');
+- strncpy(Seller,LineData,75);
++ strncpy(Seller, LineData, 75);
+ }
+ break;
+ case 11: // high bidder id
+- 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);
+
+ 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 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;
+