summaryrefslogtreecommitdiff
path: root/src/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scan.c')
-rw-r--r--src/scan.c134
1 files changed, 66 insertions, 68 deletions
diff --git a/src/scan.c b/src/scan.c
index e8e4c27..eab1c43 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -122,10 +122,10 @@ LFUNC(ScanOtherColors, int, (Display *display, XpmColor *colors,
* if not large enough.
*/
static int
-storePixel(pixel, pmap, index_return)
- Pixel pixel;
- PixelsMap *pmap;
- unsigned int *index_return;
+storePixel(
+ Pixel pixel,
+ PixelsMap *pmap,
+ unsigned int *index_return)
{
unsigned int i;
Pixel *p;
@@ -157,10 +157,10 @@ storePixel(pixel, pmap, index_return)
}
static int
-storeMaskPixel(pixel, pmap, index_return)
- Pixel pixel;
- PixelsMap *pmap;
- unsigned int *index_return;
+storeMaskPixel(
+ Pixel pixel,
+ PixelsMap *pmap,
+ unsigned int *index_return)
{
if (!pixel) {
if (!pmap->ncolors) {
@@ -187,13 +187,12 @@ do { \
* the given XpmImage structure.
*/
int
-XpmCreateXpmImageFromImage(display, image, shapeimage,
- xpmimage, attributes)
- Display *display;
- XImage *image;
- XImage *shapeimage;
- XpmImage *xpmimage;
- XpmAttributes *attributes;
+XpmCreateXpmImageFromImage(
+ Display *display,
+ XImage *image,
+ XImage *shapeimage,
+ XpmImage *xpmimage,
+ XpmAttributes *attributes)
{
/* variables stored in the XpmAttributes structure */
unsigned int cpp;
@@ -363,10 +362,10 @@ error:
}
static int
-ScanTransparentColor(color, cpp, attributes)
- XpmColor *color;
- unsigned int cpp;
- XpmAttributes *attributes;
+ScanTransparentColor(
+ XpmColor *color,
+ unsigned int cpp,
+ XpmAttributes *attributes)
{
char *s;
unsigned int a, b, c;
@@ -419,14 +418,14 @@ ScanTransparentColor(color, cpp, attributes)
}
static int
-ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes)
- Display *display;
- XpmColor *colors;
- unsigned int ncolors;
- Pixel *pixels;
- unsigned int mask;
- unsigned int cpp;
- XpmAttributes *attributes;
+ScanOtherColors(
+ Display *display,
+ XpmColor *colors,
+ unsigned int ncolors,
+ Pixel *pixels,
+ unsigned int mask,
+ unsigned int cpp,
+ XpmAttributes *attributes)
{
/* variables stored in the XpmAttributes structure */
Colormap colormap;
@@ -614,11 +613,11 @@ static unsigned long Const low_bits_table[] = {
*/
static int
-GetImagePixels(image, width, height, pmap)
- XImage *image;
- unsigned int width;
- unsigned int height;
- PixelsMap *pmap;
+GetImagePixels(
+ XImage *image,
+ unsigned int width,
+ unsigned int height,
+ PixelsMap *pmap)
{
char *src;
char *dst;
@@ -720,11 +719,11 @@ static unsigned long byteorderpixel = MSBFirst << 24;
#endif
static int
-GetImagePixels32(image, width, height, pmap)
- XImage *image;
- unsigned int width;
- unsigned int height;
- PixelsMap *pmap;
+GetImagePixels32(
+ XImage *image,
+ unsigned int width,
+ unsigned int height,
+ PixelsMap *pmap)
{
unsigned char *addr;
unsigned char *data;
@@ -785,11 +784,11 @@ GetImagePixels32(image, width, height, pmap)
*/
static int
-GetImagePixels16(image, width, height, pmap)
- XImage *image;
- unsigned int width;
- unsigned int height;
- PixelsMap *pmap;
+GetImagePixels16(
+ XImage *image,
+ unsigned int width,
+ unsigned int height,
+ PixelsMap *pmap)
{
unsigned char *addr;
unsigned char *data;
@@ -831,11 +830,11 @@ GetImagePixels16(image, width, height, pmap)
*/
static int
-GetImagePixels8(image, width, height, pmap)
- XImage *image;
- unsigned int width;
- unsigned int height;
- PixelsMap *pmap;
+GetImagePixels8(
+ XImage *image,
+ unsigned int width,
+ unsigned int height,
+ PixelsMap *pmap)
{
unsigned int *iptr;
unsigned char *data;
@@ -864,12 +863,12 @@ GetImagePixels8(image, width, height, pmap)
*/
static int
-GetImagePixels1(image, width, height, pmap, storeFunc)
- XImage *image;
- unsigned int width;
- unsigned int height;
- PixelsMap *pmap;
- storeFuncPtr storeFunc;
+GetImagePixels1(
+ XImage *image,
+ unsigned int width,
+ unsigned int height,
+ PixelsMap *pmap,
+ storeFuncPtr storeFunc)
{
unsigned int *iptr;
unsigned int x, y;
@@ -920,7 +919,7 @@ AGetImagePixels (
unsigned int width,
unsigned int height,
PixelsMap *pmap,
- int (*storeFunc) ())
+ int (*storeFunc) (Pixel, PixelsMap *, unsigned int *))
{
unsigned int *iptr;
unsigned int x, y;
@@ -954,13 +953,13 @@ AGetImagePixels (
# endif/* AMIGA */
#else /* ndef FOR_MSW */
static int
-MSWGetImagePixels(display, image, width, height, pmap, storeFunc)
- Display *display;
- XImage *image;
- unsigned int width;
- unsigned int height;
- PixelsMap *pmap;
- int (*storeFunc) ();
+MSWGetImagePixels(
+ Display *display,
+ XImage *image,
+ unsigned int width,
+ unsigned int height,
+ PixelsMap *pmap,
+ int (*storeFunc) (Pixel, PixelsMap*, unsigned int *))
{
unsigned int *iptr;
unsigned int x, y;
@@ -984,13 +983,12 @@ MSWGetImagePixels(display, image, width, height, pmap, storeFunc)
#ifndef FOR_MSW
# ifndef AMIGA
int
-XpmCreateXpmImageFromPixmap(display, pixmap, shapemask,
- xpmimage, attributes)
- Display *display;
- Pixmap pixmap;
- Pixmap shapemask;
- XpmImage *xpmimage;
- XpmAttributes *attributes;
+XpmCreateXpmImageFromPixmap(
+ Display *display,
+ Pixmap pixmap,
+ Pixmap shapemask,
+ XpmImage *xpmimage,
+ XpmAttributes *attributes)
{
XImage *ximage = NULL;
XImage *shapeimage = NULL;