annotate lib-src/update-custom.sh @ 5038:9410323e4b0d

major dynarr fixes -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-20 Ben Wing <ben@xemacs.org> * device-x.c (Fx_get_resource): * dynarr.c: * dynarr.c (Dynarr_realloc): * dynarr.c (Dynarr_newf): * dynarr.c (Dynarr_lisp_realloc): * dynarr.c (Dynarr_lisp_newf): * dynarr.c (Dynarr_resize): * dynarr.c (Dynarr_insert_many): * dynarr.c (Dynarr_delete_many): * dynarr.c (Dynarr_memory_usage): * dynarr.c (stack_like_free): * file-coding.c (coding_reader): * file-coding.c (gzip_convert): * gutter.c (output_gutter): * lisp.h: * lisp.h (Dynarr_declare): * lisp.h (DYNARR_SET_LISP_IMP): * lisp.h (CHECK_NATNUM): * profile.c (create_timing_profile_table): * redisplay-output.c (sync_rune_structs): * redisplay-output.c (sync_display_line_structs): * redisplay-output.c (redisplay_output_window): * redisplay.c: * redisplay.c (get_display_block_from_line): * redisplay.c (add_ichar_rune_1): * redisplay.c (ensure_modeline_generated): * redisplay.c (generate_displayable_area): * redisplay.c (regenerate_window): * redisplay.c (update_line_start_cache): * signal.c: * signal.c (check_quit): Lots of rewriting of dynarr code. (1) Lots of documentation added. Also fix places that referenced a now-bogus internals node concerning redisplay critical sections. (2) Rename: Dynarr_add_lisp_string -> Dynarr_add_ext_lisp_string Dynarr_set_length -> Dynarr_set_lengthr ("restricted") Dynarr_increment -> Dynarr_incrementr Dynarr_resize_if -> Dynarr_resize_to_add (3) New functions: Dynarr_elsize = dy->elsize_ Dynarr_set_length(): Set length, resizing as necessary Dynarr_set_length_and_zero(): Set length, resizing as necessary, zeroing out new elements Dynarr_increase_length(), Dynarr_increase_length_and_zero(): Optimization of Dynarr_set_length(), Dynarr_set_length_and_zero() when size is known to increase Dynarr_resize_to_fit(): Resize as necessary to fit a given length. Dynarr_set(): Set element at a given position, increasing length as necessary and setting any newly created positions to 0 (4) Use Elemcount, Bytecount. (5) Rewrite many macros as inline functions.
author Ben Wing <ben@xemacs.org>
date Sat, 20 Feb 2010 03:46:22 -0600
parents 3ecd8885ac67
children 308d34e9f07d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 #!/bin/sh
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 ### update-custom.sh --- update Customize group dependencies
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 # Author: Hrvoje Niksic, based on update-autoloads.el by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 # Jamie Zawinski, Ben Wing, Martin Buchholz, and Steve Baur
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 # Maintainer: Hrvoje Niksic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 # Keywords: internal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 # This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 # XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 # under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 # the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 # any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 # XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 # General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 # You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 # along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 # Boston, MA 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ### Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 # This is much simpler than update-autoloads.el. All we need to do is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 # compute a list of directories we want to use, and feed it to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 # Custom-make-dependencies. End of story.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ### Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 set -eu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 # get to the right directory
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 test ! -d ./lisp -a -d ../lisp && cd ..
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 if test ! -d ./lisp ; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 echo $0: neither ./lisp/ nor ../lisp/ exist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 exit 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 test -z "$EMACS" && EMACS="./src/xemacs"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 echo " (using $EMACS)"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 export EMACS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 EMACS_DIR=`cd \`dirname $EMACS\` && pwd`;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 # Account for various system automounter configurations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 if test -d "/net"; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 if test -d "/tmp_mnt/net"; then tdir="/tmp_mnt/net"; else tdir="/tmp_mnt"; fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 EMACS_DIR=`echo "$EMACS_DIR" | \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 REAL="$EMACS_DIR/`basename $EMACS`"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 echo "Rebuilding custom-loads with $REAL..."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 echon()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 /bin/echo $* '\c'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 echon()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 echo -n $*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 # Compute patterns to ignore when searching for files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 ignore_dirs=""
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 # Only use Mule XEmacs to build Mule-specific autoloads & custom-loads.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 echon "Checking for Mule support..."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 lisp_prog='(princ (featurep (quote mule)))'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 mule_p="`$EMACS -batch -q -no-site-file -eval \"$lisp_prog\"`"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 if test "$mule_p" = nil ; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 echo No
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 ignore_dirs="$ignore_dirs mule"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 echo Yes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 echon "Checking directories..."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 dirs=lisp/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 for dir in lisp/*; do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 if test -d $dir \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 -a $dir != lisp/CVS \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 -a $dir != lisp/SCCS; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 for ignore in $ignore_dirs; do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 if test $dir = lisp/$ignore; then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 continue 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 done
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 rm -f "$dir/custom-load.elc"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 dirs="$dirs $dir"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 fi
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 done
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 echo done
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 $EMACS -batch -q -no-site-file -l cus-dep -f Custom-make-dependencies $dirs