fix indent

This commit is contained in:
Fumitoshi UKAI
2003-07-07 15:49:03 +00:00
parent 0bbf6748bb
commit 851c96514f
3 changed files with 27 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: image.c,v 1.35 2003/07/07 15:48:16 ukai Exp $ */ /* $Id: image.c,v 1.36 2003/07/07 15:49:03 ukai Exp $ */
#include "fm.h" #include "fm.h"
#include <sys/types.h> #include <sys/types.h>
@@ -228,7 +228,7 @@ clearImage()
for (j = 0; j < n_terminal_image; j++) { for (j = 0; j < n_terminal_image; j++) {
i = &terminal_image[j]; i = &terminal_image[j];
if (!(i->cache->loaded & IMG_FLAG_LOADED && if (!(i->cache->loaded & IMG_FLAG_LOADED &&
i->width > 0 && i->height > 0)) i->width > 0 && i->height > 0))
continue; continue;
sprintf(buf, "6;%d;%d;%d;%d\n", i->x, i->y, i->width, i->height); sprintf(buf, "6;%d;%d;%d;%d\n", i->x, i->y, i->width, i->height);
fputs(buf, Imgdisplay_wf); fputs(buf, Imgdisplay_wf);

View File

@@ -1,4 +1,4 @@
/* $Id: fb.c,v 1.10 2003/07/07 15:48:17 ukai Exp $ */ /* $Id: fb.c,v 1.11 2003/07/07 15:49:39 ukai Exp $ */
/************************************************************************** /**************************************************************************
fb.c 0.3 Copyright (C) 2002, hito fb.c 0.3 Copyright (C) 2002, hito
**************************************************************************/ **************************************************************************/
@@ -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; offset_fb = fscinfo.line_length * y + pixel_size * x;
bg = ((r >> (CHAR_BIT - vscinfo.red.length)) << vscinfo.red.offset) + bg = ((r >> (CHAR_BIT - vscinfo.red.length)) << vscinfo.red.offset) +
((g >> (CHAR_BIT - vscinfo.green.length)) << vscinfo.green.offset) + ((g >> (CHAR_BIT - vscinfo.green.length)) << vscinfo.green.offset) +
((b >> (CHAR_BIT - vscinfo.blue.length)) << vscinfo.blue.offset); ((b >> (CHAR_BIT - vscinfo.blue.length)) << vscinfo.blue.offset);
for (i = 0; i < h; i++) { for (i = 0; i < h; i++) {
memcpy(buf + offset_fb, bg, pixel_size * w); memcpy(buf + offset_fb, bg, pixel_size * w);
offset_fb += fscinfo.line_length; offset_fb += fscinfo.line_length;

View File

@@ -1,4 +1,4 @@
/* $Id: w3mimgdisplay.c,v 1.14 2003/07/07 15:48:16 ukai Exp $ */ /* $Id: w3mimgdisplay.c,v 1.15 2003/07/07 15:49:03 ukai Exp $ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
@@ -61,7 +61,7 @@ main(int argc, char **argv)
w_op->max_anim = maxAnim; w_op->max_anim = maxAnim;
if (defined_test) { 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); w_op->height - w_op->offset_y);
exit(0); exit(0);
} }
@@ -98,21 +98,21 @@ main(int argc, char **argv)
* +--+--+--+--+ .......+--+--+ * +--+--+--+--+ .......+--+--+
* *
* args is separeted by ';' * args is separeted by ';'
* op args * op args
* 0; params draw image * 0; params draw image
* 1; params redraw image * 1; params redraw image
* 2; -none- terminate drawing * 2; -none- terminate drawing
* 3; -none- sync drawing * 3; -none- sync drawing
* 4; -none- nop, sync communication * 4; -none- nop, sync communication
* response '\n' * response '\n'
* 5; path get size of image, * 5; path get size of image,
* response "<width> <height>\n" * response "<width> <height>\n"
* 6; params(6) clear image * 6; params(6) clear image
* *
* params * params
* <n>;<x>;<y>;<w>;<h>;<sx>;<sy>;<sw>;<sh>;<path> * <n>;<x>;<y>;<w>;<h>;<sx>;<sy>;<sw>;<sh>;<path>
* params(6) * params(6)
* <x>;<y>;<w>;<h> * <x>;<y>;<w>;<h>
* *
*/ */
switch (buf[0]) { 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)) { if (w_op->get_image_size(w_op, &img, &buf[2], &w, &h)) {
fprintf(stdout, "%d %d\n", w, h); fprintf(stdout, "%d %d\n", w, h);
fflush(stdout); fflush(stdout);
} else { }
else {
fprintf(stdout, "\n"); fprintf(stdout, "\n");
fflush(stdout); fflush(stdout);
} }
} else { }
else {
fprintf(stdout, "\n"); fprintf(stdout, "\n");
fflush(stdout); fflush(stdout);
} }
@@ -253,7 +255,7 @@ DrawImage(char *buf, int redraw)
if (n < 0 || n >= MAX_IMAGE) if (n < 0 || n >= MAX_IMAGE)
return; return;
if (redraw) { 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; return;
goto draw_image; goto draw_image;
} }
@@ -267,7 +269,7 @@ DrawImage(char *buf, int redraw)
else if (n >= maxImage) else if (n >= maxImage)
maxImage = n + 1; maxImage = n + 1;
imageBuf = (W3MImage *) realloc((void *)imageBuf, imageBuf = (W3MImage *) realloc((void *)imageBuf,
sizeof(W3MImage) * maxImage); sizeof(W3MImage) * maxImage);
for (; i < maxImage; i++) for (; i < maxImage; i++)
imageBuf[i].pixmap = NULL; 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) if (w_op->load_image(w_op, &imageBuf[n], p, w, h) == 0)
imageBuf[n].pixmap = NULL; imageBuf[n].pixmap = NULL;
draw_image: draw_image:
if (imageBuf[n].pixmap) 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 void