Mercurial > hg > xemacs-beta
annotate lib-src/fix-perms.sh @ 5090:0ca81354c4c7
Further frame-geometry cleanups
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2010-03-03 Ben Wing <ben@xemacs.org>
* internals/internals.texi (Intro to Window and Frame Geometry):
* internals/internals.texi (The Paned Area):
* internals/internals.texi (The Displayable Area):
Update to make note of e.g. the fact that the bottom gutter is
actually above the minibuffer.
src/ChangeLog addition:
2010-03-03 Ben Wing <ben@xemacs.org>
* emacs.c:
* emacs.c (assert_equal_failed):
* lisp.h:
* lisp.h (assert_equal):
New fun assert_equal, asserting that two values == each other, and
printing out both values upon failure.
* frame-gtk.c (gtk_initialize_frame_size):
* frame-impl.h:
* frame-impl.h (FRAME_TOP_INTERNAL_BORDER_START):
* frame-impl.h (FRAME_BOTTOM_INTERNAL_BORDER_START):
* frame-impl.h (FRAME_LEFT_INTERNAL_BORDER_START):
* frame-impl.h (FRAME_PANED_TOP_EDGE):
* frame-impl.h (FRAME_NONPANED_SIZE):
* frame-x.c (x_initialize_frame_size):
* frame.c:
* gutter.c (get_gutter_coords):
* gutter.c (calculate_gutter_size):
* gutter.h:
* gutter.h (WINDOW_REAL_TOP_GUTTER_BOUNDS):
* gutter.h (FRAME_TOP_GUTTER_BOUNDS):
* input-method-xlib.c:
* input-method-xlib.c (XIM_SetGeometry):
* redisplay-output.c (clear_left_border):
* redisplay-output.c (clear_right_border):
* redisplay-output.c (redisplay_output_pixmap):
* redisplay-output.c (redisplay_clear_region):
* redisplay-output.c (redisplay_clear_top_of_window):
* redisplay-output.c (redisplay_clear_to_window_end):
* redisplay-xlike-inc.c (XLIKE_clear_frame):
* redisplay.c:
* redisplay.c (UPDATE_CACHE_RETURN):
* redisplay.c (pixel_to_glyph_translation):
* toolbar.c (update_frame_toolbars_geometry):
* window.c (Fwindow_pixel_edges):
Get rid of some redundant macros. Consistently use the
FRAME_TOP_*_START, FRAME_RIGHT_*_END, etc. format. Rename
FRAME_*_BORDER_* to FRAME_*_INTERNAL_BORDER_*. Comment out
FRAME_BOTTOM_* for gutters and the paned area due to the
uncertainty over where the paned area actually begins. (Eventually
we should probably move the gutters outside the minibuffer so that
the paned area is contiguous.) Use FRAME_PANED_* more often in the
code to make things clearer.
Update the diagram to show that the bottom gutter is inside the
minibuffer (!) and that there are "junk boxes" when you have left
and/or right gutters (dead boxes that are mistakenly left uncleared,
unlike the corresponding scrollbar dead boxes). Update the text
appropriately to cover the bottom gutter position, etc.
Rewrite gutter-geometry code to use the FRAME_*_GUTTER_* in place of
equivalent expressions referencing other frame elements, to make the
code more portable in case we move around the gutter location.
Cleanup FRAME_*_GUTTER_BOUNDS() in gutter.h.
Add some #### GEOM! comments where I think code is incorrect --
typically, it wasn't fixed up properly when the gutter was added.
Some cosmetic changes.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 03 Mar 2010 05:07:47 -0600 |
parents | 4faad22a9fe5 |
children | 308d34e9f07d |
rev | line source |
---|---|
4947
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
1 #!/bin/sh |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
2 ### fix-perms.sh --- Correct the permissions on XEmacs source/build files |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
3 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
4 # Copyright (C) 2010 Ben Wing. |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
5 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
6 # Author: Ben Wing |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
7 # Keywords: internal |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
8 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
9 # This file is part of XEmacs. |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
10 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
11 # XEmacs is free software; you can redistribute it and/or modify it |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
12 # under the terms of the GNU General Public License as published by |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
13 # the Free Software Foundation; either version 2, or (at your option) |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
14 # any later version. |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
15 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
16 # XEmacs is distributed in the hope that it will be useful, but |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
17 # WITHOUT ANY WARRANTY; without even the implied warranty of |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
19 # General Public License for more details. |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
20 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
21 # You should have received a copy of the GNU General Public License |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
22 # along with XEmacs; see the file COPYING. If not, write to |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
23 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
24 # Boston, MA 02111-1307, USA. |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
25 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
26 ### Commentary: |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
27 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
28 # This program sets the executable bit on all scripts and executable files |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
29 # in the XEmacs source tree, including those that are built. |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
30 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
31 ### Code: |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
32 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
33 # List of executable source files in various directories (root, lib-src, etc) |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
34 # other than .sh files. Note that we are free to list files in |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
35 # subdirectories here rather than creating a separate item list" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
36 ROOT_EXES="configure config.guess install-sh move-if-change \ |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
37 modules/canna/configure" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
38 LIB_SRC_EXES="ad2c gnuattach gnudoit rcs2log vcdiff *.pl" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
39 ETC_EXES="" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
40 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
41 LIB_SRC_BUILT_EXES="`cd lib-src; ls -1 *.c | sed 's/\.c$//g'`" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
42 LIB_SRC_BUILT_EXES="minitar ctags $LIB_SRC_BUILT_EXES" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
43 SRC_BUILT_EXES="temacs xemacs" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
44 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
45 find . -type f -print0 | xargs -0 chmod a-x |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
46 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
47 for dir in . lib-src etc ; do |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
48 if [ "$dir" = "." ]; then |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
49 exes="$ROOT_EXES" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
50 elif [ "$dir" = "lib-src" ]; then |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
51 exes="$LIB_SRC_EXES" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
52 elif [ "$dir" = "etc" ]; then |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
53 exes="$ETC_EXES" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
54 else |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
55 echo "Error! Don't know how to handle directory '$dir'"; exit 2 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
56 fi |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
57 pwd=`pwd` |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
58 cd $dir |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
59 for x in $exes *.sh ; do |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
60 if [ ! -f $x ]; then |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
61 echo "Warning: file '$dir/$x' doesn't exist" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
62 else |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
63 chmod a+x $x |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
64 fi |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
65 done |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
66 cd "$pwd" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
67 done |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
68 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
69 # Now do the built executables. Don't warn or anything if we don't find |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
70 # anything, since they may not be built. |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
71 for dir in lib-src src ; do |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
72 if [ "$dir" = "src" ]; then |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
73 exes="$SRC_BUILT_EXES" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
74 elif [ "$dir" = "lib-src" ]; then |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
75 exes="$LIB_SRC_BUILT_EXES" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
76 else |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
77 echo "Error! Don't know how to handle directory '$dir'"; exit 2 |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
78 fi |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
79 pwd=`pwd` |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
80 cd $dir |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
81 for x in $exes *.exe ; do |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
82 if [ -f $x ]; then |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
83 chmod a+x $x |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
84 fi |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
85 done |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
86 cd "$pwd" |
4faad22a9fe5
Somehow fix-perms.sh didn't get committed
Ben Wing <ben@xemacs.org>
parents:
diff
changeset
|
87 done |