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>
This commit is contained in:
Dan Cross 2020-01-10 14:44:21 +00:00
parent 77a0a5b519
commit fa325e9b42
1021 changed files with 5688 additions and 6193 deletions

View file

@ -134,7 +134,7 @@ void get_sof (int kind) {
tab = get1();
printf ("\tcomponent %d: %d hsample, %d vsample, quantization table %d\n",
id, sf >> 4, sf & 0xf, tab);
}
}
}
void get_com (int kind) {
@ -301,10 +301,10 @@ marker:
case 0xd8:
printf ("SOI\n");
break;
case 0xe0: case 0xe1: case 0xe2: case 0xe3:
case 0xe4: case 0xe5: case 0xe6: case 0xe7:
case 0xe8: case 0xe9: case 0xea: case 0xeb:
case 0xec: case 0xed: case 0xee: case 0xef:
case 0xe0: case 0xe1: case 0xe2: case 0xe3:
case 0xe4: case 0xe5: case 0xe6: case 0xe7:
case 0xe8: case 0xe9: case 0xea: case 0xeb:
case 0xec: case 0xed: case 0xee: case 0xef:
get_app(c);
break;
case 0xda:

View file

@ -225,7 +225,7 @@ vidmerge(Rawimage **aa1, Rawimage **aa2)
free(a2->cmap);
free(a1);
free(a2);
}
}
if (aa2[i] != nil)
fprint(2, "jpg: vidmerge: unequal lengths\n");
free(aa1);

View file

@ -63,7 +63,7 @@ load(Image *image, Memimage *memimage)
dx = Dx(r);
dy = Dy(r);
/*
/*
* Read image data into memory
* potentially one extra byte on each end of each scan line.
*/

View file

@ -185,7 +185,7 @@ load_4C(Biobuf *b, long width, long height, Rgb* buf, Rgb* clut)
p = &buf[ix + iy * width];
if((1 == (val & 3)) || (2 == (val & 3)))
skip = 1;
else
else
skip = 0;
while(val--) {
@ -273,7 +273,7 @@ load_8C(Biobuf *b, long width, long height, Rgb* buf, Rgb* clut)
p = &buf[ix + iy * width];
if(val & 1)
skip = 1;
else
else
skip = 0;
while(val--) {
@ -488,7 +488,7 @@ ReadBMP(Biobuf *b, int *width, int *height)
num_coltab = 3;
if(num_coltab) {
int i;
int i;
Bseek(b, bmih.size + sizeof(Infohdr), 0);
for(i = 0; i < num_coltab; i++) {
@ -622,5 +622,3 @@ readbmp(int fd, int colorspace)
Bterm(&b);
return a;
}

View file

@ -166,7 +166,7 @@ readarray(Header *h)
nimages = 0;
array[0] = nil;
h->array = array;
for(;;){
switch(c = Bgetc(h->fd)){
case Beof:

View file

@ -78,7 +78,7 @@ struct Header
Huffman acht[4];
int **data[3];
int ndata[3];
uchar *sf; /* start of frame; do better later */
uchar *ss; /* start of scan; do better later */
int ri; /* restart interval */
@ -1484,7 +1484,7 @@ receiveEOB(Header *h, int s)
return v;
}
/*
/*
* return next bit of input
*/
static

View file

@ -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

View file

@ -21,7 +21,7 @@ Bgetch(Biobuf *b)
while((c = Bgetc(b)) != Beof && c != '\n')
;
}
return c;
return c;
}
/*
@ -40,7 +40,7 @@ Bgetint(Biobuf *b)
return -1;
i = 0;
do {
do {
i = i*10 + (c-'0');
} while((c = Bgetch(b)) != Beof && isdigit(c));

View file

@ -29,7 +29,7 @@ enum {
static int lsbtab[] = { 6, 4, 2, 0};
static int
static int
clip(int x)
{
x >>= 18;
@ -186,5 +186,3 @@ readyuv(int fd, int colorspace)
Bterm(&b);
return a;
}

View file

@ -281,7 +281,7 @@ writegraphiccontrol(Biobuf *fd, int dt, int trans)
Bputc(fd, 0x01);
else
Bputc(fd, 0x00);
/* Delay time, in centisec (argument is millisec for sanity) */
if(dt < 0)
dt = 0;
@ -345,7 +345,7 @@ writedata(Biobuf *fd, Image *image, Memimage *memimage)
else
Bputc(fd, depth);
/*
/*
* Read image data into memory
* potentially one extra byte on each end of each scan line
*/

View file

@ -70,7 +70,7 @@ zread(void *va, void *buf, int n)
uchar *b = buf, *e = b+n, *img;
int pixels; /* number of pixels in row that can be sent now */
int i, a, pixwid;
pixwid = z->pixwid;
while(b+pixwid <= e){ /* loop over image rows */
if(z->row >= nrow)
@ -103,7 +103,7 @@ zread(void *va, void *buf, int n)
b[2] = (b[2]*255)/a;
}
}
}else
}else
b += pixwid*pixels;
z->col += pixels;
@ -148,7 +148,7 @@ memRGBA(Memimage *i)
Memimage *ni;
char buf[32];
ulong dst;
/*
* [A]BGR because we want R,G,B,[A] in big-endian order. Sigh.
*/
@ -157,7 +157,7 @@ memRGBA(Memimage *i)
dst = ABGR32;
else
dst = BGR24;
if(i->chan == dst)
return i;
@ -211,7 +211,7 @@ memwritepng(Biobuf *bo, Memimage *r, ImageInfo *II)
*h++ = tm->min;
*h++ = tm->sec;
chunk(bo, "tIME", buf, h-buf);
if(II->fields_set & II_GAMMA){
vgamma = II->gamma*100000;
put4(buf, vgamma);

View file

@ -30,7 +30,7 @@ writedata(Biobuf *fd, Image *image, Memimage *memimage)
chan = image->chan;
}
/*
/*
* Read image data into memory
* potentially one extra byte on each end of each scan line
*/