chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
count is count of offers
[ypp-sc-tools.web-live.git]
/
pctb
/
structure.c
diff --git
a/pctb/structure.c
b/pctb/structure.c
index 63cd641e82ebb843977bf0797ab5f589cf685d62..0fbfb40e6eb076b5dd7081635362e1dabc1fead7 100644
(file)
--- a/
pctb/structure.c
+++ b/
pctb/structure.c
@@
-84,7
+84,7
@@
const CanonColourInfo canoncolourinfos[]= {
static void mustfail1(const char *file, int line, const char *what) {
fprintf(stderr,
"\n\n"
static void mustfail1(const char *file, int line, const char *what) {
fprintf(stderr,
"\n\n"
- "Unable to figure out contents YPP client display.\n"
+ "Unable to figure out contents
of
YPP client display.\n"
" Check that your client is logged in has the correct display.\n"
" If that isn't the problem, please report this as a fault.\n\n"
"Technical details:"
" Check that your client is logged in has the correct display.\n"
" If that isn't the problem, please report this as a fault.\n\n"
"Technical details:"
@@
-304,17
+304,10
@@
void check_correct_commodities(void) {
for (y=0; y<allh; y++) {
int want= all[y][x];
if (want==' ') continue;
for (y=0; y<allh; y++) {
int want= all[y][x];
if (want==' ') continue;
-#define PIXCHECK(dx,dy) \
- if (get(alloffx+x+dx, alloffy+y+dy) == want) goto pix_found
- PIXCHECK( 0, 0);
- PIXCHECK(-1,-1);
- PIXCHECK(-1,+1);
- PIXCHECK(+1,-1);
- PIXCHECK(+1,+1);
- bad++;
- continue;
- pix_found:
- good++;
+ if (get(alloffx+x, alloffy+y) == want)
+ good++;
+ else
+ bad++;
}
debugf("CHECKCOMMOD alloff=%d,%d good=%d bad=%d\n",
alloffx,alloffy, good,bad);
}
debugf("CHECKCOMMOD alloff=%d,%d good=%d bad=%d\n",
alloffx,alloffy, good,bad);