mscms: Constify some variables
Andrew Talbot
Andrew.Talbot at talbotville.com
Mon May 28 12:11:29 CDT 2007
Changelog:
mscms: Constify some variables.
diff -urN a/dlls/mscms/handle.c b/dlls/mscms/handle.c
--- a/dlls/mscms/handle.c 2006-06-19 09:36:47.000000000 +0100
+++ b/dlls/mscms/handle.c 2007-05-28 13:49:31.000000000 +0100
@@ -153,7 +153,7 @@
return cmsprofile;
}
-HPROFILE MSCMS_iccprofile2hprofile( icProfile *iccprofile )
+HPROFILE MSCMS_iccprofile2hprofile( const icProfile *iccprofile )
{
HPROFILE profile = NULL;
DWORD_PTR i;
diff -urN a/dlls/mscms/icc.c b/dlls/mscms/icc.c
--- a/dlls/mscms/icc.c 2007-05-10 17:30:52.000000000 +0100
+++ b/dlls/mscms/icc.c 2007-05-28 13:49:46.000000000 +0100
@@ -40,7 +40,7 @@
#endif
}
-void MSCMS_get_profile_header( icProfile *iccprofile, PROFILEHEADER *header )
+void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header )
{
unsigned int i;
@@ -51,7 +51,7 @@
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;
icHeader *iccheader = (icHeader *)iccprofile;
@@ -63,7 +63,7 @@
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;
@@ -84,19 +84,19 @@
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 );
}
-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 );
return size;
diff -urN a/dlls/mscms/mscms_priv.h b/dlls/mscms/mscms_priv.h
--- a/dlls/mscms/mscms_priv.h 2007-03-13 21:57:51.000000000 +0000
+++ b/dlls/mscms/mscms_priv.h 2007-05-28 13:50:05.000000000 +0100
@@ -69,7 +69,7 @@
extern DWORD MSCMS_hprofile2access( HPROFILE );
extern HPROFILE MSCMS_handle2hprofile( HANDLE file );
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 cmsHPROFILE MSCMS_hprofile2cmsprofile( HPROFILE profile );
extern icProfile *MSCMS_hprofile2iccprofile( HPROFILE profile );
@@ -82,12 +82,12 @@
extern HTRANSFORM MSCMS_create_htransform_handle( cmsHTRANSFORM cmstransform );
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_data( icProfile *iccprofile, icTag *tag, DWORD offset, void *buffer );
-extern void MSCMS_set_tag_data( icProfile *iccprofile, icTag *tag, DWORD offset, void *buffer );
-extern void MSCMS_get_profile_header( icProfile *iccprofile, PROFILEHEADER *header );
-extern void MSCMS_set_profile_header( icProfile *iccprofile, PROFILEHEADER *header );
-extern DWORD MSCMS_get_profile_size( icProfile *iccprofile );
+extern void MSCMS_get_tag_data( const icProfile *iccprofile, const 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( const icProfile *iccprofile, PROFILEHEADER *header );
+extern void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header );
+extern DWORD MSCMS_get_profile_size( const icProfile *iccprofile );
#endif /* HAVE_LCMS */
diff -urN a/dlls/mscms/profile.c b/dlls/mscms/profile.c
--- a/dlls/mscms/profile.c 2006-11-09 19:59:47.000000000 +0000
+++ b/dlls/mscms/profile.c 2007-05-28 13:49:55.000000000 +0100
@@ -471,7 +471,7 @@
return TRUE;
}
-static BOOL MSCMS_header_from_file( LPWSTR file, PPROFILEHEADER header )
+static BOOL MSCMS_header_from_file( LPCWSTR file, PPROFILEHEADER header )
{
BOOL ret;
PROFILE profile;
More information about the wine-patches
mailing list