Rev 8163 | Rev 8878 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8163 | Rev 8195 | ||
---|---|---|---|
Line 16... | Line 16... | ||
16 | */ |
16 | */ |
17 | /* line input / output / translation routines |
17 | /* line input / output / translation routines |
18 | * and error routines */ |
18 | * and error routines */ |
19 | #include "flydraw.h" |
19 | #include "flydraw.h" |
20 | 20 | ||
21 | void |
21 | void fly_error(char *p) |
22 | { |
22 | { |
23 | fprintf(stderr,"%s %d\n",p,linecnt); |
23 | fprintf(stderr,"%s %d\n",p,linecnt); |
24 | } |
24 | } |
25 | 25 | ||
26 | /* Get a line in a stored working file. |
26 | /* Get a line in a stored working file. |
Line 104... | Line 104... | ||
104 | /* already allocated */ |
104 | /* already allocated */ |
105 | if(wimg!=NULL && savew==w && wcolor==color) goto end; |
105 | if(wimg!=NULL && savew==w && wcolor==color) goto end; |
106 | if(wimg!=NULL) gdImageDestroy(wimg); |
106 | if(wimg!=NULL) gdImageDestroy(wimg); |
107 | wimg=gdImageCreate(w,w); |
107 | wimg=gdImageCreate(w,w); |
108 | if(wimg==NULL) { |
108 | if(wimg==NULL) { |
109 |
|
109 | fly_error("width_creation_failure"); return color; |
110 | } |
110 | } |
111 | bg=gdImageColorAllocate(wimg,255,255,255); |
111 | bg=gdImageColorAllocate(wimg,255,255,255); |
112 | gdImageColorTransparent(wimg,bg); |
112 | gdImageColorTransparent(wimg,bg); |
113 | fg=gdImageColorAllocate(wimg,gdImageRed(image,color), |
113 | fg=gdImageColorAllocate(wimg,gdImageRed(image,color), |
114 | gdImageGreen(image,color), |
114 | gdImageGreen(image,color), |