~ubuntu-branches/ubuntu/trusty/libxpm/trusty

« back to all changes in this revision

Viewing changes to src/WrFFrI.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau, Timo Aaltonen, Julien Cristau
  • Date: 2009-11-25 19:31:08 UTC
  • mfrom: (1.1.5 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091125193108-53d2v3e83ejqwz5q
Tags: 1:3.5.8-1
[ Timo Aaltonen ]
* New upstream release.
* Bump the build-dep on xutils-dev (>= 1:7.5~1).

[ Julien Cristau ]
* Bump Standards-Version to 3.8.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
LFUNC(xpmDataClose, void, (xpmData *mdata));
69
69
 
70
70
int
71
 
XpmWriteFileFromImage(display, filename, image, shapeimage, attributes)
72
 
    Display *display;
73
 
    char *filename;
74
 
    XImage *image;
75
 
    XImage *shapeimage;
76
 
    XpmAttributes *attributes;
 
71
XpmWriteFileFromImage(
 
72
    Display             *display,
 
73
    char                *filename,
 
74
    XImage              *image,
 
75
    XImage              *shapeimage,
 
76
    XpmAttributes       *attributes)
77
77
{
78
78
    XpmImage xpmimage;
79
79
    XpmInfo info;
99
99
}
100
100
 
101
101
int
102
 
XpmWriteFileFromXpmImage(filename, image, info)
103
 
    char *filename;
104
 
    XpmImage *image;
105
 
    XpmInfo *info;
 
102
XpmWriteFileFromXpmImage(
 
103
    char        *filename,
 
104
    XpmImage    *image,
 
105
    XpmInfo     *info)
106
106
{
107
107
    xpmData mdata;
108
108
    char *name, *dot, *s, new_name[BUFSIZ] = {0};
163
163
}
164
164
 
165
165
static int
166
 
xpmWriteFile(file, image, name, info)
167
 
    FILE *file;
168
 
    XpmImage *image;
169
 
    char *name;
170
 
    XpmInfo *info;
 
166
xpmWriteFile(
 
167
    FILE        *file,
 
168
    XpmImage    *image,
 
169
    char        *name,
 
170
    XpmInfo     *info)
171
171
{
172
172
    /* calculation variables */
173
173
    unsigned int cmts, extensions;
221
221
}
222
222
 
223
223
static void
224
 
WriteColors(file, colors, ncolors)
225
 
    FILE *file;
226
 
    XpmColor *colors;
227
 
    unsigned int ncolors;
 
224
WriteColors(
 
225
    FILE                *file,
 
226
    XpmColor            *colors,
 
227
    unsigned int         ncolors)
228
228
{
229
229
    unsigned int a, key;
230
230
    char *s;
245
245
 
246
246
 
247
247
static int
248
 
WritePixels(file, width, height, cpp, pixels, colors)
249
 
    FILE *file;
250
 
    unsigned int width;
251
 
    unsigned int height;
252
 
    unsigned int cpp;
253
 
    unsigned int *pixels;
254
 
    XpmColor *colors;
 
248
WritePixels(
 
249
    FILE                *file,
 
250
    unsigned int         width,
 
251
    unsigned int         height,
 
252
    unsigned int         cpp,
 
253
    unsigned int        *pixels,
 
254
    XpmColor            *colors)
255
255
{
256
256
    char *s, *p, *buf;
257
257
    unsigned int x, y, h;
289
289
}
290
290
 
291
291
static void
292
 
WriteExtensions(file, ext, num)
293
 
    FILE *file;
294
 
    XpmExtension *ext;
295
 
    unsigned int num;
 
292
WriteExtensions(
 
293
    FILE                *file,
 
294
    XpmExtension        *ext,
 
295
    unsigned int         num)
296
296
{
297
297
    unsigned int x, y, n;
298
298
    char **line;
318
318
 * open the given file to be written as an xpmData which is returned
319
319
 */
320
320
static int
321
 
OpenWriteFile(filename, mdata)
322
 
    char *filename;
323
 
    xpmData *mdata;
 
321
OpenWriteFile(
 
322
    char        *filename,
 
323
    xpmData     *mdata)
324
324
{
325
325
    if (!filename) {
326
326
        mdata->stream.file = (stdout);
356
356
 * close the file related to the xpmData if any
357
357
 */
358
358
static void
359
 
xpmDataClose(mdata)
360
 
    xpmData *mdata;
 
359
xpmDataClose(xpmData *mdata)
361
360
{
362
361
    if (mdata->stream.file != (stdout))
363
362
        fclose(mdata->stream.file);