summaryrefslogtreecommitdiff
path: root/src/wbmp.c
diff options
context:
space:
mode:
authorpierre <none@none>2006-04-05 15:46:42 +0000
committerpierre <none@none>2006-04-05 15:46:42 +0000
commite42062852762f0a517cac0aa8525d2e140565e07 (patch)
tree7ea063cd99e62d01c0502505ba34b432aacb5ba4 /src/wbmp.c
parent8f5ea3fffb11fa3afc355c8e2f54fa5f7a93071b (diff)
downloadlibgd-e42062852762f0a517cac0aa8525d2e140565e07.tar.gz
- sync to 2.0.9GD_2_0_9
Diffstat (limited to 'src/wbmp.c')
-rw-r--r--src/wbmp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wbmp.c b/src/wbmp.c
index d8f4405..850f095 100644
--- a/src/wbmp.c
+++ b/src/wbmp.c
@@ -119,7 +119,8 @@ createwbmp (int width, int height, int color)
if ((wbmp = (Wbmp *) gdMalloc (sizeof (Wbmp))) == NULL)
return (NULL);
- if ((wbmp->bitmap = (int *) gdMalloc (sizeof (int) * width * height)) == NULL)
+ if ((wbmp->bitmap =
+ (int *) gdMalloc (sizeof (int) * width * height)) == NULL)
{
gdFree (wbmp);
return (NULL);
@@ -179,7 +180,8 @@ readwbmp (int (*getin) (void *in), void *in, Wbmp ** return_wbmp)
printf ("W: %d, H: %d\n", wbmp->width, wbmp->height);
#endif
- if ((wbmp->bitmap = (int *) gdMalloc (sizeof (int) * wbmp->width * wbmp->height)) == NULL)
+ if ((wbmp->bitmap =
+ (int *) gdMalloc (sizeof (int) * wbmp->width * wbmp->height)) == NULL)
{
gdFree (wbmp);
return (-1);
@@ -255,7 +257,9 @@ writewbmp (Wbmp * wbmp, void (*putout) (int c, void *out), void *out)
octet = 0;
for (col = 0; col < wbmp->width; col++)
{
- octet |= ((wbmp->bitmap[row * wbmp->width + col] == 1) ? WBMP_WHITE : WBMP_BLACK) << --bitpos;
+ octet |=
+ ((wbmp->bitmap[row * wbmp->width + col] ==
+ 1) ? WBMP_WHITE : WBMP_BLACK) << --bitpos;
if (bitpos == 0)
{
bitpos = 8;