Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
home:kssingvo
bidwatcher
bidwatcher-1.3.17-changes_20060307.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bidwatcher-1.3.17-changes_20060307.patch of Package bidwatcher
--- bidwatcher-1.3.17/helpers.cpp.orig 2006-03-08 15:23:32.000000000 +0100 +++ bidwatcher-1.3.17/helpers.cpp 2006-03-08 15:23:54.000000000 +0100 @@ -55,7 +55,7 @@ const char * const CheckPrice="0123456789.$,"; // Characters allowed in a price -const char * const SearchOps[2][37]={{ "Starts at", // 1 +const char * const SearchOps[2][40]={{ "Starts at", // 1 "Currently", // 2 "First bid", // 3 "Quantity", // 4 @@ -85,14 +85,17 @@ // for some reason theBuyItNow/Purchase only // auction have a space in front of "Price". " Price", // 28 - "Feedback Score:", // 29 - "(", // 30 + "Feedback Score:", // 29 + "(", // 30 "Ended:", // 31 "Shipping and handling:", // 32 "Shipping Cost Services Available", // 33, newer version of above - " price:", // 34 - "price:", // 35 - "Seller information", // 36 + " price:", // 34 + "price:", // 35 + "Seller information", // 36 + "Score:", // 37 + "Seller:", // 38 + "End time:", // 39 "*"}, /* eBay Motors */ { "Currently", // 1 @@ -1306,7 +1309,8 @@ case 3: // first bid case 30: - if (strstr(LineBuffer.buf(), "(PayPal account required)")) break; + if (!strstr(LineBuffer.buf(), "(Approximately")) + break; if (!FirstBid && !first_flag && strnzcmp(LineBuffer.buf(), "(Approximately")) { if (!dutch_flag) { DPRINTF(DLOW, ("LDFB: %s\n", LineBuffer.buf())); @@ -1437,11 +1441,27 @@ case 9: // time ending if (!Ends[0]) { //streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); - //DPRINTF(DLOW, ("LDE: %s\n", LineBuffer.buf())); + //DPRINTF(DLOW, ("LDE: %s\n", LineBuffer.buf())); STRNZCPY(Ends, LineBuffer.buf() + strlen("Ends ")); - translate_date(Ends); - EndsValue = CalcEndsValue(Ends); - } + translate_date(Ends); + EndsValue = CalcEndsValue(Ends); + } + case 39: // "End time:" + // has 2 possibilities of string: + // 1. "End time:10 hours 7 mins" + // " (Mar-08-06 12:52:47 PST)" + // 2. "End time: Mar-08-06 12:52:47 PST" + // "2 days 10 hours 7 mins" + if (!Ends[0]) { + if (strstr(LineBuffer.buf(), " PST ")) { + STRNZCPY(Ends, LineBuffer.buf() + strlen("End time:")); + } else { + streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); + STRNZCPY(Ends, LineBuffer.buf()+2); // skip starting 2 chars " (" + } + translate_date(Ends); + EndsValue = CalcEndsValue(Ends); + } break; case 31: // ended if (!Ends[0]) { @@ -1487,6 +1507,98 @@ SellerRate[count+1] = '\0'; } break; + case 38: // Seller: + if (!Seller[0]) { + char *p; + p = strchr(LineBuffer.buf(), ':'); + if (!p) + break; + if (*p != ':') + break; + p += 2; // skip ': ' + STRNZCPY(Seller, p); + /* strip only "(private)" away */ + p = strstr(Seller, "(private)"); + if (p) *p='\0'; + + // Bidder Rate is typicaly in next line, but without leading '(' + streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); + if (LineBuffer.buf()[0] == '(' && !strchr(LineBuffer.buf(), ')')) + streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); + if (!strchr(LineBuffer.buf(), ')')) + break; // validity check + SellerRate[0] = '('; + unsigned int count; + for (count=1; count < sizeof(SellerRate)-1; count++) + { + if (LineBuffer.buf()[count-1] == '\0' || LineBuffer.buf()[count-1] == ')' + || LineBuffer.buf()[count-1] == ' ') + break; + SellerRate[count] = LineBuffer.buf()[count-1]; + } + SellerRate[count] = ')'; + SellerRate[count+1] = '\0'; + if (!strncmp(SellerRate, "(0)", 4)) + STRNZCPY(Feedbackn,"NONE"); + } + break; + case 37: // Score: + // Example: Score: 1762 | 99.9% Positive + // Example: Score: Private | 97.0% Positive + if (!Feedbackn[0]) { + char TmpLine[6]; + unsigned int count=0, f_len=0; + int limit=0; + int i=0, j=0; + char *p; + + p = strchr(LineBuffer.buf(), ':'); + limit = strlen(p); + if (strstr(p, "Private")) { + strcpy(Feedbackn, "Priv. "); + count=strlen("Private ")+1; + f_len=strlen("Priv. ")+1; + } else { + while(!isdigit(*p) && *p) + p++; + if (*p == '\0') { + break; + } + + for (f_len=0; count<limit && f_len<sizeof(Feedbackn)-1; count++, f_len++) { + if (p[count] == ' ') + break; + Feedbackn[f_len] = p[count]; + } + Feedbackn[f_len] = '\0'; + } + if (p[count+1] == '|') { + for (i=0, j=count+3; j<limit && i<sizeof(TmpLine)-1; i++, j++) { + if (!isdigit(p[j]) && p[j] != '.' && p[j]!='%') { + break; + } + TmpLine[i] = p[j]; + } + } else + DPRINTF(DLOW, ("Score: p[count+1] is not '|': >%c<, count=%d\n", p[count+1], count)); + TmpLine[i] = '\0'; + if (i) { + int a1= 6; //a1 = sizeof(Feedbackn)-strlen(TmpLine)-1; + if (f_len < a1) { + while (f_len < a1) { /* fills spaces */ + Feedbackn[f_len++] = ' '; + } + } else { + a1 = sizeof(Feedbackn)-strlen(TmpLine)-1; + if (f_len < a1) { // room for 1 space ? + Feedbackn[f_len++] = ' '; + } + } + strcat(Feedbackn,TmpLine); + } + DPRINTF(DLOW, ("Score: Feedbackn= >%s<\n", Feedbackn)); + } + break; case 11: // high bidder id case 19: case 24: @@ -1508,7 +1620,7 @@ STRNZCPY(HighBidder, p); /* Don't cut on '('! "(www.grahamcrackers.com)" is a valid ebay account */ /* strip only "(private)" away */ - p = strstr(Seller, "(private)"); + p = strstr(HighBidder, "(private)"); if (p) *p='\0'; // Bidder Rate is typicaly in next line, but without leading '(' --- bidwatcher-1.3.17/bidwatcher.cpp.orig 2006-03-08 15:23:32.000000000 +0100 +++ bidwatcher-1.3.17/bidwatcher.cpp 2006-03-08 15:23:47.000000000 +0100 @@ -4047,6 +4047,8 @@ theColor = &color_near; else if ( strstr(auction[i]->Feedbackn,"NONE") != NULL) theColor = &color_none; + else if ( strstr(auction[i]->Feedbackn,"Priv.") != NULL) + theColor = &color_none; else theColor = &color_far; // if (auction[i]->isEndless) theColor = &color_near; @@ -4374,6 +4376,8 @@ theColor = &color_near; else if ( strstr(auction[i]->Feedbackn,"NONE") != NULL) theColor = &color_none; + else if ( strstr(auction[i]->Feedbackn,"Priv.") != NULL) + theColor = &color_none; else theColor = &color_far; // if (auction[i]->isEndless) theColor = &color_near;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor