~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop the analysis pass in Loopy's redraw routine from being
[sgt/puzzles]
/
osx.m
diff --git
a/osx.m
b/osx.m
index
53d14ba
..
6e709a5
100644
(file)
--- a/
osx.m
+++ b/
osx.m
@@
-1088,15
+1088,16
@@
struct frontend {
p = i->sval;
c = *p++;
while (*p) {
p = i->sval;
c = *p++;
while (*p) {
- char
cc, *q
;
+ char
*q, *copy
;
q = p;
while (*p && *p != c) p++;
q = p;
while (*p && *p != c) p++;
- cc = *p;
- *p = '\0';
- [pb addItemWithTitle:[NSString stringWithUTF8String:q]];
- *p = cc;
+ copy = snewn((p-q) + 1, char);
+ memcpy(copy, q, p-q);
+ copy[p-q] = '\0';
+ [pb addItemWithTitle:[NSString stringWithUTF8String:copy]];
+ sfree(copy);
if (*p) p++;
}
if (*p) p++;
}
@@
-1342,6
+1343,8
@@
static void osx_draw_line(void *handle, int x1, int y1, int x2, int y2, int colo
[path moveToPoint:p1];
[path lineToPoint:p2];
[path stroke];
[path moveToPoint:p1];
[path lineToPoint:p2];
[path stroke];
+ NSRectFill(NSMakeRect(x1, fe->h-y1-1, 1, 1));
+ NSRectFill(NSMakeRect(x2, fe->h-y2-1, 1, 1));
}
static void osx_draw_rect(void *handle, int x, int y, int w, int h, int colour)
{
}
static void osx_draw_rect(void *handle, int x, int y, int w, int h, int colour)
{