diff options
author | rsc <devnull@localhost> | 2006-02-14 19:42:07 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-02-14 19:42:07 +0000 |
commit | 7575a9e1bb90c1876999881509797900787bb6b0 (patch) | |
tree | d1fa11805c01a0a6435a4f73eaee536f29788894 /src | |
parent | 0870ded11f35f0909faf35eadd29f1bb130a3e4a (diff) | |
download | plan9port-7575a9e1bb90c1876999881509797900787bb6b0.tar.gz plan9port-7575a9e1bb90c1876999881509797900787bb6b0.tar.bz2 plan9port-7575a9e1bb90c1876999881509797900787bb6b0.zip |
bigger buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/draw/gview.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/draw/gview.c b/src/cmd/draw/gview.c index 855c7b4e..d935910e 100644 --- a/src/cmd/draw/gview.c +++ b/src/cmd/draw/gview.c @@ -700,11 +700,11 @@ int is_valid_label(char* lab) */ fpolygon* rd_fpoly(FILE* fin, int *lineno) { - char buf[256], junk[2]; + char buf[1024], junk[2]; fpoint q; fpolygon* fp; int allocn; - if (!fgets(buf,256,fin)) + if (!fgets(buf,sizeof buf,fin)) return 0; (*lineno)++; if (sscanf(buf,"%lg%lg%1s",&q.x,&q.y,junk) != 2) @@ -717,7 +717,7 @@ fpolygon* rd_fpoly(FILE* fin, int *lineno) fp->nam = ""; fp->thick = 0; fp->clr = clr_im(DBlack); - while (fgets(buf,256,fin)) { + while (fgets(buf,sizeof buf,fin)) { (*lineno)++; if (sscanf(buf,"%lg%lg%1s",&q.x,&q.y,junk) != 2) { if (!is_valid_label(buf)) @@ -784,7 +784,7 @@ fpolygon* fp_reverse(fpolygon* fp) void wr_fpoly(FILE* fout, const fpolygon* fp) { - char buf[256]; + char buf[1024]; int i; for (i=0; i<=fp->n; i++) fprintf(fout,"%.12g\t%.12g\n", fp->p[i].x, fp->p[i].y); |