Back to index

plt-scheme  4.2.1
Functions
CrIFrDat.c File Reference
#include "xpmP.h"

Go to the source code of this file.

Functions

 LFUNC (OpenArray, void,(char **data, xpmData *mdata))
int XpmCreateImageFromData (Display *display, char **data, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes)
int XpmCreateXpmImageFromData (char **data, XpmImage *image, XpmInfo *info)
static void OpenArray (char **data, xpmData *mdata)

Function Documentation

LFUNC ( OpenArray  ,
void  ,
(char **data, xpmData *mdata)   
)
static void OpenArray ( char **  data,
xpmData mdata 
) [static]

Definition at line 103 of file CrIFrDat.c.

{
    mdata->type = XPMARRAY;
    mdata->stream.data = data;
    mdata->cptr = *data;
    mdata->line = 0;
    mdata->CommentLength = 0;
    mdata->Bcmt = mdata->Ecmt = NULL;
    mdata->Bos = mdata->Eos = '\0';
    mdata->format = 0;                    /* this can only be Xpm 2 or 3 */
}

Here is the caller graph for this function:

int XpmCreateImageFromData ( Display *  display,
char **  data,
XImage **  image_return,
XImage **  shapeimage_return,
XpmAttributes attributes 
)

Definition at line 40 of file CrIFrDat.c.

{
    XpmImage image;
    XpmInfo info;
    int ErrorStatus;

    /* create an XpmImage from the file */
    if (attributes) {
       xpmInitAttributes(attributes);
       xpmSetInfoMask(&info, attributes);
       ErrorStatus = XpmCreateXpmImageFromData(data, &image, &info);
    } else
       ErrorStatus = XpmCreateXpmImageFromData(data, &image, NULL);

    if (ErrorStatus != XpmSuccess)
       return (ErrorStatus);

    /* create the related ximages */
    ErrorStatus = XpmCreateImageFromXpmImage(display, &image,
                                        image_return, shapeimage_return,
                                        attributes);
    if (attributes) {
       if (ErrorStatus >= 0)              /* no fatal error */
           xpmSetAttributes(attributes, &image, &info);
       XpmFreeXpmInfo(&info);
    }
    XpmFreeXpmImage(&image);

    return (ErrorStatus);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XpmCreateXpmImageFromData ( char **  data,
XpmImage image,
XpmInfo info 
)

Definition at line 78 of file CrIFrDat.c.

{
    xpmData mdata;
    int ErrorStatus;

    /* init returned values */
    xpmInitXpmImage(image);
    xpmInitXpmInfo(info);

    /* open data */
    OpenArray(data, &mdata);

    /* create the XpmImage from the XpmData */
    ErrorStatus = xpmParseData(&mdata, image, info);

    return (ErrorStatus);
}

Here is the call graph for this function:

Here is the caller graph for this function: