Hello,
I'm doing an NMU of fte to fix #209496, #217266, #346284, #362912,
#363527, and #368101; diff attached.
Thanks,
Matej
diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/debian/changelog
/tmp/PQJo4szkUb/fte-0.50.0/debian/changelog
--- /tmp/wgHyQebD7F/fte-0.50.0/debian/changelog 2006-01-07 00:16:55.000000000
+0100
+++ /tmp/PQJo4szkUb/fte-0.50.0/debian/changelog 2006-06-05 06:52:11.000000000
+0200
@@ -1,3 +1,16 @@
+fte (0.50.0-1.4) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Move xfte out of /usr/X11R6. Closes: #362912.
+ * src/con_slang.cpp: Really port to S-Lang2 (fixing a buffer overflow).
+ Closes: #346284.
+ * debian/fte: Add closing bracket in regular expression. Thanks to
+ Nate Bargmann for the patch. Closes: #217266.
+ * Make the package descriptions more consistent and explanatory.
+ Closes: #209496, #363527.
+
+ -- Matej Vela <[EMAIL PROTECTED]> Mon, 5 Jun 2006 06:52:10 +0200
+
fte (0.50.0-1.3) unstable; urgency=high
* Non-maintainer upload.
diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/debian/control
/tmp/PQJo4szkUb/fte-0.50.0/debian/control
--- /tmp/wgHyQebD7F/fte-0.50.0/debian/control 2006-01-07 00:09:45.000000000
+0100
+++ /tmp/PQJo4szkUb/fte-0.50.0/debian/control 2006-06-05 06:32:01.000000000
+0200
@@ -11,49 +11,63 @@
Conflicts: fte-console (<< 0.49.13-3), fte-cfgdocs (<< 0.49.13-3)
Suggests: fte-docs, exuberant-ctags
Description: Text editor for programmers - base package
- Package contains files necessary to build configuration file
- and some elementary documentation.
- There is no editor in this package.
- Please select some from the list of suggested binary packages.
+ FTE is a text editor for programmers. Some of its features are smart
+ indentation for C, C++, Java, Perl; color syntax highlighting for many more
+ languages; multiple file/window editing; column blocks; configurable menus
+ and keyboard bindings; mouse support; undo/redo; regular expression search
+ and replace; folding; background compiler execution.
+ .
+ This package contains files necessary to build a configuration file and
+ some elementary documentation. There is no editor here; please select one
+ of the packages in the dependencies.
Package: fte-docs
Architecture: any
Depends: fte (= ${Source-Version})
Replaces: fte-cfgdocs (<< 0.49.13-3)
-Description: HTML documentation and example of configuration.
- Package constains documentation files for editor.
+Description: Documentation and examples for the FTE editor
+ FTE is a text editor for programmers. Some of its features are smart
+ indentation for C, C++, Java, Perl; color syntax highlighting for many more
+ languages; multiple file/window editing; column blocks; configurable menus
+ and keyboard bindings; mouse support; undo/redo; regular expression search
+ and replace; folding; background compiler execution.
+ .
+ This package contains HTML documentation and sample configuration files.
Package: fte-xwindow
Architecture: any
Depends: ${shlibs:Depends}, fte (= ${Source-Version})
Replaces: fte (<< 0.49.2-1)
-Description: Text editor for X Window System with I18N support. (for
programmers)
- Color syntax highlighting for many more languages.
- Smart indentation for C, C++, Java, Perl.
- Multiple file/window editing, Column blocks, configurable menus and
- keyboard bindings, mouse support, undo/redo, regular expression search
- and replace, folding, background compiler execution.
- X Window System edition.
+Description: Text editor for programmers - X Window System edition with I18N
support
+ FTE is a text editor for programmers. Some of its features are smart
+ indentation for C, C++, Java, Perl; color syntax highlighting for many more
+ languages; multiple file/window editing; column blocks; configurable menus
+ and keyboard bindings; mouse support; undo/redo; regular expression search
+ and replace; folding; background compiler execution.
+ .
+ This is the X Window System edition, with internationalization support.
Package: fte-console
Architecture: any
Depends: ${shlibs:Depends}, fte (= ${Source-Version})
Conflicts: suidmanager (<< 0.50)
-Description: Text editor for console (no I18N support). (for programmers)
- Color syntax highlighting for many more languages.
- Smart indentation for C, C++, Java, Perl.
- Multiple file/window editing, Column blocks, configurable menus and
- keyboard bindings, mouse support, undo/redo, regular expression search
- and replace, folding, background compiler execution.
- Linux console edition.
+Description: Text editor for programmers - console edition, no I18N support
+ FTE is a text editor for programmers. Some of its features are smart
+ indentation for C, C++, Java, Perl; color syntax highlighting for many more
+ languages; multiple file/window editing; column blocks; configurable menus
+ and keyboard bindings; mouse support; undo/redo; regular expression search
+ and replace; folding; background compiler execution.
+ .
+ This is the Linux console edition, without internationalization support.
Package: fte-terminal
Architecture: any
Depends: ${shlibs:Depends}, fte (= ${Source-Version})
-Description: Text editor for terminals. (for programmers)
- Color syntax highlighting for many more languages.
- Smart indentation for C, C++, Java, Perl.
- Multiple file/window editing, Column blocks, configurable menus and
- keyboard bindings, mouse support, undo/redo, regular expression search
- and replace, folding, background compiler execution.
- Terminal (e.g.: xterm, vt100) edition.
+Description: Text editor for programmers - version for terminals
+ FTE is a text editor for programmers. Some of its features are smart
+ indentation for C, C++, Java, Perl; color syntax highlighting for many more
+ languages; multiple file/window editing; column blocks; configurable menus
+ and keyboard bindings; mouse support; undo/redo; regular expression search
+ and replace; folding; background compiler execution.
+ .
+ This is the version for terminals (e.g. xterm, vt100).
diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/debian/fte
/tmp/PQJo4szkUb/fte-0.50.0/debian/fte
--- /tmp/wgHyQebD7F/fte-0.50.0/debian/fte 2002-04-21 02:12:22.000000000
+0200
+++ /tmp/PQJo4szkUb/fte-0.50.0/debian/fte 2006-06-05 06:36:33.000000000
+0200
@@ -12,7 +12,7 @@
echo "Only Console version installed!"
fi
else
- if [ "$TERM" = linux ] && tty | egrep '^/dev/tty[0-9+$' >/dev/null &&
which vfte >/dev/null; then
+ if [ "$TERM" = linux ] && tty | egrep '^/dev/tty[0-9]+$' >/dev/null &&
which vfte >/dev/null; then
exec vfte "$@"
elif which sfte >/dev/null; then
exec sfte "$@"
diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/debian/fte-xwindow.dirs
/tmp/PQJo4szkUb/fte-0.50.0/debian/fte-xwindow.dirs
--- /tmp/wgHyQebD7F/fte-0.50.0/debian/fte-xwindow.dirs 2000-01-30
18:24:01.000000000 +0100
+++ /tmp/PQJo4szkUb/fte-0.50.0/debian/fte-xwindow.dirs 2006-06-05
06:50:19.000000000 +0200
@@ -1,2 +1,2 @@
-usr/X11R6/bin
-usr/X11R6/man/man1
+usr/bin
+usr/share/man/man1
diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/debian/fte-xwindow.menu
/tmp/PQJo4szkUb/fte-0.50.0/debian/fte-xwindow.menu
--- /tmp/wgHyQebD7F/fte-0.50.0/debian/fte-xwindow.menu 2006-01-07
00:15:51.000000000 +0100
+++ /tmp/PQJo4szkUb/fte-0.50.0/debian/fte-xwindow.menu 2006-06-05
06:51:14.000000000 +0200
@@ -1,6 +1,6 @@
?package(fte-xwindow):needs="x11" section="Apps/Editors" icon="mini-edit.xpm"\
title="Fte" longtitle="FTE, a powerful text editor"\
- command="/usr/X11R6/bin/xfte"
+ command="/usr/bin/xfte"
#?package(fte-xwindow):needs="dwww" section="Apps/Editors" title="Fte
Homepage"\
# command="http://www.ixtas.fri.uni-lj.si/~markom/fte"\
# longtitle="Fte Homepage"\
diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/debian/rules
/tmp/PQJo4szkUb/fte-0.50.0/debian/rules
--- /tmp/wgHyQebD7F/fte-0.50.0/debian/rules 2004-01-29 19:07:15.000000000
+0100
+++ /tmp/PQJo4szkUb/fte-0.50.0/debian/rules 2006-06-05 06:50:51.000000000
+0200
@@ -71,9 +71,9 @@
@tar cf debian/$(docs)/usr/share/doc/fte/config-example.tar config
@$(INST) -s -m 4755 src/vfte debian/$(console)/usr/bin/
@$(INST) -s src/sfte debian/$(terminal)/usr/bin/
- @$(INST) -s src/xfte debian/$(xwindow)/usr/X11R6/bin/
+ @$(INST) -s src/xfte debian/$(xwindow)/usr/bin/
@$(INST) -m 755 debian/fte debian/tmp/usr/bin/fte
- @ln -s ../../../share/man/man1/fte.1.gz
debian/$(xwindow)/usr/X11R6/man/man1/xfte.1.gz
+ @ln -s fte.1.gz debian/$(xwindow)/usr/share/man/man1/xfte.1.gz
@ln -s fte.1.gz debian/$(console)/usr/share/man/man1/vfte.1.gz
@ln -s fte.1.gz debian/$(terminal)/usr/share/man/man1/sfte.1.gz
@cp -a debian/fte-console.lintian
debian/$(console)/usr/share/lintian/overrides/fte-console
@@ -118,7 +118,7 @@
dh_md5sums
dh_builddeb -v
-# dpkg-shlibdeps debian/tmp/usr/X11R6/bin/xfte -drecommends
debian/tmp/usr/bin/vfte debian/tmp/usr/bin/cfte
+# dpkg-shlibdeps debian/tmp/usr/bin/xfte -drecommends
debian/tmp/usr/bin/vfte debian/tmp/usr/bin/cfte
# @dpkg-gencontrol -pfte
# dpkg --build debian/tmp ..
diff -Nru /tmp/wgHyQebD7F/fte-0.50.0/src/con_slang.cpp
/tmp/PQJo4szkUb/fte-0.50.0/src/con_slang.cpp
--- /tmp/wgHyQebD7F/fte-0.50.0/src/con_slang.cpp 2005-12-28
16:53:24.000000000 +0100
+++ /tmp/PQJo4szkUb/fte-0.50.0/src/con_slang.cpp 2006-06-05
06:02:37.000000000 +0200
@@ -99,12 +99,14 @@
'+'
};
-static char raw_dchs[sizeof(slang_dchs)];
+static SLsmg_Char_Type raw_dchs[sizeof(slang_dchs)];
-static unsigned char ftesl_get_dch(char raw)
+static unsigned char ftesl_get_dch(SLsmg_Char_Type raw)
{
for (int i = 0; i < (int) sizeof(slang_dchs); i++)
- if (raw_dchs[i] == raw)
+ if (raw_dchs[i].nchars == raw.nchars
+ && !memcmp(raw_dchs[i].wchars, raw.wchars,
+ raw.nchars * sizeof(*raw.wchars)))
return DCH_SLANG_C1 + i;
return DCH_SLANG_EOL;
}
@@ -215,7 +217,6 @@
int ConInit(int /*XSize */ , int /*YSize */ )
{
unsigned i;
- unsigned short linebuf[sizeof(slang_dchs)];
SLtt_get_terminfo();
@@ -246,9 +247,7 @@
SLsmg_write_nchars(slang_dchs, sizeof(slang_dchs));
SLsmg_gotorc(0, 0);
- SLsmg_read_raw((SLsmg_Char_Type*)linebuf, sizeof(slang_dchs));
- for (i = 0; i < sizeof(slang_dchs); i++)
- raw_dchs[i] = (linebuf[i]) & 0xff;
+ SLsmg_read_raw(raw_dchs, sizeof(slang_dchs));
SLsmg_set_char_set(0);
@@ -361,14 +360,14 @@
return 0;
}
-static int ConPutBoxRaw(int X, int Y, int W, int H, unsigned short *box)
+static int ConPutBoxRaw(int X, int Y, int W, int H, SLsmg_Char_Type *box)
{
int CurX, CurY;
ConQueryCursorPos(&CurX, &CurY);
while (H > 0) {
SLsmg_gotorc(Y++, X);
- SLsmg_write_raw((SLsmg_Char_Type*)box, W);
+ SLsmg_write_raw(box, W);
box += W;
H--;
}
@@ -381,35 +380,51 @@
int ConGetBox(int X, int Y, int W, int H, PCell Cell)
{
int CurX, CurY, i;
- char ch;
+ SLsmg_Char_Type *linebuf;
+
+ linebuf = new SLsmg_Char_Type [W];
ConQueryCursorPos(&CurX, &CurY);
while (H > 0) {
SLsmg_gotorc(Y++, X);
- SLsmg_read_raw((SLsmg_Char_Type*)Cell, W);
- for (i = 0; i < W; i++)
- if (Cell[i] & 0x8000) {
- ch = Cell[i] & 0xff;
- Cell[i] &= 0x7f00;
- Cell[i] |= ftesl_get_dch(ch);
- }
+ SLsmg_read_raw(linebuf, W);
+ for (i = 0; i < W; i++) {
+ if (linebuf[i].color & SLSMG_ACS_MASK)
+ Cell[i] = ftesl_get_dch(linebuf[i]);
+ else
+ /*
+ * FIXME: Handle UTF-8 -- way beyond a quick-and-dirty
+ * fix. --MV
+ */
+ Cell[i] = SLSMG_EXTRACT_CHAR(linebuf[i]);
+ /*
+ * FIXME: This preserves only 7 out of 15 bits of color.
+ * Fortunately, we're dealing with color handles rather than
+ * colors themselves -- S-Lang jumps through an extra hoop to
+ * map these to color data. As long as we use less than 127
+ * different colors, things should be OK. I think. --MV
+ */
+ Cell[i] |= (linebuf[i].color & 0x7f) << 8;
+ }
Cell += W;
H--;
}
ConSetCursorPos(CurX, CurY);
+ delete [] (linebuf);
+
return 0;
}
-static int ConGetBoxRaw(int X, int Y, int W, int H, unsigned short *box)
+static int ConGetBoxRaw(int X, int Y, int W, int H, SLsmg_Char_Type *box)
{
int CurX, CurY;
ConQueryCursorPos(&CurX, &CurY);
while (H > 0) {
SLsmg_gotorc(Y++, X);
- SLsmg_read_raw((SLsmg_Char_Type*)box, W);
+ SLsmg_read_raw(box, W);
box += W;
H--;
}
@@ -451,9 +466,9 @@
int ConScroll(int Way, int X, int Y, int W, int H, TAttr Fill, int Count)
{
- unsigned short *box;
+ SLsmg_Char_Type *box;
- box = new unsigned short [W * H];
+ box = new SLsmg_Char_Type [W * H];
TCell fill = (((unsigned) Fill) << 8) | ' ';