mscms: Constify some variables.

This commit is contained in:
Andrew Talbot 2007-05-28 18:11:29 +01:00 committed by Alexandre Julliard
parent a7e82e68ea
commit 9312f0f974
4 changed files with 17 additions and 17 deletions

View file

@ -153,7 +153,7 @@ cmsHPROFILE MSCMS_hprofile2cmsprofile( HPROFILE profile )
return cmsprofile; return cmsprofile;
} }
HPROFILE MSCMS_iccprofile2hprofile( icProfile *iccprofile ) HPROFILE MSCMS_iccprofile2hprofile( const icProfile *iccprofile )
{ {
HPROFILE profile = NULL; HPROFILE profile = NULL;
DWORD_PTR i; DWORD_PTR i;

View file

@ -40,7 +40,7 @@ static inline void MSCMS_adjust_endianess32( ULONG *ptr )
#endif #endif
} }
void MSCMS_get_profile_header( icProfile *iccprofile, PROFILEHEADER *header ) void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header )
{ {
unsigned int i; unsigned int i;
@ -51,7 +51,7 @@ void MSCMS_get_profile_header( icProfile *iccprofile, PROFILEHEADER *header )
MSCMS_adjust_endianess32( (ULONG *)header + i ); MSCMS_adjust_endianess32( (ULONG *)header + i );
} }
void MSCMS_set_profile_header( icProfile *iccprofile, PROFILEHEADER *header ) void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header )
{ {
unsigned int i; unsigned int i;
icHeader *iccheader = (icHeader *)iccprofile; icHeader *iccheader = (icHeader *)iccprofile;
@ -63,7 +63,7 @@ void MSCMS_set_profile_header( icProfile *iccprofile, PROFILEHEADER *header )
MSCMS_adjust_endianess32( (ULONG *)iccheader + i ); MSCMS_adjust_endianess32( (ULONG *)iccheader + i );
} }
DWORD MSCMS_get_tag_count( icProfile *iccprofile ) DWORD MSCMS_get_tag_count( const icProfile *iccprofile )
{ {
ULONG count = iccprofile->count; ULONG count = iccprofile->count;
@ -84,19 +84,19 @@ void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag )
MSCMS_adjust_endianess32( (ULONG *)&tag->size ); MSCMS_adjust_endianess32( (ULONG *)&tag->size );
} }
void MSCMS_get_tag_data( icProfile *iccprofile, icTag *tag, DWORD offset, void *buffer ) void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer )
{ {
memcpy( buffer, (char *)iccprofile + tag->offset + offset, tag->size - offset ); memcpy( buffer, (const char *)iccprofile + tag->offset + offset, tag->size - offset );
} }
void MSCMS_set_tag_data( icProfile *iccprofile, icTag *tag, DWORD offset, void *buffer ) void MSCMS_set_tag_data( icProfile *iccprofile, const icTag *tag, DWORD offset, const void *buffer )
{ {
memcpy( (char *)iccprofile + tag->offset + offset, buffer, tag->size - offset ); memcpy( (char *)iccprofile + tag->offset + offset, buffer, tag->size - offset );
} }
DWORD MSCMS_get_profile_size( icProfile *iccprofile ) DWORD MSCMS_get_profile_size( const icProfile *iccprofile )
{ {
DWORD size = ((icHeader *)iccprofile)->size; DWORD size = ((const icHeader *)iccprofile)->size;
MSCMS_adjust_endianess32( (ULONG *)&size ); MSCMS_adjust_endianess32( (ULONG *)&size );
return size; return size;

View file

@ -69,7 +69,7 @@
extern DWORD MSCMS_hprofile2access( HPROFILE ); extern DWORD MSCMS_hprofile2access( HPROFILE );
extern HPROFILE MSCMS_handle2hprofile( HANDLE file ); extern HPROFILE MSCMS_handle2hprofile( HANDLE file );
extern HPROFILE MSCMS_cmsprofile2hprofile( cmsHPROFILE cmsprofile ); extern HPROFILE MSCMS_cmsprofile2hprofile( cmsHPROFILE cmsprofile );
extern HPROFILE MSCMS_iccprofile2hprofile( icProfile *iccprofile ); extern HPROFILE MSCMS_iccprofile2hprofile( const icProfile *iccprofile );
extern HANDLE MSCMS_hprofile2handle( HPROFILE profile ); extern HANDLE MSCMS_hprofile2handle( HPROFILE profile );
extern cmsHPROFILE MSCMS_hprofile2cmsprofile( HPROFILE profile ); extern cmsHPROFILE MSCMS_hprofile2cmsprofile( HPROFILE profile );
extern icProfile *MSCMS_hprofile2iccprofile( HPROFILE profile ); extern icProfile *MSCMS_hprofile2iccprofile( HPROFILE profile );
@ -82,12 +82,12 @@ extern cmsHTRANSFORM MSCMS_htransform2cmstransform( HTRANSFORM transform );
extern HTRANSFORM MSCMS_create_htransform_handle( cmsHTRANSFORM cmstransform ); extern HTRANSFORM MSCMS_create_htransform_handle( cmsHTRANSFORM cmstransform );
extern void MSCMS_destroy_htransform_handle( HTRANSFORM transform ); extern void MSCMS_destroy_htransform_handle( HTRANSFORM transform );
extern DWORD MSCMS_get_tag_count( icProfile *iccprofile ); extern DWORD MSCMS_get_tag_count( const icProfile *iccprofile );
extern void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag ); extern void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag );
extern void MSCMS_get_tag_data( icProfile *iccprofile, icTag *tag, DWORD offset, void *buffer ); extern void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer );
extern void MSCMS_set_tag_data( icProfile *iccprofile, icTag *tag, DWORD offset, void *buffer ); extern void MSCMS_set_tag_data( icProfile *iccprofile, const icTag *tag, DWORD offset, const void *buffer );
extern void MSCMS_get_profile_header( icProfile *iccprofile, PROFILEHEADER *header ); extern void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header );
extern void MSCMS_set_profile_header( icProfile *iccprofile, PROFILEHEADER *header ); extern void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header );
extern DWORD MSCMS_get_profile_size( icProfile *iccprofile ); extern DWORD MSCMS_get_profile_size( const icProfile *iccprofile );
#endif /* HAVE_LCMS */ #endif /* HAVE_LCMS */

View file

@ -471,7 +471,7 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi
return TRUE; return TRUE;
} }
static BOOL MSCMS_header_from_file( LPWSTR file, PPROFILEHEADER header ) static BOOL MSCMS_header_from_file( LPCWSTR file, PPROFILEHEADER header )
{ {
BOOL ret; BOOL ret;
PROFILE profile; PROFILE profile;