Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
lisp/ChangeLog, and src/ChangeLog for list of changes.
This commit is contained in:
parent
501d8923ae
commit
e0f712ba55
73 changed files with 6706 additions and 5530 deletions
|
@ -1,3 +1,10 @@
|
|||
2002-04-26 Andrew Choi <akochoi@shaw.ca>
|
||||
|
||||
* configure.in: Add support for powerpc-apple-darwin*.
|
||||
(HAVE_CARBON): Add.
|
||||
|
||||
* make-dist: create directories in mac/Emacs.app.
|
||||
|
||||
2002-04-25 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
|
||||
|
||||
* make-dist: lwlib-Xol* are removed.
|
||||
|
|
498
configure
vendored
498
configure
vendored
|
@ -1,19 +1,11 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.53.
|
||||
# Generated by GNU Autoconf 2.53a.
|
||||
#
|
||||
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy, distribute and modify it.
|
||||
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
|
||||
## --------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
## --------------------- ##
|
||||
|
@ -22,6 +14,9 @@ fi
|
|||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
|
||||
# is contrary to our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
|
||||
set -o posix
|
||||
fi
|
||||
|
@ -60,8 +55,22 @@ fi
|
|||
{ LC_MESSAGES=C; export LC_MESSAGES; }
|
||||
|
||||
|
||||
# Required to use basename.
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
|
||||
as_basename=basename
|
||||
else
|
||||
as_basename=false
|
||||
fi
|
||||
|
||||
|
||||
# Name of the executable.
|
||||
as_me=`(basename "$0") 2>/dev/null ||
|
||||
as_me=`$as_basename "$0" ||
|
||||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
||||
X"$0" : 'X\(//\)$' \| \
|
||||
X"$0" : 'X\(/\)$' \| \
|
||||
|
@ -72,6 +81,7 @@ echo X/"$0" |
|
|||
/^X\/\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
|
||||
|
||||
# PATH needs CR, and LINENO needs CR and PATH.
|
||||
# Avoid depending upon Character Ranges.
|
||||
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
|
||||
|
@ -138,6 +148,8 @@ do
|
|||
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
|
||||
test "x$as_lineno_1" != "x$as_lineno_2" &&
|
||||
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
|
||||
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
|
||||
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
|
||||
CONFIG_SHELL=$as_dir/$as_base
|
||||
export CONFIG_SHELL
|
||||
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
|
||||
|
@ -210,6 +222,12 @@ else
|
|||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.file
|
||||
|
||||
if mkdir -p . 2>/dev/null; then
|
||||
as_mkdir_p=:
|
||||
else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
as_executable_p="test -f"
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
|
@ -857,6 +875,7 @@ Optional Packages:
|
|||
--without-toolkit-scroll-bars
|
||||
don't use Motif or Xaw3d scroll bars
|
||||
--without-xim don't use X11 XIM
|
||||
--without-carbon don't use Carbon GUI on Mac OS X
|
||||
--with-x use the X Window System
|
||||
|
||||
Some influential environment variables:
|
||||
|
@ -947,7 +966,7 @@ This file contains any messages produced by compilers while
|
|||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by $as_me, which was
|
||||
generated by GNU Autoconf 2.53. Invocation command line was
|
||||
generated by GNU Autoconf 2.53a. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
||||
|
@ -1216,7 +1235,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers src/config.h:src/config.in"
|
||||
|
||||
ac_config_headers="$ac_config_headers src/config.h:src/config.in"
|
||||
|
||||
|
||||
test "$program_prefix" != NONE &&
|
||||
|
@ -1403,6 +1423,12 @@ if test "${with_xim+set}" = set; then
|
|||
|
||||
fi;
|
||||
|
||||
# Check whether --with-carbon or --without-carbon was given.
|
||||
if test "${with_carbon+set}" = set; then
|
||||
withval="$with_carbon"
|
||||
|
||||
fi;
|
||||
|
||||
#### Make srcdir absolute, if it isn't already. It's important to
|
||||
#### avoid running the path through pwd unnecessarily, since pwd can
|
||||
#### give you automounter prefixes, which can go away. We do all this
|
||||
|
@ -2459,6 +2485,13 @@ case "${canonical}" in
|
|||
machine=f301 opsys=uxpv
|
||||
;;
|
||||
|
||||
## Darwin / Mac OS X
|
||||
powerpc-apple-darwin* )
|
||||
machine=powermac opsys=darwin
|
||||
# Define CPP as follows to make autoconf work correctly.
|
||||
CPP="cc -E -traditional-cpp"
|
||||
;;
|
||||
|
||||
* )
|
||||
unported=yes
|
||||
;;
|
||||
|
@ -2901,7 +2934,7 @@ for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
|
|||
ls a.out conftest 2>/dev/null;
|
||||
ls a.* conftest.* 2>/dev/null`; do
|
||||
case $ac_file in
|
||||
*.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
|
||||
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
|
||||
a.out ) # We found the default executable, but exeext='' is most
|
||||
# certainly right.
|
||||
break;;
|
||||
|
@ -2975,7 +3008,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
# `rm'.
|
||||
for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
|
||||
case $ac_file in
|
||||
*.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
|
||||
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
|
||||
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
|
||||
export ac_cv_exeext
|
||||
break;;
|
||||
|
@ -3026,7 +3059,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
(exit $ac_status); }; then
|
||||
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
|
||||
case $ac_file in
|
||||
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
|
||||
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
|
||||
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
|
||||
break;;
|
||||
esac
|
||||
|
@ -3159,6 +3192,103 @@ else
|
|||
CFLAGS=
|
||||
fi
|
||||
fi
|
||||
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
|
||||
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
|
||||
if test "${ac_cv_prog_cc_stdc+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_cv_prog_cc_stdc=no
|
||||
ac_save_CC=$CC
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
static char *e (p, i)
|
||||
char **p;
|
||||
int i;
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
static char *f (char * (*g) (char **, int), char **p, ...)
|
||||
{
|
||||
char *s;
|
||||
va_list v;
|
||||
va_start (v,p);
|
||||
s = g (p, va_arg (v,int));
|
||||
va_end (v);
|
||||
return s;
|
||||
}
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};
|
||||
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
||||
int argc;
|
||||
char **argv;
|
||||
#ifdef F77_DUMMY_MAIN
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int F77_DUMMY_MAIN() { return 1; }
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
# Don't try gcc -ansi; that turns off useful extensions and
|
||||
# breaks some systems' header files.
|
||||
# AIX -qlanglvl=ansi
|
||||
# Ultrix and OSF/1 -std1
|
||||
# HP-UX 10.20 and later -Ae
|
||||
# HP-UX older versions -Aa -D_HPUX_SOURCE
|
||||
# SVR4 -Xc -D__EXTENSIONS__
|
||||
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_prog_cc_stdc=$ac_arg
|
||||
break
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
rm -f conftest.$ac_objext
|
||||
done
|
||||
rm -f conftest.$ac_ext conftest.$ac_objext
|
||||
CC=$ac_save_CC
|
||||
|
||||
fi
|
||||
|
||||
case "x$ac_cv_prog_cc_stdc" in
|
||||
x|xno)
|
||||
echo "$as_me:$LINENO: result: none needed" >&5
|
||||
echo "${ECHO_T}none needed" >&6 ;;
|
||||
*)
|
||||
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
|
||||
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
|
||||
CC="$CC $ac_cv_prog_cc_stdc" ;;
|
||||
esac
|
||||
|
||||
# Some people use a C++ compiler to compile C. Since we use `exit',
|
||||
# in C++ we need to declare it. In case someone uses the same compiler
|
||||
# for both compiling C and C++ we need to have the C++ compiler decide
|
||||
|
@ -5594,103 +5724,6 @@ fi
|
|||
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
|
||||
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
|
||||
if test "${ac_cv_prog_cc_stdc+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_cv_prog_cc_stdc=no
|
||||
ac_save_CC=$CC
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
static char *e (p, i)
|
||||
char **p;
|
||||
int i;
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
static char *f (char * (*g) (char **, int), char **p, ...)
|
||||
{
|
||||
char *s;
|
||||
va_list v;
|
||||
va_start (v,p);
|
||||
s = g (p, va_arg (v,int));
|
||||
va_end (v);
|
||||
return s;
|
||||
}
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};
|
||||
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
||||
int argc;
|
||||
char **argv;
|
||||
#ifdef F77_DUMMY_MAIN
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int F77_DUMMY_MAIN() { return 1; }
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
# Don't try gcc -ansi; that turns off useful extensions and
|
||||
# breaks some systems' header files.
|
||||
# AIX -qlanglvl=ansi
|
||||
# Ultrix and OSF/1 -std1
|
||||
# HP-UX 10.20 and later -Ae
|
||||
# HP-UX older versions -Aa -D_HPUX_SOURCE
|
||||
# SVR4 -Xc -D__EXTENSIONS__
|
||||
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_prog_cc_stdc=$ac_arg
|
||||
break
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
rm -f conftest.$ac_objext
|
||||
done
|
||||
rm -f conftest.$ac_ext conftest.$ac_objext
|
||||
CC=$ac_save_CC
|
||||
|
||||
fi
|
||||
|
||||
case "x$ac_cv_prog_cc_stdc" in
|
||||
x|xno)
|
||||
echo "$as_me:$LINENO: result: none needed" >&5
|
||||
echo "${ECHO_T}none needed" >&6 ;;
|
||||
*)
|
||||
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
|
||||
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
|
||||
CC="$CC $ac_cv_prog_cc_stdc" ;;
|
||||
esac
|
||||
|
||||
echo "$as_me:$LINENO: checking for function prototypes" >&5
|
||||
echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
|
||||
if test "$ac_cv_prog_cc_stdc" != no; then
|
||||
|
@ -9060,6 +9093,124 @@ _ACEOF
|
|||
fi
|
||||
fi
|
||||
|
||||
### Use Mac OS X Carbon API to implement GUI.
|
||||
HAVE_CARBON=no
|
||||
if test "${with_carbon}" != "no"; then
|
||||
if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
|
||||
echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
|
||||
echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
|
||||
if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
|
||||
echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
|
||||
else
|
||||
# Is the header compilable?
|
||||
echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
|
||||
echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
$ac_includes_default
|
||||
#include <Carbon/Carbon.h>
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||
echo "${ECHO_T}$ac_header_compiler" >&6
|
||||
|
||||
# Is the header present?
|
||||
echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
|
||||
echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
#include <Carbon/Carbon.h>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
egrep -v '^ *\+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||
echo "${ECHO_T}$ac_header_preproc" >&6
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc in
|
||||
yes:no )
|
||||
{ echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
|
||||
echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;};;
|
||||
no:yes )
|
||||
{ echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
|
||||
echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
|
||||
echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
|
||||
echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;};;
|
||||
esac
|
||||
echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
|
||||
echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
|
||||
if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
|
||||
echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
|
||||
|
||||
fi
|
||||
if test $ac_cv_header_Carbon_Carbon_h = yes; then
|
||||
HAVE_CARBON=yes
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test "${HAVE_CARBON}" = "yes"; then
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_CARBON 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
### Use session management (-lSM -lICE) if available
|
||||
HAVE_X_SM=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
|
@ -16005,8 +16156,8 @@ fi
|
|||
rm -f conftest*
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
|
||||
ac_config_commands="$ac_config_commands default"
|
||||
ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
|
||||
ac_config_commands="$ac_config_commands default"
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
|
@ -16101,7 +16252,6 @@ SHELL=\${CONFIG_SHELL-$SHELL}
|
|||
_ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<\_ACEOF
|
||||
|
||||
## --------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
## --------------------- ##
|
||||
|
@ -16110,6 +16260,9 @@ cat >>$CONFIG_STATUS <<\_ACEOF
|
|||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
|
||||
# is contrary to our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
|
||||
set -o posix
|
||||
fi
|
||||
|
@ -16148,8 +16301,22 @@ fi
|
|||
{ LC_MESSAGES=C; export LC_MESSAGES; }
|
||||
|
||||
|
||||
# Required to use basename.
|
||||
if expr a : '\(a\)' >/dev/null 2>&1; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
|
||||
as_basename=basename
|
||||
else
|
||||
as_basename=false
|
||||
fi
|
||||
|
||||
|
||||
# Name of the executable.
|
||||
as_me=`(basename "$0") 2>/dev/null ||
|
||||
as_me=`$as_basename "$0" ||
|
||||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
||||
X"$0" : 'X\(//\)$' \| \
|
||||
X"$0" : 'X\(/\)$' \| \
|
||||
|
@ -16160,6 +16327,7 @@ echo X/"$0" |
|
|||
/^X\/\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
|
||||
|
||||
# PATH needs CR, and LINENO needs CR and PATH.
|
||||
# Avoid depending upon Character Ranges.
|
||||
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
|
||||
|
@ -16227,6 +16395,8 @@ do
|
|||
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
|
||||
test "x$as_lineno_1" != "x$as_lineno_2" &&
|
||||
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
|
||||
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
|
||||
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
|
||||
CONFIG_SHELL=$as_dir/$as_base
|
||||
export CONFIG_SHELL
|
||||
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
|
||||
|
@ -16300,6 +16470,12 @@ else
|
|||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.file
|
||||
|
||||
if mkdir -p . 2>/dev/null; then
|
||||
as_mkdir_p=:
|
||||
else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
as_executable_p="test -f"
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
|
@ -16333,7 +16509,7 @@ _ASBOX
|
|||
cat >&5 <<_CSEOF
|
||||
|
||||
This file was extended by $as_me, which was
|
||||
generated by GNU Autoconf 2.53. Invocation command line was
|
||||
generated by GNU Autoconf 2.53a. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
CONFIG_HEADERS = $CONFIG_HEADERS
|
||||
|
@ -16395,7 +16571,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
config.status
|
||||
configured by $0, generated by GNU Autoconf 2.53,
|
||||
configured by $0, generated by GNU Autoconf 2.53a,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
|
||||
|
@ -16705,25 +16881,30 @@ echo X"$ac_file" |
|
|||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
{ case "$ac_dir" in
|
||||
[\\/]* | ?:[\\/]* ) as_incr_dir=;;
|
||||
*) as_incr_dir=.;;
|
||||
esac
|
||||
as_dummy="$ac_dir"
|
||||
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
|
||||
case $as_mkdir_dir in
|
||||
# Skip DOS drivespec
|
||||
?:) as_incr_dir=$as_mkdir_dir ;;
|
||||
*)
|
||||
as_incr_dir=$as_incr_dir/$as_mkdir_dir
|
||||
test -d "$as_incr_dir" ||
|
||||
mkdir "$as_incr_dir" ||
|
||||
{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
|
||||
echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
esac
|
||||
done; }
|
||||
{ if $as_mkdir_p; then
|
||||
mkdir -p "$ac_dir"
|
||||
else
|
||||
as_dir="$ac_dir"
|
||||
as_dirs=
|
||||
while test ! -d "$as_dir"; do
|
||||
as_dirs="$as_dir $as_dirs"
|
||||
as_dir=`(dirname "$as_dir") 2>/dev/null ||
|
||||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$as_dir" : 'X\(//\)[^/]' \| \
|
||||
X"$as_dir" : 'X\(//\)$' \| \
|
||||
X"$as_dir" : 'X\(/\)' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X"$as_dir" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
done
|
||||
test ! -n "$as_dirs" || mkdir $as_dirs
|
||||
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
|
||||
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }; }
|
||||
|
||||
ac_builddir=.
|
||||
|
||||
|
@ -17023,25 +17204,30 @@ echo X"$ac_file" |
|
|||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
{ case "$ac_dir" in
|
||||
[\\/]* | ?:[\\/]* ) as_incr_dir=;;
|
||||
*) as_incr_dir=.;;
|
||||
esac
|
||||
as_dummy="$ac_dir"
|
||||
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
|
||||
case $as_mkdir_dir in
|
||||
# Skip DOS drivespec
|
||||
?:) as_incr_dir=$as_mkdir_dir ;;
|
||||
*)
|
||||
as_incr_dir=$as_incr_dir/$as_mkdir_dir
|
||||
test -d "$as_incr_dir" ||
|
||||
mkdir "$as_incr_dir" ||
|
||||
{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
|
||||
echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
esac
|
||||
done; }
|
||||
{ if $as_mkdir_p; then
|
||||
mkdir -p "$ac_dir"
|
||||
else
|
||||
as_dir="$ac_dir"
|
||||
as_dirs=
|
||||
while test ! -d "$as_dir"; do
|
||||
as_dirs="$as_dir $as_dirs"
|
||||
as_dir=`(dirname "$as_dir") 2>/dev/null ||
|
||||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$as_dir" : 'X\(//\)[^/]' \| \
|
||||
X"$as_dir" : 'X\(//\)$' \| \
|
||||
X"$as_dir" : 'X\(/\)' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X"$as_dir" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
done
|
||||
test ! -n "$as_dirs" || mkdir $as_dirs
|
||||
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
|
||||
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }; }
|
||||
|
||||
rm -f $ac_file
|
||||
mv $tmp/config.h $ac_file
|
||||
|
|
19
configure.in
19
configure.in
|
@ -128,6 +128,8 @@ AC_ARG_WITH(toolkit-scroll-bars,
|
|||
don't use Motif or Xaw3d scroll bars])
|
||||
AC_ARG_WITH(xim,
|
||||
[ --without-xim don't use X11 XIM])
|
||||
AC_ARG_WITH(carbon,
|
||||
[ --without-carbon don't use Carbon GUI on Mac OS X])
|
||||
|
||||
#### Make srcdir absolute, if it isn't already. It's important to
|
||||
#### avoid running the path through pwd unnecessarily, since pwd can
|
||||
|
@ -1104,6 +1106,13 @@ case "${canonical}" in
|
|||
machine=f301 opsys=uxpv
|
||||
;;
|
||||
|
||||
## Darwin / Mac OS X
|
||||
powerpc-apple-darwin* )
|
||||
machine=powermac opsys=darwin
|
||||
# Define CPP as follows to make autoconf work correctly.
|
||||
CPP="cc -E -traditional-cpp"
|
||||
;;
|
||||
|
||||
* )
|
||||
unported=yes
|
||||
;;
|
||||
|
@ -1997,6 +2006,16 @@ if test "${HAVE_X11}" = "yes"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
### Use Mac OS X Carbon API to implement GUI.
|
||||
HAVE_CARBON=no
|
||||
if test "${with_carbon}" != "no"; then
|
||||
AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes)
|
||||
fi
|
||||
|
||||
if test "${HAVE_CARBON}" = "yes"; then
|
||||
AC_DEFINE(HAVE_CARBON)
|
||||
fi
|
||||
|
||||
### Use session management (-lSM -lICE) if available
|
||||
HAVE_X_SM=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2002-04-26 Andrew Choi <akochoi@shaw.ca>
|
||||
|
||||
* term/mac-win.el: Don't call ediff-toggle-multiframe. Set
|
||||
default directory. Set process-connection-type to nil.
|
||||
|
||||
2002-04-26 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* cus-edit.el (customize-face): Use read-face-name
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
(put 'woman-faces 'custom-loads '("woman"))
|
||||
(put 'ps-print-vertical 'custom-loads '("ps-print"))
|
||||
(put 'supercite-hooks 'custom-loads '("supercite"))
|
||||
(put 'chinese-calendar 'custom-loads '("cal-china"))
|
||||
(put 'vhdl-menu 'custom-loads '("vhdl-mode"))
|
||||
(put 'gnus-newsrc 'custom-loads '("gnus-start"))
|
||||
(put 'chinese-calendar 'custom-loads '("cal-china"))
|
||||
(put 'expand 'custom-loads '("expand"))
|
||||
(put 'bookmark 'custom-loads '("bookmark"))
|
||||
(put 'icon 'custom-loads '("icon"))
|
||||
|
@ -62,7 +62,7 @@
|
|||
(put 'dirtrack 'custom-loads '("dirtrack"))
|
||||
(put 'ediff-window 'custom-loads '("ediff-help" "ediff-wind"))
|
||||
(put 'bruce 'custom-loads '("bruce"))
|
||||
(put 'windows 'custom-loads '("scroll-all" "window" "follow" "windmove"))
|
||||
(put 'windows 'custom-loads '("hscroll" "scroll-all" "window" "follow" "windmove"))
|
||||
(put 'gnus-exit 'custom-loads '("gnus-group" "gnus"))
|
||||
(put 'speedbar 'custom-loads '("speedbar"))
|
||||
(put 'etags 'custom-loads '("etags"))
|
||||
|
@ -112,7 +112,7 @@
|
|||
(put 'mh-hook 'custom-loads '("mh-e"))
|
||||
(put 'yow 'custom-loads '("yow"))
|
||||
(put 'reftex-defining-label-environments 'custom-loads '("reftex-vars"))
|
||||
(put 'asm 'custom-loads '("asm-mode" "cc-vars"))
|
||||
(put 'asm 'custom-loads '("asm-mode"))
|
||||
(put 'gnus-score-files 'custom-loads '("gnus-score" "gnus"))
|
||||
(put 'mail-abbrev 'custom-loads '("mailabbrev"))
|
||||
(put 'feedmail 'custom-loads '("feedmail"))
|
||||
|
@ -130,7 +130,7 @@
|
|||
(put 'iso-acc 'custom-loads '("iso-acc"))
|
||||
(put 'gnus-summary-pick 'custom-loads '("gnus-salt"))
|
||||
(put 'gnus-thread 'custom-loads '("gnus-sum"))
|
||||
(put 'languages 'custom-loads '("cus-edit" "info-look" "ada-mode" "antlr-mode" "asm-mode" "cperl-mode" "dcl-mode" "delphi" "f90" "fortran" "hideshow" "icon" "idlwave" "m4-mode" "meta-mode" "modula2" "octave-mod" "pascal" "perl-mode" "prolog" "ps-mode" "sh-script" "simula" "tcl" "vhdl-mode" "sgml-mode" "xml-lite"))
|
||||
(put 'languages 'custom-loads '("cus-edit" "info-look" "ada-mode" "antlr-mode" "asm-mode" "cperl-mode" "dcl-mode" "delphi" "f90" "fortran" "hideshow" "icon" "idlwave" "m4-mode" "meta-mode" "modula2" "octave-mod" "pascal" "perl-mode" "prolog" "ps-mode" "sh-script" "simula" "tcl" "vhdl-mode" "sgml-mode"))
|
||||
(put 'reftex-miscellaneous-configurations 'custom-loads '("reftex-vars"))
|
||||
(put 'pong 'custom-loads '("pong"))
|
||||
(put 'ediff-ptch 'custom-loads '("ediff-ptch"))
|
||||
|
@ -145,8 +145,8 @@
|
|||
(put 'smiley 'custom-loads '("smiley-ems"))
|
||||
(put 'extensions 'custom-loads '("generic" "time-stamp" "wid-edit" "cust-print" "eldoc" "page-ext"))
|
||||
(put 'tetris 'custom-loads '("tetris"))
|
||||
(put 'appt 'custom-loads '("appt"))
|
||||
(put 'ebnf-displacement 'custom-loads '("ebnf2ps"))
|
||||
(put 'appt 'custom-loads '("appt"))
|
||||
(put 'snmp 'custom-loads '("snmp-mode"))
|
||||
(put 'speedbar-faces 'custom-loads '("speedbar" "vhdl-mode"))
|
||||
(put 'rmail 'custom-loads '("paths" "rmail" "undigest"))
|
||||
|
@ -219,8 +219,8 @@
|
|||
(put 'auto-save 'custom-loads '("files" "startup"))
|
||||
(put 'tpu 'custom-loads '("tpu-edt" "tpu-extras"))
|
||||
(put 'w32 'custom-loads '("w32-vars"))
|
||||
(put 'viper-hooks 'custom-loads '("viper-init"))
|
||||
(put 'gnus-cite 'custom-loads '("gnus-cite"))
|
||||
(put 'viper-hooks 'custom-loads '("viper-init"))
|
||||
(put 'gnus-demon 'custom-loads '("gnus-demon"))
|
||||
(put 'reftex-optimizations-for-large-documents 'custom-loads '("reftex-vars"))
|
||||
(put 'viper-misc 'custom-loads '("viper-cmd" "viper-init" "viper"))
|
||||
|
@ -246,7 +246,6 @@
|
|||
(put 'cperl-indentation-details 'custom-loads '("cperl-mode"))
|
||||
(put 'mail-extr 'custom-loads '("mail-extr"))
|
||||
(put 'double 'custom-loads '("double"))
|
||||
(put 'xml-lite 'custom-loads '("xml-lite"))
|
||||
(put 'imenu 'custom-loads '("imenu"))
|
||||
(put 'eshell-var 'custom-loads '("esh-var"))
|
||||
(put 'scribe 'custom-loads '("scribe"))
|
||||
|
@ -275,10 +274,10 @@
|
|||
(put 'generic-x 'custom-loads '("generic-x"))
|
||||
(put 'partial-completion 'custom-loads '("complete"))
|
||||
(put 'whitespace 'custom-loads '("whitespace"))
|
||||
(put 'maint 'custom-loads '("emacsbug" "gulp" "lisp-mnt"))
|
||||
(put 'maint 'custom-loads '("gulp" "lisp-mnt" "emacsbug"))
|
||||
(put 'pages 'custom-loads '("page-ext"))
|
||||
(put 'message-interface 'custom-loads '("message"))
|
||||
(put 'diary 'custom-loads '("calendar" "diary-lib"))
|
||||
(put 'diary 'custom-loads '("calendar" "diary-lib" "solar"))
|
||||
(put 'custom-magic-faces 'custom-loads '("cus-edit"))
|
||||
(put 'emacsbug 'custom-loads '("emacsbug"))
|
||||
(put 'mh-compose 'custom-loads '("mh-comp"))
|
||||
|
@ -302,7 +301,7 @@
|
|||
(put 'apropos 'custom-loads '("apropos"))
|
||||
(put 'gomoku 'custom-loads '("gomoku"))
|
||||
(put 'eshell-pred 'custom-loads '("em-pred"))
|
||||
(put 'tools 'custom-loads '("add-log" "calculator" "compare-w" "diff-mode" "diff" "ediff" "elide-head" "emerge" "gud" "pcvs-defs" "smerge-mode" "speedbar" "tempo" "tooltip" "vc" "which-func" "rcompile" "copyright" "compile" "ebrowse" "etags" "glasses" "make-mode"))
|
||||
(put 'tools 'custom-loads '("add-log" "calculator" "compare-w" "diff-mode" "diff" "ediff" "elide-head" "emerge" "gud" "pcvs-defs" "smerge-mode" "speedbar" "tempo" "tooltip" "vc" "which-func" "copyright" "rcompile" "compile" "ebrowse" "etags" "glasses" "make-mode"))
|
||||
(put 'gnus-topic 'custom-loads '("gnus-topic"))
|
||||
(put 'sgml 'custom-loads '("sgml-mode"))
|
||||
(put 'keyboard 'custom-loads '("mule" "chistory" "type-break"))
|
||||
|
@ -365,15 +364,15 @@
|
|||
(put 'nnmail-retrieve 'custom-loads '("nnmail"))
|
||||
(put 'gnus-duplicate 'custom-loads '("gnus-dup"))
|
||||
(put 'find-function 'custom-loads '("find-func"))
|
||||
(put 'menu 'custom-loads '("faces" "tmm" "easymenu"))
|
||||
(put 'menu 'custom-loads '("faces" "menu-bar" "tmm" "easymenu"))
|
||||
(put 'eshell-test 'custom-loads '("esh-test"))
|
||||
(put 'vhdl-highlight 'custom-loads '("vhdl-mode"))
|
||||
(put 'widgets 'custom-loads '("wid-browse" "wid-edit"))
|
||||
(put 'log-view 'custom-loads '("log-view"))
|
||||
(put 'PostScript 'custom-loads '("ps-mode"))
|
||||
(put 'abbrev-mode 'custom-loads '("abbrev" "cus-edit" "mailabbrev"))
|
||||
(put 'eshell-term 'custom-loads '("em-term"))
|
||||
(put 'earcon 'custom-loads '("earcon"))
|
||||
(put 'eshell-term 'custom-loads '("em-term"))
|
||||
(put 'feedmail-headers 'custom-loads '("feedmail"))
|
||||
(put 'hypermedia 'custom-loads '("wid-edit" "metamail" "browse-url" "goto-addr"))
|
||||
(put 'image 'custom-loads '("image-file"))
|
||||
|
@ -498,7 +497,7 @@
|
|||
(put 'reftex-index-support 'custom-loads '("reftex-vars"))
|
||||
(put 'pascal 'custom-loads '("pascal"))
|
||||
(put 'rmail-retrieve 'custom-loads '("rmail" "rmailsum"))
|
||||
(put 'data 'custom-loads '("text-mode" "arc-mode" "forms" "hexl" "jka-compr" "saveplace" "sort" "tar-mode" "time-stamp" "snmp-mode" "timeclock"))
|
||||
(put 'data 'custom-loads '("text-mode" "arc-mode" "forms" "hexl" "jka-compr" "saveplace" "sort" "tar-mode" "time-stamp" "timeclock" "snmp-mode"))
|
||||
(put 'mail 'custom-loads '("simple" "startup" "time" "gnus" "mail-utils" "mm-decode" "message" "imap" "starttls" "emacsbug" "feedmail" "mail-extr" "mail-hist" "mailalias" "metamail" "mh-e" "mspools" "rmail" "sendmail" "smtpmail" "supercite" "uce" "eudc-vars" "fortune"))
|
||||
(put 'paren-blinking 'custom-loads '("simple"))
|
||||
(put 'gnus-summary-sort 'custom-loads '("gnus-sum"))
|
||||
|
@ -691,7 +690,7 @@
|
|||
(custom-put-if-not 'change-log-conditionals-face 'group-documentation nil)
|
||||
(custom-put-if-not 'mail-source 'custom-version "21.1")
|
||||
(custom-put-if-not 'mail-source 'group-documentation "The mail-fetching library.")
|
||||
(custom-put-if-not 'smtpmail-auth-credentials 'custom-version "21.1")
|
||||
(custom-put-if-not 'smtpmail-auth-credentials 'custom-version "21.3")
|
||||
(custom-put-if-not 'smtpmail-auth-credentials 'standard-value t)
|
||||
(custom-put-if-not 'minibuffer-prompt 'custom-version "21.3")
|
||||
(custom-put-if-not 'minibuffer-prompt 'group-documentation nil)
|
||||
|
@ -777,6 +776,8 @@ the tasks accomplished by such tools.")
|
|||
(custom-put-if-not 'tildify 'group-documentation "Adding missing hard spaces or other text fragments into texts.")
|
||||
(custom-put-if-not 'normal-erase-is-backspace 'custom-version "21.1")
|
||||
(custom-put-if-not 'normal-erase-is-backspace 'standard-value t)
|
||||
(custom-put-if-not 'vc-cvs-global-switches 'custom-version "21.3")
|
||||
(custom-put-if-not 'vc-cvs-global-switches 'standard-value t)
|
||||
(custom-put-if-not 'gnus-article-banner-alist 'custom-version "21.1")
|
||||
(custom-put-if-not 'gnus-article-banner-alist 'standard-value t)
|
||||
(custom-put-if-not 'region 'custom-version "21.1")
|
||||
|
@ -840,6 +841,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
|
|||
(custom-put-if-not 'message-buffer-naming-style 'standard-value t)
|
||||
(custom-put-if-not 'ps-footer-font-size 'custom-version "21.1")
|
||||
(custom-put-if-not 'ps-footer-font-size 'standard-value t)
|
||||
(custom-put-if-not 'hscroll-margin 'custom-version "21.3")
|
||||
(custom-put-if-not 'hscroll-margin 'standard-value t)
|
||||
(custom-put-if-not 'tags-apropos-additional-actions 'custom-version "21.1")
|
||||
(custom-put-if-not 'tags-apropos-additional-actions 'standard-value t)
|
||||
(custom-put-if-not 'generic-x 'custom-version "20.3")
|
||||
|
@ -858,6 +861,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
|
|||
(custom-put-if-not 'vcursor-interpret-input 'standard-value t)
|
||||
(custom-put-if-not 'gnus-audio 'custom-version "21.1")
|
||||
(custom-put-if-not 'gnus-audio 'group-documentation "Playing sound in Gnus.")
|
||||
(custom-put-if-not 'diary-sabbath-candles-minutes 'custom-version "21.1")
|
||||
(custom-put-if-not 'diary-sabbath-candles-minutes 'standard-value t)
|
||||
(custom-put-if-not 'trailing-whitespace 'custom-version "21.1")
|
||||
(custom-put-if-not 'trailing-whitespace 'group-documentation nil)
|
||||
(custom-put-if-not 'fortran-comment-line-start 'custom-version "21.1")
|
||||
|
@ -946,6 +951,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
|
|||
(custom-put-if-not 'change-log-version-number-regexp-list 'standard-value t)
|
||||
(custom-put-if-not 'menu 'custom-version "21.1")
|
||||
(custom-put-if-not 'menu 'group-documentation "Input from the menus.")
|
||||
(custom-put-if-not 'dired-view-command-alist 'custom-version 21.4)
|
||||
(custom-put-if-not 'dired-view-command-alist 'standard-value t)
|
||||
(custom-put-if-not 'gnus-nocem-check-from 'custom-version "21.1")
|
||||
(custom-put-if-not 'gnus-nocem-check-from 'standard-value t)
|
||||
(custom-put-if-not 'sgml-validate-command 'custom-version "21.1")
|
||||
|
@ -988,6 +995,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
|
|||
(custom-put-if-not 'message-forward-ignored-headers 'standard-value t)
|
||||
(custom-put-if-not 'eudc 'custom-version "21.1")
|
||||
(custom-put-if-not 'eudc 'group-documentation "Emacs Unified Directory Client.")
|
||||
(custom-put-if-not 'yank-excluded-properties 'custom-version 21.4)
|
||||
(custom-put-if-not 'yank-excluded-properties 'standard-value t)
|
||||
(custom-put-if-not 'scrolling 'custom-version "21.1")
|
||||
(custom-put-if-not 'scrolling 'group-documentation "Scrolling windows.")
|
||||
(custom-put-if-not 'ps-paragraph-regexp 'custom-version "21.1")
|
||||
|
@ -1020,8 +1029,6 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
|
|||
(custom-put-if-not 'custom-comment-face 'group-documentation nil)
|
||||
(custom-put-if-not 'custom-raised-buttons 'custom-version "21.1")
|
||||
(custom-put-if-not 'custom-raised-buttons 'standard-value t)
|
||||
(custom-put-if-not 'gnus-article-x-face-command 'custom-version "21.1")
|
||||
(custom-put-if-not 'gnus-article-x-face-command 'standard-value t)
|
||||
(custom-put-if-not 'gnus-inhibit-user-auto-expire 'custom-version "21.1")
|
||||
(custom-put-if-not 'gnus-inhibit-user-auto-expire 'standard-value t)
|
||||
(custom-put-if-not 'show-paren-ring-bell-on-mismatch 'custom-version "20.3")
|
||||
|
@ -1034,6 +1041,8 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
|
|||
(custom-put-if-not 'gnus-emphasize-whitespace-regexp 'standard-value t)
|
||||
(custom-put-if-not 'gnus-summary-show-article-charset-alist 'custom-version "21.1")
|
||||
(custom-put-if-not 'gnus-summary-show-article-charset-alist 'standard-value t)
|
||||
(custom-put-if-not 'mail-use-dsn 'custom-version "21.3")
|
||||
(custom-put-if-not 'mail-use-dsn 'standard-value t)
|
||||
(custom-put-if-not 'xscheme-start-hook 'custom-version 20.3)
|
||||
(custom-put-if-not 'xscheme-start-hook 'standard-value t)
|
||||
(custom-put-if-not 'vc-dired-listing-switches 'custom-version "21.1")
|
||||
|
@ -1151,7 +1160,7 @@ as a PDF file <URL:http://www.ecma.ch/ecma1/STAND/ECMA-048.HTM>.")
|
|||
(custom-put-if-not 'eval-expression-print-level 'custom-version "21.1")
|
||||
(custom-put-if-not 'eval-expression-print-level 'standard-value t)
|
||||
|
||||
(defvar custom-versions-load-alist '((20.3 "xscheme") ("20.3.3" "dos-vars") (21.1 "ange-ftp") ("20.4" "files" "help" "sh-script" "compile") ("21.2" "add-log" "sgml-mode") ("21.3" "vc-cvs" "replace" "ange-ftp") (21.3 "ange-ftp") ("20.3" "desktop" "easymenu" "hscroll" "dabbrev" "ffap" "rmail" "paren" "mailabbrev" "frame" "uce" "mouse" "diary-lib" "sendmail" "simple" "debug" "hexl" "vcursor" "vc" "compile" "etags" "help-mode" "browse-url" "add-log" "find-func" "cus-edit" "replace") ("21.1" "server" "debug" "rmailedit" "dabbrev" "isearch" "gnus-start" "mule" "hideshow" "sendmail" "paths" "sgml-mode" "net-utils" "cperl-mode" "rmail" "font-lock" "gnus-nocem" "vc-hooks" "paren" "faces" "vc-rcs" "fortran" "vc" "etags" "cus-edit" "vc-sccs" "gnus-group" "gnus-sum" "add-log" "find-func" "frame" "wid-edit" "smtpmail" "files" "nnmail" "message" "ps-print" "vc-cvs" "simple" "gnus-agent" "flyspell" "gnus-art" "browse-url" "speedbar") ("20.8" "sql"))
|
||||
(defvar custom-versions-load-alist '((20.3 "xscheme") (21.4 "simple" "dired") ("20.3.3" "dos-vars") (21.1 "ange-ftp") ("20.4" "files" "help" "sh-script" "compile") ("21.2" "add-log" "sgml-mode") (21.3 "ange-ftp") ("21.3" "sendmail" "replace" "hscroll" "vc-cvs" "ange-ftp" "smtpmail") ("20.3" "desktop" "easymenu" "hscroll" "dabbrev" "ffap" "rmail" "paren" "mailabbrev" "frame" "uce" "mouse" "diary-lib" "sendmail" "simple" "debug" "hexl" "vcursor" "vc" "compile" "etags" "help-mode" "browse-url" "add-log" "find-func" "cus-edit" "replace") ("21.1" "server" "debug" "rmailedit" "dabbrev" "isearch" "gnus-start" "mule" "hideshow" "sendmail" "paths" "sgml-mode" "net-utils" "cperl-mode" "rmail" "font-lock" "gnus-nocem" "vc-hooks" "paren" "faces" "vc-rcs" "fortran" "solar" "vc" "etags" "cus-edit" "vc-sccs" "gnus-group" "gnus-sum" "smtpmail" "add-log" "find-func" "frame" "wid-edit" "files" "nnmail" "message" "ps-print" "vc-cvs" "simple" "gnus-agent" "flyspell" "gnus-art" "browse-url" "speedbar") ("20.8" "sql"))
|
||||
"For internal use by custom.")
|
||||
|
||||
(provide 'cus-load)
|
||||
|
|
|
@ -335,7 +335,7 @@
|
|||
"highlight the current line"
|
||||
(faces frames emulation))
|
||||
("ibuf-ext.el"
|
||||
"extensions for ibuffer"
|
||||
"extensions for ibuffer "
|
||||
(buffer convenience))
|
||||
("ibuf-macs.el"
|
||||
"macros for ibuffer"
|
||||
|
@ -868,303 +868,6 @@
|
|||
("calcsel2.el"
|
||||
"selection functions for Calc"
|
||||
nil)
|
||||
("binhex.el"
|
||||
"elisp native binhex decode"
|
||||
(binhex news))
|
||||
("earcon.el"
|
||||
"sound effects for messages"
|
||||
nil)
|
||||
("flow-fill.el"
|
||||
"interprete RFC2646 \"flowed\" text"
|
||||
(mail))
|
||||
("format-spec.el"
|
||||
"functions for formatting arbitrary formatting strings"
|
||||
(tools))
|
||||
("gnus-agent.el"
|
||||
"unplugged support for Gnus"
|
||||
nil)
|
||||
("gnus-art.el"
|
||||
"article mode commands for Gnus"
|
||||
(news))
|
||||
("gnus-async.el"
|
||||
"asynchronous support for Gnus"
|
||||
(news))
|
||||
("gnus-audio.el"
|
||||
"sound effects for Gnus"
|
||||
(news mail multimedia))
|
||||
("gnus-bcklg.el"
|
||||
"backlog functions for Gnus"
|
||||
(news))
|
||||
("gnus-cache.el"
|
||||
"cache interface for Gnus"
|
||||
(news))
|
||||
("gnus-cite.el"
|
||||
"parse citations in articles for Gnus"
|
||||
nil)
|
||||
("gnus-cus.el"
|
||||
"customization commands for Gnus"
|
||||
(news))
|
||||
("gnus-demon.el"
|
||||
"daemonic Gnus behaviour"
|
||||
(news))
|
||||
("gnus-draft.el"
|
||||
"draft message support for Gnus"
|
||||
(news))
|
||||
("gnus-dup.el"
|
||||
"suppression of duplicate articles in Gnus"
|
||||
(news))
|
||||
("gnus-eform.el"
|
||||
"a mode for editing forms for Gnus"
|
||||
(news))
|
||||
("gnus-ems.el"
|
||||
"functions for making Gnus work under different Emacsen"
|
||||
(news))
|
||||
("gnus-gl.el"
|
||||
"an interface to GroupLens for Gnus"
|
||||
(news score))
|
||||
("gnus-group.el"
|
||||
"group mode commands for Gnus"
|
||||
(news))
|
||||
("gnus-int.el"
|
||||
"backend interface functions for Gnus"
|
||||
(news))
|
||||
("gnus-kill.el"
|
||||
"kill commands for Gnus"
|
||||
(news))
|
||||
("gnus-logic.el"
|
||||
"advanced scoring code for Gnus"
|
||||
(news))
|
||||
("gnus-mh.el"
|
||||
"mh-e interface for Gnus"
|
||||
(news))
|
||||
("gnus-ml.el"
|
||||
"mailing list minor mode for Gnus"
|
||||
(news))
|
||||
("gnus-mlspl.el"
|
||||
"a group params-based mail splitting mechanism"
|
||||
(news mail))
|
||||
("gnus-move.el"
|
||||
"commands for moving Gnus from one server to another"
|
||||
(news))
|
||||
("gnus-msg.el"
|
||||
"mail and post interface for Gnus"
|
||||
(news))
|
||||
("gnus-mule.el"
|
||||
"provide backward compatibility function to GNUS"
|
||||
(news i18n))
|
||||
("gnus-nocem.el"
|
||||
"NoCeM pseudo-cancellation treatment"
|
||||
(news))
|
||||
("gnus-range.el"
|
||||
"range and sequence functions for Gnus"
|
||||
(news))
|
||||
("gnus-salt.el"
|
||||
"alternate summary mode interfaces for Gnus"
|
||||
(news))
|
||||
("gnus-score.el"
|
||||
"scoring code for Gnus"
|
||||
(news))
|
||||
("gnus-setup.el"
|
||||
"initialization & setup for Gnus 5"
|
||||
(news))
|
||||
("gnus-soup.el"
|
||||
"SOUP packet writing support for Gnus"
|
||||
(news mail))
|
||||
("gnus-spec.el"
|
||||
"format spec functions for Gnus"
|
||||
(news))
|
||||
("gnus-srvr.el"
|
||||
"virtual server support for Gnus"
|
||||
(news))
|
||||
("gnus-start.el"
|
||||
"startup functions for Gnus"
|
||||
(news))
|
||||
("gnus-sum.el"
|
||||
"summary mode commands for Gnus"
|
||||
(news))
|
||||
("gnus-topic.el"
|
||||
"a folding minor mode for Gnus group buffers"
|
||||
(news))
|
||||
("gnus-undo.el"
|
||||
"minor mode for undoing in Gnus"
|
||||
(news))
|
||||
("gnus-util.el"
|
||||
"utility functions for Gnus"
|
||||
(news))
|
||||
("gnus-uu.el"
|
||||
"extract (uu)encoded files in Gnus"
|
||||
nil)
|
||||
("gnus-vm.el"
|
||||
"vm interface for Gnus"
|
||||
(news mail))
|
||||
("gnus-win.el"
|
||||
"window configuration functions for Gnus"
|
||||
(news))
|
||||
("gnus.el"
|
||||
"a newsreader for GNU Emacs"
|
||||
(news mail))
|
||||
("ietf-drums.el"
|
||||
"functions for parsing RFC822bis headers"
|
||||
nil)
|
||||
("imap.el"
|
||||
"imap library"
|
||||
(mail))
|
||||
("mail-parse.el"
|
||||
"interface functions for parsing mail"
|
||||
nil)
|
||||
("mail-prsvr.el"
|
||||
"interface variables for parsing mail"
|
||||
nil)
|
||||
("mail-source.el"
|
||||
"functions for fetching mail"
|
||||
(news mail))
|
||||
("mailcap.el"
|
||||
"MIME media types configuration"
|
||||
(news mail multimedia))
|
||||
("message.el"
|
||||
"composing mail and news messages"
|
||||
(mail news))
|
||||
("messcompat.el"
|
||||
"making message mode compatible with mail mode"
|
||||
(mail news))
|
||||
("mm-bodies.el"
|
||||
"functions for decoding MIME things"
|
||||
nil)
|
||||
("mm-decode.el"
|
||||
"functions for decoding MIME things"
|
||||
nil)
|
||||
("mm-encode.el"
|
||||
"functions for encoding MIME things "
|
||||
nil)
|
||||
("mm-partial.el"
|
||||
"showing message/partial"
|
||||
(message partial))
|
||||
("mm-util.el"
|
||||
"Utility functions for Mule and low level things"
|
||||
nil)
|
||||
("mm-uu.el"
|
||||
"return uu stuff as mm handles"
|
||||
(postscript uudecode binhex shar forward news))
|
||||
("mm-view.el"
|
||||
"functions for viewing MIME objects"
|
||||
nil)
|
||||
("mml.el"
|
||||
"package for parsing and validating MML documents"
|
||||
nil)
|
||||
("nnagent.el"
|
||||
"offline backend for Gnus"
|
||||
(news mail))
|
||||
("nnbabyl.el"
|
||||
"rmail mbox access for Gnus"
|
||||
(news mail))
|
||||
("nndir.el"
|
||||
"single directory newsgroup access for Gnus"
|
||||
(news))
|
||||
("nndoc.el"
|
||||
"single file access for Gnus"
|
||||
(news))
|
||||
("nndraft.el"
|
||||
"draft article access for Gnus"
|
||||
(news))
|
||||
("nneething.el"
|
||||
"arbitrary file access for Gnus"
|
||||
(news mail))
|
||||
("nnfolder.el"
|
||||
"mail folder access for Gnus"
|
||||
(mail))
|
||||
("nngateway.el"
|
||||
"posting news via mail gateways"
|
||||
(news mail))
|
||||
("nnheader.el"
|
||||
"header access macros for Gnus and its backends"
|
||||
(news))
|
||||
("nnimap.el"
|
||||
"imap backend for Gnus"
|
||||
(mail))
|
||||
("nnkiboze.el"
|
||||
"select virtual news access for Gnus"
|
||||
(news))
|
||||
("nnlistserv.el"
|
||||
"retrieving articles via web mailing list archives"
|
||||
(news mail))
|
||||
("nnmail.el"
|
||||
"mail support functions for the Gnus mail backends"
|
||||
(news mail))
|
||||
("nnmbox.el"
|
||||
"mail mbox access for Gnus"
|
||||
(news mail))
|
||||
("nnmh.el"
|
||||
"mhspool access for Gnus"
|
||||
(news mail))
|
||||
("nnml.el"
|
||||
"mail spool access for Gnus"
|
||||
(news mail))
|
||||
("nnoo.el"
|
||||
"OO Gnus Backends"
|
||||
(news))
|
||||
("nnslashdot.el"
|
||||
"interfacing with Slashdot"
|
||||
(news))
|
||||
("nnsoup.el"
|
||||
"SOUP access for Gnus"
|
||||
(news mail))
|
||||
("nnspool.el"
|
||||
"spool access for GNU Emacs"
|
||||
(news))
|
||||
("nntp.el"
|
||||
"nntp access for Gnus"
|
||||
(news))
|
||||
("nnultimate.el"
|
||||
"interfacing with the Ultimate Bulletin Board system"
|
||||
(news))
|
||||
("nnvirtual.el"
|
||||
"virtual newsgroups access for Gnus"
|
||||
(news))
|
||||
("nnwarchive.el"
|
||||
"interfacing with web archives"
|
||||
(news egroups mail-archive))
|
||||
("nnweb.el"
|
||||
"retrieving articles via web search engines"
|
||||
(news))
|
||||
("pop3.el"
|
||||
"Post Office Protocol (RFC 1460) interface"
|
||||
(mail))
|
||||
("qp.el"
|
||||
"Quoted-Printable functions"
|
||||
(mail extensions))
|
||||
("rfc1843.el"
|
||||
"HZ (rfc1843) decoding"
|
||||
(news hz hz+ mail i18n))
|
||||
("rfc2045.el"
|
||||
"functions for decoding rfc2045 headers"
|
||||
nil)
|
||||
("rfc2047.el"
|
||||
"functions for encoding and decoding rfc2047 messages"
|
||||
nil)
|
||||
("rfc2104.el"
|
||||
"RFC2104 Hashed Message Authentication Codes"
|
||||
(mail))
|
||||
("rfc2231.el"
|
||||
"functions for decoding rfc2231 headers"
|
||||
nil)
|
||||
("score-mode.el"
|
||||
"mode for editing Gnus score files"
|
||||
(news mail))
|
||||
("smiley-ems.el"
|
||||
"displaying smiley faces"
|
||||
(news mail multimedia))
|
||||
("starttls.el"
|
||||
"STARTTLS functions"
|
||||
(tls ssl openssl mail news))
|
||||
("utf7.el"
|
||||
"UTF-7 encoding/decoding for Emacs"
|
||||
(mail))
|
||||
("uudecode.el"
|
||||
"elisp native uudecode"
|
||||
(uudecode news))
|
||||
("webmail.el"
|
||||
"interface of web mail"
|
||||
(hotmail netaddress my-deja netscape))
|
||||
("appt.el"
|
||||
"appointment notification functions"
|
||||
(calendar))
|
||||
|
@ -1540,6 +1243,303 @@
|
|||
("eshell.el"
|
||||
"the Emacs command shell"
|
||||
(processes))
|
||||
("binhex.el"
|
||||
"elisp native binhex decode"
|
||||
(binhex news))
|
||||
("earcon.el"
|
||||
"sound effects for messages"
|
||||
nil)
|
||||
("flow-fill.el"
|
||||
"interprete RFC2646 \"flowed\" text"
|
||||
(mail))
|
||||
("format-spec.el"
|
||||
"functions for formatting arbitrary formatting strings"
|
||||
(tools))
|
||||
("gnus-agent.el"
|
||||
"unplugged support for Gnus"
|
||||
nil)
|
||||
("gnus-art.el"
|
||||
"article mode commands for Gnus"
|
||||
(news))
|
||||
("gnus-async.el"
|
||||
"asynchronous support for Gnus"
|
||||
(news))
|
||||
("gnus-audio.el"
|
||||
"sound effects for Gnus"
|
||||
(news mail multimedia))
|
||||
("gnus-bcklg.el"
|
||||
"backlog functions for Gnus"
|
||||
(news))
|
||||
("gnus-cache.el"
|
||||
"cache interface for Gnus"
|
||||
(news))
|
||||
("gnus-cite.el"
|
||||
"parse citations in articles for Gnus"
|
||||
nil)
|
||||
("gnus-cus.el"
|
||||
"customization commands for Gnus"
|
||||
(news))
|
||||
("gnus-demon.el"
|
||||
"daemonic Gnus behaviour"
|
||||
(news))
|
||||
("gnus-draft.el"
|
||||
"draft message support for Gnus"
|
||||
(news))
|
||||
("gnus-dup.el"
|
||||
"suppression of duplicate articles in Gnus"
|
||||
(news))
|
||||
("gnus-eform.el"
|
||||
"a mode for editing forms for Gnus"
|
||||
(news))
|
||||
("gnus-ems.el"
|
||||
"functions for making Gnus work under different Emacsen"
|
||||
(news))
|
||||
("gnus-gl.el"
|
||||
"an interface to GroupLens for Gnus"
|
||||
(news score))
|
||||
("gnus-group.el"
|
||||
"group mode commands for Gnus"
|
||||
(news))
|
||||
("gnus-int.el"
|
||||
"backend interface functions for Gnus"
|
||||
(news))
|
||||
("gnus-kill.el"
|
||||
"kill commands for Gnus"
|
||||
(news))
|
||||
("gnus-logic.el"
|
||||
"advanced scoring code for Gnus"
|
||||
(news))
|
||||
("gnus-mh.el"
|
||||
"mh-e interface for Gnus"
|
||||
(news))
|
||||
("gnus-ml.el"
|
||||
"mailing list minor mode for Gnus"
|
||||
(news))
|
||||
("gnus-mlspl.el"
|
||||
"a group params-based mail splitting mechanism"
|
||||
(news mail))
|
||||
("gnus-move.el"
|
||||
"commands for moving Gnus from one server to another"
|
||||
(news))
|
||||
("gnus-msg.el"
|
||||
"mail and post interface for Gnus"
|
||||
(news))
|
||||
("gnus-mule.el"
|
||||
"provide backward compatibility function to GNUS"
|
||||
(news i18n))
|
||||
("gnus-nocem.el"
|
||||
"NoCeM pseudo-cancellation treatment"
|
||||
(news))
|
||||
("gnus-range.el"
|
||||
"range and sequence functions for Gnus"
|
||||
(news))
|
||||
("gnus-salt.el"
|
||||
"alternate summary mode interfaces for Gnus"
|
||||
(news))
|
||||
("gnus-score.el"
|
||||
"scoring code for Gnus"
|
||||
(news))
|
||||
("gnus-setup.el"
|
||||
"initialization & setup for Gnus 5"
|
||||
(news))
|
||||
("gnus-soup.el"
|
||||
"SOUP packet writing support for Gnus"
|
||||
(news mail))
|
||||
("gnus-spec.el"
|
||||
"format spec functions for Gnus"
|
||||
(news))
|
||||
("gnus-srvr.el"
|
||||
"virtual server support for Gnus"
|
||||
(news))
|
||||
("gnus-start.el"
|
||||
"startup functions for Gnus"
|
||||
(news))
|
||||
("gnus-sum.el"
|
||||
"summary mode commands for Gnus"
|
||||
(news))
|
||||
("gnus-topic.el"
|
||||
"a folding minor mode for Gnus group buffers"
|
||||
(news))
|
||||
("gnus-undo.el"
|
||||
"minor mode for undoing in Gnus"
|
||||
(news))
|
||||
("gnus-util.el"
|
||||
"utility functions for Gnus"
|
||||
(news))
|
||||
("gnus-uu.el"
|
||||
"extract (uu)encoded files in Gnus"
|
||||
nil)
|
||||
("gnus-vm.el"
|
||||
"vm interface for Gnus"
|
||||
(news mail))
|
||||
("gnus-win.el"
|
||||
"window configuration functions for Gnus"
|
||||
(news))
|
||||
("gnus.el"
|
||||
"a newsreader for GNU Emacs"
|
||||
(news mail))
|
||||
("ietf-drums.el"
|
||||
"functions for parsing RFC822bis headers"
|
||||
nil)
|
||||
("imap.el"
|
||||
"imap library"
|
||||
(mail))
|
||||
("mail-parse.el"
|
||||
"interface functions for parsing mail"
|
||||
nil)
|
||||
("mail-prsvr.el"
|
||||
"interface variables for parsing mail"
|
||||
nil)
|
||||
("mail-source.el"
|
||||
"functions for fetching mail"
|
||||
(news mail))
|
||||
("mailcap.el"
|
||||
"MIME media types configuration"
|
||||
(news mail multimedia))
|
||||
("message.el"
|
||||
"composing mail and news messages"
|
||||
(mail news))
|
||||
("messcompat.el"
|
||||
"making message mode compatible with mail mode"
|
||||
(mail news))
|
||||
("mm-bodies.el"
|
||||
"functions for decoding MIME things"
|
||||
nil)
|
||||
("mm-decode.el"
|
||||
"functions for decoding MIME things"
|
||||
nil)
|
||||
("mm-encode.el"
|
||||
"functions for encoding MIME things "
|
||||
nil)
|
||||
("mm-partial.el"
|
||||
"showing message/partial"
|
||||
(message partial))
|
||||
("mm-util.el"
|
||||
"Utility functions for Mule and low level things"
|
||||
nil)
|
||||
("mm-uu.el"
|
||||
"return uu stuff as mm handles"
|
||||
(postscript uudecode binhex shar forward news))
|
||||
("mm-view.el"
|
||||
"functions for viewing MIME objects"
|
||||
nil)
|
||||
("mml.el"
|
||||
"package for parsing and validating MML documents"
|
||||
nil)
|
||||
("nnagent.el"
|
||||
"offline backend for Gnus"
|
||||
(news mail))
|
||||
("nnbabyl.el"
|
||||
"rmail mbox access for Gnus"
|
||||
(news mail))
|
||||
("nndir.el"
|
||||
"single directory newsgroup access for Gnus"
|
||||
(news))
|
||||
("nndoc.el"
|
||||
"single file access for Gnus"
|
||||
(news))
|
||||
("nndraft.el"
|
||||
"draft article access for Gnus"
|
||||
(news))
|
||||
("nneething.el"
|
||||
"arbitrary file access for Gnus"
|
||||
(news mail))
|
||||
("nnfolder.el"
|
||||
"mail folder access for Gnus"
|
||||
(mail))
|
||||
("nngateway.el"
|
||||
"posting news via mail gateways"
|
||||
(news mail))
|
||||
("nnheader.el"
|
||||
"header access macros for Gnus and its backends"
|
||||
(news))
|
||||
("nnimap.el"
|
||||
"imap backend for Gnus"
|
||||
(mail))
|
||||
("nnkiboze.el"
|
||||
"select virtual news access for Gnus"
|
||||
(news))
|
||||
("nnlistserv.el"
|
||||
"retrieving articles via web mailing list archives"
|
||||
(news mail))
|
||||
("nnmail.el"
|
||||
"mail support functions for the Gnus mail backends"
|
||||
(news mail))
|
||||
("nnmbox.el"
|
||||
"mail mbox access for Gnus"
|
||||
(news mail))
|
||||
("nnmh.el"
|
||||
"mhspool access for Gnus"
|
||||
(news mail))
|
||||
("nnml.el"
|
||||
"mail spool access for Gnus"
|
||||
(news mail))
|
||||
("nnoo.el"
|
||||
"OO Gnus Backends"
|
||||
(news))
|
||||
("nnslashdot.el"
|
||||
"interfacing with Slashdot"
|
||||
(news))
|
||||
("nnsoup.el"
|
||||
"SOUP access for Gnus"
|
||||
(news mail))
|
||||
("nnspool.el"
|
||||
"spool access for GNU Emacs"
|
||||
(news))
|
||||
("nntp.el"
|
||||
"nntp access for Gnus"
|
||||
(news))
|
||||
("nnultimate.el"
|
||||
"interfacing with the Ultimate Bulletin Board system"
|
||||
(news))
|
||||
("nnvirtual.el"
|
||||
"virtual newsgroups access for Gnus"
|
||||
(news))
|
||||
("nnwarchive.el"
|
||||
"interfacing with web archives"
|
||||
(news egroups mail-archive))
|
||||
("nnweb.el"
|
||||
"retrieving articles via web search engines"
|
||||
(news))
|
||||
("pop3.el"
|
||||
"Post Office Protocol (RFC 1460) interface"
|
||||
(mail))
|
||||
("qp.el"
|
||||
"Quoted-Printable functions"
|
||||
(mail extensions))
|
||||
("rfc1843.el"
|
||||
"HZ (rfc1843) decoding"
|
||||
(news hz hz+ mail i18n))
|
||||
("rfc2045.el"
|
||||
"functions for decoding rfc2045 headers"
|
||||
nil)
|
||||
("rfc2047.el"
|
||||
"functions for encoding and decoding rfc2047 messages"
|
||||
nil)
|
||||
("rfc2104.el"
|
||||
"RFC2104 Hashed Message Authentication Codes"
|
||||
(mail))
|
||||
("rfc2231.el"
|
||||
"functions for decoding rfc2231 headers"
|
||||
nil)
|
||||
("score-mode.el"
|
||||
"mode for editing Gnus score files"
|
||||
(news mail))
|
||||
("smiley-ems.el"
|
||||
"displaying smiley faces"
|
||||
(news mail multimedia))
|
||||
("starttls.el"
|
||||
"STARTTLS functions"
|
||||
(tls ssl openssl mail news))
|
||||
("utf7.el"
|
||||
"UTF-7 encoding/decoding for Emacs"
|
||||
(mail))
|
||||
("uudecode.el"
|
||||
"elisp native uudecode"
|
||||
(uudecode news))
|
||||
("webmail.el"
|
||||
"interface of web mail"
|
||||
(hotmail netaddress my-deja netscape))
|
||||
("ccl.el"
|
||||
"CCL (Code Conversion Language) compiler"
|
||||
(ccl mule multilingual character set coding-system))
|
||||
|
@ -1649,7 +1649,7 @@
|
|||
"translation of untranslatable utf-8 to CJK"
|
||||
(i18n))
|
||||
("utf-8.el"
|
||||
"Limited UTF-8 decoding/encoding support"
|
||||
"limited UTF-8 decoding/encoding support"
|
||||
(multilingual unicode utf-8 i18n))
|
||||
("china-util.el"
|
||||
"utilities for Chinese"
|
||||
|
@ -1897,6 +1897,9 @@
|
|||
("net-utils.el"
|
||||
"network functions"
|
||||
(network comm))
|
||||
("netrc.el"
|
||||
".netrc parsing functionality"
|
||||
(news))
|
||||
("quickurl.el"
|
||||
"insert an URL based on text at point in buffer"
|
||||
(hypermedia))
|
||||
|
@ -2308,9 +2311,6 @@
|
|||
("underline.el"
|
||||
"insert/remove underlining (done by overstriking) in Emacs"
|
||||
(wp))
|
||||
("xml-lite.el"
|
||||
"an indentation-engine for XML"
|
||||
(xml))
|
||||
("tool-bar.el"
|
||||
"setting up the tool bar"
|
||||
(mouse frames))
|
||||
|
|
229
lisp/loaddefs.el
229
lisp/loaddefs.el
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
|||
|
||||
;; Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Andrew Choi <akochoi@i-cable.com>
|
||||
;; Author: Andrew Choi <akochoi@mac.com>
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
|||
;; X Window emulation in macterm.c is not complete enough to start a
|
||||
;; frame without a minibuffer properly. Call this to tell ediff
|
||||
;; library to use a single frame.
|
||||
(ediff-toggle-multiframe)
|
||||
; (ediff-toggle-multiframe)
|
||||
|
||||
;; Setup to use the Mac clipboard. The functions mac-cut-function and
|
||||
;; mac-paste-function are defined in mac.c.
|
||||
|
@ -215,6 +215,16 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
|
|||
;; big5 or sjis
|
||||
(setq file-name-coding-system 'mac-roman)
|
||||
|
||||
;; If Emacs is started from the Finder, change the default directory
|
||||
;; to the user's home directory.
|
||||
(if (string= default-directory "/")
|
||||
(cd "~"))
|
||||
|
||||
;; Tell Emacs to use pipes instead of pty's for processes because the
|
||||
;; latter sometimes lose characters. Pty support is compiled in since
|
||||
;; ange-ftp will not work without it.
|
||||
(setq process-connection-type nil)
|
||||
|
||||
;; (prefer-coding-system 'mac-roman)
|
||||
|
||||
;;
|
||||
|
|
133
mac/ChangeLog
133
mac/ChangeLog
|
@ -1,3 +1,136 @@
|
|||
2002-04-13 Andrew Choi <akochoi@shaw.ca>
|
||||
|
||||
* Emacs.app/Contents/Info.plist: New file.
|
||||
|
||||
* Emacs.app/Contents/PkgInfo: New file.
|
||||
|
||||
* Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings:
|
||||
New file.
|
||||
|
||||
* cw5-mcp.xml: Remove file.
|
||||
|
||||
* inc/defs-cw5.h: Remove file.
|
||||
|
||||
* cw6-mcp.xml: Update with new version.
|
||||
|
||||
* mac/inc/defs-cw6.h: New constant MAC_OS8. Remove definition
|
||||
of constant CODEWARRIOR_VERSION_6.
|
||||
|
||||
* mac/src/mac.c:
|
||||
* mac/src/macmenu.c:
|
||||
* mac/src/macterm.c:
|
||||
Test constant __MSL__ instead of CODEWARRIOR_VERSION_6.
|
||||
|
||||
* src/Carbon.r: New File.
|
||||
|
||||
* makefile.MPW: Define MAC_OS and MAC_OS8. Update with change of
|
||||
locations for mac.c, macfns.c, macgui.h, macmenu.c, macterm.c, and
|
||||
macterm.h. Generate DOC from .el instead of .elc versions of
|
||||
files listed in DONTCOMPILE in lisp/Makefile.in.
|
||||
|
||||
* INSTALL: Add installation instructions for Mac OS X.
|
||||
|
||||
* README: Add information for Mac OS X.
|
||||
|
||||
* src/mac.c, inc/macgui.h, src/macfns.c, src/macmenu.c,
|
||||
src/macterm.c, inc/macterm.h: Remove from here and move to src.
|
||||
|
||||
2002-04-12 Andrew Choi <akochoi@shaw.ca>
|
||||
|
||||
* src/mac.c (select): Under Carbon, always return true so
|
||||
XTread_socket is called to poll input.
|
||||
(run_mac_command): Not implemented under Carbon.
|
||||
(get_wd): Call PBHGetVolSync and path_from_vol_dir_name to
|
||||
establish pathname.
|
||||
(do_applescript): Use Carbon routines AEGetDescDatASize and
|
||||
AEGetDescData.
|
||||
(Fmac_paste_function): Use Carbon routines GetCurrentScrap,
|
||||
GetScrapFlavorFlags, GetScrapFlavorSize, and GetScrapFlavorData.
|
||||
(Fmac_cut_function): Use Carbon routines ClearCurrentScrap,
|
||||
GetCurrentScrap, and PutScrapFlavor.
|
||||
(Fx_selection_exists_p): Use Carbon routines GetCurrentScrap and
|
||||
GetScrapFlavorFlags.
|
||||
|
||||
* src/macfns.c: Synchronize with changes in w32fns.c.
|
||||
[MAC_OSX]: Include Carbon headers.
|
||||
(x_real_positions): Use Carbon routine GetWindowPortBounds.
|
||||
(x_set_scroll_bar_width): Set width of scroll bar to 16.
|
||||
(x_make_gc): Remove static qualifier.
|
||||
|
||||
* src/macmenu.c: Synchronize with changes in w32menu.c.
|
||||
[MAC_OSX]: Include Carbon headers.
|
||||
(set_frame_menubar): Check equality of vector representation of
|
||||
scroll bars using Fequal instead of EQ.
|
||||
(mac_menu_show): Use Carbon routine GetWindowPort.
|
||||
(mac_dialog): Likewise.
|
||||
(add_menu_item): Use Carbon routines CountMenuItems,
|
||||
EnableMenuItem, and DisableMenuItem.
|
||||
|
||||
* src/macterm.c: Synchronize with changes in w32term.c.
|
||||
[MAC_OSX]: Include Carbon headers.
|
||||
(XDrawLine): Use Carbon routine GetWindowPort.
|
||||
(XClearArea): Likewise.
|
||||
(XClearWindow): Use Carbon routines GetWindowPort and
|
||||
GetWindowPortBounds.
|
||||
(mac_draw_bitmap): Use Carbon routines GetWindowPort and
|
||||
GetPortPixMap.
|
||||
(mac_set_clip_rectangle): Use Carbon routine GetWindowPort.
|
||||
(mac_reset_clipping): Use Carbon routine GetWindowPort.
|
||||
(XFillRectangle): Likewise.
|
||||
(mac_draw_rectangle): Likewise.
|
||||
(mac_draw_rectangle_to_pixmap): Likewise.
|
||||
(mac_draw_string_common): Likewise.
|
||||
(mac_copy_area): Use Carbon routines GetWindowPort and
|
||||
GetPortPixMap.
|
||||
(mac_scroll_area): Use Carbon routines GetWindowPort and
|
||||
GetQDGlobalsScreenBits.
|
||||
(x_flush): Call Carbon routine QDFlushPortBuffer.
|
||||
(x_update_end): Use Carbon routine GetWindowPort; call x_flush.
|
||||
(x_draw_fringe_bitmap): Call mac_reset_clipping before returning.
|
||||
(x_draw_image_glyph_string): Likewise.
|
||||
(x_draw_stretch_glyph_string): Likewise.
|
||||
(construct_mouse_click): Call Carbon routine GetWindowPort.
|
||||
(note_mouse_movement): Call Carbon routine GetWindowPortBounds.
|
||||
(XTmouse_position): Call Carbon routine GetWindowPort.
|
||||
(x_scroll_bar_create): Create scroll bar with proc
|
||||
kControlScrollBarProc.
|
||||
(XTset_vertical_scroll_bar) [MAC_OSX]: Set width to 16.
|
||||
(activate_scroll_bar): Call ActivateControl instead of
|
||||
SetControlMaximum.
|
||||
(deactivate_scroll_bar): Call DeactivateControl instead of
|
||||
SetControlMaximum.
|
||||
(x_scroll_bar_handle_click): Use default case for scroll
|
||||
indicator.
|
||||
(x_scroll_bar_report_motion): Call Carbon routine GetWindowPort.
|
||||
(x_calc_absolute_position): Call Carbon routines GetWindowPort and
|
||||
GetWindowPortBounds.
|
||||
(init_font_name_table): Call Carbon Font Manager routines to
|
||||
iterate through all fonts.
|
||||
(XLoadQueryFont): Call Carbon routines GetPortTextFont,
|
||||
GetPortTextSize, and GetPortTextFace.
|
||||
(do_init_managers): Do not initialize Mac Toolbox under Carbon.
|
||||
(is_emacs_window): New function to filter out non-Emacs windows
|
||||
passed back by WaitNextEvent.
|
||||
(do_mouse_moved): Call Carbon routine GetWindowPort.
|
||||
(do_apple_menu): No apple menu handler under Carbon.
|
||||
(do_zoom_window): Call Carbon routines GetWindowPort,
|
||||
GetQDGlobalsScreenBits, SetWindowStandardState, and
|
||||
GetWindowPortBounds.
|
||||
(init_required_apple_events): Use UPP procedure type converter.
|
||||
(main): Don't define for Carbon version.
|
||||
(XTread_socket): Don't check interrupt_input_blocked. Don't call
|
||||
check_alarm. Call Carbon routines GetWindowPort,
|
||||
GetQDGlobalScreenBits, GetWindowPortBounds, and InvalWindowRect.
|
||||
(NewMacWindow): Set making_terminal_window to 0. Call Carbon
|
||||
routine GetWindowPort.
|
||||
(mac_initialize): Rename from x_initialize. Use new Doc string
|
||||
format.
|
||||
|
||||
* inc/macterm.h: Synchronize with changes in w32term.h.
|
||||
|
||||
* inc/macgui.h [MAC_OSX]: Use OpaqueWindowPtr* instead of
|
||||
WindowPtr.
|
||||
|
||||
2002-01-28 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* src/macterm.c (x_erase_phys_cursor): Don't erase cursor if
|
||||
|
|
18
mac/Emacs.app/Contents/Info.plist
Normal file
18
mac/Emacs.app/Contents/Info.plist
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Emacs</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1</string>
|
||||
</dict>
|
||||
</plist>
|
1
mac/Emacs.app/Contents/PkgInfo
Normal file
1
mac/Emacs.app/Contents/PkgInfo
Normal file
|
@ -0,0 +1 @@
|
|||
APPL????
|
BIN
mac/Emacs.app/Contents/Resources/Emacs.rsrc
Normal file
BIN
mac/Emacs.app/Contents/Resources/Emacs.rsrc
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
|
@ -0,0 +1,5 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
||||
CFBundleName = "Emacs";
|
||||
CFBundleShortVersionString = "Emacs version 21";
|
||||
CFBundleGetInfoString = "Emacs version 21, Copyright 2002 FSF.";
|
174
mac/INSTALL
174
mac/INSTALL
|
@ -1,6 +1,6 @@
|
|||
* BUILDING EMACS ON THE MAC OS -*- outline -*-
|
||||
* BUILDING EMACS ON MAC OS 8/9 AND MAC OS X -*- outline -*-
|
||||
|
||||
Copyright (c) 2001 Free Software Foundation, Inc.
|
||||
Copyright (c) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to anyone to make or distribute verbatim
|
||||
copies of this document as received, in any medium, provided that
|
||||
|
@ -13,38 +13,124 @@ Copyright (c) 2001 Free Software Foundation, Inc.
|
|||
provided also that they carry prominent notices stating who last
|
||||
changed them.
|
||||
|
||||
You can use either Metrowerks CodeWarrior Pro 5 or 6 or MPW-GM
|
||||
(Aug. 2000) to build Emacs.
|
||||
* BUILDING EMACS ON MAC OS X
|
||||
|
||||
You will need MPW-GM to build the make-docfile utility and to generate
|
||||
the doc string file DOC.
|
||||
You should be able to build Emacs on Mac OS X by typing the following
|
||||
commands at the top-level directory after the source distribution is
|
||||
un-tarred.
|
||||
|
||||
To decompress files, you can use MacGzip from
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
http://persephone.cps.unizar.es/~spd/gzip
|
||||
The last step must be performed as root.
|
||||
|
||||
and to untar them, you can use tar 4.0 from
|
||||
If you have X Window installed, you need to type `./configure
|
||||
--without-x' instead of `./configure'.
|
||||
|
||||
http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/tar-40b.hqx
|
||||
You can type `make bootstrap' instead of `make' to rebuild everything,
|
||||
including byte-compiling the Lisp files.
|
||||
|
||||
(Optional) If you wish to fetch files from the Emacs CVS repository
|
||||
directly to your Mac, you can use the CVS client MacCVS, which can be
|
||||
downloaded from
|
||||
If you have not installed the GNU texinfo package on your system, the
|
||||
build will complain that makeinfo cannot be found. Instructions for
|
||||
installing the GNU texinfo package are given below. Alternatively,
|
||||
you can type `make -k' instead of `make' and safely ignore the error
|
||||
messages and use the existing info files.
|
||||
|
||||
http://www.wincvs.org/
|
||||
After Emacs is installed, you can run it by typing `emacs -nw' from a
|
||||
terminal (make sure your path contains /usr/local/bin) or by
|
||||
double-clicking on mac/Emacs.app in the Finder. At present,
|
||||
command-line options cannot be passed to Emacs running under the Aqua
|
||||
GUI. This should soon be fixed.
|
||||
|
||||
To use colors in a terminal, put the following lines in the file
|
||||
~/.termcap and log in again.
|
||||
|
||||
-----
|
||||
# added ANSI color
|
||||
vt100|vt100-am|vt100am|dec vt100:\
|
||||
:pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[m:AF=\E[3%dm:AB=\E[4%dm:\
|
||||
:do=^J:co#80:li#24:cl=\E[;H\E[2J:sf=2*\ED:\
|
||||
:le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
|
||||
:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
|
||||
:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\
|
||||
:rf=/usr/share/tabset/vt100:\
|
||||
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[;r\E[0m\E(B\E)B\E[2J:\
|
||||
:ks=\E[?1h\E=:ke=\E[?1l\E>:\
|
||||
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
|
||||
:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\
|
||||
:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
|
||||
-----
|
||||
|
||||
To build a binary distribution of Emacs for Mac OS X, run the shell
|
||||
script make-bin-dist in the `mac' directory. This will create a file
|
||||
emacs-21.xx.yy-mac-bin.tar.gz.
|
||||
|
||||
To install the binary distribution, untar the file and run the shell
|
||||
script osx-install in its top-level directory.
|
||||
|
||||
To build the `info' files, you need to install the texinfo software.
|
||||
|
||||
To install from source, obtain texinfo-4.2.tar.gz from ftp.gnu.org or
|
||||
a mirror. Un-tar it, enter its directory and type
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
The last step needs to be performed as root.
|
||||
|
||||
You may also like to install ispell, which will allow you to use
|
||||
ispell and flyspell-mode. To install ispell from source, you first
|
||||
need to install GNU textutils.
|
||||
|
||||
To do so, download textutils-2.0.tar.gz from ftp.gnu.org or a mirror.
|
||||
Un-tar it, enter its directory, type
|
||||
|
||||
./configure --host=powerpc-apple-bsd
|
||||
make
|
||||
make install
|
||||
|
||||
Again, the last step needs to be performed as root. Note that if you
|
||||
run `make check', the test for `pr' will fail.
|
||||
|
||||
Get and un-tar ispell-3.2.06.tar.gz. Look for it here:
|
||||
|
||||
http://fmg-www.cs.ucla.edu/geoff/ispell.html
|
||||
|
||||
Go into its directory, type
|
||||
|
||||
cp local.h.samp local.h
|
||||
|
||||
Add a line `#define TERMLIB ""' to the end of local.h.
|
||||
|
||||
Set the environment variable TMPDIR to an existing directory. For
|
||||
example since `/tmp' exists on my machine and I am using `bash', I
|
||||
typed
|
||||
|
||||
export TMPDIR=/tmp
|
||||
|
||||
Run `make' and `make install', the latter as root.
|
||||
|
||||
|
||||
* BUILDING EMACS ON MAC OS 8/9
|
||||
|
||||
You can use either Metrowerks CodeWarrior Pro 6 or MPW-GM (Aug. 2001)
|
||||
to build Emacs. MPW-GM can be downloaded free of charge from Apple.
|
||||
|
||||
In either case, you will need MPW-GM to build the make-docfile utility
|
||||
and to generate the doc string file DOC.
|
||||
|
||||
### IMPORTANT ### You can use StuffIf Expander to decompress and untar
|
||||
the distribution. However, you *must* set the radio button in the
|
||||
Preferences->Cross Platform->Convert text files to Macintosh format to
|
||||
"Never". Otherwise the compiled Lisp files will be corrupted.
|
||||
|
||||
(Optional) A subset of the fonts from the GNU intlfonts-1.2
|
||||
distribution converted to NFNT format can be obtained from
|
||||
|
||||
ftp://mac-emacs.sourceforge.net/pub/mac-emacs/GNU-fonts.smi.bin
|
||||
|
||||
### IMPORTANT ### If you use StuffIf Expander to decompress and untar
|
||||
the distribution, you *must* set the radio button in the
|
||||
Preferences->Cross Platform->Convert text files to Macintosh format to
|
||||
"Never". Otherwise the compiled Lisp files will be corrupted.
|
||||
|
||||
* BUILDING EMACS
|
||||
|
||||
To build Emacs in the MPW Shell, simply set the directory to
|
||||
...:emacs:mac: and build the target Emacs of the make file
|
||||
makefile.mpw. I.e., execute the commands
|
||||
|
@ -53,13 +139,11 @@ makefile.mpw. I.e., execute the commands
|
|||
Emacs.MakeScript
|
||||
|
||||
To build Emacs using CodeWarrior, start up the CodeWarrior IDE, choose
|
||||
File->Import Project... and select the file cw5-mcp.xml or
|
||||
cw6-mcp.xml, depending on which verison of CodeWarrior used. When
|
||||
File->Import Project... and select the file cw6-mcp.xml. When
|
||||
prompted to save the project, navigate to same directory as the file
|
||||
cw[56]-mcp.xml, name it emacs-cw5.mcp or emacs-cw6.mcp, and save it
|
||||
there. Then choose Project->Make. Note that this does not build the
|
||||
DOC file. To do so, use MPW and build the target "Doc" in
|
||||
makefile.MPW.
|
||||
cw6-mcp.xml, name the project emacs-cw6.mcp, and save it there. Then
|
||||
choose Project->Make. Note that this does not build the DOC file. To
|
||||
do so, use MPW and build the target "Doc" in makefile.MPW.
|
||||
|
||||
Once built, the Emacs application (Emacs CW or Emacs MPW) can be
|
||||
launched where it is created.
|
||||
|
@ -70,35 +154,29 @@ dialog. To build a version for profiling, check the Profiler
|
|||
Information box in the Emacs Settings->Code Generation->PPC Processor
|
||||
dialog and include the Profiler PPC.Lib library.
|
||||
|
||||
To build optimized or debugging version of Emacs in MPW, follow the
|
||||
comment in makefile.MPW to enable the -opt speed or -sym on option
|
||||
(see note below).
|
||||
|
||||
* NOTES
|
||||
|
||||
Emacs should build and run on a PowerMac running Mac OS 8.1 - 9.0.
|
||||
Emacs should build and run on a PowerMac running Mac OS 8.6 - 10.1.
|
||||
|
||||
You will need around 100 MB of disk space for the source files and
|
||||
intermediate files.
|
||||
|
||||
It will not run on machines with more than 256 MB of physical or
|
||||
virtual memory.
|
||||
It will not run on machines running Mac OS 8/9 with more than 256 MB
|
||||
of physical or virtual memory. It does not have this restriction when
|
||||
it is run under Mac OS X. But the usual 128MB buffer limit of a
|
||||
32-bit Emacs still exists.
|
||||
|
||||
Currently there is no support for building the LEIM directory on the
|
||||
Mac. However, it can be built on another platform and transferred to
|
||||
the Mac.
|
||||
Under Mac OS 8/9, there is no support for building the LEIM directory.
|
||||
However, it can be built on Mac OS X or another platform and
|
||||
transferred to the Mac.
|
||||
|
||||
When Emacs is built with "-opt speed" enabled in makefile.MPW,
|
||||
optimization causes the functions reset_buffer_local_variables in
|
||||
buffer.c, syms_of_lread in lread.c, and x_draw_hollow_cursor in
|
||||
macterm.c to crash. Avoid this by enclosing them in the following
|
||||
pragmas.
|
||||
On Mac OS 8/9, to use the same icon as when Emacs is built on Windows
|
||||
NT, define GNU_ICON in mac/src/Emacs.r. Currently Emacs uses a
|
||||
generic application icon on the Mac OS X. A better looking one is
|
||||
coming soon.
|
||||
|
||||
#pragma options opt off
|
||||
|
||||
<function definition...>
|
||||
Enjoy!
|
||||
|
||||
#pragma options opt reset
|
||||
|
||||
To use the same icon as when Emacs is built on Windows NT, define
|
||||
GNU_ICON in mac/src/Emacs.r.
|
||||
Andrew.
|
||||
<akochoi@mac.com>
|
||||
|
|
52
mac/README
52
mac/README
|
@ -1,6 +1,6 @@
|
|||
GNU Emacs for Mac OS
|
||||
Emacs for Mac OS 8/9 and Mac OS X
|
||||
|
||||
Copyright (c) 2001 Free Software Foundation, Inc.
|
||||
Copyright (c) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to anyone to make or distribute verbatim
|
||||
copies of this document as received, in any medium, provided that
|
||||
|
@ -13,8 +13,8 @@ Copyright (c) 2001 Free Software Foundation, Inc.
|
|||
provided also that they carry prominent notices stating who last
|
||||
changed them.
|
||||
|
||||
This directory contains the files needed to build GNU Emacs on the Mac
|
||||
OS (8.1-9.0). Many of the major features of the Unix version are
|
||||
This directory contains the files needed to build Emacs on the Mac OS
|
||||
8/9 and Mac OS X. Many of the major features of the Unix version are
|
||||
supported: multiple frames, colors, scroll bars, menu bars, use of the
|
||||
mouse, fontsets, international characters, input methods, and coding
|
||||
systems.
|
||||
|
@ -23,24 +23,42 @@ Mac OS specific support includes document drag-and-drop in the Finder,
|
|||
transfer of text to and from other applications via the clipboard, and
|
||||
sending AppleScript commands to other applications from Emacs.
|
||||
|
||||
The following are not yet supported: unexec (dump-emacs), asynchronous
|
||||
subprocesses (start-process), and networking
|
||||
(open-network-stream).
|
||||
The following are not supported on Mac OS 8/9 : unexec (dump-emacs),
|
||||
asynchronous subprocesses (start-process), and networking
|
||||
(open-network-stream). These features work fine on Mac OS X.
|
||||
|
||||
There is basic support for synchronous subprocesses (call-process)
|
||||
although Unix commands that are used will need to be ported to the
|
||||
Mac.
|
||||
There is basic support for synchronous subprocesses (call-process) on
|
||||
Mac OS 8/9 although Unix commands that are used will need to be
|
||||
ported.
|
||||
|
||||
Metrowerks CodeWarrior Pro 5 or Pro 6 or MPW-GM (August 2000) can be
|
||||
used to build Emacs on the Mac OS. See the INSTALL file in this
|
||||
directory for instructions on building Emacs.
|
||||
Metrowerks CodeWarrior Pro 6 or MPW-GM (August 2001) can be used to
|
||||
build Emacs on the Mac OS 8/9. On Mac OS X, Emacs can be built using
|
||||
the Developer Tools. See the INSTALL file in this directory for
|
||||
instructions on building Emacs.
|
||||
|
||||
Binary distributions are available in
|
||||
Binary distributions will be available in
|
||||
|
||||
ftp://ftp.gnu.org/gnu/mac/emacs/
|
||||
|
||||
At this site you can also find an FAQ related to running GNU Emacs on
|
||||
Mac OS.
|
||||
Read the Mac OS section of the on-line help to find out about how to
|
||||
use Emacs on the Mac.
|
||||
|
||||
A number of things do not work yet:
|
||||
|
||||
+ On Mac OS X, environment variables are not set up correctly when
|
||||
Emacs is started from the Finder.
|
||||
|
||||
+ Emacs does not respond correctly to C-g when it is not reading
|
||||
input.
|
||||
|
||||
+ No image support yet.
|
||||
|
||||
+ There is no mouse-2 and mouse-3 emulation yet.
|
||||
|
||||
If your Mac is connected to the Internet, report bugs by typing `M-x
|
||||
report-emacs-bug' or by choosing the entry `Send Bug Report...' in
|
||||
the `Help' menu. This will send the bug report to the address
|
||||
emacs-pretest-bug@gnu.org.
|
||||
|
||||
Andrew.
|
||||
<akochoi@i-cable.com>
|
||||
<akochoi@mac.com>
|
||||
|
|
2084
mac/cw5-mcp.xml
2084
mac/cw5-mcp.xml
File diff suppressed because it is too large
Load diff
156
mac/cw6-mcp.xml
156
mac/cw6-mcp.xml
|
@ -19,7 +19,7 @@
|
|||
02111-1307, USA.
|
||||
|
||||
|
||||
Contributed by Andrew Choi (akochoi@i-cable.com).
|
||||
Contributed by Andrew Choi (akochoi@mac.com).
|
||||
|
||||
Exported from the emacs-cw6.mcp project in Metrowerks CodeWarrior Pro
|
||||
6 for distribution. This copyright notice was then added by hand.
|
||||
|
@ -80,7 +80,7 @@
|
|||
<PROJECT>
|
||||
<TARGETLIST>
|
||||
<TARGET>
|
||||
<NAME>Emacs</NAME>
|
||||
<NAME>Emacs CW</NAME>
|
||||
<SETTINGLIST>
|
||||
|
||||
<!-- Settings for "Source Trees" panel -->
|
||||
|
@ -153,7 +153,7 @@
|
|||
<SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>
|
||||
<SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>
|
||||
<SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>
|
||||
<SETTING><NAME>Targetname</NAME><VALUE>Emacs</VALUE></SETTING>
|
||||
<SETTING><NAME>Targetname</NAME><VALUE>Emacs CW</VALUE></SETTING>
|
||||
<SETTING><NAME>OutputDirectory</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
|
@ -637,7 +637,7 @@
|
|||
<!-- Settings for "FTP Panel" panel -->
|
||||
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
|
||||
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
|
||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>3654kr6a654npes6544xbe*šA‘à"</VALUE></SETTING>
|
||||
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>35kmm835kpjgj5k5td7à</VALUE></SETTING>
|
||||
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
|
||||
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING>
|
||||
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
|
||||
|
@ -1882,367 +1882,367 @@
|
|||
</TARGETLIST>
|
||||
|
||||
<TARGETORDER>
|
||||
<ORDEREDTARGET><NAME>Emacs</NAME></ORDEREDTARGET>
|
||||
<ORDEREDTARGET><NAME>Emacs CW</NAME></ORDEREDTARGET>
|
||||
</TARGETORDER>
|
||||
|
||||
<GROUPLIST>
|
||||
<GROUP><NAME>Emacs Source</NAME>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>abbrev.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>alloc.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>alloca.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>atimer.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>buffer.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>bytecode.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>callint.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>callproc.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>casefiddle.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>casetab.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>category.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>ccl.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>charset.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>cm.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>cmds.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>coding.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>composite.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>data.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>dired.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>dispnew.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>doc.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>doprnt.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>editfns.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>emacs.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>eval.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>fileio.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>filemode.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>floatfns.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>fns.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>fontset.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>frame.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>getloadavg.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>indent.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>insdel.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>intervals.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>keyboard.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>keymap.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>lread.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>macros.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>marker.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>md5.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>minibuf.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>mktime.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>print.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>process.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>regex.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>region-cache.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>scroll.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>search.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>strftime.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>syntax.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>sysdep.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>term.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>termcap.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>textprop.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>tparam.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>undo.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>window.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xdisp.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xfaces.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
|
@ -2250,25 +2250,25 @@
|
|||
</GROUP>
|
||||
<GROUP><NAME>Mac Source</NAME>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>mac.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>macfns.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>macmenu.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>macterm.c</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
|
@ -2276,7 +2276,7 @@
|
|||
</GROUP>
|
||||
<GROUP><NAME>Resources</NAME>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>Emacs.r</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
|
@ -2284,31 +2284,31 @@
|
|||
</GROUP>
|
||||
<GROUP><NAME>Mac Libraries</NAME>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfaceLib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>MathLib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>AppleScriptLib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>TextEncodingConverter</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>AppearanceLib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
|
@ -2316,19 +2316,19 @@
|
|||
</GROUP>
|
||||
<GROUP><NAME>ANSI Libraries</NAME>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>MSL C.PPC.Lib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>MSL SIOUX.PPC.Lib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>Emacs</TARGETNAME>
|
||||
<TARGETNAME>Emacs CW</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>MSL RuntimePPC.Lib</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
|
|
|
@ -17,7 +17,7 @@ along with GNU Emacs; see the file COPYING. If not, write to the Free
|
|||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _ALLOCA_H_
|
||||
#define _ALLOCA_H_
|
||||
|
|
|
@ -20,6 +20,8 @@ along with GNU Emacs; see the file COPYING. If not, write to the
|
|||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
|
||||
/* No code in Emacs #includes config.h twice, but some of the code
|
||||
intended to work with other packages as well (like gmalloc.c)
|
||||
|
@ -567,4 +569,4 @@ extern char *getenv ();
|
|||
|
||||
/* #define GLYPH_DEBUG 1 */
|
||||
|
||||
#define NO_RETURN /* nothing */
|
||||
#define NO_RETURN /* nothing */
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
|
||||
#define emacs 1
|
||||
#define HAVE_CONFIG_H
|
|
@ -17,9 +17,10 @@ along with GNU Emacs; see the file COPYING. If not, write to the Free
|
|||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#define emacs 1
|
||||
#define HAVE_CONFIG_H
|
||||
|
||||
#define CODEWARRIOR_VERSION_6
|
||||
#define MAC_OS8 1
|
||||
#define MAC_OS 1
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _DIRENT_H
|
||||
#define _DIRENT_H
|
||||
|
|
|
@ -20,7 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
/* The default search path for Lisp function "load".
|
||||
This sets load-path. */
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
/* The following line tells the configuration script what sort of
|
||||
operating system this machine is likely to run.
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _PWD_H
|
||||
#define _PWD_H
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
/*
|
||||
* Define symbols to identify the version of Unix this is.
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _SYS_FILE_H
|
||||
#define _SYS_FILE_H
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _SYS_IOCTL_H
|
||||
#define _SYS_IOCTL_H
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _SYS_PARAM_H
|
||||
#define _SYS_PARAM_H
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _SYS_STAT_H
|
||||
#define _SYS_STAT_H
|
||||
|
@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#ifdef __MWERKS__
|
||||
#include <stat.mac.h>
|
||||
|
||||
#ifdef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ >= 0x6000
|
||||
#define fstat _fstat
|
||||
#endif
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _SYS_TIME_H
|
||||
#define _SYS_TIME_H
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _SYS_TYPES_H
|
||||
#define _SYS_TYPES_H
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _SYS_TERMIO_H
|
||||
#define _SYS_TERMIO_H
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _UTIME_H_
|
||||
#define _UTIME_H_
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef _UTSNAME_H
|
||||
#define _UTSNAME_H
|
||||
|
|
117
mac/make-bin-dist
Executable file
117
mac/make-bin-dist
Executable file
|
@ -0,0 +1,117 @@
|
|||
#!/bin/sh
|
||||
|
||||
#### make-bin-dist: create a binary Emacs distribution tar file for
|
||||
#### Mac OS X. This basically runs a `configure' and `make install'
|
||||
#### into a temporary directory and archives that directory. It also
|
||||
#### places the Emacs application bundle and a installer script in the
|
||||
#### tar file. The installer script is run to set up the XML file for
|
||||
#### setting the environment variables used by Emacs when it is
|
||||
#### started from the Finder.
|
||||
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GNU Emacs.
|
||||
#
|
||||
# GNU Emacs is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# GNU Emacs is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
progname="$0"
|
||||
|
||||
### Exit if a command fails.
|
||||
#set -e
|
||||
|
||||
### Print out each line we read, for debugging's sake.
|
||||
set -v
|
||||
|
||||
LANGUAGE=C
|
||||
LC_ALL=C
|
||||
LC_MESSAGES=
|
||||
LANG=
|
||||
export LANGUAGE LC_ALL LC_MESSAGES LANG
|
||||
|
||||
## Don't restrict access to any files.
|
||||
umask 0
|
||||
|
||||
### Make sure we're running in the right place.
|
||||
if [ ! -f Emacs.app/Contents/PkgInfo ]; then
|
||||
echo "${progname}: Can't find \`Emacs.app/Contents/PkgInfo'" >&2
|
||||
echo "${progname} must be run in the \`mac' directory of the Emacs" >&2
|
||||
echo "distribution tree. cd to that directory and try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
### Check whether file ../lisp/version.el exists.
|
||||
if [ ! -f ../lisp/version.el ]; then
|
||||
echo "${progname}: Can't find \`../lisp/version.el'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
### Find out which version of Emacs this is.
|
||||
shortversion=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \
|
||||
| sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
|
||||
version=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \
|
||||
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
|
||||
if [ ! "${version}" ]; then
|
||||
echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Version numbers are $version and $shortversion
|
||||
|
||||
### Make sure we don't already have a directory emacs-${version}.
|
||||
|
||||
emacsname="emacs-${version}${new_extension}"
|
||||
|
||||
if [ -d ${emacsname} ]
|
||||
then
|
||||
echo Directory "${emacsname}" already exists >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
### Make sure the subdirectory is available.
|
||||
tempparent="make-bin-dist.tmp.$$"
|
||||
if [ -d ${tempparent} ]; then
|
||||
echo "${progname}: staging directory \`${tempparent}' already exists.
|
||||
Perhaps a previous invocation of \`${progname}' failed to clean up after
|
||||
itself. Check that directories whose names are of the form
|
||||
\`make-dist.tmp.NNNNN' don't contain any important information, remove
|
||||
them, and try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tempparentfull="`pwd`/${tempparent}"
|
||||
|
||||
echo Installing into directory ${tempparentfull} >&2
|
||||
|
||||
(cd ..; ./configure --prefix=${tempparentfull}; make install)
|
||||
|
||||
### This trap ensures that the staging directory will be cleaned up even
|
||||
### when the script is interrupted in mid-career.
|
||||
trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
|
||||
|
||||
cp -r Emacs.app ${tempparent}
|
||||
|
||||
cp osx-install ${tempparent}
|
||||
|
||||
echo "Creating tar file"
|
||||
|
||||
mv ${tempparent} ${emacsname}
|
||||
|
||||
tar cvf - ${emacsname} | gzip > ${emacsname}-mac-bin.tar.gz
|
||||
|
||||
echo "Cleaning up the staging directory"
|
||||
rm -rf ${emacsname}
|
||||
|
||||
### make-bin-dist ends here
|
|
@ -47,13 +47,13 @@ OptOption = # -opt speed # alternatively set to -opt off or -opt size
|
|||
PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int ¶
|
||||
-typecheck relaxed -w off ¶
|
||||
-includes unix -i {Includes},{Src} ¶
|
||||
-d emacs=1 -d HAVE_CONFIG_H
|
||||
-d emacs=1 -d HAVE_CONFIG_H -d MAC_OS -d MAC_OS8
|
||||
|
||||
LinkOptions = {SymOption} -d
|
||||
|
||||
CONFIG_H_GROUP = "{Includes}config.h" "{Includes}s-mac.h" "{Includes}utsname.h" "{Includes}m-mac.h"
|
||||
DISPEXTERN_H_GROUP = "{Src}dispextern.h" "{Includes}macgui.h"
|
||||
INTERVALS_H_GROUP = "{Src}intervals.h" "{Src}dispextern.h" "{Includes}macgui.h"
|
||||
DISPEXTERN_H_GROUP = "{Src}dispextern.h" "{Src}macgui.h"
|
||||
INTERVALS_H_GROUP = "{Src}intervals.h" "{Src}dispextern.h" "{Src}macgui.h"
|
||||
WINDOW_H_GROUP = "{Src}window.h" {DISPEXTERN_H_GROUP}
|
||||
BLOCKINPUT_H_GROUP = "{Src}blockinput.h" "{Src}atimer.h" "{Src}systime.h" ¶
|
||||
"{Includes}sys:time.h" "{Includes}sys:time.h"
|
||||
|
@ -125,10 +125,10 @@ EmacsObjects =
|
|||
# The list of object files generated from new source files of the Macintosh port.
|
||||
|
||||
MacObjects = ¶
|
||||
"{Source}mac.c.x" ¶
|
||||
"{Source}macfns.c.x" ¶
|
||||
"{Source}macmenu.c.x" ¶
|
||||
"{Source}macterm.c.x"
|
||||
"{Src}mac.c.x" ś
|
||||
"{Src}macfns.c.x" ś
|
||||
"{Src}macmenu.c.x" ś
|
||||
"{Src}macterm.c.x"
|
||||
|
||||
# The next two are the dependency rules for building Emacs.
|
||||
|
||||
|
@ -369,8 +369,8 @@ Emacs
|
|||
"{Src}process.h" ¶
|
||||
"{Src}keyboard.h" ¶
|
||||
"{Src}syssignal.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h" ¶
|
||||
"{Src}systime.h"
|
||||
|
||||
|
@ -482,8 +482,8 @@ Emacs
|
|||
"{Src}lisp.h" ¶
|
||||
"{Src}charset.h" ¶
|
||||
"{Src}fontset.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h" ¶
|
||||
"{Src}frame.h" ¶
|
||||
"{Src}fontset.h" ¶
|
||||
|
@ -556,8 +556,8 @@ Emacs
|
|||
"{Src}systty.h" ¶
|
||||
"{Includes}termio.h" ¶
|
||||
"{Includes}sys:types.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h" ¶
|
||||
"{Src}systime.h"
|
||||
|
||||
|
@ -734,8 +734,8 @@ Emacs
|
|||
{DISPEXTERN_H_GROUP} ¶
|
||||
{WINDOW_H_GROUP} ¶
|
||||
"{Src}cm.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h"
|
||||
|
||||
{Src}termcap.c.x Ä ¶
|
||||
|
@ -774,8 +774,8 @@ Emacs
|
|||
{DISPEXTERN_H_GROUP} ¶
|
||||
{BLOCKINPUT_H_GROUP} ¶
|
||||
{INTERVALS_H_GROUP} ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h"
|
||||
|
||||
{Src}xdisp.c.x Ä ¶
|
||||
|
@ -799,8 +799,8 @@ Emacs
|
|||
"{Src}process.h" ¶
|
||||
"{Src}region-cache.h" ¶
|
||||
"{Src}fontset.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h"
|
||||
|
||||
{Src}xfaces.c.x Ä ¶
|
||||
|
@ -811,8 +811,8 @@ Emacs
|
|||
"{Src}charset.h" ¶
|
||||
"{Src}frame.h" ¶
|
||||
"{Src}fontset.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h" ¶
|
||||
"{Src}buffer.h" ¶
|
||||
{DISPEXTERN_H_GROUP} ¶
|
||||
|
@ -833,7 +833,7 @@ Emacs
|
|||
"{Includes}sys:types.h" ¶
|
||||
{DISPEXTERN_H_GROUP}
|
||||
|
||||
{Source}mac.c Ä ¶
|
||||
{Src}mac.c Ä ś
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Includes}utime.h" ¶
|
||||
"{Includes}dirent.h" ¶
|
||||
|
@ -849,12 +849,12 @@ Emacs
|
|||
"{Includes}sys:time.h" ¶
|
||||
"{Includes}utsname.h"
|
||||
|
||||
{Source}macfns.c Ä ¶
|
||||
{Src}macfns.c Ä ś
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Src}lisp.h" ¶
|
||||
"{Src}charset.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h" ¶
|
||||
"{Src}frame.h" ¶
|
||||
{WINDOW_H_GROUP} ¶
|
||||
|
@ -871,13 +871,13 @@ Emacs
|
|||
"{Src}systime.h" ¶
|
||||
"{Src}bitmaps:gray.xbm"
|
||||
|
||||
{Source}macterm.c Ä ¶
|
||||
{Src}macterm.c Ä ś
|
||||
{CONFIG_H_GROUP} ¶
|
||||
"{Src}lisp.h" ¶
|
||||
{BLOCKINPUT_H_GROUP} ¶
|
||||
"{Src}syssignal.h" ¶
|
||||
"{Includes}macterm.h" ¶
|
||||
"{Includes}macgui.h" ¶
|
||||
"{Src}macterm.h" ś
|
||||
"{Src}macgui.h" ś
|
||||
"{Src}frame.h" ¶
|
||||
"{Includes}alloca.h" ¶
|
||||
"{Includes}sys:types.h" ¶
|
||||
|
@ -992,9 +992,9 @@ EmacsSource =
|
|||
"{Src}xmenu.c"
|
||||
|
||||
MacSource = ¶
|
||||
"{Source}mac.c" ¶
|
||||
"{Source}macfns.c" ¶
|
||||
"{Source}macterm.c"
|
||||
"{Src}mac.c" ś
|
||||
"{Src}macfns.c" ś
|
||||
"{Src}macterm.c"
|
||||
|
||||
|
||||
LispSource = ¶
|
||||
|
@ -1040,22 +1040,10 @@ LispSource =
|
|||
{Lisp}language:chinese.elc ¶
|
||||
{Lisp}language:cyrillic.elc ¶
|
||||
{Lisp}language:indian.elc ¶
|
||||
{Lisp}language:devanagari.elc ¶
|
||||
{Lisp}language:english.elc ¶
|
||||
{Lisp}language:ethiopic.elc ¶
|
||||
{Lisp}language:european.elc ¶
|
||||
{Lisp}language:czech.elc ¶
|
||||
{Lisp}language:slovak.elc ¶
|
||||
{Lisp}language:romanian.elc ¶
|
||||
{Lisp}language:greek.elc ¶
|
||||
{Lisp}language:hebrew.elc ¶
|
||||
{Lisp}language:japanese.elc ¶
|
||||
{Lisp}language:korean.elc ¶
|
||||
{Lisp}language:lao.elc ¶
|
||||
{Lisp}language:thai.elc ¶
|
||||
{Lisp}language:tibetan.elc ¶
|
||||
{Lisp}language:vietnamese.elc ¶
|
||||
{Lisp}language:misc-lang.elc ¶
|
||||
{Lisp}paths.el ¶
|
||||
{Lisp}register.elc ¶
|
||||
{Lisp}replace.elc ¶
|
||||
|
@ -1073,13 +1061,27 @@ LispSource =
|
|||
{Lisp}window.elc ¶
|
||||
{Lisp}version.el
|
||||
|
||||
LispSourceDontCompile = ś
|
||||
{Lisp}language:devanagari.el ś
|
||||
{Lisp}language:english.el ś
|
||||
{Lisp}language:czech.el ś
|
||||
{Lisp}language:slovak.el ś
|
||||
{Lisp}language:romanian.el ś
|
||||
{Lisp}language:greek.el ś
|
||||
{Lisp}language:hebrew.el ś
|
||||
{Lisp}language:japanese.el ś
|
||||
{Lisp}language:korean.el ś
|
||||
{Lisp}language:lao.el ś
|
||||
{Lisp}language:thai.el ś
|
||||
{Lisp}language:misc-lang.el
|
||||
|
||||
Doc Ä {DocTarget}DOC
|
||||
|
||||
{DocTarget}DOC Ä {Makefile} {EmacsSource} {MacSource} {LispSource} {Make-DocFileDir}Make-DocFile
|
||||
{DocTarget}DOC Ä {Makefile} {EmacsSource} {MacSource} {LispSource} {LispSourceDontCompile} {Make-DocFileDir}Make-DocFile
|
||||
{Make-DocFileDir}make-docfile {EmacsSource} > {DocTarget}DOC
|
||||
{Make-DocFileDir}make-docfile {MacSource} >> {DocTarget}DOC
|
||||
{Make-DocFileDir}make-docfile {LispSource} >> {DocTarget}DOC
|
||||
{Make-DocFileDir}make-docfile {LispSourceDontCompile} >> {DocTarget}DOC
|
||||
|
||||
|
||||
#-----------------------------------------------#
|
||||
|
|
97
mac/osx-install
Executable file
97
mac/osx-install
Executable file
|
@ -0,0 +1,97 @@
|
|||
#!/bin/sh
|
||||
|
||||
#### osx-install: create the file ~/.MacOSX/environment.plist with
|
||||
#### appropriate paths for Emacs to access lisp and bin directories.
|
||||
#### On Mac OS X, this file contains values for environment variables
|
||||
#### seen by Aqua application launched in the Finder. This script
|
||||
#### must be run at the top level of a Mac OS X binary distribution.
|
||||
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GNU Emacs.
|
||||
#
|
||||
# GNU Emacs is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# GNU Emacs is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
progname="$0"
|
||||
|
||||
### Exit if a command fails.
|
||||
#set -e
|
||||
|
||||
### Print out each line we read, for debugging's sake.
|
||||
set -v
|
||||
|
||||
LANGUAGE=C
|
||||
LC_ALL=C
|
||||
LC_MESSAGES=
|
||||
LANG=
|
||||
export LANGUAGE LC_ALL LC_MESSAGES LANG
|
||||
|
||||
## Don't restrict access to any files.
|
||||
umask 0
|
||||
|
||||
### Make sure we're running in the right place.
|
||||
if [ ! -d Emacs.app -o ! -d libexec -o ! -d share ]; then
|
||||
echo "${progname} must be run in the top directory of the Emacs" >&2
|
||||
echo "binary distribution tree for Mac OS. cd to that directory" >&2
|
||||
echo "and try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
versionfile=`ls share/emacs/21.*/lisp/version.el`
|
||||
|
||||
### Find out which version of Emacs this is.
|
||||
shortversion=`grep 'defconst[ ]*emacs-version' ${versionfile} \
|
||||
| sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
|
||||
version=`grep 'defconst[ ]*emacs-version' ${versionfile} \
|
||||
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
|
||||
if [ ! "${version}" ]; then
|
||||
echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Version numbers are $version and $shortversion
|
||||
|
||||
homedir=`ls -d ~`
|
||||
initfile="${homedir}/.MacOSX/environment.plist"
|
||||
|
||||
if [ -f ${initfile} ]; then
|
||||
mv ${initfile} ${initfile}.old
|
||||
fi
|
||||
|
||||
if [ -d ${homedir}/.MacOSX ]; then
|
||||
mkdir ${homedir}/.MacOSX
|
||||
fi
|
||||
|
||||
execpath=`ls -d libexec/emacs/21.*/powerpc-apple-*/`
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>' > ${initfile}
|
||||
echo '<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">' >> ${initfile}
|
||||
echo '<plist version="0.9">' >> ${initfile}
|
||||
echo '<dict>' >> ${initfile}
|
||||
echo ' <key>EMACSLOADPATH</key>' >> ${initfile}
|
||||
echo " <string>`pwd`/share/emacs/${version}/lisp/</string>" >> ${initfile}
|
||||
echo ' <key>EMACSPATH</key>' >> ${initfile}
|
||||
echo " <string>`pwd`/${execpath}:`pwd`/bin/</string>" >> ${initfile}
|
||||
echo ' <key>EMACSDATA</key>' >> ${initfile}
|
||||
echo " <string>`pwd`/share/emacs/${version}/etc/</string>" >> ${initfile}
|
||||
echo ' <key>EMACSDOC</key>' >> ${initfile}
|
||||
echo " <string>`pwd`/share/emacs/${version}/etc/</string>" >> ${initfile}
|
||||
echo ' <key>INFOPATH</key>' >> ${initfile}
|
||||
echo " <string>`pwd`/info/</string>" >> ${initfile}
|
||||
echo '</dict>' >> ${initfile}
|
||||
echo '</plist>' >> ${initfile}
|
||||
|
||||
### osx-install ends here
|
|
@ -18,11 +18,13 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef TARGET_API_MAC_CARBON
|
||||
#include "Types.r"
|
||||
/* added for finder icon balloon help --ben */
|
||||
#include "Balloons.r"
|
||||
#endif
|
||||
|
||||
/* Define to use gnu icon */
|
||||
/* #define GNU_ICON 1 */
|
||||
|
@ -55,10 +57,12 @@ resource 'hfdr' (-5696) { /*help for emacs icon*/
|
|||
}
|
||||
};
|
||||
|
||||
#ifndef TARGET_API_MAC_CARBON
|
||||
/* added for finder icon balloon help --ben */
|
||||
resource 'STR ' (128) { /*help message for emacs icon*/
|
||||
"GNU Emacs\0xd1the extensible, customizable, self-documenting real-time display editor."
|
||||
};
|
||||
#endif
|
||||
|
||||
resource 'MENU' (128, preload) {
|
||||
128,
|
||||
|
|
|
@ -20,7 +20,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#include "Types.r"
|
||||
#include "CodeFragmentTypes.r"
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#include <string.h>
|
||||
#include <Files.h>
|
||||
|
|
12
make-dist
12
make-dist
|
@ -325,7 +325,9 @@ for subdir in lisp site-lisp lispref lispintro \
|
|||
src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
|
||||
nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
|
||||
etc etc/e lock info man msdos vms mac mac/inc mac/inc/sys \
|
||||
mac/src
|
||||
mac/src mac/Emacs.app mac/Emacs.app/Contents \
|
||||
mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \
|
||||
mac/Emacs.app/Contents/Resources/English.lproj
|
||||
do
|
||||
echo " ${tempdir}/${subdir}"
|
||||
mkdir ${tempdir}/${subdir}
|
||||
|
@ -528,6 +530,14 @@ echo "Making links to \`mac/src'"
|
|||
(cd mac/src
|
||||
ln [a-z]*.c *.r ../../${tempdir}/mac/src)
|
||||
|
||||
echo "Making links to \`mac/Emacs.app/Contents'"
|
||||
(cd mac/Emacs.app/Contents
|
||||
ln Info.plist PkgInfo ../../../${tempdir}/mac/Emacs.app/Contents)
|
||||
|
||||
echo "Making links to \`mac/Emacs.app/Contents/Resources/English.lproj'"
|
||||
(cd mac/Emacs.app/Contents/Resources/English.lproj
|
||||
ln InfoPlist.strings ../../../../../${tempdir}/mac/Emacs.app/Contents/Resources/English.lproj)
|
||||
|
||||
echo "Making links to \`msdos'"
|
||||
(cd msdos
|
||||
ln ChangeLog emacs.ico emacs.pif ../${tempdir}/msdos
|
||||
|
|
|
@ -1,27 +1,31 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 2000,2001 Free Software Foundation, Inc.
|
||||
@c Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node Mac OS, MS-DOS, Antinews, Top
|
||||
@appendix Emacs and the Mac OS
|
||||
@cindex Mac OS
|
||||
@cindex Macintosh
|
||||
|
||||
Emacs built on the Mac OS supports many of its major features:
|
||||
Emacs built on Mac OS X supports most of its major features:
|
||||
multiple frames, colors, scroll bars, menu bars, use of the mouse,
|
||||
fontsets, international characters, input methods, coding systems, and
|
||||
synchronous subprocesses (@code{call-process}). Much of this works in
|
||||
the same way as on other platforms and is therefore documented in the
|
||||
rest of this manual. This section describes the peculiarities of using
|
||||
Emacs under the Mac OS.
|
||||
fontsets, international characters, input methods, coding systems,
|
||||
asynchronous and synchronous subprocesses, unexec (@code{dump-emacs}),
|
||||
and networking (@code{open-network-stream}). Support for various
|
||||
image file formats has not been implemented yet.
|
||||
|
||||
The following features of Emacs are not yet supported on the Mac:
|
||||
unexec (@code{dump-emacs}), asynchronous subprocesses
|
||||
The following features of Emacs are not yet supported on the Mac OS
|
||||
8 or 9: unexec (@code{dump-emacs}), asynchronous subprocesses
|
||||
(@code{start-process}), and networking (@code{open-network-stream}).
|
||||
As a result, packages such as Gnus, GUD, and Comint do not work.
|
||||
However, synchronous subprocesses (@code{call-process}) are supported.
|
||||
Since external programs to handle commands such as @code{print-buffer}
|
||||
and @code{diff} are not available on Mac OS 8 or 9, they are not
|
||||
supported.
|
||||
|
||||
Since external programs to handle commands such as
|
||||
@code{print-buffer} and @code{diff} are not available on the Mac OS,
|
||||
they are not supported in the Mac OS version.
|
||||
Most of the features that are supported work in the same way as on
|
||||
other platforms and are therefore documented in the rest of this
|
||||
manual. This section describes the peculiarities of using Emacs under
|
||||
the Mac OS.
|
||||
|
||||
@menu
|
||||
* Input: Mac Input. Keyboard input on the Mac.
|
||||
|
@ -138,9 +142,15 @@ Traditional Chinese, use @samp{chinese-big5-mac} and for Japanese,
|
|||
@section Environment Variables and Command Line Arguments.
|
||||
@cindex environment variables (Mac OS)
|
||||
|
||||
Environment variables and command line arguments for Emacs can be set
|
||||
by modifying the @samp{STR#} resources 128 and 129, respectively. A common
|
||||
environment variable that one may want to set is @samp{HOME}.
|
||||
On Mac OS X, when Emacs is run in a terminal, it inherits the values
|
||||
of environment variables from the shell from which it is invoked.
|
||||
However, when it is run from the Finder as a GUI application, it
|
||||
inherits no environment variable values.
|
||||
|
||||
On Mac OS 8 or 9, environment variables and command line arguments
|
||||
for Emacs can be set by modifying the @samp{STR#} resources 128 and
|
||||
129, respectively. A common environment variable that one may want to
|
||||
set is @samp{HOME}.
|
||||
|
||||
The way to set an environment variable is by adding a string of the
|
||||
form
|
||||
|
@ -173,17 +183,18 @@ So when Emacs requests a file name, doing file name completion on
|
|||
@file{/} will display all volumes on the system. You can use @file{..}
|
||||
to go up a directory level.
|
||||
|
||||
To access files and folders on the desktop, look in the folder
|
||||
@file{Desktop Folder} in your boot volume (this folder is usually
|
||||
invisible in the Mac @code{Finder}).
|
||||
On Mac OS 8 or 9, to access files and folders on the desktop, look
|
||||
in the folder @file{Desktop Folder} in your boot volume (this folder
|
||||
is usually invisible in the Mac @code{Finder}).
|
||||
|
||||
Emacs creates the Mac folder @file{:Preferences:Emacs:} in the
|
||||
@file{System Folder} and uses it as the temporary directory. Emacs
|
||||
maps the directory name @file{/tmp/} to that. Therefore it
|
||||
is best to avoid naming a volume @file{tmp}. If everything works
|
||||
correctly, the program should leave no files in it when it exits. You
|
||||
should be able to set the environment variable @code{TMPDIR} to use
|
||||
another directory but this folder will still be created.
|
||||
On Mac OS 8 or 9, Emacs creates the Mac folder
|
||||
@file{:Preferences:Emacs:} in the @file{System Folder} and uses it as
|
||||
the temporary directory. Emacs maps the directory name @file{/tmp/}
|
||||
to that. Therefore it is best to avoid naming a volume @file{tmp}.
|
||||
If everything works correctly, the program should leave no files in it
|
||||
when it exits. You should be able to set the environment variable
|
||||
@code{TMPDIR} to use another directory but this folder will still be
|
||||
created.
|
||||
|
||||
|
||||
@node Mac Font Specs
|
||||
|
|
|
@ -1,3 +1,36 @@
|
|||
2002-04-26 Andrew Choi <akochoi@shaw.ca>
|
||||
|
||||
* Makefile.in (C_SWITCH_SYSTEM_TEMACS): Add.
|
||||
[HAVE_CARBON]: Include Mac object files.
|
||||
|
||||
* alloc.c, callproc.c, dispextern.h, dispnew.c, emacs.c,
|
||||
fontset.c, frame.c, frame.h, keyboard.c, sysdep.c, term.c,
|
||||
termcap.c, window.c, xdisp.c, xfaces.c: Use macros MAC_OS8,
|
||||
MAC_OSX, and MAC_OS instead of macintosh.
|
||||
|
||||
* editfns.c [MAC_OS8]: Include stdio.h.
|
||||
|
||||
* emacs.c [MAC_OS8]: Call mac_initialize instead of x_term_init.
|
||||
|
||||
* fontset.c [MAC_OS]: Set Vdefault_fontset to ETL Fixed instead of
|
||||
Apple Monaco.
|
||||
|
||||
* process.c: Declare QCfamily and QCfilter as extern.
|
||||
(wait_reading_process_input) [MAC_OSX]: Clear bit for stdin before
|
||||
calling select.
|
||||
|
||||
* termcap.c [MAC_OSX]: Don't define tgetnum, PC, tputs, and
|
||||
tgetent.
|
||||
|
||||
* tparam.c [MAC_OSX]: Don't define BC and UP.
|
||||
|
||||
* config.in [HAVE_CARBON]: Add.
|
||||
|
||||
* mac.c, macgui.h, macfns.c, macmenu.c, macterm.c, macterm.h: Move
|
||||
here from mac/src and mac/inc.
|
||||
|
||||
* s/darwin.h, m/powermac.h, unexmacosx.c: New files.
|
||||
|
||||
2002-04-26 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
* xterm.c (x_draw_phys_cursor_glyph): Undo last change. Compute
|
||||
|
|
|
@ -159,6 +159,12 @@ CC = C_COMPILER
|
|||
#define LD_SWITCH_SYSTEM_TEMACS
|
||||
#endif
|
||||
|
||||
/* Some s/SYSTEM.h files define this to request special switches
|
||||
for compiling temacs. */
|
||||
#ifndef C_SWITCH_SYSTEM_TEMACS
|
||||
#define C_SWITCH_SYSTEM_TEMACS
|
||||
#endif
|
||||
|
||||
/* Some m/MACHINE.h files define this to request special switches in ld. */
|
||||
#ifndef LD_SWITCH_MACHINE
|
||||
#define LD_SWITCH_MACHINE
|
||||
|
@ -266,7 +272,7 @@ TOOLKIT_DEFINES =
|
|||
|
||||
/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
|
||||
since it may have -I options that should override those two. */
|
||||
ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAG) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM ${CFLAGS}
|
||||
ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAG) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS}
|
||||
.c.o:
|
||||
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
|
||||
|
||||
|
@ -531,10 +537,17 @@ MSDOS_OBJ = dosfns.o msdos.o w16select.o
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CARBON
|
||||
XMENU_OBJ =
|
||||
MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o
|
||||
emacsapp = ../mac/Emacs.app/
|
||||
#else
|
||||
XMENU_OBJ = xmenu.o
|
||||
#endif
|
||||
|
||||
/* lastfile must follow all files
|
||||
whose initialized data areas should be dumped as pure by dump-emacs. */
|
||||
obj= dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o \
|
||||
obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \
|
||||
charset.o coding.o category.o ccl.o\
|
||||
cm.o term.o xfaces.o $(XOBJ) \
|
||||
emacs.o keyboard.o macros.o keymap.o sysdep.o \
|
||||
|
@ -547,13 +560,14 @@ obj= dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o \
|
|||
process.o callproc.o \
|
||||
region-cache.o sound.o atimer.o \
|
||||
doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
|
||||
$(MSDOS_OBJ)
|
||||
$(MSDOS_OBJ) $(MAC_OBJ)
|
||||
|
||||
/* Object files used on some machine or other.
|
||||
These go in the DOC file on all machines
|
||||
in case they are needed there. */
|
||||
SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \
|
||||
xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o
|
||||
xterm.o xfns.o xmenu.o xselect.o xrdb.o \
|
||||
mac.o macterm.o macfns.o macmenu.o
|
||||
|
||||
|
||||
#ifdef TERMINFO
|
||||
|
@ -1168,6 +1182,38 @@ composite.o: composite.c buffer.h charset.h $(INTERVAL_SRC) $(config_h)
|
|||
|
||||
sunfns.o: sunfns.c buffer.h window.h dispextern.h $(config_h)
|
||||
|
||||
#ifdef HAVE_CARBON
|
||||
abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
|
||||
fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
|
||||
scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \
|
||||
xterm.o xselect.o sound.o: macgui.h
|
||||
mac.o: mac.c process.h sysselect.h systime.h $(config_h)
|
||||
macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \
|
||||
dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
|
||||
atimer.h systime.h epaths.h termhooks.h coding.h ccl.h systime.h $(config_h)
|
||||
macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \
|
||||
keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h)
|
||||
macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \
|
||||
frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \
|
||||
termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \
|
||||
process.h coding.h $(config_h)
|
||||
|
||||
macosx-app: ${emacsapp}Contents/MacOS/Emacs \
|
||||
${emacsapp}Contents/Resources/Emacs.rsrc
|
||||
|
||||
${emacsapp}Contents/MacOS/Emacs: emacs
|
||||
if [ -d ${emacsapp}Contents/MacOS/ ]; then true; else \
|
||||
mkdir ${emacsapp}Contents/MacOS/; \
|
||||
fi
|
||||
cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs Emacs
|
||||
|
||||
${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r
|
||||
/Developer/Tools/Rez -useDF -o \
|
||||
${emacsapp}Contents/Resources/Emacs.rsrc \
|
||||
/System/Library/Frameworks/Carbon.framework/Headers/Carbon.r \
|
||||
../mac/src/Emacs.r
|
||||
#endif
|
||||
|
||||
${libsrc}emacstool: ${libsrc}emacstool.c
|
||||
cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
|
||||
bootstrapclean:
|
||||
|
|
|
@ -1341,7 +1341,7 @@ allocate_string ()
|
|||
|
||||
#ifdef GC_CHECK_STRING_BYTES
|
||||
if (!noninteractive
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
&& current_sblock
|
||||
#endif
|
||||
)
|
||||
|
|
|
@ -154,14 +154,14 @@ Lisp_Object
|
|||
call_process_cleanup (fdpid)
|
||||
Lisp_Object fdpid;
|
||||
{
|
||||
#if defined (MSDOS) || defined (macintosh)
|
||||
#if defined (MSDOS) || defined (MAC_OS8)
|
||||
/* for MSDOS fdpid is really (fd . tempfile) */
|
||||
register Lisp_Object file;
|
||||
file = Fcdr (fdpid);
|
||||
emacs_close (XFASTINT (Fcar (fdpid)));
|
||||
if (strcmp (XSTRING (file)-> data, NULL_DEVICE) != 0)
|
||||
unlink (XSTRING (file)->data);
|
||||
#else /* not MSDOS and not macintosh */
|
||||
#else /* not MSDOS and not MAC_OS8 */
|
||||
register int pid = XFASTINT (Fcdr (fdpid));
|
||||
|
||||
if (call_process_exited)
|
||||
|
@ -232,7 +232,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
|
|||
char *outf, *tempfile;
|
||||
int outfilefd;
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
char *tempfile;
|
||||
int outfilefd;
|
||||
#endif
|
||||
|
@ -440,7 +440,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
|
|||
fd[1] = outfilefd;
|
||||
#endif /* MSDOS */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
/* Since we don't have pipes on the Mac, create a temporary file to
|
||||
hold the output of the subprocess. */
|
||||
tempfile = (char *) alloca (STRING_BYTES (XSTRING (Vtemp_file_name_pattern)) + 1);
|
||||
|
@ -458,14 +458,14 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
|
|||
}
|
||||
fd[0] = filefd;
|
||||
fd[1] = outfilefd;
|
||||
#endif /* macintosh */
|
||||
#endif /* MAC_OS8 */
|
||||
|
||||
if (INTEGERP (buffer))
|
||||
fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1;
|
||||
else
|
||||
{
|
||||
#ifndef MSDOS
|
||||
#ifndef macintosh
|
||||
#ifndef MAC_OS8
|
||||
errno = 0;
|
||||
if (pipe (fd) == -1)
|
||||
{
|
||||
|
@ -531,7 +531,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
|
|||
|
||||
current_dir = ENCODE_FILE (current_dir);
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
{
|
||||
/* Call run_mac_command in sysdep.c here directly instead of doing
|
||||
a child_setup as for MSDOS and other platforms. Note that this
|
||||
|
@ -576,7 +576,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
|
|||
report_file_error ("Cannot re-open temporary file", Qnil);
|
||||
}
|
||||
}
|
||||
#else /* not macintosh */
|
||||
#else /* not MAC_OS8 */
|
||||
#ifdef MSDOS /* MW, July 1993 */
|
||||
/* Note that on MSDOS `child_setup' actually returns the child process
|
||||
exit status, not its PID, so we assign it to `synch_process_retcode'
|
||||
|
@ -635,7 +635,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
|
|||
if (fd_error >= 0)
|
||||
emacs_close (fd_error);
|
||||
#endif /* not MSDOS */
|
||||
#endif /* not macintosh */
|
||||
#endif /* not MAC_OS8 */
|
||||
|
||||
environ = save_environ;
|
||||
|
||||
|
@ -669,14 +669,14 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
|
|||
/* Enable sending signal if user quits below. */
|
||||
call_process_exited = 0;
|
||||
|
||||
#if defined(MSDOS) || defined(macintosh)
|
||||
#if defined(MSDOS) || defined(MAC_OS8)
|
||||
/* MSDOS needs different cleanup information. */
|
||||
record_unwind_protect (call_process_cleanup,
|
||||
Fcons (make_number (fd[0]), build_string (tempfile)));
|
||||
#else
|
||||
record_unwind_protect (call_process_cleanup,
|
||||
Fcons (make_number (fd[0]), make_number (pid)));
|
||||
#endif /* not MSDOS and not macintosh */
|
||||
#endif /* not MSDOS and not MAC_OS8 */
|
||||
|
||||
|
||||
if (BUFFERP (buffer))
|
||||
|
|
|
@ -717,6 +717,18 @@ Boston, MA 02111-1307, USA. */
|
|||
/* Define as `fork' if `vfork' does not work. */
|
||||
#undef vfork
|
||||
|
||||
/* Define if we should use the Carbon API on Mac OS X. */
|
||||
#undef HAVE_CARBON
|
||||
|
||||
#ifdef HAVE_CARBON
|
||||
#define HAVE_WINDOW_SYSTEM
|
||||
#define HAVE_MOUSE
|
||||
#define HAVE_MENUS
|
||||
#endif
|
||||
|
||||
/* Define if we have the session management (SM) library. */
|
||||
#undef HAVE_X_SM
|
||||
|
||||
/* Define to empty if the keyword `volatile' does not work. Warning: valid
|
||||
code using `volatile' can become incorrect without. Disable with care. */
|
||||
#undef volatile
|
||||
|
|
|
@ -39,7 +39,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "w32gui.h"
|
||||
#endif
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macgui.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "w32term.h"
|
||||
#endif /* HAVE_NTGUI */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macterm.h"
|
||||
#endif /* macintosh */
|
||||
#endif /* MAC_OS */
|
||||
|
||||
/* Include systime.h after xterm.h to avoid double inclusion of time.h. */
|
||||
|
||||
|
@ -6469,7 +6469,7 @@ init_display ()
|
|||
}
|
||||
#endif /* HAVE_NTGUI */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
if (!inhibit_window_system)
|
||||
{
|
||||
Vwindow_system = intern ("mac");
|
||||
|
@ -6477,7 +6477,7 @@ init_display ()
|
|||
adjust_frame_glyphs_initially ();
|
||||
return;
|
||||
}
|
||||
#endif /* macintosh */
|
||||
#endif /* MAC_OS */
|
||||
|
||||
/* If no window system has been specified, try to use the terminal. */
|
||||
if (! isatty (0))
|
||||
|
|
|
@ -33,6 +33,12 @@ Boston, MA 02111-1307, USA. */
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* Without this, sprintf on Mac OS Classic will produce wrong
|
||||
result. */
|
||||
#ifdef MAC_OS8
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "lisp.h"
|
||||
|
|
48
src/emacs.c
48
src/emacs.c
|
@ -793,6 +793,11 @@ main (argc, argv, envp)
|
|||
run_time_remap (argv[0]);
|
||||
#endif
|
||||
|
||||
#ifdef MAC_OSX
|
||||
if (!initialized)
|
||||
unexec_init_emacs_zone ();
|
||||
#endif
|
||||
|
||||
sort_args (argc, argv);
|
||||
argc = 0;
|
||||
while (argv[argc]) argc++;
|
||||
|
@ -848,6 +853,13 @@ main (argc, argv, envp)
|
|||
}
|
||||
#endif /* NeXT */
|
||||
|
||||
#ifdef MAC_OSX
|
||||
/* Skip process serial number passed in the form -psn_x_y as
|
||||
command-line argument. */
|
||||
if (argc > skip_args + 1 && strncmp (argv[skip_args+1], "-psn_", 5) == 0)
|
||||
skip_args++;
|
||||
#endif /* MAC_OSX */
|
||||
|
||||
#ifdef VMS
|
||||
/* If -map specified, map the data file in. */
|
||||
{
|
||||
|
@ -1175,12 +1187,12 @@ main (argc, argv, envp)
|
|||
CANNOT_DUMP is defined. */
|
||||
syms_of_keyboard ();
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
/* init_window_once calls make_terminal_frame which on Mac OS
|
||||
creates a full-fledge output_mac type frame. This does not
|
||||
work correctly before syms_of_textprop, syms_of_macfns,
|
||||
syms_of_ccl, syms_of_fontset, syms_of_xterm, syms_of_search,
|
||||
syms_of_frame, x_term_init, and init_keyboard have already
|
||||
syms_of_frame, mac_initialize, and init_keyboard have already
|
||||
been called. */
|
||||
syms_of_textprop ();
|
||||
syms_of_macfns ();
|
||||
|
@ -1192,7 +1204,7 @@ main (argc, argv, envp)
|
|||
syms_of_search ();
|
||||
syms_of_frame ();
|
||||
|
||||
x_term_init ();
|
||||
mac_initialize ();
|
||||
init_keyboard ();
|
||||
#endif
|
||||
|
||||
|
@ -1388,8 +1400,8 @@ main (argc, argv, envp)
|
|||
/* The basic levels of Lisp must come first. */
|
||||
/* And data must come first of all
|
||||
for the sake of symbols like error-message. */
|
||||
#ifndef macintosh
|
||||
/* Called before init_window_once for Mac OS. */
|
||||
#ifndef MAC_OS8
|
||||
/* Called before init_window_once for Mac OS Classic. */
|
||||
syms_of_data ();
|
||||
#endif
|
||||
syms_of_alloc ();
|
||||
|
@ -1407,8 +1419,8 @@ main (argc, argv, envp)
|
|||
syms_of_casetab ();
|
||||
syms_of_callproc ();
|
||||
syms_of_category ();
|
||||
#ifndef macintosh
|
||||
/* Called before init_window_once for Mac OS. */
|
||||
#ifndef MAC_OS8
|
||||
/* Called before init_window_once for Mac OS Classic. */
|
||||
syms_of_ccl ();
|
||||
#endif
|
||||
syms_of_charset ();
|
||||
|
@ -1432,8 +1444,8 @@ main (argc, argv, envp)
|
|||
syms_of_marker ();
|
||||
syms_of_minibuf ();
|
||||
syms_of_process ();
|
||||
#ifndef macintosh
|
||||
/* Called before init_window_once for Mac OS. */
|
||||
#ifndef MAC_OS8
|
||||
/* Called before init_window_once for Mac OS Classic. */
|
||||
syms_of_search ();
|
||||
syms_of_frame ();
|
||||
#endif
|
||||
|
@ -1443,8 +1455,8 @@ main (argc, argv, envp)
|
|||
#ifdef HAVE_SOUND
|
||||
syms_of_sound ();
|
||||
#endif
|
||||
#ifndef macintosh
|
||||
/* Called before init_window_once for Mac OS. */
|
||||
#ifndef MAC_OS8
|
||||
/* Called before init_window_once for Mac OS Classic. */
|
||||
syms_of_textprop ();
|
||||
#endif
|
||||
syms_of_composite ();
|
||||
|
@ -1469,7 +1481,8 @@ main (argc, argv, envp)
|
|||
#endif /* HAVE_X_WINDOWS */
|
||||
|
||||
#ifndef HAVE_NTGUI
|
||||
#ifndef macintosh
|
||||
#ifndef MAC_OS
|
||||
/* Called before init_window_once for Mac OS Classic. */
|
||||
syms_of_xmenu ();
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1482,6 +1495,13 @@ main (argc, argv, envp)
|
|||
syms_of_fontset ();
|
||||
#endif /* HAVE_NTGUI */
|
||||
|
||||
#ifdef HAVE_CARBON
|
||||
syms_of_macterm ();
|
||||
syms_of_macfns ();
|
||||
syms_of_macmenu ();
|
||||
syms_of_fontset ();
|
||||
#endif /* HAVE_CARBON */
|
||||
|
||||
#ifdef SYMS_SYSTEM
|
||||
SYMS_SYSTEM;
|
||||
#endif
|
||||
|
@ -1506,8 +1526,8 @@ main (argc, argv, envp)
|
|||
#endif /* VMS */
|
||||
init_display (); /* Determine terminal type. init_sys_modes uses results. */
|
||||
}
|
||||
#ifndef macintosh
|
||||
/* Called before init_window_once for Mac OS. */
|
||||
#ifndef MAC_OS8
|
||||
/* Called before init_window_once for Mac OS Classic. */
|
||||
init_keyboard (); /* This too must precede init_sys_modes. */
|
||||
#endif
|
||||
#ifdef VMS
|
||||
|
|
|
@ -1410,10 +1410,10 @@ syms_of_fontset ()
|
|||
FONTSET_ID (Vdefault_fontset) = make_number (0);
|
||||
FONTSET_NAME (Vdefault_fontset)
|
||||
= build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default");
|
||||
#if defined (macintosh)
|
||||
#if defined (MAC_OS)
|
||||
FONTSET_ASCII (Vdefault_fontset)
|
||||
= Fcons (make_number (0),
|
||||
build_string ("-apple-monaco-medium-r-*--*-120-*-*-*-*-mac-roman"));
|
||||
build_string ("-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1"));
|
||||
#elif defined (WINDOWSNT)
|
||||
FONTSET_ASCII (Vdefault_fontset)
|
||||
= Fcons (make_number (0),
|
||||
|
|
10
src/frame.c
10
src/frame.c
|
@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#ifdef WINDOWSNT
|
||||
#include "w32term.h"
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macterm.h"
|
||||
#endif
|
||||
#include "buffer.h"
|
||||
|
@ -486,11 +486,11 @@ make_terminal_frame ()
|
|||
f->output_method = output_termcap;
|
||||
f->output_data.x = &tty_display;
|
||||
#else
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
make_mac_terminal_frame (f);
|
||||
#else
|
||||
f->output_data.x = &tty_display;
|
||||
#endif /* macintosh */
|
||||
#endif /* MAC_OS8 */
|
||||
#endif /* WINDOWSNT */
|
||||
#endif /* MSDOS */
|
||||
|
||||
|
@ -521,7 +521,7 @@ Note that changing the size of one terminal frame automatically affects all. */
|
|||
abort ();
|
||||
#else /* not MSDOS */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
if (sf->output_method != output_mac)
|
||||
error ("Not running on a Macintosh screen; cannot make a new Macintosh frame");
|
||||
#else
|
||||
|
@ -1112,7 +1112,7 @@ frame. The hook is called with one argument FRAME. */)
|
|||
return Qnil;
|
||||
|
||||
if (NILP (force) && !other_visible_frames (f)
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
/* Terminal frame deleted before any other visible frames are
|
||||
created. */
|
||||
&& strcmp (XSTRING (f->name)->data, "F1") != 0
|
||||
|
|
10
src/frame.h
10
src/frame.h
|
@ -57,7 +57,7 @@ enum vertical_scroll_bar_type
|
|||
vertical_scroll_bar_right
|
||||
};
|
||||
|
||||
#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(macintosh)
|
||||
#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(MAC_OS)
|
||||
|
||||
#if !defined(HAVE_X_WINDOWS)
|
||||
|
||||
|
@ -82,7 +82,7 @@ struct x_output
|
|||
/* A structure describing a termcap frame display. */
|
||||
extern struct x_output tty_display;
|
||||
|
||||
#endif /* ! MSDOS && ! WINDOWSNT && ! macintosh */
|
||||
#endif /* ! MSDOS && ! WINDOWSNT && ! MAC_OS */
|
||||
|
||||
struct frame
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ struct frame
|
|||
/* Number of lines of menu bar. */
|
||||
int menu_bar_lines;
|
||||
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
/* Nonzero means using a menu bar that comes from the X toolkit. */
|
||||
int external_menu_bar;
|
||||
#endif
|
||||
|
@ -404,7 +404,7 @@ typedef struct frame *FRAME_PTR;
|
|||
#ifdef HAVE_NTGUI
|
||||
#define FRAME_WINDOW_P(f) FRAME_W32_P (f)
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#define FRAME_WINDOW_P(f) FRAME_MAC_P (f)
|
||||
#endif
|
||||
#ifndef FRAME_WINDOW_P
|
||||
|
@ -444,7 +444,7 @@ typedef struct frame *FRAME_PTR;
|
|||
|
||||
/* Nonzero if this frame should display a menu bar
|
||||
in a way that does not use any text lines. */
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
|
||||
#else
|
||||
#define FRAME_EXTERNAL_MENU_BAR(f) 0
|
||||
|
|
|
@ -71,7 +71,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "w32term.h"
|
||||
#endif /* HAVE_NTGUI */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macterm.h"
|
||||
#endif
|
||||
|
||||
|
@ -94,8 +94,8 @@ extern int input_fd;
|
|||
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
/* Make all keyboard buffers much bigger when using X windows. */
|
||||
#ifdef macintosh
|
||||
/* But not too big (local data > 32K error) if on macintosh. */
|
||||
#ifdef MAC_OS8
|
||||
/* But not too big (local data > 32K error) if on Mac OS Classic. */
|
||||
#define KBD_BUFFER_SIZE 512
|
||||
#else
|
||||
#define KBD_BUFFER_SIZE 4096
|
||||
|
@ -3687,7 +3687,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
|
|||
abort ();
|
||||
#endif
|
||||
}
|
||||
#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
else if (event->kind == delete_window_event)
|
||||
{
|
||||
/* Make an event (delete-frame (FRAME)). */
|
||||
|
@ -3718,7 +3718,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
|
|||
XSETBUFFER (obj, current_buffer);
|
||||
kbd_fetch_ptr = event + 1;
|
||||
}
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
else if (event->kind == menu_bar_activate_event)
|
||||
{
|
||||
kbd_fetch_ptr = event + 1;
|
||||
|
@ -5373,7 +5373,7 @@ make_lispy_event (event)
|
|||
}
|
||||
#endif /* HAVE_MOUSE */
|
||||
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
case MENU_BAR_EVENT:
|
||||
if (EQ (event->arg, event->frame_or_window))
|
||||
/* This is the prefix key. We translate this to
|
||||
|
|
121
src/m/powermac.h
Normal file
121
src/m/powermac.h
Normal file
|
@ -0,0 +1,121 @@
|
|||
/* Machine description file for Apple Power Macintosh
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* The following line tells the configuration script what sort of
|
||||
operating system this machine is likely to run.
|
||||
USUAL-OPSYS="darwin" */
|
||||
|
||||
/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
|
||||
is the most significant byte. */
|
||||
|
||||
#define WORDS_BIG_ENDIAN
|
||||
|
||||
/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
|
||||
* group of arguments and treat it as an array of the arguments. */
|
||||
|
||||
#define NO_ARG_ARRAY
|
||||
|
||||
/* Define WORD_MACHINE if addresses and such have
|
||||
* to be corrected before they can be used as byte counts. */
|
||||
|
||||
/* #define WORD_MACHINE */
|
||||
|
||||
/* Now define a symbol for the cpu type, if your compiler
|
||||
does not define it automatically:
|
||||
Ones defined so far include vax, m68000, ns16000, pyramid,
|
||||
orion, tahoe, APOLLO and many others */
|
||||
|
||||
/* Use type int rather than a union, to represent Lisp_Object */
|
||||
/* This is desirable for most machines. */
|
||||
|
||||
#define NO_UNION_TYPE
|
||||
|
||||
/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
|
||||
the 24-bit bit field into an int. In other words, if bit fields
|
||||
are always unsigned.
|
||||
|
||||
If you use NO_UNION_TYPE, this flag does not matter. */
|
||||
|
||||
/* #define EXPLICIT_SIGN_EXTEND */
|
||||
|
||||
/* Data type of load average, as read out of kmem. */
|
||||
|
||||
#define LOAD_AVE_TYPE long
|
||||
|
||||
/* Convert that into an integer that is 100 for a load average of 1.0 */
|
||||
|
||||
#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
|
||||
|
||||
/* Define CANNOT_DUMP on machines where unexec does not work.
|
||||
Then the function dump-emacs will not be defined
|
||||
and temacs will do (load "loadup") automatically unless told otherwise. */
|
||||
|
||||
/* #define CANNOT_DUMP */
|
||||
|
||||
/* Define VIRT_ADDR_VARIES if the virtual addresses of
|
||||
pure and impure space as loaded can vary, and even their
|
||||
relative order cannot be relied on.
|
||||
|
||||
Otherwise Emacs assumes that text space precedes data space,
|
||||
numerically. */
|
||||
|
||||
/* #define VIRT_ADDR_VARIES * */
|
||||
|
||||
/* Define C_ALLOCA if this machine does not support a true alloca
|
||||
and the one written in C should be used instead.
|
||||
Define HAVE_ALLOCA to say that the system provides a properly
|
||||
working alloca function and it should be used.
|
||||
Define neither one if an assembler-language alloca
|
||||
in the file alloca.s should be used. */
|
||||
|
||||
/* #define C_ALLOCA */
|
||||
/* #define HAVE_ALLOCA */
|
||||
|
||||
/* Define NO_REMAP if memory segmentation makes it not work well
|
||||
to change the boundary between the text section and data section
|
||||
when Emacs is dumped. If you define this, the preloaded Lisp
|
||||
code will not be sharable; but that's better than failing completely. */
|
||||
|
||||
#define NO_REMAP
|
||||
|
||||
/* Some really obscure 4.2-based systems (like Sequent DYNIX)
|
||||
* do not support asynchronous I/O (using SIGIO) on sockets,
|
||||
* even though it works fine on tty's. If you have one of
|
||||
* these systems, define the following, and then use it in
|
||||
* config.h (or elsewhere) to decide when (not) to use SIGIO.
|
||||
*
|
||||
* You'd think this would go in an operating-system description file,
|
||||
* but since it only occurs on some, but not all, BSD systems, the
|
||||
* reasonable place to select for it is in the machine description
|
||||
* file.
|
||||
*/
|
||||
|
||||
/* #define NO_SOCK_SIGIO */
|
||||
|
||||
|
||||
/* After adding support for a new system, modify the large case
|
||||
statement in the `configure' script to recognize reasonable
|
||||
configuration names, and add a description of the system to
|
||||
`etc/MACHINES'.
|
||||
|
||||
If you've just fixed a problem in an existing configuration file,
|
||||
you should also check `etc/MACHINES' to make sure its descriptions
|
||||
of known problems in that configuration should be updated. */
|
|
@ -1,5 +1,5 @@
|
|||
/* Unix emulation routines for GNU Emacs on the Mac OS.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
@ -34,6 +34,20 @@ Boston, MA 02111-1307, USA. */
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef MAC_OSX
|
||||
#undef mktime
|
||||
#undef DEBUG
|
||||
#undef free
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
#include <Carbon/Carbon.h>
|
||||
#undef free
|
||||
#define free unexec_free
|
||||
#undef malloc
|
||||
#define malloc unexec_malloc
|
||||
#undef realloc
|
||||
#define realloc unexec_realloc
|
||||
#else /* not MAC_OSX */
|
||||
#include <Files.h>
|
||||
#include <MacTypes.h>
|
||||
#include <TextUtils.h>
|
||||
|
@ -44,6 +58,8 @@ Boston, MA 02111-1307, USA. */
|
|||
#include <Timer.h>
|
||||
#include <OSA.h>
|
||||
#include <AppleScript.h>
|
||||
#include <Scrap.h>
|
||||
#endif /* not MAC_OSX */
|
||||
|
||||
#include "lisp.h"
|
||||
#include "process.h"
|
||||
|
@ -81,13 +97,13 @@ string_cat_and_replace (char *s1, const char *s2, int n, char a, char b)
|
|||
}
|
||||
|
||||
|
||||
/* Convert a Mac pathname to Unix form. A Mac full pathname is one
|
||||
/* Convert a Mac pathname to Posix form. A Mac full pathname is one
|
||||
that does not begin with a ':' and contains at least one ':'. A Mac
|
||||
full pathname causes an '/' to be prepended to the Unix pathname.
|
||||
full pathname causes an '/' to be prepended to the Posix pathname.
|
||||
The algorithm for the rest of the pathname is as follows:
|
||||
For each segment between two ':',
|
||||
if it is non-null, copy as is and then add a '/' at the end,
|
||||
otherwise, insert a "../" into the Unix pathname.
|
||||
otherwise, insert a "../" into the Posix pathname.
|
||||
Returns 1 if successful; 0 if fails. */
|
||||
|
||||
int
|
||||
|
@ -146,7 +162,7 @@ mac_to_posix_pathname (const char *mfn, char *ufn, int ufnbuflen)
|
|||
extern char *get_temp_dir_name ();
|
||||
|
||||
|
||||
/* Convert a Unix pathname to Mac form. Approximately reverse of the
|
||||
/* Convert a Posix pathname to Mac form. Approximately reverse of the
|
||||
above in algorithm. */
|
||||
|
||||
int
|
||||
|
@ -235,6 +251,7 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifndef MAC_OSX
|
||||
|
||||
/* The following functions with "sys_" prefix are stubs to Unix
|
||||
functions that have already been implemented by CW or MPW. The
|
||||
|
@ -250,21 +267,21 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen)
|
|||
#define MAC_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60)
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#ifndef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ < 0x6000
|
||||
/* CW Pro 5 epoch is Jan 1, 1900 (aaarghhhhh!); remember, 1900 is not
|
||||
a leap year! This is for adjusting time_t values returned by MSL
|
||||
functions. */
|
||||
#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 70 + 17) * 24 * 60 * 60)
|
||||
#else
|
||||
/* CW changes Pro 6 to following Unix! */
|
||||
#else /* __MSL__ >= 0x6000 */
|
||||
/* CW changes Pro 6 to follow Unix! */
|
||||
#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60)
|
||||
#endif
|
||||
#endif /* __MSL__ >= 0x6000 */
|
||||
#elif __MRC__
|
||||
/* MPW library functions follow Unix (confused?). */
|
||||
#define CW_OR_MPW_UNIX_EPOCH_DIFF ((365L * 66 + 17) * 24 * 60 * 60)
|
||||
#else
|
||||
#else /* not __MRC__ */
|
||||
You lose!!!
|
||||
#endif
|
||||
#endif /* not __MRC__ */
|
||||
|
||||
|
||||
/* Define our own stat function for both MrC and CW. The reason for
|
||||
|
@ -408,8 +425,6 @@ fstat (int fildes, struct stat *buf)
|
|||
#endif /* __MRC__ */
|
||||
|
||||
|
||||
/* Adapted from Think Reference code example. */
|
||||
|
||||
int
|
||||
mkdir (const char *dirname, int mode)
|
||||
{
|
||||
|
@ -611,9 +626,9 @@ sys_open (const char *path, int oflag)
|
|||
if (oflag & O_CREAT)
|
||||
fsetfileinfo (mac_pathname, 'EMAx', 'TEXT');
|
||||
return res;
|
||||
#else
|
||||
#else /* not __MRC__ */
|
||||
return open (mac_pathname, oflag);
|
||||
#endif
|
||||
#endif /* not __MRC__ */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -637,9 +652,9 @@ sys_creat (const char *path, mode_t mode)
|
|||
int result = creat (mac_pathname);
|
||||
fsetfileinfo (mac_pathname, 'EMAx', 'TEXT');
|
||||
return result;
|
||||
#else
|
||||
#else /* not __MRC__ */
|
||||
return creat (mac_pathname, mode);
|
||||
#endif
|
||||
#endif /* not __MRC__ */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -675,7 +690,7 @@ sys_read (int fildes, char *buf, int count)
|
|||
if (fildes == 0) /* this should not be used for console input */
|
||||
return -1;
|
||||
else
|
||||
#ifdef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ >= 0x6000
|
||||
return _read (fildes, buf, count);
|
||||
#else
|
||||
return read (fildes, buf, count);
|
||||
|
@ -690,7 +705,7 @@ sys_write (int fildes, const char *buf, int count)
|
|||
if (fildes == DEV_NULL_FD)
|
||||
return count;
|
||||
else
|
||||
#ifdef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ >= 0x6000
|
||||
return _write (fildes, buf, count);
|
||||
#else
|
||||
return write (fildes, buf, count);
|
||||
|
@ -764,7 +779,7 @@ sys_fopen (const char *name, const char *mode)
|
|||
#ifdef __MRC__
|
||||
if (mode[0] == 'w' || mode[0] == 'a')
|
||||
fsetfileinfo (mac_pathname, 'EMAx', 'TEXT');
|
||||
#endif
|
||||
#endif /* not __MRC__ */
|
||||
return fopen (mac_pathname, mode);
|
||||
}
|
||||
}
|
||||
|
@ -778,9 +793,9 @@ long target_ticks = 0;
|
|||
__sigfun alarm_signal_func = (__sigfun) 0;
|
||||
#elif __MWERKS__
|
||||
__signal_func_ptr alarm_signal_func = (__signal_func_ptr) 0;
|
||||
#else
|
||||
#else /* not __MRC__ and not __MWERKS__ */
|
||||
You lose!!!
|
||||
#endif
|
||||
#endif /* not __MRC__ and not __MWERKS__ */
|
||||
|
||||
|
||||
/* These functions simulate SIG_ALRM. The stub for function signal
|
||||
|
@ -804,13 +819,16 @@ check_alarm ()
|
|||
|
||||
|
||||
int
|
||||
select(n, rfds, wfds, efds, timeout)
|
||||
select (n, rfds, wfds, efds, timeout)
|
||||
int n;
|
||||
SELECT_TYPE *rfds;
|
||||
SELECT_TYPE *wfds;
|
||||
SELECT_TYPE *efds;
|
||||
struct timeval *timeout;
|
||||
{
|
||||
#ifdef TARGET_API_MAC_CARBON
|
||||
return 1;
|
||||
#else /* not TARGET_API_MAC_CARBON */
|
||||
EMACS_TIME end_time, now;
|
||||
EventRecord e;
|
||||
|
||||
|
@ -844,7 +862,8 @@ select(n, rfds, wfds, efds, timeout)
|
|||
}
|
||||
}
|
||||
|
||||
WaitNextEvent (0, &e, 1UL, NULL); /* Accept no event; wait 1 tic. by T.I.*/
|
||||
WaitNextEvent (0, &e, 1UL, NULL); /* Accept no event; wait 1
|
||||
tic. by T.I. */
|
||||
|
||||
EMACS_GET_TIME (now);
|
||||
EMACS_SUB_TIME (now, end_time, now);
|
||||
|
@ -852,6 +871,7 @@ select(n, rfds, wfds, efds, timeout)
|
|||
while (!EMACS_TIME_NEG_P (now));
|
||||
|
||||
return 0;
|
||||
#endif /* not TARGET_API_MAC_CARBON */
|
||||
}
|
||||
|
||||
|
||||
|
@ -866,8 +886,9 @@ pause ()
|
|||
if (!target_ticks) /* no alarm pending */
|
||||
return -1;
|
||||
|
||||
if ( (tick = TickCount ()) < target_ticks )
|
||||
WaitNextEvent (0, &e, target_ticks - tick, NULL); /* Accept no event; just wait. by T.I.*/
|
||||
if ((tick = TickCount ()) < target_ticks)
|
||||
WaitNextEvent (0, &e, target_ticks - tick, NULL); /* Accept no event;
|
||||
just wait. by T.I. */
|
||||
|
||||
target_ticks = 0;
|
||||
if (alarm_signal_func)
|
||||
|
@ -897,9 +918,9 @@ sys_signal (int signal_num, __sigfun signal_func)
|
|||
extern __signal_func_ptr signal (int signal, __signal_func_ptr signal_func);
|
||||
__signal_func_ptr
|
||||
sys_signal (int signal_num, __signal_func_ptr signal_func)
|
||||
#else
|
||||
#else /* not __MRC__ and not __MWERKS__ */
|
||||
You lose!!!
|
||||
#endif
|
||||
#endif /* not __MRC__ and not __MWERKS__ */
|
||||
{
|
||||
if (signal_num != SIGALRM)
|
||||
return signal (signal_num, signal_func);
|
||||
|
@ -1003,7 +1024,7 @@ extern struct tm *localtime (const time_t *);
|
|||
struct tm *
|
||||
sys_localtime (const time_t *timer)
|
||||
{
|
||||
#ifdef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ >= 0x6000
|
||||
time_t unix_time = *timer;
|
||||
#else
|
||||
time_t unix_time = *timer + CW_OR_MPW_UNIX_EPOCH_DIFF;
|
||||
|
@ -1018,7 +1039,7 @@ extern char *ctime (const time_t *);
|
|||
char *
|
||||
sys_ctime (const time_t *timer)
|
||||
{
|
||||
#ifdef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ >= 0x6000
|
||||
time_t unix_time = *timer;
|
||||
#else
|
||||
time_t unix_time = *timer + CW_OR_MPW_UNIX_EPOCH_DIFF;
|
||||
|
@ -1033,7 +1054,7 @@ extern time_t time (time_t *);
|
|||
time_t
|
||||
sys_time (time_t *timer)
|
||||
{
|
||||
#ifdef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ >= 0x6000
|
||||
time_t mac_time = time (NULL);
|
||||
#else
|
||||
time_t mac_time = time (NULL) - CW_OR_MPW_UNIX_EPOCH_DIFF;
|
||||
|
@ -1333,6 +1354,7 @@ link (const char *name1, const char *name2)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#endif /* ! MAC_OSX */
|
||||
|
||||
/* Determine the path name of the file specified by VREFNUM, DIRID,
|
||||
and NAME and place that in the buffer PATH of length
|
||||
|
@ -1381,6 +1403,7 @@ path_from_vol_dir_name (char *path, int man_path_len, short vol_ref_num,
|
|||
return 1; /* success */
|
||||
}
|
||||
|
||||
#ifndef MAC_OSX
|
||||
|
||||
int
|
||||
readlink (const char *path, char *buf, int bufsiz)
|
||||
|
@ -1593,7 +1616,7 @@ geteuid ()
|
|||
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#ifndef CODEWARRIOR_VERSION_6
|
||||
#if __MSL__ < 0x6000
|
||||
#undef getpid
|
||||
int
|
||||
getpid ()
|
||||
|
@ -1603,6 +1626,8 @@ getpid ()
|
|||
#endif
|
||||
#endif /* __MWERKS__ */
|
||||
|
||||
#endif /* ! MAC_OSX */
|
||||
|
||||
|
||||
/* Return the path to the directory in which Emacs can create
|
||||
temporary files. The MacOS "temporary items" directory cannot be
|
||||
|
@ -1613,7 +1638,7 @@ getpid ()
|
|||
directory "Emacs" in the Preferences Folder. This directory is
|
||||
created if it does not exist. */
|
||||
|
||||
static char *
|
||||
char *
|
||||
get_temp_dir_name ()
|
||||
{
|
||||
static char *temp_dir_name = NULL;
|
||||
|
@ -1658,6 +1683,7 @@ get_temp_dir_name ()
|
|||
return temp_dir_name;
|
||||
}
|
||||
|
||||
#ifndef MAC_OSX
|
||||
|
||||
/* Allocate and construct an array of pointers to strings from a list
|
||||
of strings stored in a 'STR#' resource. The returned pointer array
|
||||
|
@ -1725,7 +1751,8 @@ get_path_to_system_folder ()
|
|||
if (!path_from_vol_dir_name (full_path, 255, vol_ref_num, dir_id, "\p"))
|
||||
return NULL;
|
||||
|
||||
if (!mac_to_posix_pathname (full_path, system_folder_unix_name, MAXPATHLEN+1))
|
||||
if (!mac_to_posix_pathname (full_path, system_folder_unix_name,
|
||||
MAXPATHLEN+1))
|
||||
return NULL;
|
||||
|
||||
return system_folder_unix_name;
|
||||
|
@ -1831,9 +1858,9 @@ char *sys_siglist[] =
|
|||
"Segment violation",
|
||||
"Terminal"
|
||||
};
|
||||
#else
|
||||
#else /* not __MRC__ and not __MWERKS__ */
|
||||
You lose!!!
|
||||
#endif
|
||||
#endif /* not __MRC__ and not __MWERKS__ */
|
||||
|
||||
|
||||
#include <utsname.h>
|
||||
|
@ -1928,6 +1955,9 @@ run_mac_command (argv, workdir, infn, outfn, errfn)
|
|||
const char *workdir;
|
||||
const char *infn, *outfn, *errfn;
|
||||
{
|
||||
#ifdef TARGET_API_MAC_CARBON
|
||||
return -1;
|
||||
#else /* not TARGET_API_MAC_CARBON */
|
||||
char macappname[MAXPATHLEN+1], macworkdir[MAXPATHLEN+1];
|
||||
char macinfn[MAXPATHLEN+1], macoutfn[MAXPATHLEN+1], macerrfn[MAXPATHLEN+1];
|
||||
int paramlen, argc, newargc, j, retries;
|
||||
|
@ -2008,9 +2038,9 @@ run_mac_command (argv, workdir, infn, outfn, errfn)
|
|||
char *t = (char *) alloca (strlen (newargv[0]) + 7 + 1);
|
||||
strcpy (t, "~emacs/");
|
||||
strcat (t, newargv[0]);
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
Lisp_Object path;
|
||||
openp (Vexec_path, build_string (newargv[0]), Vexec_suffixes, &path,
|
||||
openp (Vexec_path, build_string (newargv[0]), EXEC_SUFFIXES, &path,
|
||||
1);
|
||||
|
||||
if (NILP (path))
|
||||
|
@ -2158,6 +2188,7 @@ run_mac_command (argv, workdir, infn, outfn, errfn)
|
|||
free (param);
|
||||
|
||||
return ref_con;
|
||||
#endif /* not TARGET_API_MAC_CARBON */
|
||||
}
|
||||
|
||||
|
||||
|
@ -2360,6 +2391,8 @@ getwd (char *path)
|
|||
return path;
|
||||
}
|
||||
|
||||
#endif /* ! MAC_OSX */
|
||||
|
||||
|
||||
void
|
||||
initialize_applescript ()
|
||||
|
@ -2423,6 +2456,15 @@ do_applescript (char *script, char **result)
|
|||
if (!OSAScriptError (as_scripting_component, kOSAErrorMessage, typeChar,
|
||||
&error_desc))
|
||||
{
|
||||
#if TARGET_API_MAC_CARBON
|
||||
length = AEGetDescDataSize (&error_desc);
|
||||
*result = (char *) xmalloc (length + 1);
|
||||
if (*result)
|
||||
{
|
||||
AEGetDescData (&error_desc, *result, length);
|
||||
*(*result + length) = '\0';
|
||||
}
|
||||
#else /* not TARGET_API_MAC_CARBON */
|
||||
HLock (error_desc.dataHandle);
|
||||
length = GetHandleSize(error_desc.dataHandle);
|
||||
*result = (char *) xmalloc (length + 1);
|
||||
|
@ -2432,11 +2474,21 @@ do_applescript (char *script, char **result)
|
|||
*(*result + length) = '\0';
|
||||
}
|
||||
HUnlock (error_desc.dataHandle);
|
||||
#endif /* not TARGET_API_MAC_CARBON */
|
||||
AEDisposeDesc (&error_desc);
|
||||
}
|
||||
}
|
||||
else if (osaerror == noErr) /* success: retrieve resulting script value */
|
||||
{
|
||||
#if TARGET_API_MAC_CARBON
|
||||
length = AEGetDescDataSize (&result_desc);
|
||||
*result = (char *) xmalloc (length + 1);
|
||||
if (*result)
|
||||
{
|
||||
AEGetDescData (&result_desc, *result, length);
|
||||
*(*result + length) = '\0';
|
||||
}
|
||||
#else /* not TARGET_API_MAC_CARBON */
|
||||
HLock (result_desc.dataHandle);
|
||||
length = GetHandleSize(result_desc.dataHandle);
|
||||
*result = (char *) xmalloc (length + 1);
|
||||
|
@ -2446,6 +2498,7 @@ do_applescript (char *script, char **result)
|
|||
*(*result + length) = '\0';
|
||||
}
|
||||
HUnlock (result_desc.dataHandle);
|
||||
#endif /* not TARGET_API_MAC_CARBON */
|
||||
}
|
||||
|
||||
AEDisposeDesc (&script_desc);
|
||||
|
@ -2456,11 +2509,11 @@ do_applescript (char *script, char **result)
|
|||
|
||||
|
||||
DEFUN ("do-applescript", Fdo_applescript, Sdo_applescript, 1, 1, 0,
|
||||
"Compile and execute AppleScript SCRIPT and retrieve and return the\n\
|
||||
result. If compilation and execution are successful, the resulting script\n\
|
||||
value is returned as a string. Otherwise the function aborts and\n\
|
||||
displays the error message returned by the AppleScript scripting\n\
|
||||
component.")
|
||||
doc: /* Compile and execute AppleScript SCRIPT and retrieve and return the result.
|
||||
If compilation and execution are successful, the resulting script
|
||||
value is returned as a string. Otherwise the function aborts and
|
||||
displays the error message returned by the AppleScript scripting
|
||||
component. */)
|
||||
(script)
|
||||
Lisp_Object script;
|
||||
{
|
||||
|
@ -2468,7 +2521,7 @@ component.")
|
|||
Lisp_Object lisp_result;
|
||||
long status;
|
||||
|
||||
CHECK_STRING (script, 0);
|
||||
CHECK_STRING (script);
|
||||
|
||||
status = do_applescript (XSTRING (script)->data, &result);
|
||||
if (status)
|
||||
|
@ -2497,15 +2550,15 @@ component.")
|
|||
}
|
||||
|
||||
|
||||
DEFUN ("mac-file-name-to-posix", Fmac_file_name_to_posix, Smac_file_name_to_posix, 1,
|
||||
1, 0,
|
||||
"Convert Macintosh filename to Posix form.")
|
||||
(mac_filename)
|
||||
Lisp_Object mac_filename;
|
||||
DEFUN ("mac-file-name-to-posix", Fmac_file_name_to_posix,
|
||||
Smac_file_name_to_posix, 1, 1, 0,
|
||||
doc: /* Convert Macintosh filename to Posix form. */)
|
||||
(mac_filename)
|
||||
Lisp_Object mac_filename;
|
||||
{
|
||||
char posix_filename[MAXPATHLEN+1];
|
||||
|
||||
CHECK_STRING (mac_filename, 0);
|
||||
CHECK_STRING (mac_filename);
|
||||
|
||||
if (mac_to_posix_pathname (XSTRING (mac_filename)->data, posix_filename,
|
||||
MAXPATHLEN))
|
||||
|
@ -2515,15 +2568,15 @@ DEFUN ("mac-file-name-to-posix", Fmac_file_name_to_posix, Smac_file_name_to_posi
|
|||
}
|
||||
|
||||
|
||||
DEFUN ("posix-file-name-to-mac", Fposix_file_name_to_mac, Sposix_file_name_to_mac, 1,
|
||||
1, 0,
|
||||
"Convert Unix filename to Mac form.")
|
||||
(posix_filename)
|
||||
Lisp_Object posix_filename;
|
||||
DEFUN ("posix-file-name-to-mac", Fposix_file_name_to_mac,
|
||||
Sposix_file_name_to_mac, 1, 1, 0,
|
||||
doc: /* Convert Posix filename to Mac form. */)
|
||||
(posix_filename)
|
||||
Lisp_Object posix_filename;
|
||||
{
|
||||
char mac_filename[MAXPATHLEN+1];
|
||||
|
||||
CHECK_STRING (posix_filename, 0);
|
||||
CHECK_STRING (posix_filename);
|
||||
|
||||
if (posix_to_mac_pathname (XSTRING (posix_filename)->data, mac_filename,
|
||||
MAXPATHLEN))
|
||||
|
@ -2536,9 +2589,39 @@ DEFUN ("posix-file-name-to-mac", Fposix_file_name_to_mac, Sposix_file_name_to_ma
|
|||
/* set interprogram-paste-function to mac-paste-function in mac-win.el
|
||||
to enable Emacs to obtain the contents of the Mac clipboard. */
|
||||
DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0,
|
||||
"Return the contents of the Mac clipboard as a string.")
|
||||
()
|
||||
doc: /* Return the contents of the Mac clipboard as a string. */)
|
||||
()
|
||||
{
|
||||
#if TARGET_API_MAC_CARBON
|
||||
ScrapRef scrap;
|
||||
ScrapFlavorFlags sff;
|
||||
Size s;
|
||||
int i;
|
||||
char *data;
|
||||
|
||||
if (GetCurrentScrap (&scrap) != noErr)
|
||||
return Qnil;
|
||||
|
||||
if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) != noErr)
|
||||
return Qnil;
|
||||
|
||||
if (GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s) != noErr)
|
||||
return Qnil;
|
||||
|
||||
if ((data = (char*) alloca (s)) == NULL)
|
||||
return Qnil;
|
||||
|
||||
if (GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data) != noErr
|
||||
|| s == 0)
|
||||
return Qnil;
|
||||
|
||||
/* Emacs expects clipboard contents have Unix-style eol's */
|
||||
for (i = 0; i < s; i++)
|
||||
if (data[i] == '\r')
|
||||
data[i] = '\n';
|
||||
|
||||
return make_string (data, s);
|
||||
#else /* not TARGET_API_MAC_CARBON */
|
||||
Lisp_Object value;
|
||||
Handle my_handle;
|
||||
long scrap_offset, rc, i;
|
||||
|
@ -2563,13 +2646,14 @@ DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0,
|
|||
DisposeHandle (my_handle);
|
||||
|
||||
return value;
|
||||
#endif /* not TARGET_API_MAC_CARBON */
|
||||
}
|
||||
|
||||
|
||||
/* set interprogram-cut-function to mac-cut-function in mac-win.el
|
||||
to enable Emacs to write the top of the kill-ring to the Mac clipboard. */
|
||||
DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0,
|
||||
"Put the value of the string parameter to the Mac clipboard.")
|
||||
doc: /* Put the value of the string parameter to the Mac clipboard. */)
|
||||
(value, push)
|
||||
Lisp_Object value, push;
|
||||
{
|
||||
|
@ -2578,36 +2662,50 @@ DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0,
|
|||
|
||||
/* fixme: ignore the push flag for now */
|
||||
|
||||
CHECK_STRING (value, 0);
|
||||
CHECK_STRING (value);
|
||||
|
||||
len = XSTRING (value)->size;
|
||||
buf = (char *) alloca (len);
|
||||
bcopy(XSTRING (value)->data, buf, len);
|
||||
buf = (char *) alloca (len+1);
|
||||
bcopy (XSTRING (value)->data, buf, len);
|
||||
buf[len] = '\0';
|
||||
|
||||
/* convert to Mac-style eol's before sending to clipboard */
|
||||
for (i = 0; i < len; i++)
|
||||
if (buf[i] == '\n')
|
||||
buf[i] = '\r';
|
||||
|
||||
#if TARGET_API_MAC_CARBON
|
||||
{
|
||||
ScrapRef scrap;
|
||||
ClearCurrentScrap ();
|
||||
if (GetCurrentScrap (&scrap) != noErr)
|
||||
error ("cannot get current scrap");
|
||||
|
||||
if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len,
|
||||
buf) != noErr)
|
||||
error ("cannot put to scrap");
|
||||
}
|
||||
#else /* not TARGET_API_MAC_CARBON */
|
||||
ZeroScrap ();
|
||||
PutScrap (len, 'TEXT', buf);
|
||||
#endif /* not TARGET_API_MAC_CARBON */
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p,
|
||||
0, 1, 0,
|
||||
"Whether there is an owner for the given X Selection.\n\
|
||||
The arg should be the name of the selection in question, typically one of\n\
|
||||
the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.\n\
|
||||
\(Those are literal upper-case symbol names, since that's what X expects.)\n\
|
||||
For convenience, the symbol nil is the same as `PRIMARY',\n\
|
||||
and t is the same as `SECONDARY'.")
|
||||
0, 1, 0,
|
||||
doc: /* Whether there is an owner for the given X Selection.
|
||||
The arg should be the name of the selection in question, typically one of
|
||||
the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
|
||||
(Those are literal upper-case symbol names, since that's what X expects.)
|
||||
For convenience, the symbol nil is the same as `PRIMARY',
|
||||
and t is the same as `SECONDARY'. */)
|
||||
(selection)
|
||||
Lisp_Object selection;
|
||||
{
|
||||
CHECK_SYMBOL (selection, 0);
|
||||
CHECK_SYMBOL (selection);
|
||||
|
||||
/* Return nil for PRIMARY and SECONDARY selections; for CLIPBOARD, check
|
||||
if the clipboard currently has valid text format contents. */
|
||||
|
@ -2615,7 +2713,15 @@ and t is the same as `SECONDARY'.")
|
|||
if (EQ (selection, QCLIPBOARD))
|
||||
{
|
||||
Lisp_Object val = Qnil;
|
||||
Lisp_Object value;
|
||||
|
||||
#if TARGET_API_MAC_CARBON
|
||||
ScrapRef scrap;
|
||||
ScrapFlavorFlags sff;
|
||||
|
||||
if (GetCurrentScrap (&scrap) == noErr)
|
||||
if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr)
|
||||
val = Qt;
|
||||
#else /* not TARGET_API_MAC_CARBON */
|
||||
Handle my_handle;
|
||||
long rc, scrap_offset;
|
||||
|
||||
|
@ -2626,6 +2732,7 @@ and t is the same as `SECONDARY'.")
|
|||
val = Qt;
|
||||
|
||||
DisposeHandle (my_handle);
|
||||
#endif /* not TARGET_API_MAC_CARBON */
|
||||
|
||||
return val;
|
||||
}
|
||||
|
@ -2641,7 +2748,9 @@ syms_of_mac ()
|
|||
|
||||
defsubr (&Smac_paste_function);
|
||||
defsubr (&Smac_cut_function);
|
||||
#if 0
|
||||
defsubr (&Sx_selection_exists_p);
|
||||
#endif /* 0 */
|
||||
|
||||
defsubr (&Sdo_applescript);
|
||||
defsubr (&Smac_file_name_to_posix);
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/* Definitions and headers for communication on the Mac OS.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
|
@ -18,22 +18,24 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#ifndef EMACS_MACGUI_H
|
||||
#define EMACS_MACGUI_H
|
||||
|
||||
#include <MacTypes.h>
|
||||
#include <Quickdraw.h>
|
||||
|
||||
typedef int Pixmap;
|
||||
typedef int Bitmap;
|
||||
|
||||
typedef int Display; /* fix later */
|
||||
|
||||
typedef unsigned long Time;
|
||||
typedef RGBColor Color;
|
||||
|
||||
#if MAC_OSX
|
||||
typedef struct OpaqueWindowPtr* Window;
|
||||
#else
|
||||
#include <QuickDraw.h>
|
||||
typedef WindowPtr Window;
|
||||
#endif
|
||||
|
||||
#define FACE_DEFAULT (~0)
|
||||
|
||||
|
@ -51,9 +53,9 @@ typedef struct _XCharStruct
|
|||
struct MacFontStruct {
|
||||
char *fontname;
|
||||
|
||||
SInt16 mac_fontnum; /* font number of font used in this window */
|
||||
short mac_fontnum; /* font number of font used in this window */
|
||||
int mac_fontsize; /* size of font */
|
||||
Style mac_fontface; /* plain, bold, italics, etc. */
|
||||
short mac_fontface; /* plain, bold, italics, etc. */
|
||||
short mac_scriptcode; /* Mac OS script code for font used */
|
||||
|
||||
#if 0
|
||||
|
@ -67,14 +69,14 @@ struct MacFontStruct {
|
|||
int mDescent;
|
||||
int mLeading;
|
||||
char mTwoByte; /* true for two-byte font */
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
|
||||
/* from Xlib.h */
|
||||
#if 0
|
||||
XExtData *ext_data; /* hook for extension to hang data */
|
||||
Font fid; /* Font id for this font */
|
||||
unsigned direction; /* hint about the direction font is painted */
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
unsigned min_char_or_byte2;/* first character */
|
||||
unsigned max_char_or_byte2;/* last character */
|
||||
unsigned min_byte1; /* first row that exists */
|
||||
|
@ -84,7 +86,7 @@ struct MacFontStruct {
|
|||
unsigned default_char; /* char to print for undefined character */
|
||||
int n_properties; /* how many properties there are */
|
||||
XFontProp *properties; /* pointer to array of additional properties */
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
XCharStruct min_bounds; /* minimum bounds over all existing char */
|
||||
XCharStruct max_bounds; /* maximum bounds over all existing char */
|
||||
XCharStruct *per_char; /* first_char to last_char information */
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/* Display module for Mac OS.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
|
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@users.sourceforge.net). */
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
#include "macgui.h"
|
||||
#include "frame.h"
|
||||
|
@ -103,7 +103,7 @@ struct mac_display_info
|
|||
Window root_window;
|
||||
|
||||
/* The cursor to use for vertical scroll bars. */
|
||||
Cursor vertical_scroll_bar_cursor;
|
||||
struct Cursor *vertical_scroll_bar_cursor;
|
||||
|
||||
#if 0
|
||||
/* color palette information. */
|
||||
|
@ -151,10 +151,9 @@ struct mac_display_info
|
|||
int mouse_face_end_row, mouse_face_end_col;
|
||||
int mouse_face_end_x, mouse_face_end_y;
|
||||
int mouse_face_past_end;
|
||||
|
||||
Lisp_Object mouse_face_window;
|
||||
|
||||
int mouse_face_face_id;
|
||||
Lisp_Object mouse_face_overlay;
|
||||
|
||||
/* 1 if a mouse motion event came and we didn't handle it right away because
|
||||
gc was in progress. */
|
||||
|
@ -169,6 +168,9 @@ struct mac_display_info
|
|||
/* Nonzero means defer mouse-motion highlighting. */
|
||||
int mouse_face_defer;
|
||||
|
||||
/* Nonzero means that the mouse highlight should not be shown. */
|
||||
int mouse_face_hidden;
|
||||
|
||||
int mouse_face_image_state;
|
||||
|
||||
char *mac_id_name;
|
||||
|
@ -208,12 +210,12 @@ struct mac_display_info
|
|||
|
||||
#define x_display_info mac_display_info
|
||||
|
||||
/* This is a chain of structures for all the displays currently in use. */
|
||||
extern struct mac_display_info one_mac_display_info;
|
||||
|
||||
/* This is a chain of structures for all the X displays currently in use. */
|
||||
extern struct x_display_info *x_display_list;
|
||||
|
||||
/* This is a chain of structures for all the displays currently in use. */
|
||||
extern struct mac_display_info one_mac_display_info;
|
||||
|
||||
/* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
|
||||
one for each element of x_display_list and in the same order.
|
||||
NAME is the name of the frame.
|
||||
|
@ -228,10 +230,24 @@ extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
|
|||
|
||||
extern struct mac_display_info *mac_term_init ();
|
||||
|
||||
/* The collection of data describing a window on the Mac. Functions
|
||||
defined in macterm.c */
|
||||
/* When Emacs uses a tty window, tty_display in frame.c points to an
|
||||
x_output struct . */
|
||||
struct x_output
|
||||
{
|
||||
unsigned long background_pixel;
|
||||
unsigned long foreground_pixel;
|
||||
};
|
||||
|
||||
/* The collection of data describing a window on the Mac. */
|
||||
struct mac_output {
|
||||
WindowPtr mWP; /* pointer to QuickDraw window */
|
||||
/* Placeholder for things accessed through output_data.x. Must
|
||||
appear first. */
|
||||
struct x_output x_compatible;
|
||||
|
||||
/* Menubar "widget" handle. */
|
||||
int menubar_widget;
|
||||
|
||||
Window mWP; /* pointer to QuickDraw window */
|
||||
FRAME_PTR mFP; /* points back to the frame struct */
|
||||
|
||||
#if 0
|
||||
|
@ -239,11 +255,15 @@ struct mac_output {
|
|||
int mNumRows; /* number of characters per row */
|
||||
int mLineHeight; /* height of one line of text in pixels */
|
||||
int mCharWidth; /* width of one character in pixels */
|
||||
int mHomeX; /* X pixel coordinate of lower left corner of character at (0, 0) */
|
||||
int mHomeY; /* Y pixel coordinate of lower left corner of character at (0, 0) */
|
||||
int mHomeX; /* X pixel coordinate of lower left
|
||||
corner of character at (0, 0) */
|
||||
int mHomeY; /* Y pixel coordinate of lower left
|
||||
corner of character at (0, 0) */
|
||||
int mHighlight; /* current highlight state (0 = off). */
|
||||
int mTermWinSize; /* num of lines from top of window affected by ins_del_lines; set by set_terminal_window. */
|
||||
#endif
|
||||
int mTermWinSize; /* num of lines from top of window
|
||||
affected by ins_del_lines; set by
|
||||
set_terminal_window. */
|
||||
#endif /* 0 */
|
||||
|
||||
#if 0
|
||||
/* stuffs used by xfaces.c */
|
||||
|
@ -254,9 +274,6 @@ struct mac_output {
|
|||
int size_computed_faces;
|
||||
#endif
|
||||
|
||||
unsigned long background_pixel;
|
||||
unsigned long foreground_pixel;
|
||||
|
||||
/* Position of the Mac window (x and y offsets in global coordinates). */
|
||||
int left_pos;
|
||||
int top_pos;
|
||||
|
@ -318,11 +335,11 @@ struct mac_output {
|
|||
unsigned long scroll_bar_background_pixel;
|
||||
|
||||
/* Descriptor for the cursor in use for this window. */
|
||||
Cursor text_cursor;
|
||||
Cursor nontext_cursor;
|
||||
Cursor modeline_cursor;
|
||||
Cursor cross_cursor;
|
||||
Cursor hourglass_cursor;
|
||||
struct Cursor *text_cursor;
|
||||
struct Cursor *nontext_cursor;
|
||||
struct Cursor *modeline_cursor;
|
||||
struct Cursor *cross_cursor;
|
||||
struct Cursor *hourglass_cursor;
|
||||
#if 0
|
||||
/* Window whose cursor is hourglass_cursor. This window is temporarily
|
||||
mapped to display a hourglass-cursor. */
|
||||
|
@ -380,15 +397,13 @@ struct mac_output {
|
|||
/* Nonzero means menubar is currently active. */
|
||||
char menubar_active;
|
||||
|
||||
/* Always contains NULL on the Mac OS because the menu bar is shared. */
|
||||
int menubar_widget;
|
||||
|
||||
#if 0
|
||||
/* Nonzero means a menu command is being processed. */
|
||||
char menu_command_in_progress;
|
||||
|
||||
/* Nonzero means menubar is about to become active, but should be
|
||||
brought up to date first. */
|
||||
volatile char pending_menu_activation;
|
||||
|
||||
#endif
|
||||
/* Relief GCs, colors etc. */
|
||||
struct relief
|
||||
{
|
||||
|
@ -408,13 +423,15 @@ typedef struct mac_output mac_output;
|
|||
/* Return the Mac window used for displaying data in frame F. */
|
||||
#define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->mWP)
|
||||
|
||||
#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.mac->foreground_pixel)
|
||||
#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.mac->background_pixel)
|
||||
#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
|
||||
#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
|
||||
|
||||
#define FRAME_FONT(f) ((f)->output_data.mac->font)
|
||||
#define FRAME_FONTSET(f) ((f)->output_data.mac->fontset)
|
||||
|
||||
#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.mac->internal_border_width)
|
||||
#undef FRAME_INTERNAL_BORDER_WIDTH
|
||||
#define FRAME_INTERNAL_BORDER_WIDTH(f) \
|
||||
((f)->output_data.mac->internal_border_width)
|
||||
#define FRAME_LINE_HEIGHT(f) ((f)->output_data.mac->line_height)
|
||||
/* Width of the default font of frame F. Must be defined by each
|
||||
terminal specific header. */
|
||||
|
@ -469,6 +486,7 @@ typedef struct mac_output mac_output;
|
|||
#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.mac->left_fringe_width)
|
||||
#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.mac->right_fringe_width)
|
||||
|
||||
|
||||
|
||||
/* Mac-specific scroll bar stuff. */
|
||||
|
||||
|
@ -539,13 +557,16 @@ struct scroll_bar {
|
|||
XSETINT ((high), ((int32) >> 16) & 0xffff))
|
||||
|
||||
|
||||
/* Extract the Mac control handle of the scroll bar from a struct scroll_bar. */
|
||||
/* Extract the Mac control handle of the scroll bar from a struct
|
||||
scroll_bar. */
|
||||
#define SCROLL_BAR_CONTROL_HANDLE(ptr) \
|
||||
((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, (ptr)->control_handle_high))
|
||||
((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, \
|
||||
(ptr)->control_handle_high))
|
||||
|
||||
/* Store a Mac control handle in a struct scroll_bar. */
|
||||
#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, id) \
|
||||
(SCROLL_BAR_UNPACK ((ptr)->control_handle_low, (ptr)->control_handle_high, (int) id))
|
||||
(SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \
|
||||
(ptr)->control_handle_high, (int) id))
|
||||
|
||||
/* Return the inside width of a vertical scroll bar, given the outside
|
||||
width. */
|
||||
|
@ -563,12 +584,14 @@ struct scroll_bar {
|
|||
scaling buffer positions to scroll bar positions, we use this, not
|
||||
VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */
|
||||
#define VERTICAL_SCROLL_BAR_TOP_RANGE(f,height) \
|
||||
(VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) - VERTICAL_SCROLL_BAR_MIN_HANDLE - UP_AND_DOWN_ARROWS)
|
||||
(VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) \
|
||||
- VERTICAL_SCROLL_BAR_MIN_HANDLE - UP_AND_DOWN_ARROWS)
|
||||
|
||||
/* Return the inside height of vertical scroll bar, given the outside
|
||||
height. See VERTICAL_SCROLL_BAR_TOP_RANGE too. */
|
||||
#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f,height) \
|
||||
((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
|
||||
((height) - VERTICAL_SCROLL_BAR_TOP_BORDER \
|
||||
- VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
|
||||
|
||||
|
||||
/* Border widths for scroll bars.
|
||||
|
@ -645,8 +668,3 @@ struct scroll_bar {
|
|||
|
||||
struct frame * check_x_frame (Lisp_Object);
|
||||
|
||||
/* Dummy entry for defining tty_display in frame.c. */
|
||||
struct x_output
|
||||
{
|
||||
char _dummy;
|
||||
};
|
|
@ -137,6 +137,11 @@ extern Lisp_Object QCfamily, QCfilter;
|
|||
|
||||
/* Qexit is declared and initialized in eval.c. */
|
||||
|
||||
/* QCfamily is defined in xfaces.c. */
|
||||
extern Lisp_Object QCfamily;
|
||||
/* QCfilter is defined in keyboard.c. */
|
||||
extern Lisp_Object QCfilter;
|
||||
|
||||
/* a process object is a network connection when its childp field is neither
|
||||
Qt nor Qnil but is instead a cons cell (HOSTNAME PORTNUM). */
|
||||
|
||||
|
@ -3750,6 +3755,14 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
|
|||
SELECT_TYPE Atemp, Ctemp;
|
||||
|
||||
Atemp = input_wait_mask;
|
||||
#ifdef MAC_OSX
|
||||
/* On Mac OS X, the SELECT system call always says input is
|
||||
present (for reading) at stdin, even when none is. This
|
||||
causes the the call to SELECT below to return 1 and
|
||||
status_notify not to be called. As a result output of
|
||||
subprocesses are incorrectly discarded. */
|
||||
FD_CLR (0, &Atemp);
|
||||
#endif
|
||||
Ctemp = connect_wait_mask;
|
||||
EMACS_SET_SECS_USECS (timeout, 0, 0);
|
||||
if ((select (max (max_process_desc, max_keyboard_desc) + 1,
|
||||
|
|
291
src/s/darwin.h
Normal file
291
src/s/darwin.h
Normal file
|
@ -0,0 +1,291 @@
|
|||
/* System description header file for Darwin (Mac OS X).
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/*
|
||||
* Define symbols to identify the version of Unix this is.
|
||||
* Define all the symbols that apply correctly.
|
||||
*/
|
||||
|
||||
/* #define UNIPLUS */
|
||||
/* #define USG5 */
|
||||
/* #define USG */
|
||||
/* #define HPUX */
|
||||
/* #define UMAX */
|
||||
/* #define BSD4_1 */
|
||||
#define BSD4_2
|
||||
/* BSD4_3 and BSD4_4 are already defined in sys/param.h */
|
||||
/* #define BSD4_3 */
|
||||
/* #define BSD4_4 */
|
||||
#define BSD_SYSTEM
|
||||
/* #define VMS */
|
||||
|
||||
/* MAC_OS is used to conditionally compile code common to both MAC_OS8
|
||||
and MAC_OSX. */
|
||||
#ifdef MAC_OSX
|
||||
#define MAC_OS
|
||||
#endif
|
||||
|
||||
/* SYSTEM_TYPE should indicate the kind of system you are using.
|
||||
It sets the Lisp variable system-type. */
|
||||
|
||||
#define SYSTEM_TYPE "darwin"
|
||||
|
||||
/* NOMULTIPLEJOBS should be defined if your system's shell
|
||||
does not have "job control" (the ability to stop a program,
|
||||
run some other program, then continue the first one). */
|
||||
|
||||
/* #define NOMULTIPLEJOBS */
|
||||
|
||||
/* Emacs can read input using SIGIO and buffering characters itself,
|
||||
or using CBREAK mode and making C-g cause SIGINT.
|
||||
The choice is controlled by the variable interrupt_input.
|
||||
|
||||
Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
|
||||
|
||||
Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
|
||||
to indicate whether or not signal-driven I/O is possible. It uses
|
||||
INTERRUPT_INPUT to decide whether to use it by default.
|
||||
|
||||
SIGIO can be used only on systems that implement it (4.2 and 4.3).
|
||||
CBREAK mode has two disadvantages
|
||||
1) At least in 4.2, it is impossible to handle the Meta key properly.
|
||||
I hear that in system V this problem does not exist.
|
||||
2) Control-G causes output to be discarded.
|
||||
I do not know whether this can be fixed in system V.
|
||||
|
||||
Another method of doing input is planned but not implemented.
|
||||
It would have Emacs fork off a separate process
|
||||
to read the input and send it to the true Emacs process
|
||||
through a pipe. */
|
||||
|
||||
#define INTERRUPT_INPUT
|
||||
|
||||
/* Letter to use in finding device name of first pty,
|
||||
if system supports pty's. 'a' means it is /dev/ptya0 */
|
||||
|
||||
#define FIRST_PTY_LETTER 'p'
|
||||
|
||||
/*
|
||||
* Define HAVE_TERMIOS if the system provides POSIX-style
|
||||
* functions and macros for terminal control.
|
||||
*
|
||||
* Define HAVE_TERMIO if the system provides sysV-style ioctls
|
||||
* for terminal control.
|
||||
*
|
||||
* Do not define both. HAVE_TERMIOS is preferred, if it is
|
||||
* supported on your system.
|
||||
*/
|
||||
|
||||
#define HAVE_TERMIOS
|
||||
/* #define HAVE_TERMIO */
|
||||
|
||||
#define NO_TERMIO
|
||||
|
||||
/*
|
||||
* Define HAVE_PTYS if the system supports pty devices.
|
||||
*/
|
||||
|
||||
#define HAVE_PTYS
|
||||
|
||||
/*
|
||||
* Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
|
||||
* The 4.2 opendir, etc., library functions.
|
||||
*/
|
||||
|
||||
/* #define NONSYSTEM_DIR_LIBRARY */
|
||||
|
||||
/* Define this symbol if your system has the functions bcopy, etc. */
|
||||
|
||||
#define BSTRING
|
||||
|
||||
/* subprocesses should be defined if you want to
|
||||
have code for asynchronous subprocesses
|
||||
(as used in M-x compile and M-x shell).
|
||||
This is generally OS dependent, and not supported
|
||||
under most USG systems. */
|
||||
|
||||
#define subprocesses
|
||||
|
||||
/* If your system uses COFF (Common Object File Format) then define the
|
||||
preprocessor symbol "COFF". */
|
||||
|
||||
/* #define COFF */
|
||||
|
||||
/* define MAIL_USE_FLOCK if the mailer uses flock
|
||||
to interlock access to /usr/spool/mail/$USER.
|
||||
The alternative is that a lock file named
|
||||
/usr/spool/mail/$USER.lock. */
|
||||
|
||||
#define MAIL_USE_FLOCK
|
||||
|
||||
/* Define CLASH_DETECTION if you want lock files to be written
|
||||
so that Emacs can tell instantly when you try to modify
|
||||
a file that someone else has modified in his Emacs. */
|
||||
|
||||
#define CLASH_DETECTION
|
||||
|
||||
/* Define this if your operating system declares signal handlers to
|
||||
have a type other than the usual. `The usual' is `void' for ANSI C
|
||||
systems (i.e. when the __STDC__ macro is defined), and `int' for
|
||||
pre-ANSI systems. If you're using GCC on an older system, __STDC__
|
||||
will be defined, but the system's include files will still say that
|
||||
signal returns int or whatever; in situations like that, define
|
||||
this to be what the system's include files want. */
|
||||
/* #define SIGTYPE int */
|
||||
|
||||
/* If the character used to separate elements of the executable path
|
||||
is not ':', #define this to be the appropriate character constant. */
|
||||
/* #define SEPCHAR ':' */
|
||||
|
||||
/* Define this if the system can use mmap for buffer text allocation. */
|
||||
/* #define USE_MMAP_FOR_BUFFERS 1 */
|
||||
|
||||
/* ============================================================ */
|
||||
|
||||
/* Here, add any special hacks needed
|
||||
to make Emacs work on this system. For example,
|
||||
you might define certain system call names that don't
|
||||
exist on your system, or that do different things on
|
||||
your system and must be used only through an encapsulation
|
||||
(Which you should place, by convention, in sysdep.c). */
|
||||
|
||||
/* Some compilers tend to put everything declared static
|
||||
into the initialized data area, which becomes pure after dumping Emacs.
|
||||
On these systems, you must #define static as nothing to foil this.
|
||||
Note that emacs carefully avoids static vars inside functions. */
|
||||
|
||||
/* #define static */
|
||||
|
||||
/* If the system's imake configuration file defines `NeedWidePrototypes'
|
||||
as `NO', we must define NARROWPROTO manually. Such a define is
|
||||
generated in the Makefile generated by `xmkmf'. If we don't
|
||||
define NARROWPROTO, we will see the wrong function prototypes
|
||||
for X functions taking float or double parameters. */
|
||||
|
||||
/* #define NARROWPROTO 1 */
|
||||
|
||||
/* ============================================================ */
|
||||
|
||||
/* After adding support for a new system, modify the large case
|
||||
statement in the `configure' script to recognize reasonable
|
||||
configuration names, and add a description of the system to
|
||||
`etc/MACHINES'.
|
||||
|
||||
If you've just fixed a problem in an existing configuration file,
|
||||
you should also check `etc/MACHINES' to make sure its descriptions
|
||||
of known problems in that configuration should be updated. */
|
||||
|
||||
|
||||
/* Avoid the use of the name init_process (process.c) because it is
|
||||
also the name of a Mach system call. */
|
||||
#define init_process emacs_init_process
|
||||
|
||||
/* Fix compilation problem for regex.c. */
|
||||
#define __restrict
|
||||
|
||||
/* Fix compilation problem for md5.c. */
|
||||
#define __attribute__(x)
|
||||
|
||||
/* Used in dispnew.c. Copied from freebsd.h. */
|
||||
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
|
||||
|
||||
/* Darwin provides POSIX-style getpgrp. */
|
||||
#define GETPGRP_NO_ARG
|
||||
|
||||
/* System uses OXTABS instead of the expected TAB3. (Copied from
|
||||
bsd386.h.) */
|
||||
#define TAB3 OXTABS
|
||||
|
||||
/* Darwin ld insists on the use of malloc routines in the System
|
||||
framework. */
|
||||
#define SYSTEM_MALLOC
|
||||
|
||||
/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
|
||||
#define HAVE_SOCKETS
|
||||
|
||||
/* Extra initialization calls in main for Mac OS X system type. */
|
||||
#define SYMS_SYSTEM syms_of_mac()
|
||||
|
||||
/* Definitions for how to dump. Copied from nextstep.h. */
|
||||
|
||||
#define UNEXEC unexmacosx.o
|
||||
|
||||
#define START_FILES pre-crt0.o
|
||||
|
||||
/* start_of_text isn't actually used, so make it compile without error. */
|
||||
#define TEXT_START (0)
|
||||
|
||||
/* This seems to be right for end_of_text, but it may not be used anyway. */
|
||||
#define TEXT_END get_etext()
|
||||
|
||||
/* This seems to be right for end_of_data, but it may not be used anyway. */
|
||||
#define DATA_END get_edata()
|
||||
|
||||
/* Definitions for how to compile & link. */
|
||||
|
||||
/* Indicate that we are compiling for Mac OS X and where to find Mac
|
||||
specific headers. */
|
||||
#define C_SWITCH_SYSTEM -fpascal-strings -fno-common -DMAC_OSX -I../mac/src
|
||||
|
||||
/* Link in the Carbon lib. The -headerpad option tells ld (see man
|
||||
page) to leave room at the end of the header for adding load
|
||||
commands. Needed for dumping. 0x690 is the total size of 30
|
||||
segment load commands (at 56 each). */
|
||||
#define LD_SWITCH_SYSTEM_TEMACS -prebind -framework Carbon -lstdc++ -Xlinker -headerpad -Xlinker 690
|
||||
|
||||
#define C_SWITCH_SYSTEM_TEMACS -Dtemacs
|
||||
|
||||
/* Link this program just by running cc. */
|
||||
#define ORDINARY_LINK
|
||||
|
||||
/* We don't have a g library, so override the -lg LIBS_DEBUG switch. */
|
||||
#define LIBS_DEBUG
|
||||
|
||||
/* Adding -lm confuses the dynamic linker, so omit it. */
|
||||
#define LIB_MATH
|
||||
|
||||
/* Tell src/Makefile.in to create files in the Mac OS X application
|
||||
bundle mac/Emacs.app. */
|
||||
#define OTHER_FILES macosx-app
|
||||
|
||||
|
||||
/* Define the following so emacs symbols will not conflict with those
|
||||
in the System framework. Otherwise -prebind will not work. */
|
||||
|
||||
/* Do not define abort in emacs.c. */
|
||||
#define NO_ABORT
|
||||
|
||||
/* Do not define matherr in floatfns.c. */
|
||||
#define NO_MATHERR
|
||||
|
||||
|
||||
/* This prevents a compilation error in xfaces.c: struct kboard * is
|
||||
used in a function protocol the first time this type appears in the
|
||||
file, since MULTI_KBOARD is undefined for the Mac OS X build. */
|
||||
#ifndef NOT_C_CODE
|
||||
struct kboard;
|
||||
#endif
|
||||
|
||||
#ifdef temacs
|
||||
#define malloc unexec_malloc
|
||||
#define realloc unexec_realloc
|
||||
#define free unexec_free
|
||||
#endif
|
12
src/sysdep.c
12
src/sysdep.c
|
@ -48,7 +48,7 @@ extern void srandom P_ ((unsigned int));
|
|||
#include "blockinput.h"
|
||||
#undef NULL
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
/* It is essential to include stdlib.h so that this file picks up
|
||||
the correct definitions of rand, srand, and RAND_MAX.
|
||||
Otherwise random numbers will not work correctly. */
|
||||
|
@ -58,7 +58,7 @@ extern void srandom P_ ((unsigned int));
|
|||
/* Nonzero means delete a process right away if it exits (process.c). */
|
||||
static int delete_exited_processes;
|
||||
#endif
|
||||
#endif /* macintosh */
|
||||
#endif /* MAC_OS8 */
|
||||
|
||||
#ifdef WINDOWSNT
|
||||
#define read sys_read
|
||||
|
@ -759,7 +759,7 @@ sys_suspend ()
|
|||
|
||||
/* Fork a subshell. */
|
||||
|
||||
#ifndef macintosh
|
||||
#ifndef MAC_OS8
|
||||
void
|
||||
sys_subshell ()
|
||||
{
|
||||
|
@ -895,7 +895,7 @@ sys_subshell ()
|
|||
synch_process_alive = 0;
|
||||
#endif /* !VMS */
|
||||
}
|
||||
#endif /* !macintosh */
|
||||
#endif /* !MAC_OS8 */
|
||||
|
||||
static void
|
||||
save_signal_handlers (saved_handlers)
|
||||
|
@ -1305,7 +1305,7 @@ init_sys_modes ()
|
|||
{
|
||||
struct emacs_tty tty;
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS8
|
||||
/* cus-start.el complains if delete-exited-processes is not defined */
|
||||
#ifndef subprocesses
|
||||
DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
|
||||
|
@ -1313,7 +1313,7 @@ init_sys_modes ()
|
|||
nil means don't delete them until `list-processes' is run. */);
|
||||
delete_exited_processes = 0;
|
||||
#endif
|
||||
#endif /* not macintosh */
|
||||
#endif /* MAC_OS8 */
|
||||
|
||||
#ifdef VMS
|
||||
#if 0
|
||||
|
|
|
@ -56,7 +56,7 @@ extern int tgetnum P_ ((char *id));
|
|||
#ifdef HAVE_X_WINDOWS
|
||||
#include "xterm.h"
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macterm.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -144,6 +144,9 @@ find_capability (bp, cap)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* These are already defined in the System framework in Mac OS X and
|
||||
cause prebinding to fail. */
|
||||
#ifndef MAC_OSX
|
||||
int
|
||||
tgetnum (cap)
|
||||
char *cap;
|
||||
|
@ -177,6 +180,7 @@ tgetstr (cap, area)
|
|||
return NULL;
|
||||
return tgetst1 (ptr, area);
|
||||
}
|
||||
#endif /* MAC_OSX */
|
||||
|
||||
#ifdef IS_EBCDIC_HOST
|
||||
/* Table, indexed by a character in range 0200 to 0300 with 0200 subtracted,
|
||||
|
@ -294,7 +298,12 @@ short ospeed;
|
|||
/* If OSPEED is 0, we use this as the actual baud rate. */
|
||||
int tputs_baud_rate;
|
||||
#endif
|
||||
|
||||
/* Already defined in the System framework in Mac OS X and causes
|
||||
prebinding to fail. */
|
||||
#ifndef MAC_OSX
|
||||
char PC;
|
||||
#endif /* MAC_OSX */
|
||||
|
||||
#ifndef emacs
|
||||
/* Actual baud rate if positive;
|
||||
|
@ -313,6 +322,9 @@ static int speeds[] =
|
|||
|
||||
#endif /* not emacs */
|
||||
|
||||
/* Already defined in the System framework in Mac OS X and causes
|
||||
prebinding to fail. */
|
||||
#ifndef MAC_OSX
|
||||
void
|
||||
tputs (str, nlines, outfun)
|
||||
register char *str;
|
||||
|
@ -375,6 +387,7 @@ tputs (str, nlines, outfun)
|
|||
while (padcount-- > 0)
|
||||
(*outfun) (PC);
|
||||
}
|
||||
#endif /* MAC_OSX */
|
||||
|
||||
/* Finding the termcap entry in the termcap data base. */
|
||||
|
||||
|
@ -445,6 +458,9 @@ valid_filename_p (fn)
|
|||
0 if the data base is accessible but the type NAME is not defined
|
||||
in it, and some other value otherwise. */
|
||||
|
||||
/* Already defined in the System framework in Mac OS X and causes
|
||||
prebinding to fail. */
|
||||
#ifndef MAC_OSX
|
||||
int
|
||||
tgetent (bp, name)
|
||||
char *bp, *name;
|
||||
|
@ -603,6 +619,7 @@ tgetent (bp, name)
|
|||
term_entry = bp;
|
||||
return 1;
|
||||
}
|
||||
#endif /* MAC_OSX */
|
||||
|
||||
/* Given file open on FD and buffer BUFP,
|
||||
scan the file from the beginning until a line is found
|
||||
|
|
|
@ -107,6 +107,9 @@ tparam (string, outstring, len, arg0, arg1, arg2, arg3)
|
|||
return tparam1 (string, outstring, len, NULL, NULL, arg);
|
||||
}
|
||||
|
||||
/* These are already defined in the System framework in Mac OS X and
|
||||
cause prebinding to fail. */
|
||||
#ifndef MAC_OSX
|
||||
char *BC;
|
||||
char *UP;
|
||||
|
||||
|
@ -124,6 +127,7 @@ tgoto (cm, hpos, vpos)
|
|||
args[1] = hpos;
|
||||
return tparam1 (cm, tgoto_buf, 50, UP, BC, args);
|
||||
}
|
||||
#endif
|
||||
|
||||
static char *
|
||||
tparam1 (string, outstring, len, up, left, argp)
|
||||
|
|
914
src/unexmacosx.c
Normal file
914
src/unexmacosx.c
Normal file
|
@ -0,0 +1,914 @@
|
|||
/* Dump Emacs in Mach-O format for use on Mac OS X.
|
||||
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Contributed by Andrew Choi (akochoi@mac.com). */
|
||||
|
||||
/* Documentation note.
|
||||
|
||||
Consult the following documents/files for a description of the
|
||||
Mach-O format: the file loader.h, man pages for Mach-O and ld, old
|
||||
NEXTSTEP documents of the Mach-O format. The tool otool dumps the
|
||||
mach header (-h option) and the load commands (-l option) in a
|
||||
Mach-O file. The tool nm on Mac OS X displays the symbol table in
|
||||
a Mach-O file. For examples of unexec for the Mach-O format, see
|
||||
the file unexnext.c in the GNU Emacs distribution, the file
|
||||
unexdyld.c in the Darwin port of GNU Emacs 20.7, and unexdyld.c in
|
||||
the Darwin port of XEmacs 21.1. Also the Darwin Libc source
|
||||
contains the source code for malloc_freezedry and malloc_jumpstart.
|
||||
Read that to see what they do. This file was written completely
|
||||
from scratch, making use of information from the above sources. */
|
||||
|
||||
/* The Mac OS X implementation of unexec makes use of Darwin's `zone'
|
||||
memory allocator. All calls to malloc, realloc, and free in Emacs
|
||||
are redirected to unexec_malloc, unexec_realloc, and unexec_free in
|
||||
this file. When temacs is run, all memory requests are handled in
|
||||
the zone EmacsZone. The Darwin memory allocator library calls
|
||||
maintain the data structures to manage this zone. Dumping writes
|
||||
its contents to data segments of the executable file. When emacs
|
||||
is run, the loader recreates the contents of the zone in memory.
|
||||
However since the initialization routine of the zone memory
|
||||
allocator is run again, this `zone' can no longer be used as a
|
||||
heap. That is why emacs uses the ordinary malloc system call to
|
||||
allocate memory. Also, when a block of memory needs to be
|
||||
reallocated and the new size is larger than the old one, a new
|
||||
block must be obtained by malloc and the old contents copied to
|
||||
it. */
|
||||
|
||||
/* Peculiarity of the Mach-O files generated by ld in Mac OS X
|
||||
(possible causes of future bugs if changed).
|
||||
|
||||
The file offset of the start of the __TEXT segment is zero. Since
|
||||
the Mach header and load commands are located at the beginning of a
|
||||
Mach-O file, copying the contents of the __TEXT segment from the
|
||||
input file overwrites them in the output file. Despite this,
|
||||
unexec works fine as written below because the segment load command
|
||||
for __TEXT appears, and is therefore processed, before all other
|
||||
load commands except the segment load command for __PAGEZERO, which
|
||||
remains unchanged.
|
||||
|
||||
Although the file offset of the start of the __TEXT segment is
|
||||
zero, none of the sections it contains actually start there. In
|
||||
fact, the earliest one starts a few hundred bytes beyond the end of
|
||||
the last load command. The linker option -headerpad controls the
|
||||
minimum size of this padding. Its setting can be changed in
|
||||
s/darwin.h. A value of 0x300, e.g., leaves room for about 15
|
||||
additional load commands for the newly created __DATA segments (at
|
||||
56 bytes each). Unexec fails if there is not enough room for these
|
||||
new segments.
|
||||
|
||||
The __TEXT segment contains the sections __text, __cstring,
|
||||
__picsymbol_stub, and __const and the __DATA segment contains the
|
||||
sections __data, __la_symbol_ptr, __nl_symbol_ptr, __dyld, __bss,
|
||||
and __common. The other segments do not contain any sections.
|
||||
These sections are copied from the input file to the output file,
|
||||
except for __data, __bss, and __common, which are dumped from
|
||||
memory. The types of the sections __bss and __common are changed
|
||||
from S_ZEROFILL to S_REGULAR. Note that the number of sections and
|
||||
their relative order in the input and output files remain
|
||||
unchanged. Otherwise all n_sect fields in the nlist records in the
|
||||
symbol table (specified by the LC_SYMTAB load command) will have to
|
||||
be changed accordingly.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <mach/mach.h>
|
||||
#include <mach-o/loader.h>
|
||||
#include <objc/malloc.h>
|
||||
|
||||
#define VERBOSE 1
|
||||
|
||||
/* Size of buffer used to copy data from the input file to the output
|
||||
file in function unexec_copy. */
|
||||
#define UNEXEC_COPY_BUFSZ 1024
|
||||
|
||||
/* Regions with memory addresses above this value are assumed to be
|
||||
mapped to dynamically loaded libraries and will not be dumped. */
|
||||
#define VM_DATA_TOP (20 * 1024 * 1024)
|
||||
|
||||
/* Used by malloc_freezedry and malloc_jumpstart. */
|
||||
int malloc_cookie;
|
||||
|
||||
/* Type of an element on the list of regions to be dumped. */
|
||||
struct region_t {
|
||||
vm_address_t address;
|
||||
vm_size_t size;
|
||||
vm_prot_t protection;
|
||||
vm_prot_t max_protection;
|
||||
|
||||
struct region_t *next;
|
||||
};
|
||||
|
||||
/* Head and tail of the list of regions to be dumped. */
|
||||
struct region_t *region_list_head = 0;
|
||||
struct region_t *region_list_tail = 0;
|
||||
|
||||
/* Pointer to array of load commands. */
|
||||
struct load_command **lca;
|
||||
|
||||
/* Number of load commands. */
|
||||
int nlc;
|
||||
|
||||
/* The highest VM address of segments loaded by the input file.
|
||||
Regions with addresses beyond this are assumed to be allocated
|
||||
dynamically and thus require dumping. */
|
||||
vm_address_t infile_lc_highest_addr = 0;
|
||||
|
||||
/* The lowest file offset used by the all sections in the __TEXT
|
||||
segments. This leaves room at the beginning of the file to store
|
||||
the Mach-O header. Check this value against header size to ensure
|
||||
the added load commands for the new __DATA segments did not
|
||||
overwrite any of the sections in the __TEXT segment. */
|
||||
unsigned long text_seg_lowest_offset = 0x10000000;
|
||||
|
||||
/* Mach header. */
|
||||
struct mach_header mh;
|
||||
|
||||
/* Offset at which the next load command should be written. */
|
||||
unsigned long curr_header_offset = sizeof (struct mach_header);
|
||||
|
||||
/* Current adjustment that needs to be made to offset values because
|
||||
of additional data segments. */
|
||||
unsigned long delta = 0;
|
||||
|
||||
int infd, outfd;
|
||||
|
||||
int in_dumped_exec = 0;
|
||||
|
||||
malloc_zone_t *emacs_zone;
|
||||
|
||||
/* Read n bytes from infd into memory starting at address dest.
|
||||
Return true if successful, false otherwise. */
|
||||
static int
|
||||
unexec_read (void *dest, size_t n)
|
||||
{
|
||||
return n == read (infd, dest, n);
|
||||
}
|
||||
|
||||
/* Write n bytes from memory starting at address src to outfd starting
|
||||
at offset dest. Return true if successful, false otherwise. */
|
||||
static int
|
||||
unexec_write (off_t dest, const void *src, size_t count)
|
||||
{
|
||||
if (lseek (outfd, dest, SEEK_SET) != dest)
|
||||
return 0;
|
||||
|
||||
return write (outfd, src, count) == count;
|
||||
}
|
||||
|
||||
/* Copy n bytes from starting offset src in infd to starting offset
|
||||
dest in outfd. Return true if successful, false otherwise. */
|
||||
static int
|
||||
unexec_copy (off_t dest, off_t src, ssize_t count)
|
||||
{
|
||||
ssize_t bytes_read;
|
||||
|
||||
char buf[UNEXEC_COPY_BUFSZ];
|
||||
|
||||
if (lseek (infd, src, SEEK_SET) != src)
|
||||
return 0;
|
||||
|
||||
if (lseek (outfd, dest, SEEK_SET) != dest)
|
||||
return 0;
|
||||
|
||||
while (count > 0)
|
||||
{
|
||||
bytes_read = read (infd, buf, UNEXEC_COPY_BUFSZ);
|
||||
if (bytes_read <= 0)
|
||||
return 0;
|
||||
if (write (outfd, buf, bytes_read) != bytes_read)
|
||||
return 0;
|
||||
count -= bytes_read;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Debugging and informational messages routines. */
|
||||
|
||||
static void
|
||||
unexec_error (char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, format);
|
||||
fprintf (stderr, "unexec: ");
|
||||
vfprintf (stderr, format, ap);
|
||||
fprintf (stderr, "\n");
|
||||
va_end (ap);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
print_prot (vm_prot_t prot)
|
||||
{
|
||||
if (prot == VM_PROT_NONE)
|
||||
printf ("none");
|
||||
else
|
||||
{
|
||||
putchar (prot & VM_PROT_READ ? 'r' : ' ');
|
||||
putchar (prot & VM_PROT_WRITE ? 'w' : ' ');
|
||||
putchar (prot & VM_PROT_EXECUTE ? 'x' : ' ');
|
||||
putchar (' ');
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_region (vm_address_t address, vm_size_t size, vm_prot_t prot,
|
||||
vm_prot_t max_prot)
|
||||
{
|
||||
printf ("%#10x %#8x ", address, size);
|
||||
print_prot (prot);
|
||||
putchar (' ');
|
||||
print_prot (max_prot);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
static void
|
||||
print_region_list ()
|
||||
{
|
||||
struct region_t *r;
|
||||
|
||||
printf (" address size prot maxp\n");
|
||||
|
||||
for (r = region_list_head; r; r = r->next)
|
||||
print_region (r->address, r->size, r->protection, r->max_protection);
|
||||
}
|
||||
|
||||
void
|
||||
print_regions ()
|
||||
{
|
||||
task_t target_task = mach_task_self ();
|
||||
vm_address_t address = (vm_address_t) 0;
|
||||
vm_size_t size;
|
||||
struct vm_region_basic_info info;
|
||||
mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT;
|
||||
mach_port_t object_name;
|
||||
|
||||
printf (" address size prot maxp\n");
|
||||
|
||||
while (vm_region (target_task, &address, &size, VM_REGION_BASIC_INFO,
|
||||
(vm_region_info_t) &info, &info_count, &object_name)
|
||||
== KERN_SUCCESS && info_count == VM_REGION_BASIC_INFO_COUNT)
|
||||
{
|
||||
print_region (address, size, info.protection, info.max_protection);
|
||||
|
||||
if (object_name != MACH_PORT_NULL)
|
||||
mach_port_deallocate (target_task, object_name);
|
||||
|
||||
address += size;
|
||||
}
|
||||
}
|
||||
|
||||
/* Build the list of regions that need to be dumped. Regions with
|
||||
addresses above VM_DATA_TOP are omitted. Adjacent regions with
|
||||
identical protection are merged. Note that non-writable regions
|
||||
cannot be omitted because they some regions created at run time are
|
||||
read-only. */
|
||||
static void
|
||||
build_region_list ()
|
||||
{
|
||||
task_t target_task = mach_task_self ();
|
||||
vm_address_t address = (vm_address_t) 0;
|
||||
vm_size_t size;
|
||||
struct vm_region_basic_info info;
|
||||
mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT;
|
||||
mach_port_t object_name;
|
||||
struct region_t *r;
|
||||
|
||||
#if VERBOSE
|
||||
printf ("--- List of All Regions ---\n");
|
||||
printf (" address size prot maxp\n");
|
||||
#endif
|
||||
|
||||
while (vm_region (target_task, &address, &size, VM_REGION_BASIC_INFO,
|
||||
(vm_region_info_t) &info, &info_count, &object_name)
|
||||
== KERN_SUCCESS && info_count == VM_REGION_BASIC_INFO_COUNT)
|
||||
{
|
||||
/* Done when we reach addresses of shared libraries, which are
|
||||
loaded in high memory. */
|
||||
if (address >= VM_DATA_TOP)
|
||||
break;
|
||||
|
||||
#if VERBOSE
|
||||
print_region (address, size, info.protection, info.max_protection);
|
||||
#endif
|
||||
|
||||
/* If a region immediately follows the previous one (the one
|
||||
most recently added to the list) and has identical
|
||||
protection, merge it with the latter. Otherwise create a
|
||||
new list element for it. */
|
||||
if (region_list_tail
|
||||
&& info.protection == region_list_tail->protection
|
||||
&& info.max_protection == region_list_tail->max_protection
|
||||
&& region_list_tail->address + region_list_tail->size == address)
|
||||
{
|
||||
region_list_tail->size += size;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = (struct region_t *) malloc (sizeof (struct region_t));
|
||||
|
||||
if (!r)
|
||||
unexec_error ("cannot allocate region structure");
|
||||
|
||||
r->address = address;
|
||||
r->size = size;
|
||||
r->protection = info.protection;
|
||||
r->max_protection = info.max_protection;
|
||||
|
||||
r->next = 0;
|
||||
if (region_list_head == 0)
|
||||
{
|
||||
region_list_head = r;
|
||||
region_list_tail = r;
|
||||
}
|
||||
else
|
||||
{
|
||||
region_list_tail->next = r;
|
||||
region_list_tail = r;
|
||||
}
|
||||
|
||||
/* Deallocate (unused) object name returned by
|
||||
vm_region. */
|
||||
if (object_name != MACH_PORT_NULL)
|
||||
mach_port_deallocate (target_task, object_name);
|
||||
}
|
||||
|
||||
address += size;
|
||||
}
|
||||
|
||||
printf ("--- List of Regions to be Dumped ---\n");
|
||||
print_region_list ();
|
||||
}
|
||||
|
||||
|
||||
#define MAX_UNEXEC_REGIONS 30
|
||||
|
||||
int num_unexec_regions;
|
||||
vm_range_t unexec_regions[MAX_UNEXEC_REGIONS];
|
||||
|
||||
static void
|
||||
unexec_regions_recorder (task_t task, void *rr, unsigned type,
|
||||
vm_range_t *ranges, unsigned num)
|
||||
{
|
||||
while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
|
||||
{
|
||||
unexec_regions[num_unexec_regions++] = *ranges;
|
||||
printf ("%#8x (sz: %#8x)\n", ranges->address, ranges->size);
|
||||
ranges++; num--;
|
||||
}
|
||||
if (num_unexec_regions == MAX_UNEXEC_REGIONS)
|
||||
fprintf (stderr, "malloc_freezedry_recorder: too many regions\n");
|
||||
}
|
||||
|
||||
static kern_return_t
|
||||
unexec_reader (task_t task, vm_address_t address, vm_size_t size, void **ptr)
|
||||
{
|
||||
*ptr = (void *) address;
|
||||
return KERN_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
find_emacs_zone_regions ()
|
||||
{
|
||||
num_unexec_regions = 0;
|
||||
|
||||
emacs_zone->introspect->enumerator (mach_task_self(), 0,
|
||||
MALLOC_PTR_REGION_RANGE_TYPE
|
||||
| MALLOC_ADMIN_REGION_RANGE_TYPE,
|
||||
(vm_address_t) emacs_zone,
|
||||
unexec_reader,
|
||||
unexec_regions_recorder);
|
||||
}
|
||||
|
||||
|
||||
/* More informational messages routines. */
|
||||
|
||||
static void
|
||||
print_load_command_name (int lc)
|
||||
{
|
||||
switch (lc)
|
||||
{
|
||||
case LC_SEGMENT:
|
||||
printf ("LC_SEGMENT ");
|
||||
break;
|
||||
case LC_LOAD_DYLINKER:
|
||||
printf ("LC_LOAD_DYLINKER ");
|
||||
break;
|
||||
case LC_LOAD_DYLIB:
|
||||
printf ("LC_LOAD_DYLIB ");
|
||||
break;
|
||||
case LC_SYMTAB:
|
||||
printf ("LC_SYMTAB ");
|
||||
break;
|
||||
case LC_DYSYMTAB:
|
||||
printf ("LC_DYSYMTAB ");
|
||||
break;
|
||||
case LC_UNIXTHREAD:
|
||||
printf ("LC_UNIXTHREAD ");
|
||||
break;
|
||||
case LC_PREBOUND_DYLIB:
|
||||
printf ("LC_PREBOUND_DYLIB");
|
||||
break;
|
||||
case LC_TWOLEVEL_HINTS:
|
||||
printf ("LC_TWOLEVEL_HINTS");
|
||||
break;
|
||||
default:
|
||||
printf ("unknown ");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_load_command (struct load_command *lc)
|
||||
{
|
||||
print_load_command_name (lc->cmd);
|
||||
printf ("%8d", lc->cmdsize);
|
||||
|
||||
if (lc->cmd == LC_SEGMENT)
|
||||
{
|
||||
struct segment_command *scp;
|
||||
struct section *sectp;
|
||||
int j;
|
||||
|
||||
scp = (struct segment_command *) lc;
|
||||
printf (" %-16.16s %#10x %#8x\n",
|
||||
scp->segname, scp->vmaddr, scp->vmsize);
|
||||
|
||||
sectp = (struct section *) (scp + 1);
|
||||
for (j = 0; j < scp->nsects; j++)
|
||||
{
|
||||
printf (" %-16.16s %#10x %#8x\n",
|
||||
sectp->sectname, sectp->addr, sectp->size);
|
||||
sectp++;
|
||||
}
|
||||
}
|
||||
else
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
/* Read header and load commands from input file. Store the latter in
|
||||
the global array lca. Store the total number of load commands in
|
||||
global variable nlc. */
|
||||
static void
|
||||
read_load_commands ()
|
||||
{
|
||||
int n, i, j;
|
||||
|
||||
if (!unexec_read (&mh, sizeof (struct mach_header)))
|
||||
unexec_error ("cannot read mach-o header");
|
||||
|
||||
if (mh.magic != MH_MAGIC)
|
||||
unexec_error ("input file not in Mach-O format");
|
||||
|
||||
if (mh.filetype != MH_EXECUTE)
|
||||
unexec_error ("input Mach-O file is not an executable object file");
|
||||
|
||||
#if VERBOSE
|
||||
printf ("--- Header Information ---\n");
|
||||
printf ("Magic = 0x%08x\n", mh.magic);
|
||||
printf ("CPUType = %d\n", mh.cputype);
|
||||
printf ("CPUSubType = %d\n", mh.cpusubtype);
|
||||
printf ("FileType = 0x%x\n", mh.filetype);
|
||||
printf ("NCmds = %d\n", mh.ncmds);
|
||||
printf ("SizeOfCmds = %d\n", mh.sizeofcmds);
|
||||
printf ("Flags = 0x%08x\n", mh.flags);
|
||||
#endif
|
||||
|
||||
nlc = mh.ncmds;
|
||||
lca = (struct load_command **) malloc (nlc * sizeof (struct load_command *));
|
||||
|
||||
for (i = 0; i < nlc; i++)
|
||||
{
|
||||
struct load_command lc;
|
||||
/* Load commands are variable-size: so read the command type and
|
||||
size first and then read the rest. */
|
||||
if (!unexec_read (&lc, sizeof (struct load_command)))
|
||||
unexec_error ("cannot read load command");
|
||||
lca[i] = (struct load_command *) malloc (lc.cmdsize);
|
||||
memcpy (lca[i], &lc, sizeof (struct load_command));
|
||||
if (!unexec_read (lca[i] + 1, lc.cmdsize - sizeof (struct load_command)))
|
||||
unexec_error ("cannot read content of load command");
|
||||
if (lc.cmd == LC_SEGMENT)
|
||||
{
|
||||
struct segment_command *scp = (struct segment_command *) lca[i];
|
||||
|
||||
if (scp->vmaddr + scp->vmsize > infile_lc_highest_addr)
|
||||
infile_lc_highest_addr = scp->vmaddr + scp->vmsize;
|
||||
|
||||
if (strncmp (scp->segname, SEG_TEXT, 16) == 0)
|
||||
{
|
||||
struct section *sectp = (struct section *) (scp + 1);
|
||||
int j;
|
||||
|
||||
for (j = 0; j < scp->nsects; j++)
|
||||
if (sectp->offset < text_seg_lowest_offset)
|
||||
text_seg_lowest_offset = sectp->offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf ("Highest address of load commands in input file: %#8x\n",
|
||||
infile_lc_highest_addr);
|
||||
|
||||
printf ("Lowest offset of all sections in __TEXT segment: %#8x\n",
|
||||
text_seg_lowest_offset);
|
||||
|
||||
printf ("--- List of Load Commands in Input File ---\n");
|
||||
printf ("# cmd cmdsize name address size\n");
|
||||
|
||||
for (i = 0; i < nlc; i++)
|
||||
{
|
||||
printf ("%1d ", i);
|
||||
print_load_command (lca[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Copy a LC_SEGMENT load command other than the __DATA segment from
|
||||
the input file to the output file, adjusting the file offset of the
|
||||
segment and the file offsets of sections contained in it. */
|
||||
static void
|
||||
copy_segment (struct load_command *lc)
|
||||
{
|
||||
struct segment_command *scp = (struct segment_command *) lc;
|
||||
unsigned long old_fileoff = scp->fileoff;
|
||||
struct section *sectp;
|
||||
int j;
|
||||
|
||||
scp->fileoff += delta;
|
||||
|
||||
sectp = (struct section *) (scp + 1);
|
||||
for (j = 0; j < scp->nsects; j++)
|
||||
{
|
||||
sectp->offset += delta;
|
||||
sectp++;
|
||||
}
|
||||
|
||||
printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
|
||||
scp->segname, scp->fileoff, scp->fileoff + scp->filesize,
|
||||
scp->filesize);
|
||||
|
||||
if (!unexec_copy (scp->fileoff, old_fileoff, scp->filesize))
|
||||
unexec_error ("cannot copy segment from input to output file");
|
||||
if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
|
||||
unexec_error ("cannot write load command to header");
|
||||
|
||||
curr_header_offset += lc->cmdsize;
|
||||
}
|
||||
|
||||
/* Copy a LC_SEGMENT load command for the __DATA segment in the input
|
||||
file to the output file. We assume that only one such segment load
|
||||
command exists in the input file and it contains the sections
|
||||
__data, __bss, __common, __la_symbol_ptr, __nl_symbol_ptr, and
|
||||
__dyld. The first three of these should be dumped from memory and
|
||||
the rest should be copied from the input file. Note that the
|
||||
sections __bss and __common contain no data in the input file
|
||||
because their flag fields have the value S_ZEROFILL. Dumping these
|
||||
from memory makes it necessary to adjust file offset fields in
|
||||
subsequently dumped load commands. Then, create new __DATA segment
|
||||
load commands for regions on the region list other than the one
|
||||
corresponding to the __DATA segment in the input file. */
|
||||
static void
|
||||
copy_data_segment (struct load_command *lc)
|
||||
{
|
||||
struct segment_command *scp = (struct segment_command *) lc;
|
||||
struct section *sectp;
|
||||
int j;
|
||||
unsigned long header_offset, file_offset, old_file_offset;
|
||||
struct region_t *r;
|
||||
|
||||
printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
|
||||
scp->segname, scp->fileoff, scp->fileoff + scp->filesize,
|
||||
scp->filesize);
|
||||
|
||||
if (delta != 0)
|
||||
unexec_error ("cannot handle multiple DATA segments in input file");
|
||||
|
||||
/* Offsets in the output file for writing the next section structure
|
||||
and segment data block, respectively. */
|
||||
header_offset = curr_header_offset + sizeof (struct segment_command);
|
||||
|
||||
sectp = (struct section *) (scp + 1);
|
||||
for (j = 0; j < scp->nsects; j++)
|
||||
{
|
||||
old_file_offset = sectp->offset;
|
||||
sectp->offset = sectp->addr - scp->vmaddr + scp->fileoff;
|
||||
/* The __data section is dumped from memory. The __bss and
|
||||
__common sections are also dumped from memory but their flag
|
||||
fields require changing (from S_ZEROFILL to S_REGULAR). The
|
||||
other three kinds of sections are just copied from the input
|
||||
file. */
|
||||
if (strncmp (sectp->sectname, SECT_DATA, 16) == 0)
|
||||
{
|
||||
if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
|
||||
unexec_error ("cannot write section %s", SECT_DATA);
|
||||
if (!unexec_write (header_offset, sectp, sizeof (struct section)))
|
||||
unexec_error ("cannot write section %s's header", SECT_DATA);
|
||||
}
|
||||
else if (strncmp (sectp->sectname, SECT_BSS, 16) == 0
|
||||
|| strncmp (sectp->sectname, SECT_COMMON, 16) == 0)
|
||||
{
|
||||
sectp->flags = S_REGULAR;
|
||||
if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
|
||||
unexec_error ("cannot write section %s", SECT_DATA);
|
||||
if (!unexec_write (header_offset, sectp, sizeof (struct section)))
|
||||
unexec_error ("cannot write section %s's header", SECT_DATA);
|
||||
}
|
||||
else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
|
||||
|| strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
|
||||
|| strncmp (sectp->sectname, "__dyld", 16) == 0
|
||||
|| strncmp (sectp->sectname, "__const", 16) == 0)
|
||||
{
|
||||
if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
|
||||
unexec_error ("cannot copy section %s", sectp->sectname);
|
||||
if (!unexec_write (header_offset, sectp, sizeof (struct section)))
|
||||
unexec_error ("cannot write section %s's header", sectp->sectname);
|
||||
}
|
||||
else
|
||||
unexec_error ("unrecognized section name in __DATA segment");
|
||||
|
||||
printf (" section %-16.16s at %#8x - %#8x (sz: %#8x)\n",
|
||||
sectp->sectname, sectp->offset, sectp->offset + sectp->size,
|
||||
sectp->size);
|
||||
|
||||
header_offset += sizeof (struct section);
|
||||
sectp++;
|
||||
}
|
||||
|
||||
/* The new filesize of the segment is set to its vmsize because data
|
||||
blocks for segments must start at region boundaries. Note that
|
||||
this may leave unused locations at the end of the segment data
|
||||
block because the total of the sizes of all sections in the
|
||||
segment is generally smaller than vmsize. */
|
||||
delta = scp->vmsize - scp->filesize;
|
||||
scp->filesize = scp->vmsize;
|
||||
if (!unexec_write (curr_header_offset, scp, sizeof (struct segment_command)))
|
||||
unexec_error ("cannot write header of __DATA segment");
|
||||
curr_header_offset += lc->cmdsize;
|
||||
|
||||
/* Create new __DATA segment load commands for regions on the region
|
||||
list that do not corresponding to any segment load commands in
|
||||
the input file.
|
||||
*/
|
||||
file_offset = scp->fileoff + scp->filesize;
|
||||
for (j = 0; j < num_unexec_regions; j++)
|
||||
{
|
||||
struct segment_command sc;
|
||||
|
||||
sc.cmd = LC_SEGMENT;
|
||||
sc.cmdsize = sizeof (struct segment_command);
|
||||
strncpy (sc.segname, SEG_DATA, 16);
|
||||
sc.vmaddr = unexec_regions[j].address;
|
||||
sc.vmsize = unexec_regions[j].size;
|
||||
sc.fileoff = file_offset;
|
||||
sc.filesize = unexec_regions[j].size;
|
||||
sc.maxprot = VM_PROT_READ | VM_PROT_WRITE;
|
||||
sc.initprot = VM_PROT_READ | VM_PROT_WRITE;
|
||||
sc.nsects = 0;
|
||||
sc.flags = 0;
|
||||
|
||||
printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
|
||||
sc.segname, sc.fileoff, sc.fileoff + sc.filesize,
|
||||
sc.filesize);
|
||||
|
||||
if (!unexec_write (sc.fileoff, (void *) sc.vmaddr, sc.vmsize))
|
||||
unexec_error ("cannot write new __DATA segment");
|
||||
delta += sc.filesize;
|
||||
file_offset += sc.filesize;
|
||||
|
||||
if (!unexec_write (curr_header_offset, &sc, sc.cmdsize))
|
||||
unexec_error ("cannot write new __DATA segment's header");
|
||||
curr_header_offset += sc.cmdsize;
|
||||
mh.ncmds++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Copy a LC_SYMTAB load command from the input file to the output
|
||||
file, adjusting the file offset fields. */
|
||||
static void
|
||||
copy_symtab (struct load_command *lc)
|
||||
{
|
||||
struct symtab_command *stp = (struct symtab_command *) lc;
|
||||
|
||||
stp->symoff += delta;
|
||||
stp->stroff += delta;
|
||||
|
||||
printf ("Writing LC_SYMTAB command\n");
|
||||
|
||||
if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
|
||||
unexec_error ("cannot write symtab command to header");
|
||||
|
||||
curr_header_offset += lc->cmdsize;
|
||||
}
|
||||
|
||||
/* Copy a LC_DYSYMTAB load command from the input file to the output
|
||||
file, adjusting the file offset fields. */
|
||||
static void
|
||||
copy_dysymtab (struct load_command *lc)
|
||||
{
|
||||
struct dysymtab_command *dstp = (struct dysymtab_command *) lc;
|
||||
|
||||
/* If Mach-O executable is not prebound, relocation entries need
|
||||
fixing up. This is not supported currently. */
|
||||
if (!(mh.flags & MH_PREBOUND) && (dstp->nextrel != 0 || dstp->nlocrel != 0))
|
||||
unexec_error ("cannot handle LC_DYSYMTAB with relocation entries");
|
||||
|
||||
if (dstp->nextrel > 0) {
|
||||
dstp->extreloff += delta;
|
||||
}
|
||||
|
||||
if (dstp->nlocrel > 0) {
|
||||
dstp->locreloff += delta;
|
||||
}
|
||||
|
||||
if (dstp->nindirectsyms > 0)
|
||||
dstp->indirectsymoff += delta;
|
||||
|
||||
printf ("Writing LC_DYSYMTAB command\n");
|
||||
|
||||
if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
|
||||
unexec_error ("cannot write symtab command to header");
|
||||
|
||||
curr_header_offset += lc->cmdsize;
|
||||
}
|
||||
|
||||
/* Copy other kinds of load commands from the input file to the output
|
||||
file, ones that do not require adjustments of file offsets. */
|
||||
static void
|
||||
copy_other (struct load_command *lc)
|
||||
{
|
||||
printf ("Writing ");
|
||||
print_load_command_name (lc->cmd);
|
||||
printf (" command\n");
|
||||
|
||||
if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
|
||||
unexec_error ("cannot write symtab command to header");
|
||||
|
||||
curr_header_offset += lc->cmdsize;
|
||||
}
|
||||
|
||||
/* Loop through all load commands and dump them. Then write the Mach
|
||||
header. */
|
||||
static void
|
||||
dump_it ()
|
||||
{
|
||||
int i;
|
||||
|
||||
printf ("--- Load Commands written to Output File ---\n");
|
||||
|
||||
for (i = 0; i < nlc; i++)
|
||||
switch (lca[i]->cmd)
|
||||
{
|
||||
case LC_SEGMENT:
|
||||
{
|
||||
struct segment_command *scp = (struct segment_command *) lca[i];
|
||||
if (strncmp (scp->segname, SEG_DATA, 16) == 0)
|
||||
{
|
||||
copy_data_segment (lca[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
copy_segment (lca[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LC_SYMTAB:
|
||||
copy_symtab (lca[i]);
|
||||
break;
|
||||
case LC_DYSYMTAB:
|
||||
copy_dysymtab (lca[i]);
|
||||
break;
|
||||
default:
|
||||
copy_other (lca[i]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (curr_header_offset > text_seg_lowest_offset)
|
||||
unexec_error ("not enough room for load commands for new __DATA segments");
|
||||
|
||||
printf ("%d unused bytes follow Mach-O header\n",
|
||||
text_seg_lowest_offset - curr_header_offset);
|
||||
|
||||
mh.sizeofcmds = curr_header_offset - sizeof (struct mach_header);
|
||||
if (!unexec_write (0, &mh, sizeof (struct mach_header)))
|
||||
unexec_error ("cannot write final header contents");
|
||||
}
|
||||
|
||||
/* Take a snapshot of Emacs and make a Mach-O format executable file
|
||||
from it. The file names of the output and input files are outfile
|
||||
and infile, respectively. The three other parameters are
|
||||
ignored. */
|
||||
void
|
||||
unexec (char *outfile, char *infile, void *start_data, void *start_bss,
|
||||
void *entry_address)
|
||||
{
|
||||
infd = open (infile, O_RDONLY, 0);
|
||||
if (infd < 0)
|
||||
{
|
||||
unexec_error ("cannot open input file `%s'", infile);
|
||||
}
|
||||
|
||||
outfd = open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
|
||||
if (outfd < 0)
|
||||
{
|
||||
close (infd);
|
||||
unexec_error ("cannot open output file `%s'", outfile);
|
||||
}
|
||||
|
||||
build_region_list ();
|
||||
read_load_commands ();
|
||||
|
||||
find_emacs_zone_regions ();
|
||||
|
||||
in_dumped_exec = 1;
|
||||
|
||||
dump_it ();
|
||||
|
||||
close (outfd);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
unexec_init_emacs_zone ()
|
||||
{
|
||||
emacs_zone = malloc_create_zone (0, 0);
|
||||
malloc_set_zone_name (emacs_zone, "EmacsZone");
|
||||
}
|
||||
|
||||
int
|
||||
ptr_in_unexec_regions (void *ptr)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < num_unexec_regions; i++)
|
||||
if ((vm_address_t) ptr - unexec_regions[i].address
|
||||
< unexec_regions[i].size)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *
|
||||
unexec_malloc (size_t size)
|
||||
{
|
||||
if (in_dumped_exec)
|
||||
return malloc (size);
|
||||
else
|
||||
return malloc_zone_malloc (emacs_zone, size);
|
||||
}
|
||||
|
||||
void *
|
||||
unexec_realloc (void *old_ptr, size_t new_size)
|
||||
{
|
||||
if (in_dumped_exec)
|
||||
if (ptr_in_unexec_regions (old_ptr))
|
||||
{
|
||||
char *p = malloc (new_size);
|
||||
/* 2002-04-15 T. Ikegami <ikegami@adam.uprr.pr>. The original
|
||||
code to get size failed to reallocate read_buffer
|
||||
(lread.c). */
|
||||
int old_size = emacs_zone->size (emacs_zone, old_ptr);
|
||||
int size = new_size > old_size ? old_size : new_size;
|
||||
|
||||
if (size)
|
||||
memcpy (p, old_ptr, size);
|
||||
return p;
|
||||
}
|
||||
else
|
||||
return realloc (old_ptr, new_size);
|
||||
else
|
||||
return malloc_zone_realloc (emacs_zone, old_ptr, new_size);
|
||||
}
|
||||
|
||||
void
|
||||
unexec_free (void *ptr)
|
||||
{
|
||||
if (in_dumped_exec)
|
||||
{
|
||||
if (!ptr_in_unexec_regions (ptr))
|
||||
free (ptr);
|
||||
}
|
||||
else
|
||||
malloc_zone_free (emacs_zone, ptr);
|
||||
}
|
|
@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#ifdef MSDOS
|
||||
#include "msdos.h"
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macterm.h"
|
||||
#endif
|
||||
|
||||
|
|
16
src/xdisp.c
16
src/xdisp.c
|
@ -194,13 +194,13 @@ Boston, MA 02111-1307, USA. */
|
|||
#ifdef WINDOWSNT
|
||||
#include "w32term.h"
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macterm.h"
|
||||
#endif
|
||||
|
||||
#define INFINITY 10000000
|
||||
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
extern void set_frame_menubar P_ ((struct frame *f, int, int));
|
||||
extern int pending_menu_activation;
|
||||
#endif
|
||||
|
@ -7077,7 +7077,7 @@ echo_area_display (update_frame_p)
|
|||
return 0;
|
||||
|
||||
/* The terminal frame is used as the first Emacs frame on the Mac OS. */
|
||||
#ifndef macintosh
|
||||
#ifndef MAC_OS8
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
/* When Emacs starts, selected_frame may be a visible terminal
|
||||
frame, even if we run under a window system. If we let this
|
||||
|
@ -7450,7 +7450,7 @@ update_menu_bar (f, save_match_data)
|
|||
|
||||
if (FRAME_WINDOW_P (f)
|
||||
?
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
FRAME_EXTERNAL_MENU_BAR (f)
|
||||
#else
|
||||
FRAME_MENU_BAR_LINES (f) > 0
|
||||
|
@ -7501,9 +7501,9 @@ update_menu_bar (f, save_match_data)
|
|||
FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f));
|
||||
|
||||
/* Redisplay the menu bar in case we changed it. */
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
if (FRAME_WINDOW_P (f)
|
||||
#if defined (macintosh)
|
||||
#if defined (MAC_OS)
|
||||
/* All frames on Mac OS share the same menubar. So only the
|
||||
selected frame should be allowed to set it. */
|
||||
&& f == SELECTED_FRAME ()
|
||||
|
@ -10647,7 +10647,7 @@ redisplay_window (window, just_this_one_p)
|
|||
|
||||
if (FRAME_WINDOW_P (f))
|
||||
{
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
|
||||
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
|
||||
redisplay_menu_p = FRAME_EXTERNAL_MENU_BAR (f);
|
||||
#else
|
||||
redisplay_menu_p = FRAME_MENU_BAR_LINES (f) > 0;
|
||||
|
@ -13379,7 +13379,7 @@ display_menu_bar (w)
|
|||
if (FRAME_X_P (f))
|
||||
return;
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
if (FRAME_MAC_P (f))
|
||||
return;
|
||||
#endif
|
||||
|
|
63
src/xfaces.c
63
src/xfaces.c
|
@ -234,32 +234,11 @@ Boston, MA 02111-1307, USA. */
|
|||
#define FONT_WIDTH FONT_MAX_WIDTH
|
||||
#endif /* WINDOWSNT */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
#include "macterm.h"
|
||||
#define x_display_info mac_display_info
|
||||
#define check_x check_mac
|
||||
|
||||
extern XGCValues *XCreateGC (void *, WindowPtr, unsigned long, XGCValues *);
|
||||
|
||||
static INLINE GC
|
||||
x_create_gc (f, mask, xgcv)
|
||||
struct frame *f;
|
||||
unsigned long mask;
|
||||
XGCValues *xgcv;
|
||||
{
|
||||
GC gc;
|
||||
gc = XCreateGC (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), mask, xgcv);
|
||||
return gc;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
x_free_gc (f, gc)
|
||||
struct frame *f;
|
||||
GC gc;
|
||||
{
|
||||
XFreeGC (FRAME_MAC_DISPLAY (f), gc);
|
||||
}
|
||||
#endif
|
||||
#endif /* MAC_OS */
|
||||
|
||||
#include "buffer.h"
|
||||
#include "dispextern.h"
|
||||
|
@ -814,6 +793,32 @@ x_free_gc (f, gc)
|
|||
|
||||
#endif /* WINDOWSNT */
|
||||
|
||||
#ifdef MAC_OS
|
||||
/* Mac OS emulation of GCs */
|
||||
|
||||
extern XGCValues *XCreateGC (void *, Window, unsigned long, XGCValues *);
|
||||
|
||||
static INLINE GC
|
||||
x_create_gc (f, mask, xgcv)
|
||||
struct frame *f;
|
||||
unsigned long mask;
|
||||
XGCValues *xgcv;
|
||||
{
|
||||
GC gc;
|
||||
gc = XCreateGC (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), mask, xgcv);
|
||||
return gc;
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
x_free_gc (f, gc)
|
||||
struct frame *f;
|
||||
GC gc;
|
||||
{
|
||||
XFreeGC (FRAME_MAC_DISPLAY (f), gc);
|
||||
}
|
||||
|
||||
#endif /* MAC_OS */
|
||||
|
||||
/* Like stricmp. Used to compare parts of font names which are in
|
||||
ISO8859-1. */
|
||||
|
||||
|
@ -1382,7 +1387,7 @@ defined_color (f, color_name, color_def, alloc)
|
|||
else if (FRAME_W32_P (f))
|
||||
return w32_defined_color (f, color_name, color_def, alloc);
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
else if (FRAME_MAC_P (f))
|
||||
return mac_defined_color (f, color_name, color_def, alloc);
|
||||
#endif
|
||||
|
@ -1889,7 +1894,7 @@ static struct frame *font_frame;
|
|||
font height, then for weight, then for slant.' This variable can be
|
||||
set via set-face-font-sort-order. */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
static int font_sort_order[4] = {
|
||||
XLFD_SWIDTH, XLFD_POINT_SIZE, XLFD_WEIGHT, XLFD_SLANT
|
||||
};
|
||||
|
@ -4341,7 +4346,7 @@ DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource,
|
|||
{
|
||||
Lisp_Object value = Qnil;
|
||||
#ifndef WINDOWSNT
|
||||
#ifndef macintosh
|
||||
#ifndef MAC_OS
|
||||
CHECK_STRING (resource);
|
||||
CHECK_STRING (class);
|
||||
CHECK_LIVE_FRAME (frame);
|
||||
|
@ -4349,7 +4354,7 @@ DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource,
|
|||
value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)),
|
||||
resource, class, Qnil, Qnil);
|
||||
UNBLOCK_INPUT;
|
||||
#endif /* not macintosh */
|
||||
#endif /* not MAC_OS */
|
||||
#endif /* not WINDOWSNT */
|
||||
return value;
|
||||
}
|
||||
|
@ -4997,7 +5002,7 @@ prepare_face_for_display (f, face)
|
|||
#ifdef WINDOWSNT
|
||||
xgcv.font = face->font;
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
xgcv.font = face->font;
|
||||
#endif
|
||||
mask |= GCFont;
|
||||
|
@ -6428,7 +6433,7 @@ realize_x_face (cache, attrs, c, base_face)
|
|||
face->fontset = make_fontset_for_ascii_face (f, fontset);
|
||||
face->font = NULL; /* to force realize_face to load font */
|
||||
|
||||
#ifdef macintosh
|
||||
#ifdef MAC_OS
|
||||
/* Load the font if it is specified in ATTRS. This fixes
|
||||
changing frame font on the Mac. */
|
||||
if (STRINGP (attrs[LFACE_FONT_INDEX]))
|
||||
|
|
Loading…
Add table
Reference in a new issue