* [devel] Первая порция фиксов на libzvt
@ 2002-11-03 15:18 Alexey Morozov
2002-11-04 22:08 ` [devel] " Mikhail Zabaluev
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Morozov @ 2002-11-03 15:18 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
Собственно, сабж.
Достижения:
1. Собирается automake-1.6/autoconf-2.5, хотя я не вижу причин, по которым
не должно собираться и старыми версиями :-). Впрочем, не проверял :-).
2. В заголовке терминала корректно отображаются не Latin-1 символы (ой, ну
и чехарда с многочисленными конвертациями между local charset <-> UTF-8
<-> UCS-4 у них там внутри :-)).
Проверять при помощи
zsh:
precmd () {print -Pn "\e]0;%n@%m: %~\a"}; mkdir тест; cd тест;
bash:
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"; mkdir тест; cd тест;
Да, если в эхе есть особы, приближенные к импе^H^H^H^H gnome-devel , я буду рад, если эти
патчи засабмиттятся туда. Влад, Вы этот список читаете? :-)
P.S. Да, to be continued :-). На очереди - нормальный маппинг кнопочек :-).
[-- Attachment #2: libzvt-2.0.1-automake.patch --]
[-- Type: text/plain, Size: 6205 bytes --]
diff -urN libzvt-2.0.1.orig/acinclude.m4 libzvt-2.0.1/acinclude.m4
--- libzvt-2.0.1.orig/acinclude.m4 Thu Jan 1 07:00:00 1970
+++ libzvt-2.0.1/acinclude.m4 Sun Nov 3 18:12:03 2002
@@ -0,0 +1,244 @@
+# Checks for availability of various utmp fields
+#
+# Original code by Bernhard Rosenkraenzer (bero@linux.net.eu.org), 1998.
+# Modifications by Timur Bakeyev (timur@gnu.org), 1999.
+#
+
+dnl AC_CHECK_UTMP()
+dnl Test for presence of the field and define HAVE_UT_UT_field macro
+dnl
+
+AC_DEFUN(AC_CHECK_UTMP,[
+
+AC_CHECK_HEADERS(sys/time.h utmp.h utmpx.h)
+AC_HEADER_TIME
+
+if test "$ac_cv_header_utmpx_h" = "yes"; then
+ AC_DEFINE(UTMP,[struct utmpx])
+else
+ AC_DEFINE(UTMP,[struct utmp])
+fi
+
+dnl some systems (BSD4.4-like) require time.h to be included before utmp.h :/
+AC_MSG_CHECKING(for ut_host field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; char *p; p=ut.ut_host;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_HOST)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_pid field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; int i; i=ut.ut_pid;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_PID)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_id field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; char *p; p=ut.ut_id;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_ID)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_name field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; char *p; p=ut.ut_name;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_NAME)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_type field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; int i; i=(int) ut.ut_type;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_TYPE)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_exit.e_termination field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; ut.ut_exit.e_termination=0;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_EXIT_E_TERMINATION)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_user field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; char *p; p=ut.ut_user;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_USER)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_time field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; ut.ut_time=0;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_TIME)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_tv field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; ut.ut_tv={0, 0};],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_TV)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_syslen field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif],[UTMP ut; ut.ut_syslen=0;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_SYSLEN)
+fi
+AC_MSG_RESULT($result)
+
+])
+
diff -urN libzvt-2.0.1.orig/libzvt/Makefile.am libzvt-2.0.1/libzvt/Makefile.am
--- libzvt-2.0.1.orig/libzvt/Makefile.am Sun Nov 3 17:51:39 2002
+++ libzvt-2.0.1/libzvt/Makefile.am Sun Nov 3 18:09:38 2002
@@ -79,10 +79,9 @@
gnome_pty_helper_SOURCES= \
gnome-pty-helper.c \
- gnome-login-support.c \
gnome-utmp.c
-gnome_pty_helper_LDADD= $(UTIL_LIBS)
+gnome_pty_helper_LDADD= $(UTIL_LIBS) gnome-login-support.$(OBJEXT)
# Since we do gnome-pty-helper manually, include the relevant sources here
EXTRA_DIST = TODO BUGS README \
[-- Attachment #3: libzvt-2.0.1-i18n-fix.patch --]
[-- Type: text/plain, Size: 1871 bytes --]
--- libzvt-2.0.1.orig/libzvt/vt.c Sun Nov 3 17:51:39 2002
+++ libzvt-2.0.1/libzvt/vt.c Sun Nov 3 18:49:27 2002
@@ -1413,40 +1413,11 @@
/* XPROPERTY sets an XA_STRING in gnome-terminal and must
* therefore be Latin-1 unless gnome-terminal is on crack.
- * We'll assume the title/iconname are in locale encoding, since
- * AFAIK they aren't tagged for encoding. xterm seems to treat
- * them as locale encoding.
+ * The processing code automatically converts data into
+ * UTF-8, so we don't have to bother ourselves...
*/
-
- if (i == VTTITLE_XPROPERTY)
- {
- const char *s;
- GString *str;
-
- str = g_string_new ("");
-
- s = p;
- while (*s)
- {
- g_string_append_unichar (str, *s);
- ++s;
- }
-
- utf8 = g_string_free (str, FALSE);
- }
- else
- {
- utf8 = zvt_term_locale_to_utf8 (p, -1, NULL, NULL, NULL);
- /* utf8 will be NULL if the title was not valid
- * in the locale encoding
- */
- }
-
- if (utf8)
- {
- vt->change_my_name (vt->user_data, utf8, i);
- g_free (utf8);
- }
+ if (p)
+ vt->change_my_name (vt->user_data, p, i);
}
}
}
@@ -1766,8 +1737,15 @@
} else if (c==0x0a) {
state = 0; /* abort command */
} else {
+#ifdef HAS_I18N
+ if (vt->arg.txt.outptr + 6 <(vt->arg.txt.args_mem+VTPARAM_MAXARGS*VTPARAM_ARGMAX-2)) {/* truncate excessive args */
+ gint len = g_unichar_to_utf8(c, vt->arg.txt.outptr);
+ vt->arg.txt.outptr += len;
+ }
+#else
if (vt->arg.txt.outptr<(vt->arg.txt.args_mem+VTPARAM_MAXARGS*VTPARAM_ARGMAX-2)) /* truncate excessive args */
*(vt->arg.txt.outptr)++=c;
+#endif
}
break;
[-- Attachment #4: libzvt.spec.patch --]
[-- Type: text/plain, Size: 1412 bytes --]
--- libzvt.spec.orig Sun Oct 6 20:20:48 2002
+++ libzvt.spec Sun Nov 3 18:56:00 2002
@@ -1,12 +1,11 @@
Name: libzvt
Version: 2.0.1
-Release: alt3
+Release: alt3.aam1
Summary: Zed's Virtual Terminal widget library
License: LGPL
Group: System/Libraries
Url: ftp://ftp.gnome.org
-Packager: Yuri N. Sedunov <aris@altlinux.ru>
Source: %name-%version.tar.bz2
# patch to make utf-8 mode the default if the locale is utf-8
@@ -17,6 +16,10 @@
# enforce pty helper path in all execl parameters
Patch2: %name-2.0.1-mdk-ptyhelper.patch.bz2
+# Local patches
+Patch11: %name-2.0.1-automake.patch
+Patch12: %name-2.0.1-i18n-fix.patch
+
%define gtk2_ver 2.1.0
%define glib2_ver 2.0.6
%define libart_lgpl_ver 2.3.8
@@ -65,10 +68,14 @@
%patch -p1
%patch1 -p1
%patch2 -p1
+%patch11 -p1
+%patch12 -p1
%build
# needed by patch1
-%__automake
+aclocal
+%__automake -a
+%__autoconf
%configure
%make_build
@@ -96,6 +103,12 @@
%_libdir/*.a
%changelog
+* Sun Nov 03 2002 Alexey Morozov <morozov@novosoft.ru> 2.0.1-alt3.aam1
+- A patch and spec fixes for automake-1.6/autoconf-2.5x (should be
+ backward compatible with older version but I'm not sure about that)
+- A fix for proper localized title displaying (especially useful for
+ non-Latin1 directory names and famous \e]0...\a escape-sequence
+
* Sun Oct 06 2002 Yuri N. Sedunov <aris@altlinux.ru> 2.0.1-alt3
- rebuild with new pango, gtk+
^ permalink raw reply [flat|nested] 3+ messages in thread
* [devel] Re: Первая порция фиксов на libzvt
2002-11-03 15:18 [devel] Первая порция фиксов на libzvt Alexey Morozov
@ 2002-11-04 22:08 ` Mikhail Zabaluev
2002-11-05 9:43 ` Alexey Morozov
0 siblings, 1 reply; 3+ messages in thread
From: Mikhail Zabaluev @ 2002-11-04 22:08 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
Hello Alexey,
On Sun, Nov 03, 2002 at 09:18:49PM +0600, Alexey Morozov wrote:
>
> Собственно, сабж.
Круто.
А вот как бы его на utempter переделать, по рекомендациям LDV?
Или это нужно в gnome-terminal править?
--
Stay tuned,
MhZ JID: mookid@jabber.org
___________
Prediction is very difficult, especially of the future.
- Niels Bohr
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [devel] Re: Первая порция фиксов на libzvt
2002-11-04 22:08 ` [devel] " Mikhail Zabaluev
@ 2002-11-05 9:43 ` Alexey Morozov
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Morozov @ 2002-11-05 9:43 UTC (permalink / raw)
To: ALT Devel discussion list
On Tue, Nov 05, 2002 at 01:08:55AM +0300, Mikhail Zabaluev wrote:
> On Sun, Nov 03, 2002 at 09:18:49PM +0600, Alexey Morozov wrote:
> > Собственно, сабж.
> Круто.
> А вот как бы его на utempter переделать, по рекомендациям LDV?
> Или это нужно в gnome-terminal править?
Кажется, в нем. Но на самом деле, какая разница, где править :-)
Там все равно править придется :-)
Надеюсь, в следующие выходные доедет вторая порция, на этот раз про
кнопочки.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-05 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-03 15:18 [devel] Первая порция фиксов на libzvt Alexey Morozov
2002-11-04 22:08 ` [devel] " Mikhail Zabaluev
2002-11-05 9:43 ` Alexey Morozov
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git