diff options
author | Dan Cross <cross@gajendra.net> | 2020-01-10 14:44:21 +0000 |
---|---|---|
committer | Dan Cross <cross@gajendra.net> | 2020-01-10 14:54:30 +0000 |
commit | fa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch) | |
tree | 81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/jpg/readpng.c | |
parent | 77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff) | |
download | plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2 plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip |
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.
Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/cmd/jpg/readpng.c')
-rw-r--r-- | src/cmd/jpg/readpng.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/jpg/readpng.c b/src/cmd/jpg/readpng.c index 5fdbc1db..e327a572 100644 --- a/src/cmd/jpg/readpng.c +++ b/src/cmd/jpg/readpng.c @@ -11,9 +11,9 @@ int debug; enum{ IDATSIZE=1000000, /* filtering algorithms, supposedly increase compression */ FilterNone = 0, /* new[x][y] = buf[x][y] */ - FilterSub = 1, /* new[x][y] = buf[x][y] + new[x-1][y] */ - FilterUp = 2, /* new[x][y] = buf[x][y] + new[x][y-1] */ - FilterAvg = 3, /* new[x][y] = buf[x][y] + (new[x-1][y]+new[x][y-1])/2 */ + FilterSub = 1, /* new[x][y] = buf[x][y] + new[x-1][y] */ + FilterUp = 2, /* new[x][y] = buf[x][y] + new[x][y-1] */ + FilterAvg = 3, /* new[x][y] = buf[x][y] + (new[x-1][y]+new[x][y-1])/2 */ FilterPaeth= 4, /* new[x][y] = buf[x][y] + paeth(new[x-1][y],new[x][y-1],new[x-1][y-1]) */ FilterLast = 5, PropertyBit = 1<<5 @@ -141,11 +141,11 @@ refill_buffer: return *z->b++; } -static uchar +static uchar paeth(uchar a, uchar b, uchar c) { int p, pa, pb, pc; - + p = (int)a + (int)b - (int)c; pa = abs(p - (int)a); pb = abs(p - (int)b); @@ -218,7 +218,7 @@ convertpix(ZlibW *z, uchar *pixel, uchar *r, uchar *g, uchar *b) break; default: sysfatal("bad number of channels: %d", z->nchan); - } + } } static void @@ -234,7 +234,7 @@ scan(ZlibW *z) unfilter(p[0], p+1, z->pscan+1, z->scanl-1, (nch*z->bpp+7)/8); /* - * Adam7 interlace order. + * Adam7 interlace order. * 1 6 4 6 2 6 4 6 * 7 7 7 7 7 7 7 7 * 5 6 5 6 5 6 5 6 |