Back to index

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

Go to the source code of this file.

Functions

int XpmReadFileToData (char *filename, char ***data_return)

Function Documentation

int XpmReadFileToData ( char *  filename,
char ***  data_return 
)

Definition at line 38 of file RdFToDat.c.

{
    XpmImage image;
    XpmInfo info;
    int ErrorStatus;

    info.valuemask = XpmReturnComments | XpmReturnExtensions;

    /*
     * initialize return value
     */
    if (data_return)
       *data_return = NULL;

    ErrorStatus = XpmReadFileToXpmImage(filename, &image, &info);
    if (ErrorStatus != XpmSuccess)
       return (ErrorStatus);

    ErrorStatus =
       XpmCreateDataFromXpmImage(data_return, &image, &info);

    XpmFreeXpmImage(&image);
    XpmFreeXpmInfo(&info);

    return (ErrorStatus);
}

Here is the call graph for this function: