From: Jan S. <st...@us...> - 2004-06-10 11:51:57
|
Update of /cvsroot/bidwatcher/bidwatcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32262 Modified Files: Tag: STABLE_1_3 Makefile.am bidwatcher.cpp bidwatcher.h helpers.cpp Log Message: Jan's complete changes incl. SnipeGroups Index: Makefile.am =================================================================== RCS file: /cvsroot/bidwatcher/bidwatcher/Makefile.am,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -d -r1.7 -r1.7.2.1 --- Makefile.am 7 May 2003 19:32:14 -0000 1.7 +++ Makefile.am 10 Jun 2004 11:51:46 -0000 1.7.2.1 @@ -2,7 +2,7 @@ SUBDIRS=pixmaps bin_PROGRAMS=bidwatcher #bin_PROGRAMS=bidwatcher biddaemon -bidwatcher_SOURCES=bidwatcher.cpp helpers.cpp netstuff.cpp bidwatcher.h +bidwatcher_SOURCES=bidwatcher.cpp helpers.cpp netstuff.cpp bidwatcher.h bidgroup.cpp bidgroup.h bidgui.cpp bidgui.h #biddaemon_SOURCES=daemon.c daemon.h LDADD=-lX11 -lXext man_MANS = bidwatcher.1 Index: bidwatcher.cpp =================================================================== RCS file: /cvsroot/bidwatcher/bidwatcher/Attic/bidwatcher.cpp,v retrieving revision 1.171.2.34 retrieving revision 1.171.2.35 diff -u -d -r1.171.2.34 -r1.171.2.35 --- bidwatcher.cpp 23 Apr 2004 14:06:51 -0000 1.171.2.34 +++ bidwatcher.cpp 10 Jun 2004 11:51:46 -0000 1.171.2.35 @@ -63,6 +63,8 @@ #include <gtk/gtk.h> #include "bidwatcher.h" +#include "bidgroup.h" +#include "bidgui.h" #include "pixmaps/user.xpm" #include "pixmaps/clock.xpm" @@ -799,6 +801,7 @@ obj->myauc->snipeAmount=atof(gtk_entry_get_text(GTK_ENTRY(obj->bidtext))); obj->myauc->snipeQty=atoi(gtk_entry_get_text(GTK_ENTRY(obj->quantitytext))); obj->myauc->isSnipe = TRUE; + obj->myauc->isPreBid = TRUE; gtk_widget_set_sensitive(obj->okbutton, TRUE); gtk_widget_set_sensitive(obj->cancelbutton, TRUE); gtk_label_set_text(GTK_LABEL(obj->currentbidlabel), ""); @@ -1924,6 +1927,7 @@ gtk_widget_set_sensitive(bidderbutton, !strcasecmp(authID, myauc->Seller)); */ + removeAscii127(info); gtk_label_set_text(GTK_LABEL(infolabel), info); /* gtk_widget_set_sensitive(sellerbutton, FALSE); @@ -2381,14 +2385,16 @@ gtk_clist_get_selection_info(GTK_CLIST(w), (gint) event->x, (gint) event->y, &row, &col); + if(event->button == 2) switchBidGroup(auction, aucIdx, currentauc, row, bw_subdir, timeDiff, authID); // always call before setting currentauc currentauc = row; if (aucIdx != 0) { if (event->type == GDK_2BUTTON_PRESS) { loadauc_handler(NULL, NULL); return TRUE; - } - if (event->button == 3) {// right mouse button + } + + if (event->button == 3) {// right mouse button gtk_menu_popup(GTK_MENU(popupmenu->menu), NULL, NULL, NULL, NULL, event->button, 1); gtk_signal_emit_stop_by_name(GTK_OBJECT(w), @@ -2866,7 +2872,9 @@ fprintf(file, " snipe %.2f %d\n",auction[i]->snipeAmount, auction[i]->snipeQty); fprintf(file, " endauction\n"); } - fclose(file); + fclose(file); + + writeBidGroup(bw_subdir); } BidWindow::~BidWindow() { @@ -3002,6 +3010,7 @@ void ClearSnipe(int choice) { auction[choice]->isSnipe = FALSE; + auction[choice]->isPreBid = FALSE; strcpy(auction[choice]->snipeKey, ""); auction[choice]->snipeAmount=0; auction[choice]->snipeQty=0; @@ -3318,7 +3327,7 @@ // caller would have to duplicate this loop if he did not want to take // the chance of the user seeing an "error" message. DPRINTF(DLOW, ("The auction %llu is already in the list.\n", auction[i]->ItemNumber)); - showStatus(" adding auction..."); + showStatus(""); updateInProgress = FALSE; return; } @@ -3383,6 +3392,8 @@ gint secondticker_callback(gpointer data) // second ticker { + addItemsFromFile(bw_subdir, updateInProgress); + static volatile int checking_snipes = FALSE; if (clockIsSet) { @@ -3424,7 +3435,15 @@ if (!checking_snipes) { checking_snipes = TRUE; - + + if(timeLeft < cur_snipe_delay + 60) { + if(auction[i]->isPreBid) { + auction[i]->isPreBid = FALSE; + auction[i]->getkey(auction[i]->snipeAmount, + auction[i]->snipeQty); + } + } + if (timeLeft < cur_snipe_delay) { auction[i]->isSnipe = FALSE; DoSnipe(i); @@ -3613,6 +3632,23 @@ gtk_timeout_add(time_to_next_update,updatelist_callback,NULL); return FALSE; } + +static void setProxyURL(char *proxystring, char *proxyuserstring, char *proxypassstring) +{ + if (proxyurl != NULL) { + delete(proxyurl); + proxyurl = NULL; + } + + if (strlen(proxystring) > 2) { + char *pxy = g_strdup_printf("http://%s/", proxystring); + proxyurl = new URL(pxy, NULL, proxyuserstring, proxypassstring); + g_free(pxy); + } else { + proxyurl = NULL; + } +} + ////////////////////////////////////////////////////////////////////////////// // ReadAucFile: // called once at startup, reads the username and stored auctions from @@ -3829,6 +3865,7 @@ memset(authPASS, 0, sizeof(authPASS)); } else if (!strcasecmp(keyword, "auction")) { + setProxyURL(proxystring, proxyuserstring, proxypassstring); char which[20]; auction[aucIdx] = new auctioninfo(); fscanf(file, "%llu", &auction[aucIdx]->ItemNumber); @@ -3867,6 +3904,7 @@ auction[aucIdx]->snipeQty); #endif auction[aucIdx]->isSnipe = 1; + auction[aucIdx]->isPreBid = 1; auction[aucIdx]->getkey(auction[aucIdx]->snipeAmount, auction[aucIdx]->snipeQty); @@ -3878,23 +3916,14 @@ } } fclose(file); - - if (proxyurl != NULL) { - delete(proxyurl); - proxyurl = NULL; - } - if (strlen(proxystring) > 2) { - char *pxy = g_strdup_printf("http://%s/", proxystring); - proxyurl = new URL(pxy, NULL, proxyuserstring, - proxypassstring); - g_free(pxy); - } - else proxyurl = NULL; - + + setProxyURL(proxystring, proxyuserstring, proxypassstring); resetTimeSyncURL(); makeStyles(); resetStyles(); + + readBidGroup(bw_subdir); } ////////////////////////////////////////////////////////////////////////////// @@ -3938,6 +3967,8 @@ auction[i]->Comments, auction[i]->Seller}; + bidGroupComment(&item[5], auction, i); + int j; for(j=0; j<NUM_COLUMNS; j++) gtk_clist_set_text(GTK_CLIST(aucList), i, j, item[j]); @@ -3991,6 +4022,7 @@ CHECK; int idx; if (index >= aucIdx) return; // we are out of range + delBidGroupItem(auction, index); // Loop through AucNumList, moving list up to fill the gap // where choice will be removed, this should be a linked list. WriteLog(index); @@ -4172,6 +4204,8 @@ // the item number out of the URL. because it is possible that there are CRLF // in the URL, strip them out first and call addNewItem() with the auction // number. + strip_crlf(Buff); + char *pszendurl; char *pszonlyurl; char *pszitemnumber; @@ -4184,12 +4218,12 @@ memset(pszonlyurl, 0, pszendurl - pszitemurl + 1); memcpy(pszonlyurl, pszitemurl, pszendurl - pszitemurl); pszitemnumber = strstr(pszonlyurl, "item="); - // save some time and only strip crlf from the item number - strip_crlf(pszitemnumber); - if(pszitemnumber) - // addNewItem() checks for dups and for maximum number of auctions. - // no need to do it twice. - addNewItem(atoul(pszitemnumber + 5)); + if(pszitemnumber) { + // addNewItem() checks for dups and for maximum number of auctions. + // no need to do it twice. + unsigned long long item; + if(sscanf(pszitemnumber + 5, "%llu", &item) == 1) addNewItem(item); + } // delete the new'd memory delete pszonlyurl; // get the next url starting from the end of the current url. @@ -4248,6 +4282,8 @@ auction[i]->Comments, auction[i]->Seller}; + bidGroupComment(&item[5], auction, i); + gtk_clist_insert(GTK_CLIST(aucList), i, item); if (auction[i]->isSnipe) { gtk_clist_set_pixtext(GTK_CLIST(aucList), i, 0, item[0], 5, @@ -4326,6 +4362,8 @@ int auctioninfo::getinfo() { CHECK; + SetBidGroupAuction set_bid_group(auction, aucIdx, timeDiff, authID); + int returnVal; char *HtmlBuff; char *urlstring; @@ -4417,6 +4455,7 @@ } } free(Buff); + UpdTime = time(NULL) + timeDiff; return INFO_SUCCESS; } free(Buff); @@ -4983,6 +5022,7 @@ memset(this, 0, sizeof(auctioninfo)); magic = 12345; isEndless = 0; + UpdTime = 0; } auctioninfo::~auctioninfo() { Index: helpers.cpp =================================================================== RCS file: /cvsroot/bidwatcher/bidwatcher/Attic/helpers.cpp,v retrieving revision 1.90.2.25 retrieving revision 1.90.2.26 diff -u -d -r1.90.2.25 -r1.90.2.26 --- helpers.cpp 22 Apr 2004 14:10:48 -0000 1.90.2.25 +++ helpers.cpp 10 Jun 2004 11:51:47 -0000 1.90.2.26 @@ -6,7 +6,7 @@ // Wayne Schlitt (wa...@mi...) // Ben Byer (bu...@us...) // Kevin Dwyer (ke...@ph...) -// +// // use of this code is restricted to the terms // of the GNU GPL, which should have been included in this // distribution. If not, see www.gnu.org/copyleft/gpl.html. @@ -26,7 +26,7 @@ // // Helper functions for bidwatcher, no platform/gui specific // code. -// +// #include "config.h" #include <stdio.h> @@ -46,7 +46,7 @@ #include <gtk/gtk.h> #include "bidwatcher.h" -const char * const CheckPrice="0123456789.$,"; // Characters allowed in a price +const char * const CheckPrice="0123456789.$,"; // Characters allowed in a price const char * const SearchOps[2][29]={{ "Starts at", // 1 "Currently", // 2 @@ -139,10 +139,10 @@ else inc = 100.00; break; case 'G': // great british pounds - inc=100; - if (fcb<3000) inc=50; - if (fcb<1500) inc=20; - if (fcb<600) inc=10; + inc=100; + if (fcb<3000) inc=50; + if (fcb<1500) inc=20; + if (fcb<600) inc=10; if (fcb<300) inc=5; if (fcb<150) inc=2; if (fcb<60) inc=1; @@ -151,10 +151,10 @@ if (fcb<1) inc=0.05; break; case 'J': // japanese yen - inc=12000; - if (fcb<=600000) inc=7500; - if (fcb<=300000) inc=3000; - if (fcb<=120000) inc=1200; + inc=12000; + if (fcb<=600000) inc=7500; + if (fcb<=300000) inc=3000; + if (fcb<=120000) inc=1200; if (fcb<=60000) inc=600; if (fcb<=30000) inc=240; if (fcb<=12000) inc=120; @@ -168,7 +168,7 @@ if (fcb<1000) inc=5; if (fcb<100) inc=1; break; - default: + default: inc=0; } fcb = fcb + inc; @@ -213,7 +213,7 @@ return '-'; // Unicode "en dash" character if (!strcmp(temp, "szlig")) return 223; // sz-ligature - if (!strcmp(temp, "nbsp") || !strcmp(temp, "copy") || + if (!strcmp(temp, "nbsp") || !strcmp(temp, "copy") || !strcmp(temp, "#8260") || !strcmp(temp, "#12288")) return ' '; if (!strcmp(temp, "middot")) // This should be trademark @@ -295,7 +295,7 @@ // We don't know what it is fprintf(stderr, "Got unknown HTML entity '%s'\n", temp); } - + return 0; } } @@ -429,7 +429,7 @@ for(unsigned int i=0; i <= strlen(p); i++) { if (p[i] != '\n') p[j++] = p[i]; - else + else p[j++] = '/'; } p[j] = '\0'; @@ -445,7 +445,7 @@ p[j++] = p[i]; p[j] = '\0'; } - + ////////////////////////////////////////////////////////////////////////////////// // ProcessBidSubmission // takes the html response from submitting a bid and returns an appropriate @@ -455,7 +455,7 @@ // 2 - Bid too low // 3 - Quantity Problem // 4 - Other problem (unknown, probably bad connection) -// +// ////////////////////////////////////////////////////////////////////////////////// int ProcessBidSubmission(char *Buff, char *lineBuff, int lineBuffLen) { @@ -477,13 +477,13 @@ return PBS_SUCCESS; } else if (strstr(lineBuff, "Confirm that your bid is correct")){ - if (foundKey) + if (foundKey) return PBS_SUCCESS; } else if (strstr(lineBuff, "Problem with bid amount") || (strstr(lineBuff, "Your bid must be at least"))) return PBS_BIDTOOLOW; - else if (strstr(lineBuff, "Problem with quantity")) + else if (strstr(lineBuff, "Problem with quantity")) return PBS_BADQUANTITY; else if (strstr(lineBuff, "Cannot proceed") || strstr(lineBuff, "Auction ended")) @@ -505,7 +505,7 @@ // 5 - Auction is over. // 6 - invalid username / password. // 7 - unknown error -// +// ////////////////////////////////////////////////////////////////////////////// int ProcessBid(char *Buff) { @@ -536,7 +536,7 @@ return PB_BADQUANTITY; else if (strstr(Buff, "Cannot proceed")) return PB_AUCTIONOVER; - else if (strstr(Buff, "or password invalid") || + else if (strstr(Buff, "or password invalid") || strstr(Buff, "password is not valid")) return PB_BADUSER; // Do we see our username info URL? @@ -565,7 +565,7 @@ char tempBuff[1024]; if (strstr(Buff, "password invalid") != NULL) return PEA_BADUSER; if (strstr(Buff, "via e-mail:") == NULL) return ERROR; - // now the likely errors are weeded - so we can parse the + // now the likely errors are weeded - so we can parse the // email address out of Buff #ifdef HAVE_SSTREAM std::istringstream buffStream(Buff); @@ -604,34 +604,34 @@ { char lineBuff[2048]; unsigned int nlpos; - + unsigned long long ids[512], numids=0; unsigned long long *retval; unsigned int i; - + while(*Buff) { // Get the next line - if (strchr(Buff,'\n') == NULL) + if (strchr(Buff,'\n') == NULL) nlpos = strlen(Buff) - 1; - else + else nlpos = strchr(Buff,'\n') - Buff; strncpy(lineBuff, Buff, nlpos); Buff += nlpos + 1; lineBuff[nlpos] = '\0'; - + // This is a particularly lame check. Numeric usernames are possible - if ((lineBuff[0] == '\t') && (isdigit(lineBuff[1])) && - (isdigit(lineBuff[2])) && (isdigit(lineBuff[3])) && + if ((lineBuff[0] == '\t') && (isdigit(lineBuff[1])) && + (isdigit(lineBuff[2])) && (isdigit(lineBuff[3])) && (isdigit(lineBuff[4])) && (isdigit(lineBuff[8]))) { ids[numids++] = atoul(lineBuff+1); DPRINTF(DLOW, ("Read id %llu\n", ids[numids-1])); } } - + retval = (unsigned long long *) malloc(sizeof(unsigned long long) * (numids+1)); - for(i=0; i < numids; i++) + for(i=0; i < numids; i++) retval[i] = ids[i]; retval[i] = 0; @@ -649,11 +649,11 @@ for (idx=0;Str2Chk[idx]!=0;++idx) { for (idx2=0;GoodChars[idx2]!=0;++idx2) { - if (GoodChars[idx2]==Str2Chk[idx]) break; + if (GoodChars[idx2]==Str2Chk[idx]) break; } - if (GoodChars[idx2]==0) { - Str2Chk[idx]=0; + if (GoodChars[idx2]==0) { + Str2Chk[idx]=0; return; } } @@ -672,8 +672,8 @@ else ops_type = auc_type; // Watch the change, it's strNcmp now. - for(idx=0; SearchOps[ops_type][idx][0]!='*';++idx) - if (strncmp(LineData, SearchOps[ops_type][idx], + for(idx=0; SearchOps[ops_type][idx][0]!='*';++idx) + if (strncmp(LineData, SearchOps[ops_type][idx], strlen(SearchOps[ops_type][idx]))==0) { return (idx+1); } @@ -686,7 +686,7 @@ // ClearBidMakeUp: // Clears the information in a BidMakeup struct ////////////////////////////////////////////////////////////////////////////// -void ClearBidMakeUp(struct auctioninfo * NewAuction) +void ClearBidMakeUp(struct auctioninfo * NewAuction) { NewAuction->ItemNumber=0; NewAuction->Description[0]=0; @@ -711,7 +711,9 @@ NewAuction->stat = '0'; NewAuction->reserveMet = '0'; NewAuction->isSnipe = FALSE; + NewAuction->isPreBid = FALSE; NewAuction->EndsValue = 0; + NewAuction->UpdTime = 0; if (NewAuction->infourl) delete NewAuction->infourl; if (NewAuction->infourl) delete NewAuction->bidurl; NewAuction->infourl=NULL; @@ -733,7 +735,7 @@ // convert Ends into in values of year, month, day char tokEnds[50]; // the tokenized Ends, will be tossed. strncpy(tokEnds, Ends, 50); - tokEnds[49] = '\0'; + tokEnds[49] = '\0'; char * scratch; int seconds,minutes,hours,month,day,year; scratch = strtok(tokEnds, "/"); @@ -766,14 +768,14 @@ TheTime.tm_yday = 0; TheTime.tm_wday = 0; TheTime.tm_isdst = -1; - + // now we have day,month,year,minutes,hours,seconds in integer format, // we just need to convert it to seconds since the epoch and we're in // business. long int the_time = mktime(&TheTime); return the_time; } - else return -1; + else return -1; } ////////////////////////////////////////////////////////////////////////////// @@ -828,7 +830,7 @@ err = sprintf(chTimeLeft, "Auction Ended"); return intTimeLeft; } -} +} ////////////////////////////////////////////////////////////////////////////// // translate_date // converts dates from "Jan-23-00 12:34:56" into "01/23/00, 12:34:56" @@ -879,7 +881,7 @@ len=strspn(buf,"0123456789.,"); buf[len]='\0'; strip_commas(buf); - + //if (isfirst) auc->FirstBid = atof(buf); //else auc->CurrentBid = atof(buf); @@ -913,10 +915,10 @@ memset(Seller, 0, sizeof(Seller)); memset(HighBidder, 0, sizeof(HighBidder)); reserveMet = 'x'; - + CurrentBid = 0; // Not resetting this breaks the logic of updating the bid BidCount = 0; // This too. - + /* * Parse the description out of the buffer first. This is * most easily done at the buffer-level and not as we try @@ -940,7 +942,7 @@ Description[idx] = '\0'; } else { return FALSE; - } + } #ifdef HAVE_SSTREAM std::istringstream streamBuff(Buff); @@ -948,7 +950,7 @@ std::istrstream streamBuff(Buff); #endif /* Skip everything before the start of auction data */ - + memset(&LineData, 0, sizeof(LineData)); while(strstr(LineData,"eBay")==NULL && streamBuff) @@ -991,7 +993,7 @@ // The Idea here is to get the info we can get, if for // some reason some of the data is missing or out of // order we can still salvage what we can.. - + // This new case style I came up with is a bit redundant, but // it may allow for bidwatcher to grow into more types. Like // Checking yahoo or something. See also SearchOps. -kdwyer @@ -1007,7 +1009,7 @@ case TYPE_EBAYMOTORS: //non-car auctions are the same case TYPE_EBAY: switch (matchedPhrase) { - case 1: + case 1: case 2: // current price case 14: // "Lowest" -shows up on motorsnotcars case 16: @@ -1070,7 +1072,7 @@ } else if (strstr(LineData, "Winning bidders list")) { strcpy(HighBidder, "Dutch Auction"); } else { - for(cnt=0; (((LineData[cnt]!=' ') && + for(cnt=0; (((LineData[cnt]!=' ') && (LineData[cnt]!=0)) && (cnt<14)); ++cnt) bc[cnt] = LineData[cnt]; bc[cnt] = 0; @@ -1184,12 +1186,12 @@ BidderRate[count+1] = '\0'; } break; - + //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")) @@ -1217,7 +1219,7 @@ if (!CurrentBid) { streamBuff.getline(LineData, 1024, '\n'); parseprice(LineData, this, FALSE); - + streamBuff.getline(LineData, 1024, '\n'); streamBuff.getline(LineData, 1024, '\n'); if (strstr(LineData, "reserve not")) @@ -1228,7 +1230,7 @@ TimeLeft[0] = '0'; } break; - + case 2: //Time left if (!TimeLeft[0]) { streamBuff.getline(LineData, 1024, '\n'); @@ -1253,7 +1255,7 @@ if (!BidCount) { char bc[80]; streamBuff.getline(LineData, 1024, '\n'); - for(cnt=0; (((LineData[cnt]!=' ') && + for(cnt=0; (((LineData[cnt]!=' ') && (LineData[cnt]!=0)) && (cnt<14)); ++cnt) bc[cnt] = LineData[cnt]; bc[cnt] = 0; @@ -1287,7 +1289,7 @@ reserveMet = 'n'; else if (strstr(LineData, "reserve met")) reserveMet = 'y'; - + default:; break; /* End case 1 of auc_type */ @@ -1298,13 +1300,16 @@ } } // if ( CurrentBid == 0 ) strcpy(CurrentBid, "Error"); - + // now calculate the ending time in seconds and save it if the auction ended // early due to cancel or "buy it now" - if (ended_early == 1) + if (ended_early == 1) { EndsValue = 0; - - + } else { + EndsValue = CalcEndsValue(Ends); + if(EndsValue < 0) EndsValue = 0; + } + // now We'll parse the High Bidder and Seller's ratings off their names // and assign them to .SellerRate and .BidderRate strcpy(newName, Seller); @@ -1349,7 +1354,7 @@ } DPRINTF(DLOW, ("HighBidder: %s %s\n", HighBidder, BidderRate)); - + } return TRUE; } // end GetAucInfo() @@ -1364,11 +1369,11 @@ else month = timeStruct->tm_mon; year = timeStruct->tm_year; if (year > 99) year = year - 100; - + if (year > 75) - sprintf(fileName, "%s%s%d_%d.txt",homedir, prefix2, month, year); + sprintf(fileName, "%s%s%d_%d.txt",homedir, prefix2, month, year); else - sprintf(fileName, "%s%s%d_0%d.txt",homedir,prefix2, month, year); + sprintf(fileName, "%s%s%d_0%d.txt",homedir,prefix2, month, year); } void MakeClockTime(int offSet, char * theTime) @@ -1495,7 +1500,7 @@ i = j = 0; bool inComment = false; - for ( i=0; i<bufflen; i++) + for ( i=0; i<bufflen; i++) { /* * Let's first delete all of the JavaScript code by removing anything @@ -1523,20 +1528,20 @@ // If we're inside an HTML comment, throw chars out. if (inComment == true) continue; - if ((inRow==FALSE) && - (fromBuff[i] == '<') && - (tolower(fromBuff[i + 1]) == 't') && + if ((inRow==FALSE) && + (fromBuff[i] == '<') && + (tolower(fromBuff[i + 1]) == 't') && (tolower(fromBuff[i + 2]) == 'r')) { - // we have found a cell and should start recording + // we have found a cell and should start recording inRow = TRUE; toBuffer[j++] = fromBuff[i]; } else if ((inRow==TRUE) && (fromBuff[i - 3] == '/') && - (tolower(fromBuff[i - 2]) == 't') && + (tolower(fromBuff[i - 2]) == 't') && (tolower(fromBuff[i - 1]) == 'r') && (fromBuff[i] == '>')) - { + { inRow = FALSE; toBuffer[j++] = fromBuff[i]; toBuffer[j++] = '\n'; @@ -1562,7 +1567,7 @@ // encode_password // converts the password to use the %## sequence so that special characters // in the password don't cause problems with the URL. (It also makes the -// password a little more hidden on the disk, but that is barely worth +// password a little more hidden on the disk, but that is barely worth // mentioning) ////////////////////////////////////////////////////////////////////////////// void encode_password( char *dest, const char *src ) Index: bidwatcher.h =================================================================== RCS file: /cvsroot/bidwatcher/bidwatcher/Attic/bidwatcher.h,v retrieving revision 1.74.2.16 retrieving revision 1.74.2.17 diff -u -d -r1.74.2.16 -r1.74.2.17 --- bidwatcher.h 20 Apr 2004 03:24:29 -0000 1.74.2.16 +++ bidwatcher.h 10 Jun 2004 11:51:47 -0000 1.74.2.17 @@ -160,16 +160,17 @@ char snipeKey[100]; /* Snipe key for this auction */ float myBidAmount; /* Our bid */ int myBidQuantity; /* Our bid quantity for dutch */ - long int EndsValue; /* time auction ends in seconds */ + long int EndsValue; /* time auction ends in seconds */ + long int UpdTime; /* time of last update */ char stat; /* status of auction for GUI */ char bidstatus; /* final status of bid/snipe */ char reserveMet; /* [y/n/x] = Status of reserve */ bool isSnipe; /* Is this a snipe or not? */ + bool isPreBid; /* Needs pre-bid for snipe */ int AuctionType; /* Type: ebay/ebaymotors/etc. */ URL *infourl; /* URL for auction info */ URL *bidurl; /* URL for bidding/sniping */ int magic; /* Used to detect corrupt lists */ - int bid(bool); int isEndless; /* For non-auction auctions */ auctioninfo(); @@ -177,6 +178,7 @@ int getinfo(); bool parseaucinfo(const char *); void getkey(float bid, int quantity); + int bid(bool); }; typedef char string30[30]; |