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

« back to all changes in this revision

Viewing changes to src/Attrib.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:
49
49
 * Create a colortable compatible with the old style colortable
50
50
 */
51
51
static int
52
 
CreateOldColorTable(ct, ncolors, oldct)
53
 
    XpmColor *ct;
54
 
    unsigned int ncolors;
55
 
    XpmColor ***oldct;
 
52
CreateOldColorTable(
 
53
    XpmColor      *ct,
 
54
    unsigned int   ncolors,
 
55
    XpmColor    ***oldct)
56
56
{
57
57
    XpmColor **colorTable, **color;
58
58
    unsigned int a;
72
72
}
73
73
 
74
74
static void
75
 
FreeOldColorTable(colorTable, ncolors)
76
 
    XpmColor **colorTable;
77
 
    unsigned int ncolors;
 
75
FreeOldColorTable(
 
76
    XpmColor    **colorTable,
 
77
    unsigned int  ncolors)
78
78
{
79
79
    unsigned int a, b;
80
80
    XpmColor **color;
97
97
 * Free the computed color table
98
98
 */
99
99
void
100
 
xpmFreeColorTable(colorTable, ncolors)
101
 
    XpmColor *colorTable;
102
 
    int ncolors;
 
100
xpmFreeColorTable(
 
101
    XpmColor    *colorTable,
 
102
    int          ncolors)
103
103
{
104
104
    int a, b;
105
105
    XpmColor *color;
119
119
 * Free array of extensions
120
120
 */
121
121
void
122
 
XpmFreeExtensions(extensions, nextensions)
123
 
    XpmExtension *extensions;
124
 
    int nextensions;
 
122
XpmFreeExtensions(
 
123
    XpmExtension        *extensions,
 
124
    int                  nextensions)
125
125
{
126
126
    unsigned int i, j, nlines;
127
127
    XpmExtension *ext;
147
147
 */
148
148
 
149
149
int
150
 
XpmAttributesSize()
 
150
XpmAttributesSize(void)
151
151
{
152
152
    return sizeof(XpmAttributes);
153
153
}
156
156
 * Init returned data to free safely later on
157
157
 */
158
158
void
159
 
xpmInitAttributes(attributes)
160
 
    XpmAttributes *attributes;
 
159
xpmInitAttributes(XpmAttributes *attributes)
161
160
{
162
161
    if (attributes) {
163
162
        attributes->pixels = NULL;
184
183
 * Fill in the XpmAttributes with the XpmImage and the XpmInfo
185
184
 */
186
185
void
187
 
xpmSetAttributes(attributes, image, info)
188
 
    XpmAttributes *attributes;
189
 
    XpmImage *image;
190
 
    XpmInfo *info;
 
186
xpmSetAttributes(
 
187
    XpmAttributes       *attributes,
 
188
    XpmImage            *image,
 
189
    XpmInfo             *info)
191
190
{
192
191
    if (attributes->valuemask & XpmReturnColorTable) {
193
192
        attributes->colorTable = image->colorTable;
254
253
 * but the structure itself
255
254
 */
256
255
void
257
 
XpmFreeAttributes(attributes)
258
 
    XpmAttributes *attributes;
 
256
XpmFreeAttributes(XpmAttributes *attributes)
259
257
{
260
258
    if (attributes->valuemask & XpmReturnPixels && attributes->npixels) {
261
259
        XpmFree(attributes->pixels);