From: Alexey Morozov <morozov@novosoft.ru> To: ALT Devel discussion list <devel@altlinux.ru> Subject: [devel] Первая порция фиксов на libzvt Date: Sun, 3 Nov 2002 21:18:49 +0600 Message-ID: <20021103151849.GF26430@bebi.novosoft.ru> (raw) [-- 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+
next reply other threads:[~2002-11-03 15:18 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-11-03 15:18 Alexey Morozov [this message] 2002-11-04 22:08 ` [devel] " Mikhail Zabaluev 2002-11-05 9:43 ` Alexey Morozov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021103151849.GF26430@bebi.novosoft.ru \ --to=morozov@novosoft.ru \ --cc=devel@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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