tbigger buffer - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 7575a9e1bb90c1876999881509797900787bb6b0
 (DIR) parent 0870ded11f35f0909faf35eadd29f1bb130a3e4a
 (HTM) Author: rsc <devnull@localhost>
       Date:   Tue, 14 Feb 2006 19:42:07 +0000
       
       bigger buffer
       
       Diffstat:
         M src/cmd/draw/gview.c                |       8 ++++----
       
       1 file changed, 4 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/draw/gview.c b/src/cmd/draw/gview.c
       t@@ -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)
       t@@ -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))
       t@@ -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);