Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:kssingvo
bidwatcher
bidwatcher-1.3.17-changes_20061124.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bidwatcher-1.3.17-changes_20061124.patch of Package bidwatcher
--- bidwatcher-1.3.17/helpers.cpp.orig 2006-11-24 12:55:43.000000000 +0100 +++ bidwatcher-1.3.17/helpers.cpp 2006-11-24 12:54:12.000000000 +0100 @@ -1449,6 +1449,8 @@ } else { p = strchr(LineBuffer.buf(), ':') + 1; } + if (*p == ' ') + p++; STRNZCPY(Location, p); // Dutch Auctions if (Quantity > 1 ) { @@ -1618,8 +1620,11 @@ if (*(p+1) == '\0') { streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); p = LineBuffer.buf(); - } else + } else { p++; + if (*p == ' ') + p++; + } } else { streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); p = LineBuffer.buf(); @@ -1627,29 +1632,34 @@ STRNZCPY(HighBidder, p); /* Don't cut on '('! "(www.grahamcrackers.com)" is a valid ebay account */ - /* strip only "(private)" away */ - p = strstr(HighBidder, "(private)"); - if (p) + /* the rating is now in same line again */ + /* Looks like: High bidder: aldiguru( 0 ) */ + /* Looks like: Buyer: alltrust555( 1704) */ + p = strrchr(HighBidder, '('); + if (p && p < HighBidder+strlen(HighBidder) && p[1]==' ') *p='\0'; - /* remove trailing '(' in name, because its start of the ranking */ - p = HighBidder+strlen(HighBidder)-1; - if (*p == '(') { - *p = '\0'; - } + /* get the R A T I N G */ // Bidder Rate is typicaly in next line, but without leading '(' - streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); - if (!strchr(LineBuffer.buf(), ')')) streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); + if (!strchr(LineBuffer.buf(), ')')) + streamBuff.getline(LineBuffer.buf(), LineBuffer.size(), '\n'); if (!strchr(LineBuffer.buf(), ')')) break; // validity check + p = strrchr(LineBuffer.buf(), '('); + if (!p) { + STRNZCPY(BidderRate, "(parse error)"); + break; + } + p++; // skip leading '(' + if (*p == ' ') + p++; BidderRate[0] = '('; unsigned int count; for (count=1; count < sizeof(BidderRate)-1; count++) { - if (LineBuffer.buf()[count-1] == '\0' || LineBuffer.buf()[count-1] == ')' - || LineBuffer.buf()[count-1] == ' ') + if (p[count-1] == '\0' || p[count-1] == ')' || p[count-1] == ' ') break; - BidderRate[count] = LineBuffer.buf()[count-1]; + BidderRate[count] = p[count-1]; } BidderRate[count] = ')'; BidderRate[count+1] = '\0';
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