diff options
author | Egbert Eich <eich@suse.de> | 2004-04-23 18:43:40 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2004-04-23 18:43:40 +0000 |
commit | cbcf471d9157c88a506cd3f067253c8e64cb8e08 (patch) | |
tree | d380f8dd7791f5a2e602a013a9e707ced757f5b2 /src/file.c | |
parent | fb1739bd2272fa45d9c04fe40517468a49660b37 (diff) |
Merging XORG-CURRENT into trunkxprint_packagertest_20041125_baserel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1XACE-SELINUX-MERGExprint_packagertest_20041125lg3d-masterlg3d-eventlg3d-dev-0-7-1lg3d-dev-0-7-0lg3d-dev-0-6-latestlg3d-dev-0-6-2lg3d-dev-0-6-1-latestlg3d-dev-0-6-1-currentlg3d-dev-0-6-1-1lg3d-dev-0-6-1lg3dXORG-6_8-branchCOMPOSITEWRAP
Diffstat (limited to 'src/file.c')
-rw-r--r-- | src/file.c | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -1,7 +1,6 @@ /* - * $XFree86: xc/lib/Xcursor/file.c,v 1.2 2002/09/18 17:11:42 tsi Exp $ * - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * Copyright © 2002 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -61,6 +60,7 @@ XcursorImagesCreate (int size) return 0; images->nimage = 0; images->images = (XcursorImage **) (images + 1); + images->name = 0; return images; } @@ -71,9 +71,24 @@ XcursorImagesDestroy (XcursorImages *images) for (n = 0; n < images->nimage; n++) XcursorImageDestroy (images->images[n]); + if (images->name) + free (images->name); free (images); } +void +XcursorImagesSetName (XcursorImages *images, const char *name) +{ + char *new = malloc (strlen (name) + 1); + + if (!new) + return; + strcpy (new, name); + if (images->name) + free (images->name); + images->name = new; +} + XcursorComment * XcursorCommentCreate (XcursorUInt comment_type, int length) { @@ -185,7 +200,7 @@ _XcursorFileHeaderCreate (int ntoc) return 0; fileHeader->magic = XCURSOR_MAGIC; fileHeader->header = XCURSOR_FILE_HEADER_LEN; - fileHeader->version = XCURSOR_VERSION; + fileHeader->version = XCURSOR_FILE_VERSION; fileHeader->ntoc = ntoc; fileHeader->tocs = (XcursorFileToc *) (fileHeader + 1); return fileHeader; |