Mercurial > emacs
annotate admin/revdiff @ 94928:a9ee82808208
Throughout the file, delete all USE_FONT_BACKEND
conditionals. Don't check enable_font_backend. Delete all codes
used only when USE_FONT_BACKEND is not defined.
(get_font_info_func, list_font_func, load_font_func)
(query_font_func, set_frame_fontset_func, find_ccl_program_func)
(get_font_repertory_func): Delete them.
(FONTSET_SPEC, FONT_DEF_NEW, FONT_DEF_SPEC, FONT_DEF_ENCODING)
(FONT_DEF_REPERTORY, RFONT_DEF_FACE, RFONT_DEF_SET_FACE)
(RFONT_DEF_FONT_DEF, RFONT_DEF_SPEC, RFONT_DEF_REPERTORY)
(RFONT_DEF_OBJECT, RFONT_DEF_SET_OBJECT, RFONT_DEF_SCORE)
(RFONT_DEF_SET_SCORE, RFONT_DEF_NEW): New macros.
(fontset_compare_rfontdef): New function.
(reorder_font_vector): Remove the argument CHARSET-ID. Sort
ront-defs by qsort. Adjusted for the change of font-group vector.
(load_font_get_repertory): Deleted.
(fontset_find_font): Use new macros to ref/set elements of
font-def and rfont-def.
(fontset_font): Fix the timing of remembering that no font for C.
(free_face_fontset): Do nothing if the face has no fontset.
(face_suitable_for_char_p): Use new macros to ref/set elements of
rfont-def.
(face_for_char): Likewise. Call face_for_char with font_object.
(fs_load_font): Delete. Delete #pragma surrounding it.
(fs_query_fontset): Use strcasecmp instead of strcmp.
(generate_ascii_font_name): Adjusted for the format change of
font-spec.
(Fset_fontset_font): Likewise. Use new macros to set elements of
font-def.
(Fnew_fontset): Use font_unparse_xlfd to generate
FONTSET_ASCII (fontset).
(new_fontset_from_font_name): Deleted.
(fontset_from_font): Renamed from new_fontset_from_font. Check if
a fontset is already created for the font. FIx updating of
Vfontset_alias_alist.
(fontset_ascii_font): Deleted.
(Ffont_info): Adjusted for the format change of font-spec.
(Finternal_char_font): Likewise.
(Ffontset_info): Likewise.
(syms_of_fontset): Don't check load_font_func.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 14 May 2008 01:26:46 +0000 |
parents | e6db9ee945b8 |
children | ce88a631c161 |
rev | line source |
---|---|
38850 | 1 #! /usr/bin/perl |
2 | |
79744 | 3 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
75348 | 4 # Free Software Foundation, Inc. |
38850 | 5 # |
6 # This file is part of GNU Emacs. | |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
7 |
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
8 # GNU Emacs is free software: you can redistribute it and/or modify |
38850 | 9 # it under the terms of the GNU General Public License as published by |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
10 # the Free Software Foundation, either version 3 of the License, or |
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
11 # (at your option) any later version. |
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
12 |
38850 | 13 # GNU Emacs is distributed in the hope that it will be useful, |
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 # GNU General Public License for more details. | |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
17 |
38850 | 18 # You should have received a copy of the GNU General Public License |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
19 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
20 |
38850 | 21 |
22 use File::Basename; | |
23 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
24 if (@ARGV < 3) |
38850 | 25 { |
26 print <<USAGE; | |
27 revdiff FILE OLD NEW | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
28 |
38850 | 29 Get a diff of FILE between revisions OLD and NEW. Store the |
39132 | 30 diff in a file named FILE-OLD-NEW.diff. |
31 | |
32 If OLD is `-' use FILE's current revision for OLD. If OLD is | |
33 `-<number>', use the Nth revision before the current one for OLD. | |
34 | |
35 If NEW is +<number> or -<number>, build diffs between revisions OLD | |
36 and OLD +/- <number>. | |
38850 | 37 |
38 Examples: | |
39 | |
40 revdiff FILE - -1 get the latest change of FILE | |
39132 | 41 revdiff FILE -1 +1 also gets the latest change of FILE |
38850 | 42 revdiff FILE 1.500 +2 get diffs 1.500-1.501 and 1.501-1.502. |
43 | |
44 USAGE | |
45 exit 1; | |
46 } | |
47 | |
48 $file = shift @ARGV; | |
49 $old = shift @ARGV; | |
50 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
51 sub diffit |
38850 | 52 { |
53 my ($old, $new) = @_; | |
54 print "cvs diff -r$old -r$new $file >$file-$old-$new.diff\n"; | |
55 system "cvs diff -r$old -r$new $file >$file-$old-$new.diff"; | |
56 } | |
57 | |
58 sub current_revision ($) | |
59 { | |
60 my ($file) = @_; | |
61 my $dir = dirname ($file); | |
62 my $base = basename ($file); | |
63 my $entries = "$dir/CVS/Entries"; | |
64 die "Can't find $entries" unless -f $entries; | |
65 open (IN, "<$entries") or die "Cannot open $entries"; | |
66 my $rev; | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
67 while ($line = <IN>) |
38850 | 68 { |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
69 if ($line =~ m,/$base/([^/]+),) |
38850 | 70 { |
71 $rev = $1; | |
72 break; | |
73 } | |
74 } | |
75 die "Cannot determine current revision of $file" unless $rev; | |
76 close (IN); | |
77 return $rev; | |
78 } | |
79 | |
80 if ($old eq "-") | |
39132 | 81 { |
82 $old = current_revision ($file); | |
83 } | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
84 elsif ($old =~ /^-(\d+)$/) |
39132 | 85 { |
86 my $offset = $1; | |
87 $old = current_revision ($file); | |
88 die "Internal error" unless $old =~ /(.*)\.(\d+)$/; | |
89 my $minor = $2 - $offset; | |
90 $old = sprintf ("%d.%d", $1, $minor); | |
91 } | |
38850 | 92 |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
93 while (@ARGV) |
38850 | 94 { |
95 my $new = shift @ARGV; | |
96 if ($new =~ /^[+]\d+$/) | |
97 { | |
98 my $n = $new; | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
99 for ($i = 0; $i < $n; ++$i) |
38850 | 100 { |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
101 unless ($old =~ /(.*)\.(\d+)$/) |
38850 | 102 { |
103 die "Internal error"; | |
104 } | |
105 my $j = $2 + 1; | |
106 $new = "$1.$j"; | |
107 diffit ($old, $new); | |
108 $old = $new; | |
109 } | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
110 } |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
111 elsif ($new =~ /^[-]\d+$/) |
38850 | 112 { |
113 my $n = - $new; | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
114 for ($i = 0; $i < $n; ++$i) |
38850 | 115 { |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
116 unless ($old =~ /(.*)\.(\d+)$/) |
38850 | 117 { |
118 die "Internal error"; | |
119 } | |
120 my $j = $2 - 1; | |
121 $new = "$1.$j"; | |
122 diffit ($new, $old); | |
123 $old = $new; | |
124 } | |
125 } | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
39132
diff
changeset
|
126 else |
38850 | 127 { |
128 diffit ($old, $new); | |
129 $old = $new; | |
130 } | |
131 } | |
132 | |
133 # Local Variables: | |
134 # mode: cperl | |
135 # End: | |
52401 | 136 |
137 # arch-tag: 2798b20d-c7f2-4c78-8378-7bb529c36a09 |