On Tue, 15 Jul 2008, Rob Kendrick wrote:
Thanks for this. I've a few additional comments, some answering your
questions.
| +gchar* url_parse_domain (const gchar *url)
| +{
| + /* the + 2 is to account for both '/' after the protocol (ftp://) */
| + gchar *domain = strchr(url, '/') + 2;
*RJEK* Does this cope gracefully with data: URLs and file:// URLs with
unusual numbers of slashes? (ie, any number from one up)
What's wrong with url_host() ? (utils/url.h)
| bool gui_empty_clipboard(void)
| {
| + if (!current_selection)
| + current_selection = g_string_new(NULL);
*RJEK* Is this ever freed?
(Also gui_start_selection()). Either destroy this once the selection's no
longer needed or have a cleanup function that's called on program exit.
| Index: desktop/textinput.c
| ===================================================================
| --- desktop/textinput.c (revision 4636)
| +++ desktop/textinput.c (working copy)
*RJEK* There's a lot of stuff in here I haven't a clue about. Can
somebody else have a look over this?
After rewriting a bunch of this (some due to Mike's changes, others due to
longstanding badness) I'm satified this is significantly better than
trunk. Probably worth someone going over it to check for obvious stupid,
though.
| -struct box *get_box(struct box *b, unsigned offset, int *pidx)
| +struct box *get_box(struct box *b, unsigned offset, size_t *pidx)
*RJEK* What was the rationale for changing this to size_t?
1) Selection offsets are unsigned, so int is wrong, regardless.
2) The textinput code uses size_t everywhere, so that was probably the
deciding factor here.
( size_t foo; get_box(x, y, (int *) &foo); is somewhat nasty)
J.