diff options
author | rsc <devnull@localhost> | 2005-01-14 20:21:15 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-14 20:21:15 +0000 |
commit | 23aada8926e0af265b2aaa3f62c1bb49d73c1e41 (patch) | |
tree | b302839ef41476ff91d452b623b6a92827033593 | |
parent | 5940cb844b8df1c9a69f5f8f7967cc786f14bba0 (diff) | |
download | plan9port-23aada8926e0af265b2aaa3f62c1bb49d73c1e41.tar.gz plan9port-23aada8926e0af265b2aaa3f62c1bb49d73c1e41.tar.bz2 plan9port-23aada8926e0af265b2aaa3f62c1bb49d73c1e41.zip |
floating percent
-rw-r--r-- | src/cmd/acme/rows.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c index be580f1c..1927e29d 100644 --- a/src/cmd/acme/rows.c +++ b/src/cmd/acme/rows.c @@ -488,7 +488,8 @@ rowloadfonts(char *file) int rowload(Row *row, char *file, int initing) { - int i, j, line, percent, y, nr, nfontr, n, ns, ndumped, dumpid, x, fd; + int i, j, line, y, nr, nfontr, n, ns, ndumped, dumpid, x, fd; + double percent; Biobuf *b, *bout; char *buf, *l, *t, *fontname; Rune *r, rune, *fontr; @@ -539,7 +540,7 @@ rowload(Row *row, char *file, int initing) if(j<=0 || j>10) goto Rescue2; for(i=0; i<j; i++){ - percent = atoi(l+i*12); + percent = atof(l+i*12); if(percent<0 || percent>=100) goto Rescue2; x = row->r.min.x+percent*Dx(row->r)/100; @@ -630,7 +631,7 @@ rowload(Row *row, char *file, int initing) j = atoi(l+1+1*12); q0 = atoi(l+1+2*12); q1 = atoi(l+1+3*12); - percent = atoi(l+1+4*12); + percent = atof(l+1+4*12); if(i<0 || i>10) goto Rescue2; if(i > row->ncol) |