diff --git a/tgif-QPL-4.1.45-size-debug.patch b/tgif-QPL-4.1.45-size-debug.patch new file mode 100644 index 0000000..3deebdc --- /dev/null +++ b/tgif-QPL-4.1.45-size-debug.patch @@ -0,0 +1,154 @@ +--- tgif-QPL-4.1.45/chat.c.debug 2006-06-14 07:29:57.000000000 +0900 ++++ tgif-QPL-4.1.45/chat.c 2008-03-11 03:59:04.000000000 +0900 +@@ -350,10 +350,11 @@ + case TDGTNF_MULTI_BTN_CLICKED: + if (tdgt_notify.ctl_id == ID_CHAT_BTN_COLOR) { + int color_index=INVALID; ++ char c_tmp; + + switch (tdgt_notify.nf_arg) { /* Button[1-3] */ + case Button1: +- color_index = (int)TdgtBtnGetText( ++ color_index = (int)*TdgtBtnGetText( + gstChatInfo.btn_ctl[CHAT_BTN_COLOR]); + if (++color_index >= maxColors) color_index = 0; + break; +@@ -361,13 +362,14 @@ + color_index = tdgt_notify.nf_arg2; + break; + case Button3: +- color_index = (int)TdgtBtnGetText( ++ color_index = (int)*TdgtBtnGetText( + gstChatInfo.btn_ctl[CHAT_BTN_COLOR]); + if (--color_index < 0) color_index = maxColors-1; + break; + } ++ c_tmp = (char) color_index; + TdgtBtnSetText(gstChatInfo.btn_ctl[CHAT_BTN_COLOR], +- (char*)color_index, NULL); ++ &c_tmp, NULL); + TdgtSmplEditSetColorIndex(gstChatInfo.edit_ctl, color_index); + tgWriteProfileString("User", "Color", + colorMenuItems[color_index], gstChatInfo.ini_fname); +@@ -589,6 +591,8 @@ + int new_alloc=FALSE, ival=0, font_style=STYLE_NR; + int is_bold=FALSE, is_italic=FALSE, color_index=colorIndex; + ++ char c_tmp; ++ + if ((buf=tgGetProfileString("User", "Color", gstChatInfo.ini_fname)) != + NULL) { + color_index = QuickFindColorIndex(NULL, buf, &new_alloc, TRUE); +@@ -685,6 +689,8 @@ + 0, 0, TGMUTYPE_TEXT, TDGTBTN_CLICK, TGBS_NORMAL, STYLE_NR, "Send", + &mosi); + ++ c_tmp = (char) color_index; ++ + mosi.one_line_status = FALSE; + UtilStrCpyN(mosi.btn_str[0], sizeof(mosi.btn_str[0]), colorMouseStatus[0].l); + UtilStrCpyN(mosi.btn_str[1], sizeof(mosi.btn_str[1]), colorMouseStatus[0].m); +@@ -695,7 +701,7 @@ + gstChatInfo.btn_win_info[CHAT_BTN_COLOR].w, + gstChatInfo.btn_win_info[CHAT_BTN_COLOR].h, + 0, 0, TGMUTYPE_COLOR, TDGTBTN_CLICK, TGBS_NORMAL, INVALID, +- (char*)color_index, &mosi); ++ &c_tmp, &mosi); + + gstChatInfo.edit_ctl = CreateTdgtSmplEdit(chatWindow, NULL, ID_CHAT_EDIT, + gstChatInfo.edit_win_info.x, gstChatInfo.edit_win_info.y, +--- tgif-QPL-4.1.45/cmd.c.debug 2006-06-14 07:29:57.000000000 +0900 ++++ tgif-QPL-4.1.45/cmd.c 2008-03-11 02:49:42.000000000 +0900 +@@ -794,10 +794,12 @@ + int count=0; + + if (CmdPtr->pos_before_has_ids) { ++ char c_tmp; + for (obj_ptr=topObj; obj_ptr != NULL; obj_ptr=next_obj) { + next_obj = obj_ptr->next; ++ c_tmp = (char) (CmdPtr->pos_before[count]); + if (ObjHasFullID(obj_ptr, +- (char*)(int)(CmdPtr->pos_before[count]))) { ++ &c_tmp)) { + count++; + sel_ptr->obj = obj_ptr; + if (!obj_ptr->locked) MoveObj(obj_ptr, dx, dy); +--- tgif-QPL-4.1.45/font.c.debug 2008-03-11 03:54:02.000000000 +0900 ++++ tgif-QPL-4.1.45/font.c 2008-03-11 03:54:02.000000000 +0900 +@@ -20,6 +20,8 @@ + + #define _INCLUDE_FROM_FONT_C_ + ++#include ++ + #include "tgifdefs.h" + #include "cmdids.h" + +@@ -372,15 +374,15 @@ + char *font_name; + int dbflag; + { +- unsigned char c; +- unsigned char *buf, *dist, *src; ++ char c; ++ char *buf, *dist, *src; + char **font_list; + int actual_count_return; + + if (!font_name) + return False; + +- buf = (unsigned char*)malloc (strlen(font_name) + 3); ++ buf = malloc (strlen(font_name) + 3); + if (!buf) + return False; + +--- tgif-QPL-4.1.45/stretch.c.debug 2006-06-14 07:29:59.000000000 +0900 ++++ tgif-QPL-4.1.45/stretch.c 2008-03-11 03:07:59.000000000 +0900 +@@ -386,6 +386,7 @@ + *pn_num_to_resize = 0; + for (sel_ptr=botSel; sel_ptr != NULL; sel_ptr=sel_ptr->prev) { + struct AttrRec *name_attr=NULL; ++ char c_tmp; + + if (HasOnResize(sel_ptr->obj, &name_attr) && name_attr != NULL) { + num_to_resize++; +@@ -396,7 +397,8 @@ + num_to_resize*sizeof(char*)); + } + if (ppsz_names == NULL) FailAllocMessage(); +- ppsz_names[num_to_resize-1] = (char*)(sel_ptr->obj->id); ++ c_tmp = (char) (sel_ptr->obj->id); ++ ppsz_names[num_to_resize-1] = &c_tmp; + } + } + if (num_to_resize == 0) return NULL; +@@ -429,7 +431,7 @@ + RemoveAllSel(); + for (i=0; i < num_to_resize; i++) { + struct AttrRec *exec_attr=NULL; +- struct ObjRec *obj_ptr=FindObjWithOID((int)(ppsz_names[i])); ++ struct ObjRec *obj_ptr=FindObjWithOID((int)(*ppsz_names[i])); + + if (obj_ptr != NULL && !SkipOnResize(obj_ptr)) { + exec_attr = FindAttrWithName(obj_ptr, "on_resize=", NULL); +@@ -445,7 +447,7 @@ + } + } + for (i=0; i < num_to_resize; i++) { +- struct ObjRec *obj_ptr=FindObjWithOID((int)(ppsz_names[i])); ++ struct ObjRec *obj_ptr=FindObjWithOID((int)(*ppsz_names[i])); + + if (obj_ptr != NULL) { + if (!AlreadySelected(obj_ptr)) { +--- tgif-QPL-4.1.45/tdgtbtn.c.debug 2006-06-14 07:29:59.000000000 +0900 ++++ tgif-QPL-4.1.45/tdgtbtn.c 2008-03-11 03:14:25.000000000 +0900 +@@ -129,7 +129,7 @@ + break; + case TGMUTYPE_COLOR: + if (colorDisplay) { +- pixel = (btn_down ? myFgPixel : colorPixels[(int)(pTdgtBtn->str)]); ++ pixel = (btn_down ? myFgPixel : colorPixels[(unsigned int)(*pTdgtBtn->str)]); + } else { + pixel = myFgPixel; + } diff --git a/tgif.spec b/tgif.spec index 89ec737..f6ea269 100644 --- a/tgif.spec +++ b/tgif.spec @@ -2,7 +2,7 @@ Name: tgif Version: 4.1.45 -Release: 5%{?dist}.2 +Release: 6%{?dist} Summary: 2-D drawing tool Group: Applications/Multimedia @@ -21,6 +21,7 @@ Patch3: tgif-4.1.35-overthespot_fix.patch Patch10: tgif-textcursor-a-urasim.patch Patch20: tgif-4.1.44-xim-bad-focus.patch Patch100: tgif-QPL-4.1.45-open-with-mode.patch +Patch101: tgif-QPL-4.1.45-size-debug.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRequires: ImageMagick @@ -30,6 +31,7 @@ BuildRequires: gettext BuildRequires: libXmu-devel Requires: ghostscript Requires: netpbm-progs +Requires: xorg-x11-fonts-75dpi %description Tgif - Xlib based interactive 2-D drawing facility under @@ -45,6 +47,7 @@ the World-Wide-Web. %patch10 -p0 -b textcursor %patch20 -p1 -b .xim-bad-focus %patch100 -p1 -b .opmode +%patch101 -p1 -b .size %{__cp} -pf %{SOURCE2} po/ja/ja.po pushd po/ja @@ -102,8 +105,10 @@ popd $RPM_BUILD_ROOT%{_datadir}/tgif/ %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/X11/{,ja/}app-defaults/ +%if 0 %{__install} -cpm 0644 tgif-%{Xresource_ja_ver}/C/Tgif.ad \ $RPM_BUILD_ROOT%{_datadir}/X11/app-defaults/Tgif +%endif %{__install} -cpm 0644 tgif-%{Xresource_ja_ver}/ja/Tgif.ad \ $RPM_BUILD_ROOT%{_datadir}/X11/ja/app-defaults/Tgif @@ -152,7 +157,9 @@ convert -geometry 64x64! %{SOURCE4} %{name}.png %{_mandir}/man1/%{name}.1x* %{_datadir}/%{name}/ +%if 0 %{_datadir}/X11/app-defaults/Tgif +%endif # Currently no package owns the following directories %dir %{_datadir}/X11/ja/ %dir %{_datadir}/X11/ja/app-defaults/ @@ -162,8 +169,14 @@ convert -geometry 64x64! %{SOURCE4} %{name}.png %{_datadir}/applications/*-%{name}.desktop %changelog +* Mon Mar 17 2008 Mamoru Tasaka - 4.1.45-6 +- Require xorg-x11-fonts-75dpi +- Try to clean up size difference +- Don't ship Japanese related Tgif.ad for non Japanese + locale (may fix bug 436644, 427806?) + * Sat Feb 9 2008 Mamoru Tasaka -- Rebuild against gcc43 +- Rebuild against gcc43 (F-9) * Wed Aug 22 2007 TASAKA Mamoru - 4.1.45-5 - Set mode explicitly when open(2) is used with O_CREAT