~ubuntu-branches/ubuntu/lucid/libxpm/lucid

« back to all changes in this revision

Viewing changes to src/RdFToI.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-11-25 19:31:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20091125193108-9b0rcev074121s5m
Tags: upstream-3.5.8
ImportĀ upstreamĀ versionĀ 3.5.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
LFUNC(OpenReadFile, int, (char *filename, xpmData *mdata));
54
54
LFUNC(xpmDataClose, void, (xpmData *mdata));
55
55
 
 
56
FUNC(xpmPipeThrough, FILE*, (int fd,
 
57
                             const char *cmd,
 
58
                             const char *arg1,
 
59
                             const char *mode));
 
60
 
56
61
#ifndef CXPMPROG
57
62
int
58
 
XpmReadFileToImage(display, filename,
59
 
                   image_return, shapeimage_return, attributes)
60
 
    Display *display;
61
 
    char *filename;
62
 
    XImage **image_return;
63
 
    XImage **shapeimage_return;
64
 
    XpmAttributes *attributes;
 
63
XpmReadFileToImage(
 
64
    Display              *display,
 
65
    char                 *filename,
 
66
    XImage              **image_return,
 
67
    XImage              **shapeimage_return,
 
68
    XpmAttributes        *attributes)
65
69
{
66
70
    XpmImage image;
67
71
    XpmInfo info;
100
104
}
101
105
 
102
106
int
103
 
XpmReadFileToXpmImage(filename, image, info)
104
 
    char *filename;
105
 
    XpmImage *image;
106
 
    XpmInfo *info;
 
107
XpmReadFileToXpmImage(
 
108
    char        *filename,
 
109
    XpmImage    *image,
 
110
    XpmInfo     *info)
107
111
{
108
112
    xpmData mdata;
109
113
    int ErrorStatus;
128
132
#ifndef NO_ZPIPE
129
133
/* Do not depend on errno after read_through */
130
134
FILE*
131
 
xpmPipeThrough(fd, cmd, arg1, mode)
132
 
    int fd;
133
 
    const char* cmd;
134
 
    const char* arg1;
135
 
    const char* mode;
 
135
xpmPipeThrough(
 
136
    int          fd,
 
137
    const char  *cmd,
 
138
    const char  *arg1,
 
139
    const char  *mode)
136
140
{
137
141
    FILE* fp;
138
142
    int status, fds[2], in = 0, out = 1;
190
194
 * open the given file to be read as an xpmData which is returned.
191
195
 */
192
196
static int
193
 
OpenReadFile(filename, mdata)
194
 
    char *filename;
195
 
    xpmData *mdata;
 
197
OpenReadFile(
 
198
    char        *filename,
 
199
    xpmData     *mdata)
196
200
{
197
201
    if (!filename) {
198
202
        mdata->stream.file = (stdin);
263
267
 * close the file related to the xpmData if any
264
268
 */
265
269
static void
266
 
xpmDataClose(mdata)
267
 
    xpmData *mdata;
 
270
xpmDataClose(xpmData *mdata)
268
271
{
269
272
    if (mdata->stream.file != (stdin))
270
273
        fclose(mdata->stream.file);