From MAILER-DAEMON Mon Jul 02 18:11:03 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1I5U6p-0008KZ-SH
	for mharc-getht-commit@gnu.org; Mon, 02 Jul 2007 18:11:03 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1I5U6o-0008KM-B2
	for getht-commit@nongnu.org; Mon, 02 Jul 2007 18:11:02 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1I5U6n-0008Js-83
	for getht-commit@nongnu.org; Mon, 02 Jul 2007 18:11:01 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1I5U6n-0008JP-03
	for getht-commit@nongnu.org; Mon, 02 Jul 2007 18:11:01 -0400
Received: from outmail136079.authsmtp.co.uk ([62.13.136.79])
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <nick@njw.me.uk>) id 1I5U6m-0007jO-EX
	for getht-commit@nongnu.org; Mon, 02 Jul 2007 18:11:00 -0400
Received: from outmail128180.authsmtp.com (outmail128180.authsmtp.com
	[62.13.128.180])
	by punt2.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l62MAwvt022843
	for <getht-commit@nongnu.org>; Mon, 2 Jul 2007 23:10:58 +0100 (BST)
Received: from localhost ([213.40.126.1]) (authenticated bits=0)
	by mail.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l62MAuWp003616
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <getht-commit@nongnu.org>; Mon, 2 Jul 2007 23:10:56 +0100 (BST)
Date: Mon, 2 Jul 2007 23:15:45 +0100
From: Nick <nick@njw.me.uk>
To: getht-commit@nongnu.org
Message-ID: <20070702221545.GA7783@cutie1.lan>
Mail-Followup-To: getht-commit@nongnu.org
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI"
Content-Disposition: inline
User-Agent: Mutt/1.5.13 (2006-08-11)
X-Server-Quench: 1b7fdbb9-28e9-11dc-867b-001185d377ca
X-AuthRoute: OCdxYQ8WA1ZTTQ8Z IiUGE2lFREM4JQtD DAMDMU5RJ18MVBh5
	NEFcIVxOdloGSkcB AXlxHghLUl1xXnN3 aABQbQ9YZARMXgZ0
	VEhXQ1BUCgR3BRoE GR9QDh9wCnQDHz5w ZUVkX3YVWENzdwh8
	EEkCQT9UbHpiYDUW TUFZI1BJeAVNLAJF alF+XHZZYmIANSsu
	FhU4P3g6OjBaKTgH Cg4AMVIOBAMOFz86 QxEEEHBqRQtcAmAr JgAtKhtHRC4z
X-Authentic-SMTP: 61633231373330.squirrel.dmpriest.net.uk:671/Kp
X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse
X-Virus-Status: No virus detected - but ensure you scan with your own
	anti-virus system!
X-detected-kernel: FreeBSD 6.x (1)
Subject: [Getht-commit] arch commit: getht--mainline--0.1--patch-30
X-BeenThere: getht-commit@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: getht-general@nongnu.org
List-Id: Repository Commit List <getht-commit.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/getht-commit>,
	<mailto:getht-commit-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/getht-commit>
List-Post: <mailto:getht-commit@nongnu.org>
List-Help: <mailto:getht-commit-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/getht-commit>,
	<mailto:getht-commit-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Jul 2007 22:11:02 -0000


--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Revision: getht--mainline--0.1--patch-30
Archive: getht@sv.gnu.org
Creator: Nick White <arch@njw.me.uk>
Date: Mon Jul  2 23:15:11 BST 2007
Standard-date: 2007-07-02 22:15:11 GMT
Modified-files: BUGS src/mediarev.c src/tocxml.c src/xml.c
New-patches: getht@sv.gnu.org/getht--mainline--0.1--patch-30
Summary: Fixed xml encoding bug
Keywords:=20

Removed defunct entry in BUGS re: clearmed
Fixed bug caused by attempting to read the ISO-8859-1 xml file as UTF-8=20
M  BUGS
M  src/mediarev.c
M  src/tocxml.c
M  src/xml.c

* modified files

--- orig/BUGS
+++ mod/BUGS
@@ -1,2 +1,33 @@
-getht.c
-	running clearmed clears unrelated title in update media section
+!! BIG BUG !!
+read media xml crashes, as cannot find any issue info, so sets issue & lea=
ves an item with all blank fields
+a few things to fix with this:
+
+	read rev:
+		at the moment looks for
+			set the filename of player \"player1\" to \"%s\"
+			set the filename of player \"player1\" to \"
+		however, "player1" has now been changed to "PubDesk"
+		therefore change scanning routine to along the lines of
+			set the filename of player \"*\" to \"%s\"
+		more complex but worthwhile
+		-also-
+		if no url is found inside a "on mouseUp" clause, do not keep a blank med=
ia entry
+		best way to do this would be to:
+			dealloc the media item,
+			realloc the pointer array,
+			and -1 to no_of_media
+
+	read media xml:
+		should not segfault if it finds an empty item
+		prob needs to check that string is not blank before trying to copy info
+
+further progress:
+-	main obstacle is that "on mouseUp" no longer necessarily follows a newli=
ne - file now less organised still
+	therefore we'll have to scan each line (except when already in useful cla=
use (check this) char by char for the occurance
+	best way to do this would be to scan char by char, and if one worthwhile =
is found to copy from the start to a new string for parsing
+	worth spending a few minutes checking if there's a library function out t=
here to do this, if not create a simple generic one, using pointers, roughl=
y of the form:
+		int containstring(char * toparse, char * match), returning 1 if found an=
d 0 otherwise
+-	change of scanning routine has been done, but is untested
+	consider changing for an improved getquote which can take the nth quote
+		this is due to it being best not to rely on end of lines at end of bit w=
e're interested in
+-	2nd clause of above (if no url is found) is very important now, as major=
ity are unuseful


--- orig/src/mediarev.c
+++ mod/src/mediarev.c
@@ -75,10 +75,11 @@
=20
 				removeleadingspace(cur_line);
=20
-				if(!strncmp(cur_line,"set the filename of player \"player1\" to \"",41=
))
+				if(!strncmp(cur_line,"set the filename of player \"", 28))
 				{
 					/* todo: check if smil, if so follow to find uri */
-					sscanf(cur_line,"set the filename of player \"player1\" to \"%s\"",cu=
r_media->uri);
+					//sscanf(cur_line,"set the filename of player \"player1\" to \"%s\"",=
cur_media->uri);
+					sscanf(cur_line,"set the filename of player \"%[^\"] to \"%s\"",NULL,=
cur_media->uri);
 					cur_media->uri[strlen(cur_media->uri)-1] =3D '\0'; /* workaround extr=
a character */
 				}
 				else if(!strncmp(cur_line,"set the label of this stack to \"",32))


--- orig/src/tocxml.c
+++ mod/src/tocxml.c
@@ -206,7 +206,8 @@
 {
 	xmlDocPtr file;
=20
-	if((file =3D xmlParseFile(filepath)) =3D=3D NULL)
+//	if((file =3D xmlParseFile(filepath)) =3D=3D NULL)
+	if((file =3D  xmlReadFile(filepath, "ISO-8859-1", 0)) =3D=3D NULL)
 	{
 		return 1;
 	}


--- orig/src/xml.c
+++ mod/src/xml.c
@@ -34,7 +34,8 @@
 	if(access(filepath, R_OK) !=3D 0)
 		return 1;
=20
-	if((*file =3D xmlParseFile(filepath)) =3D=3D NULL)
+//	if((*file =3D xmlParseFile(filepath)) =3D=3D NULL)
+	if((*file =3D xmlReadFile(filepath, "ISO-8859-1", 0)) =3D=3D NULL)
 	{
 		fprintf(stderr, "Error: cannot open xml file %s\n", filepath);
 		return 1;




--+HP7ph2BbKc20aGI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGiXkRH0hWdATkZT8RAqQUAKDNJMYlEVDxyyYCwr2g3kVu7kkQAQCgyEhg
zThGTo74Kaey7vjW/iNVJec=
=UXKe
-----END PGP SIGNATURE-----

--+HP7ph2BbKc20aGI--



