summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/xbm.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-03-12 00:51:03 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-03-12 00:51:03 +0000
commit88281627bc765041f85b68f585e75c255cf2e89b (patch)
tree0e01a7b62dd7de5ef6ab24de9615902ca46f0ff4 /ext/gd/libgd/xbm.c
parenta1cafdf0c45c224336ceb5a84fd5d40c6c1fa05e (diff)
downloadphp-git-88281627bc765041f85b68f585e75c255cf2e89b.tar.gz
Style fixes.
Diffstat (limited to 'ext/gd/libgd/xbm.c')
-rw-r--r--ext/gd/libgd/xbm.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/ext/gd/libgd/xbm.c b/ext/gd/libgd/xbm.c
index b873c51c1e..c730c3666d 100644
--- a/ext/gd/libgd/xbm.c
+++ b/ext/gd/libgd/xbm.c
@@ -103,14 +103,11 @@ gdImageCreateFromXbm (FILE * fd)
h[4] = '\0';
for (i = 0; i < bytes; i++) {
while (1) {
- ch = getc(fd);
- if (ch == EOF)
- {
+ if ((ch=getc(fd)) == EOF) {
fail = 1;
break;
}
- if (ch == 'x')
- {
+ if (ch == 'x') {
break;
}
}
@@ -118,25 +115,31 @@ gdImageCreateFromXbm (FILE * fd)
break;
}
/* Get hex value */
- if ((ch=getc(fd)) == EOF) break;
+ if ((ch=getc(fd)) == EOF) {
+ break;
+ }
h[0] = ch;
- if ((ch=getc(fd)) == EOF) break;
+ if ((ch=getc(fd)) == EOF) {
+ break;
+ }
h[1] = ch;
if (max_bit == 32768) {
- if ((ch=getc(fd)) == EOF) break;
+ if ((ch=getc(fd)) == EOF) {
+ break;
+ }
h[2] = ch;
- if ((ch=getc(fd)) == EOF) break;
+ if ((ch=getc(fd)) == EOF) {
+ break;
+ }
h[3] = ch;
}
sscanf(h, "%x", &b);
for (bit = 1; bit <= max_bit; bit = bit << 1) {
- gdImageSetPixel (im, x++, y, (b & bit) ? 1 : 0);
- if (x == im->sx)
- {
+ gdImageSetPixel(im, x++, y, (b & bit) ? 1 : 0);
+ if (x == im->sx) {
x = 0;
y++;
- if (y == im->sy)
- {
+ if (y == im->sy) {
return im;
}
break;