carbon2-commit: Clean up various Carbon files for the C++ build; fix Mule problems, toolbar-carbon
Aidan Kehoe
kehoea at parhasard.net
Fri Jun 4 06:23:49 EDT 2010
changeset: 5282:c8faf8c372c2
tag: tip
user: Aidan Kehoe <kehoea at parhasard.net>
date: Fri Jun 04 11:22:12 2010 +0100
files: ChangeLog.carbon2 configure src/ChangeLog.carbon2 src/fontcolor-carbon.c src/frame-carbon.c src/glyphs-carbon.c src/redisplay-carbon.c src/select-carbon.c src/toolbar-carbon.c
description:
Clean up various Carbon files for the C++ build; fix Mule problems, toolbar-carbon
src/ChangeLog.carbon2 addition:
2010-06-04 Aidan Kehoe <kehoea at parhasard.net>
* select-carbon.c (pasteboard_get_utext_or_text):
* redisplay-carbon.c (carbon_text_width, carbon_clear_region):
* glyphs-carbon.c (carbon_init_image_instance_from_eimage):
* frame-carbon.c:
* fontcolor-carbon.c:
Clean up these files for the C++ build, casting where appropriate,
and changing function declarations where appropriate.
* toolbar-carbon.c (create_toolbar_item): Fix some Mule brokenness
in this function.
ChangeLog.carbon2 addition:
2010-06-04 Aidan Kehoe <kehoea at parhasard.net>
* configure: Regenerate.
diff -r abe0b7e0c9bb -r c8faf8c372c2 ChangeLog.carbon2
--- a/ChangeLog.carbon2 Thu Jun 03 11:03:35 2010 +0100
+++ b/ChangeLog.carbon2 Fri Jun 04 11:22:12 2010 +0100
@@ -1,3 +1,7 @@
+2010-06-04 Aidan Kehoe <kehoea at parhasard.net>
+
+ * configure: Regenerate.
+
2008-05-11 Aidan Kehoe <kehoea at parhasard.net>
* configure: Regenerate.
diff -r abe0b7e0c9bb -r c8faf8c372c2 configure
--- a/configure Thu Jun 03 11:03:35 2010 +0100
+++ b/configure Fri Jun 04 11:22:12 2010 +0100
@@ -1,12 +1,14 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for XEmacs 21.5.
+# Generated by GNU Autoconf 2.65 for XEmacs 21.5.
#
# Report bugs to <xemacs-beta at xemacs.org>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@@ -573,7 +575,8 @@
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -2021,7 +2024,7 @@
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
YACC The `Yet Another C Compiler' implementation to use. Defaults to
@@ -2100,7 +2103,7 @@
if $ac_init_version; then
cat <<\_ACEOF
XEmacs configure 21.5
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -2193,7 +2196,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -2230,7 +2233,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -2365,7 +2368,7 @@
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -2442,7 +2445,7 @@
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -2837,7 +2840,7 @@
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
@@ -2875,7 +2878,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
cat >config.log <<_ACEOF
@@ -2883,7 +2886,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by XEmacs $as_me 21.5, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -3136,7 +3139,7 @@
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
@@ -3145,9 +3148,9 @@
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
@@ -6392,32 +6395,30 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
- fi
+ fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
+
+int
+main ()
+{
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -6479,10 +6480,10 @@
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -6490,51 +6491,18 @@
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
-fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
@@ -6567,13 +6535,72 @@
as_fn_error "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." "$LINENO" 5; }
fi
-rm -f conftest$ac_cv_exeext
+rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
@@ -7632,8 +7659,8 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
- fi
+ fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -8180,8 +8207,8 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
- fi
+ fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -8728,8 +8755,8 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
- fi
+ fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -19983,8 +20010,8 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
- fi
+ fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -22001,7 +22028,7 @@
# values after options handling.
ac_log="
This file was extended by XEmacs $as_me 21.5, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -22041,6 +22068,7 @@
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -22063,10 +22091,11 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
XEmacs config.status 21.5
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
@@ -22102,6 +22131,8 @@
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
@@ -22296,7 +22327,7 @@
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -22310,7 +22341,7 @@
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
diff -r abe0b7e0c9bb -r c8faf8c372c2 src/ChangeLog.carbon2
--- a/src/ChangeLog.carbon2 Thu Jun 03 11:03:35 2010 +0100
+++ b/src/ChangeLog.carbon2 Fri Jun 04 11:22:12 2010 +0100
@@ -1,3 +1,15 @@
+2010-06-04 Aidan Kehoe <kehoea at parhasard.net>
+
+ * select-carbon.c (pasteboard_get_utext_or_text):
+ * redisplay-carbon.c (carbon_text_width, carbon_clear_region):
+ * glyphs-carbon.c (carbon_init_image_instance_from_eimage):
+ * frame-carbon.c:
+ * fontcolor-carbon.c:
+ Clean up these files for the C++ build, casting where appropriate,
+ and changing function declarations where appropriate.
+ * toolbar-carbon.c (create_toolbar_item): Fix some Mule brokenness
+ in this function.
+
2010-04-17 Aidan Kehoe <kehoea at parhasard.net>
* toolbar-carbon.c:
diff -r abe0b7e0c9bb -r c8faf8c372c2 src/fontcolor-carbon.c
--- a/src/fontcolor-carbon.c Thu Jun 03 11:03:35 2010 +0100
+++ b/src/fontcolor-carbon.c Fri Jun 04 11:22:12 2010 +0100
@@ -1188,8 +1188,9 @@
get_truename (ATSUFontID font, Fixed size, Boolean bold, Boolean italic,
Lisp_Object *truename, int honor_size)
{
- Bytecount namelen;
- Extbyte *namestr, *enamestr;
+ ByteCount namelen;
+ Extbyte *namestr;
+ Ibyte *enamestr;
Ascbyte sizebuf[DECIMAL_PRINT_SIZE (long)], *bold_italic = NULL;
FontPlatformCode fontplatform;
FontScriptCode fontscript;
@@ -1257,9 +1258,9 @@
eicat_ch (fname, ':');
long_to_string (sizebuf, Fix2Long (size));
/* eicat_c appears not to work. */
- eicat_rawz (fname, sizebuf);
+ eicat_rawz (fname, (Ibyte *) sizebuf);
}
- eicat_rawz (fname, bold_italic);
+ eicat_rawz (fname, (Ibyte *) bold_italic);
*truename = make_string (eidata (fname), eilen (fname));
xfree (enamestr);
@@ -1388,7 +1389,7 @@
FontScriptCode fontnamescript;
FontNameCode fontnamecode;
Extbyte *namestr = NULL;
- Bytecount namestr_len = 0, namelen = 0;
+ ByteCount namestr_len = 0, namelen = 0;
int copied_into;
DECLARE_EISTRING (fname);
@@ -1507,14 +1508,25 @@
#ifdef MULE
static Lisp_Object
-carbon_find_charset_font (Lisp_Object UNUSED (device), Lisp_Object font, Lisp_Object UNUSED (charset), int UNUSED (stage))
+carbon_find_charset_font (Lisp_Object UNUSED (device),
+ Lisp_Object font,
+ Lisp_Object UNUSED (charset),
+ enum font_specifier_matchspec_stages UNUSED (stage))
{
- /* As a simplification, any font will display any charset, since automatic font substitution is on. */
+ /* As a simplification, any font will display any charset, since automatic
+ font substitution is on. */
return font;
}
static int
-carbon_font_spec_matches_charset (struct device * UNUSED (d), Lisp_Object UNUSED (charset), const Ibyte * UNUSED (nonreloc), Lisp_Object UNUSED (reloc), Bytecount UNUSED (offset), Bytecount UNUSED (length), int UNUSED (stage))
+carbon_font_spec_matches_charset (struct device * UNUSED (d),
+ Lisp_Object UNUSED (charset),
+ const Ibyte * UNUSED (nonreloc),
+ Lisp_Object UNUSED (reloc),
+ Bytecount UNUSED (offset),
+ Bytecount UNUSED (length),
+ enum font_specifier_matchspec_stages
+ UNUSED (stage))
{
/* Always return true as a simplification. */
return 1;
diff -r abe0b7e0c9bb -r c8faf8c372c2 src/frame-carbon.c
--- a/src/frame-carbon.c Thu Jun 03 11:03:35 2010 +0100
+++ b/src/frame-carbon.c Fri Jun 04 11:22:12 2010 +0100
@@ -144,7 +144,8 @@
require_noerr (err, ParameterMissing);
struct frame *f = data->f;
- Binbyte *bitmap_data = CGBitmapContextGetData (FRAME_CARBON_CONTEXT (f));
+ Binbyte *bitmap_data
+ = (Binbyte *)CGBitmapContextGetData (FRAME_CARBON_CONTEXT (f));
size_t width = FRAME_PIXWIDTH (f);
size_t height = FRAME_PIXHEIGHT (f);
@@ -329,7 +330,7 @@
static void
release_bitmap_context (CGContextRef context)
{
- Binbyte *data = CGBitmapContextGetData (context);
+ Binbyte *data = (Binbyte *) CGBitmapContextGetData (context);
if (data)
xfree (data);
@@ -565,7 +566,7 @@
CFRelease (substring);
}
else
- drag_string = CFRetain (cfselection);
+ drag_string = (CFStringRef) CFRetain (cfselection);
int drag_string_length = CFStringGetLength (drag_string);
int buffer_size = (drag_string_length + 1) * 2;
@@ -599,8 +600,7 @@
ATSUDrawText (text_layout, kATSUFromTextBeginning, kATSUToTextEnd, text_before, descent);
- Binbyte *bitmap_data = CGBitmapContextGetData (image_context);
-
+ Binbyte *bitmap_data = (Binbyte *) CGBitmapContextGetData (image_context);
size_t width = CGBitmapContextGetWidth (image_context);
size_t height = CGBitmapContextGetHeight (image_context);
diff -r abe0b7e0c9bb -r c8faf8c372c2 src/glyphs-carbon.c
--- a/src/glyphs-carbon.c Thu Jun 03 11:03:35 2010 +0100
+++ b/src/glyphs-carbon.c Fri Jun 04 11:22:12 2010 +0100
@@ -254,7 +254,15 @@
/* Adapted from glyphs-msw.c. */
static void
-carbon_init_image_instance_from_eimage (Lisp_Image_Instance *ii, int width, int height, int slices, Binbyte *eimage, int dest_mask, Lisp_Object instantiator, Lisp_Object UNUSED (domain))
+carbon_init_image_instance_from_eimage (Lisp_Image_Instance *ii,
+ int width, int height,
+ int slices,
+ Binbyte *eimage,
+ int dest_mask,
+ Lisp_Object instantiator,
+ Lisp_Object UNUSED (pointer_fg),
+ Lisp_Object UNUSED (pointer_bg),
+ Lisp_Object UNUSED (domain))
{
CGImageRef image_ref;
int slice;
diff -r abe0b7e0c9bb -r c8faf8c372c2 src/redisplay-carbon.c
--- a/src/redisplay-carbon.c Thu Jun 03 11:03:35 2010 +0100
+++ b/src/redisplay-carbon.c Fri Jun 04 11:22:12 2010 +0100
@@ -194,8 +194,10 @@
}
static int
-carbon_text_width (struct frame *f, struct face_cachel *cachel, const Ichar *str, Charcount len)
+carbon_text_width (struct window *w, struct face_cachel *cachel,
+ const Ichar *str, Charcount len)
{
+ struct frame *f = WINDOW_XFRAME (w);
CGContextRef context = FRAME_CARBON_CONTEXT (f);
int width_so_far = 0;
textual_run *runs;
@@ -901,7 +903,8 @@
int x, int y,
int width, int height,
Lisp_Object fcolor, Lisp_Object UNUSED (bcolor),
- Lisp_Object UNUSED (background_pixmap))
+ Lisp_Object UNUSED (background_pixmap),
+ Lisp_Object UNUSED (background_placement))
{
CGContextSetFillColorWithColor (FRAME_CARBON_CONTEXT (f), COLOR_INSTANCE_CARBON_COLOR (XCOLOR_INSTANCE (fcolor)));
diff -r abe0b7e0c9bb -r c8faf8c372c2 src/select-carbon.c
--- a/src/select-carbon.c Thu Jun 03 11:03:35 2010 +0100
+++ b/src/select-carbon.c Fri Jun 04 11:22:12 2010 +0100
@@ -211,7 +211,10 @@
return Qnil;
}
- Lisp_Object data = make_extstring (CFDataGetBytePtr (flavor_data), CFDataGetLength (flavor_data), Qcarbon_unicode);
+ Lisp_Object data
+ = make_extstring ((const Extbyte *) CFDataGetBytePtr
+ (flavor_data), CFDataGetLength (flavor_data),
+ Qcarbon_unicode);
CFRelease (flavor_data);
CFRelease (flavor_type_array);
diff -r abe0b7e0c9bb -r c8faf8c372c2 src/toolbar-carbon.c
--- a/src/toolbar-carbon.c Thu Jun 03 11:03:35 2010 +0100
+++ b/src/toolbar-carbon.c Fri Jun 04 11:22:12 2010 +0100
@@ -30,6 +30,8 @@
#include "fontcolor-carbon-impl.h"
extern void carbon_enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object); /* In event-carbon.c. */
+
+extern Lisp_Object Qcarbon_unicode;
static Lisp_Object Qcarbon_show_toolbar;
static Lisp_Object Qcarbon_hide_toolbar;
@@ -91,17 +93,24 @@
}
static HIToolbarItemRef
-create_toolbar_item (CFStringRef identifier, CGImageRef image_ref, const char *help_string)
+create_toolbar_item (CFStringRef identifier, CGImageRef image_ref,
+ const Ibyte *help_string)
{
HIToolbarItemRef item;
+ DECLARE_EISTRING (eihelp_string);
if (HIToolbarItemCreate (identifier, kHIToolbarItemCantBeRemoved | kHIToolbarItemAllowDuplicates, &item) != noErr)
invalid_operation ("Can't create toolbar item", Qnil);
if (HIToolbarItemSetImage (item, image_ref) != noErr)
invalid_operation ("Can't set toolbar item image", Qnil);
+
+ eicpy_rawz (eihelp_string, help_string);
+ eito_external (eihelp_string, Qcarbon_unicode);
- CFStringRef cf_help_string = CFStringCreateWithCString (NULL, help_string, kCFStringEncodingISOLatin1);
+ CFStringRef cf_help_string
+ = CFStringCreateWithCString (NULL, (const char *)eiextdata (eihelp_string),
+ kCFStringEncodingUnicode);
if (HIToolbarItemSetHelpText (item, cf_help_string, NULL) != noErr)
invalid_operation ("Can't set toolbar item help text", Qnil);
More information about the XEmacs-Patches
mailing list