[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getht-commit] arch commit: getht--mainline--0.1--patch-30
From: |
Nick |
Subject: |
[Getht-commit] arch commit: getht--mainline--0.1--patch-30 |
Date: |
Mon, 2 Jul 2007 23:15:45 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Revision: getht--mainline--0.1--patch-30
Archive: address@hidden
Creator: Nick White <address@hidden>
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: address@hidden/getht--mainline--0.1--patch-30
Summary: Fixed xml encoding bug
Keywords:
Removed defunct entry in BUGS re: clearmed
Fixed bug caused by attempting to read the ISO-8859-1 xml file as UTF-8
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 & leaves
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 media 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
newline - file now less organised still
+ therefore we'll have to scan each line (except when already in useful
clause (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
there to do this, if not create a simple generic one, using pointers, roughly
of the form:
+ int containstring(char * toparse, char * match), returning 1 if
found and 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 we're interested in
+- 2nd clause of above (if no url is found) is very important now, as
majority are unuseful
--- orig/src/mediarev.c
+++ mod/src/mediarev.c
@@ -75,10 +75,11 @@
removeleadingspace(cur_line);
- 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\"",cur_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] = '\0'; /* workaround extra 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;
- if((file = xmlParseFile(filepath)) == NULL)
+// if((file = xmlParseFile(filepath)) == NULL)
+ if((file = xmlReadFile(filepath, "ISO-8859-1", 0)) == NULL)
{
return 1;
}
--- orig/src/xml.c
+++ mod/src/xml.c
@@ -34,7 +34,8 @@
if(access(filepath, R_OK) != 0)
return 1;
- if((*file = xmlParseFile(filepath)) == NULL)
+// if((*file = xmlParseFile(filepath)) == NULL)
+ if((*file = xmlReadFile(filepath, "ISO-8859-1", 0)) == NULL)
{
fprintf(stderr, "Error: cannot open xml file %s\n", filepath);
return 1;
pgpTNwgtFItiC.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getht-commit] arch commit: getht--mainline--0.1--patch-30,
Nick <=