rpms/ochusha/F-9 ochusha-0.6.0-20090224-machibbs.patch, NONE, 1.1 ochusha.spec, 1.51, 1.52

Mamoru Tasaka mtasaka at fedoraproject.org
Fri Feb 27 15:22:15 UTC 2009


Author: mtasaka

Update of /cvs/extras/rpms/ochusha/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30549/F-9

Modified Files:
	ochusha.spec 
Added Files:
	ochusha-0.6.0-20090224-machibbs.patch 
Log Message:
* Sat Feb 28 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.0.1-0.2.cvs20081226T1200.dist.1
- Patch for Machi-BBS read.pl redirect change on 2009-02-24 (patch from
  Upstream CVS)


ochusha-0.6.0-20090224-machibbs.patch:

--- NEW FILE ochusha-0.6.0-20090224-machibbs.patch ---
Index: libochusha/bbs_jbbs_utils.cc
===================================================================
RCS file: /cvsroot/ochusha/ochusha/libochusha/bbs_jbbs_utils.cc,v
retrieving revision 1.32
retrieving revision 1.35
diff -u -r1.32 -r1.35
--- libochusha/bbs_jbbs_utils.cc	16 Dec 2008 14:01:17 -0000	1.32
+++ libochusha/bbs_jbbs_utils.cc	27 Feb 2009 08:07:02 -0000	1.35
@@ -1,5 +1,5 @@
 /* -*- c++ -*-
- * Copyright (c) 2003-2008 The Ochusha Project.
+ * Copyright (c) 2003-2009 The Ochusha Project.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: bbs_jbbs_utils.cc,v 1.32 2008/12/16 14:01:17 fuyu Exp $
+ * $Id: bbs_jbbs_utils.cc,v 1.35 2009/02/27 08:07:02 itn2002 Exp $
  */
 
 #include "config.h"
@@ -518,15 +518,16 @@
 		pending_buffer.get_string_length());
   buffer.append(data, length);
 
-  const char *buf_top = buffer.get_string();
+  // buf_top¤Ï¾å½ñ¤­¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë¤Î¤Ç¡¢buf_top¤Ïconst char *¤Ë¤Ç¤­¤Ê¤¤
+  char *buf_top = strdup(buffer.get_string());
   size_t buf_len = buffer.get_string_length();
 
-  const char *buf_pos = buf_top;
+  char *buf_pos = buf_top;
   size_t rest_len = buf_len;
   unsigned int res_num = cursor->get_next_res_num();
   if (res_num == 1 && title_text == NULL)
     {
-      const char *tmp_pos;
+      char *tmp_pos;
       while ((tmp_pos = static_cast<char *>(memchr(buf_pos, '\n',
 						   rest_len))) != NULL)
 	{
@@ -579,6 +580,7 @@
 	    {
 	      if (!two_line)
 		{
+		// ¼¡¤Î¹Ô¤Çtmp_pos (¤Ä¤Þ¤êbuf_top)¤¬¾å½ñ¤­¤µ¤ì¤ë
 		  *tmp_pos = ' ';	// ¼¡¤Î¹Ô¤È·Ò¤¤¤ÇºÆÅÙÄ©Àï
 		  two_line = true;
 		  continue;
@@ -601,6 +603,7 @@
   pending_buffer.clear();
   pending_buffer.append(buf_pos, rest_len);
 
+  free(buf_top);
   return true;
 }
 
@@ -614,8 +617,7 @@
 {
   if (!restore_hints())
     {
-      thread->set_last_modified(NULL);	// °Ọ̵̃¤·¤Ê¤Î¤Ç¾Ãµî
-      clear_hints();
+      thread->set_last_modified(NULL);	// ¡¼¥æ¥Õ¡×¥Õ¥ª¡¢¥­¡¢¥Ï¡¢¥Û¡¢¥Ì¥»¥Æ¥ª      clear_hints();
     }
 
   buffer->fix();
@@ -1434,23 +1436,23 @@
 
   char url_buffer[PATH_MAX];
   if (from == 0)
-    snprintf(url_buffer, PATH_MAX, "http://%s/bbs/read.pl?BBS=%s&KEY=%s",
+    snprintf(url_buffer, PATH_MAX, "http://%s/bbs/read.cgi?BBS=%s&KEY=%s",
 	     board_uri.get_server(), bbs, thread->get_id());
   else if (from < 0)
     snprintf(url_buffer, PATH_MAX,
-	     "http://%s/bbs/read.pl?BBS=%s&KEY=%s&LAST=%d",
+	     "http://%s/bbs/read.cgi?BBS=%s&KEY=%s&LAST=%d",
 	     board_uri.get_server(), bbs, thread->get_id(), -from);
   else if (from < to)
     snprintf(url_buffer, PATH_MAX,
-	     "http://%s/bbs/read.pl?BBS=%s&KEY=%s&START=%d&END=%d&NOFIRST=TRUE",
+	     "http://%s/bbs/read.cgi?BBS=%s&KEY=%s&START=%d&END=%d&NOFIRST=TRUE",
 	     board_uri.get_server(), bbs, thread->get_id(), from, to);
   else if (from != 1)
     snprintf(url_buffer, PATH_MAX,
-	     "http://%s/bbs/read.pl?BBS=%s&KEY=%s&START=%d&NOFIRST=TRUE",
+	     "http://%s/bbs/read.cgi?BBS=%s&KEY=%s&START=%d&NOFIRST=TRUE",
 	     board_uri.get_server(), bbs, thread->get_id(), from);
   else
     snprintf(url_buffer, PATH_MAX,
-	     "http://%s/bbs/read.pl?BBS=%s&KEY=%s&START=%d",
+	     "http://%s/bbs/read.cgi?BBS=%s&KEY=%s&START=%d",
 	     board_uri.get_server(), bbs, thread->get_id(), from);
 
   return strdup(url_buffer);


Index: ochusha.spec
===================================================================
RCS file: /cvs/extras/rpms/ochusha/F-9/ochusha.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- ochusha.spec	26 Dec 2008 06:39:56 -0000	1.51
+++ ochusha.spec	27 Feb 2009 15:21:44 -0000	1.52
@@ -1,5 +1,3 @@
-%define		__default_patch_fuzz	2
-
 # To create CVS based tarball, do
 # cvs -z3 -d:pserver:anonymous at cvs.sourceforge.jp:/cvsroot/ochusha \
 #	co \
@@ -33,7 +31,7 @@
 Summary:	A GTK+ 2ch.net BBS Browser
 Name:		ochusha
 Version:	%{main_ver}
-Release:	%{rel}
+Release:	%{rel}.1
 URL:		http://ochusha.sourceforge.jp/
 %if %{pre_release}
 Source:		%{name}-%{main_ver}-%{strtag}.tar.bz2
@@ -43,6 +41,7 @@
 Source10:	ochusha-prefs-gtkrc
 Source11:	ochusha.sh
 #Patch10:	ochusha-build-20081207T0000.diff
+Patch100:	ochusha-0.6.0-20090224-machibbs.patch
 License:	BSD
 Group:		Applications/Internet
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -75,6 +74,7 @@
 %else
 %setup -q
 %endif
+%patch100 -p0 -b .machi_read_pl_cgi
 
 # Icon path fix
 %{__sed} -i -e 's|Icon.*$|Icon=ochusha48|' ochusha/ochusha.desktop.in
@@ -217,6 +217,10 @@
 %{_datadir}/icons/hicolor/48x48/apps/*.png
 
 %changelog
+* Sat Feb 28 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.0.1-0.2.cvs20081226T1200.dist.1
+- Patch for Machi-BBS read.pl redirect change on 2009-02-24 (patch from
+  Upstream CVS)
+
 * Fri Dec 26 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp>
 - 2008-12-26 12:00
 - Hopely fix the issue on /linux/1148809116/612




More information about the fedora-extras-commits mailing list