w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 36b6e9c6ad470222c5e591ed8e679609b2d358ed
parent 105ff7cd26f6740c61cc265d9d03d35d38f0cba6
Author: ukai <ukai>
Date:   Mon,  7 Jul 2003 15:49:03 +0000

fix indent

Diffstat:
Mimage.c | 2+-
Mw3mimg/fb/fb.c | 4++--
Mw3mimgdisplay.c | 40+++++++++++++++++++++-------------------
3 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/image.c b/image.c @@ -228,7 +228,7 @@ clearImage() for (j = 0; j < n_terminal_image; j++) { i = &terminal_image[j]; if (!(i->cache->loaded & IMG_FLAG_LOADED && - i->width > 0 && i->height > 0)) + i->width > 0 && i->height > 0)) continue; sprintf(buf, "6;%d;%d;%d;%d\n", i->x, i->y, i->width, i->height); fputs(buf, Imgdisplay_wf); diff --git a/w3mimg/fb/fb.c b/w3mimg/fb/fb.c @@ -380,8 +380,8 @@ fb_clear(int x, int y, int w, int h, int r, int g, int b) offset_fb = fscinfo.line_length * y + pixel_size * x; bg = ((r >> (CHAR_BIT - vscinfo.red.length)) << vscinfo.red.offset) + - ((g >> (CHAR_BIT - vscinfo.green.length)) << vscinfo.green.offset) + - ((b >> (CHAR_BIT - vscinfo.blue.length)) << vscinfo.blue.offset); + ((g >> (CHAR_BIT - vscinfo.green.length)) << vscinfo.green.offset) + + ((b >> (CHAR_BIT - vscinfo.blue.length)) << vscinfo.blue.offset); for (i = 0; i < h; i++) { memcpy(buf + offset_fb, bg, pixel_size * w); offset_fb += fscinfo.line_length; diff --git a/w3mimgdisplay.c b/w3mimgdisplay.c @@ -61,7 +61,7 @@ main(int argc, char **argv) w_op->max_anim = maxAnim; if (defined_test) { - printf("%d %d\n", w_op->width - w_op->offset_x, + printf("%d %d\n", w_op->width - w_op->offset_x, w_op->height - w_op->offset_y); exit(0); } @@ -98,21 +98,21 @@ main(int argc, char **argv) * +--+--+--+--+ .......+--+--+ * * args is separeted by ';' - * op args - * 0; params draw image - * 1; params redraw image - * 2; -none- terminate drawing - * 3; -none- sync drawing - * 4; -none- nop, sync communication - * response '\n' - * 5; path get size of image, - * response "<width> <height>\n" - * 6; params(6) clear image + * op args + * 0; params draw image + * 1; params redraw image + * 2; -none- terminate drawing + * 3; -none- sync drawing + * 4; -none- nop, sync communication + * response '\n' + * 5; path get size of image, + * response "<width> <height>\n" + * 6; params(6) clear image * * params - * <n>;<x>;<y>;<w>;<h>;<sx>;<sy>;<sw>;<sh>;<path> + * <n>;<x>;<y>;<w>;<h>;<sx>;<sy>;<sw>;<sh>;<path> * params(6) - * <x>;<y>;<w>;<h> + * <x>;<y>;<w>;<h> * */ switch (buf[0]) { @@ -139,11 +139,13 @@ main(int argc, char **argv) if (w_op->get_image_size(w_op, &img, &buf[2], &w, &h)) { fprintf(stdout, "%d %d\n", w, h); fflush(stdout); - } else { + } + else { fprintf(stdout, "\n"); fflush(stdout); } - } else { + } + else { fprintf(stdout, "\n"); fflush(stdout); } @@ -253,7 +255,7 @@ DrawImage(char *buf, int redraw) if (n < 0 || n >= MAX_IMAGE) return; if (redraw) { - if (! w_op->active(w_op) || n >= maxImage || !imageBuf[n].pixmap) + if (!w_op->active(w_op) || n >= maxImage || !imageBuf[n].pixmap) return; goto draw_image; } @@ -267,7 +269,7 @@ DrawImage(char *buf, int redraw) else if (n >= maxImage) maxImage = n + 1; imageBuf = (W3MImage *) realloc((void *)imageBuf, - sizeof(W3MImage) * maxImage); + sizeof(W3MImage) * maxImage); for (; i < maxImage; i++) imageBuf[i].pixmap = NULL; } @@ -277,11 +279,11 @@ DrawImage(char *buf, int redraw) } if (w_op->load_image(w_op, &imageBuf[n], p, w, h) == 0) - imageBuf[n].pixmap = NULL; + imageBuf[n].pixmap = NULL; draw_image: if (imageBuf[n].pixmap) - w_op->show_image(w_op, &imageBuf[n], sx, sy, sw, sh, x, y); + w_op->show_image(w_op, &imageBuf[n], sx, sy, sw, sh, x, y); } void