Fossil SCM

Update the pikchr.c file from the latest source from the Pikchr website.

drh 2020-09-10 01:06 trunk
Commit d2b69d16c66218bf5935960199feeb660f5fb1c021a3bb0b8c497693e5379d32
1 file changed +3 -2
+3 -2
--- src/pikchr.c
+++ src/pikchr.c
@@ -5114,11 +5114,11 @@
51145114
**
51155115
** Special color names "None" and "Off" return -1.0 without causing
51165116
** an error.
51175117
*/
51185118
static PNum pik_lookup_color(Pik *p, PToken *pId){
5119
- int first, last, mid, c;
5119
+ int first, last, mid, c = 0;
51205120
first = 0;
51215121
last = count(aColor)-1;
51225122
while( first<=last ){
51235123
const char *zClr;
51245124
int c1, c2, i;
@@ -5479,10 +5479,11 @@
54795479
** Search for object located at *pCenter that has an xChop method.
54805480
** Return a pointer to the object, or NULL if not found.
54815481
*/
54825482
static PElem *pik_find_chopper(PEList *pList, PPoint *pCenter){
54835483
int i;
5484
+ if( pList==0 ) return 0;
54845485
for(i=pList->n-1; i>=0; i--){
54855486
PElem *pElem = pList->a[i];
54865487
if( pElem->type->xChop!=0
54875488
&& pElem->ptAt.x==pCenter->x
54885489
&& pElem->ptAt.y==pCenter->y
@@ -6330,6 +6331,6 @@
63306331
printf("</body></html>\n");
63316332
return 0;
63326333
}
63336334
#endif /* PIKCHR_SHELL */
63346335
6335
-#line 6360 "pikchr.c"
6336
+#line 6361 "pikchr.c"
63366337
--- src/pikchr.c
+++ src/pikchr.c
@@ -5114,11 +5114,11 @@
5114 **
5115 ** Special color names "None" and "Off" return -1.0 without causing
5116 ** an error.
5117 */
5118 static PNum pik_lookup_color(Pik *p, PToken *pId){
5119 int first, last, mid, c;
5120 first = 0;
5121 last = count(aColor)-1;
5122 while( first<=last ){
5123 const char *zClr;
5124 int c1, c2, i;
@@ -5479,10 +5479,11 @@
5479 ** Search for object located at *pCenter that has an xChop method.
5480 ** Return a pointer to the object, or NULL if not found.
5481 */
5482 static PElem *pik_find_chopper(PEList *pList, PPoint *pCenter){
5483 int i;
 
5484 for(i=pList->n-1; i>=0; i--){
5485 PElem *pElem = pList->a[i];
5486 if( pElem->type->xChop!=0
5487 && pElem->ptAt.x==pCenter->x
5488 && pElem->ptAt.y==pCenter->y
@@ -6330,6 +6331,6 @@
6330 printf("</body></html>\n");
6331 return 0;
6332 }
6333 #endif /* PIKCHR_SHELL */
6334
6335 #line 6360 "pikchr.c"
6336
--- src/pikchr.c
+++ src/pikchr.c
@@ -5114,11 +5114,11 @@
5114 **
5115 ** Special color names "None" and "Off" return -1.0 without causing
5116 ** an error.
5117 */
5118 static PNum pik_lookup_color(Pik *p, PToken *pId){
5119 int first, last, mid, c = 0;
5120 first = 0;
5121 last = count(aColor)-1;
5122 while( first<=last ){
5123 const char *zClr;
5124 int c1, c2, i;
@@ -5479,10 +5479,11 @@
5479 ** Search for object located at *pCenter that has an xChop method.
5480 ** Return a pointer to the object, or NULL if not found.
5481 */
5482 static PElem *pik_find_chopper(PEList *pList, PPoint *pCenter){
5483 int i;
5484 if( pList==0 ) return 0;
5485 for(i=pList->n-1; i>=0; i--){
5486 PElem *pElem = pList->a[i];
5487 if( pElem->type->xChop!=0
5488 && pElem->ptAt.x==pCenter->x
5489 && pElem->ptAt.y==pCenter->y
@@ -6330,6 +6331,6 @@
6331 printf("</body></html>\n");
6332 return 0;
6333 }
6334 #endif /* PIKCHR_SHELL */
6335
6336 #line 6361 "pikchr.c"
6337

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button