summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorkristerw <kristerw@pkgsrc.org>2004-11-24 22:35:25 +0000
committerkristerw <kristerw@pkgsrc.org>2004-11-24 22:35:25 +0000
commit8c3ae0e67442803e796d74c9a64b0399100ca63f (patch)
tree6032c14552d2881403568cc9d42d7d5266db5adb /time
parent6a04b1b261f89569ce58f1b6f757805a416fb505 (diff)
downloadpkgsrc-8c3ae0e67442803e796d74c9a64b0399100ca63f.tar.gz
Make this build under NetBSD 1.6.2 (C99-isms, and a missing header file).
Diffstat (limited to 'time')
-rw-r--r--time/gnotime/distinfo16
-rw-r--r--time/gnotime/patches/patch-aa63
-rw-r--r--time/gnotime/patches/patch-ac38
-rw-r--r--time/gnotime/patches/patch-ad64
-rw-r--r--time/gnotime/patches/patch-ae172
-rw-r--r--time/gnotime/patches/patch-af27
-rw-r--r--time/gnotime/patches/patch-ag52
-rw-r--r--time/gnotime/patches/patch-ah24
-rw-r--r--time/gnotime/patches/patch-ai103
-rw-r--r--time/gnotime/patches/patch-aj28
-rw-r--r--time/gnotime/patches/patch-ak18
-rw-r--r--time/gnotime/patches/patch-al145
-rw-r--r--time/gnotime/patches/patch-am255
-rw-r--r--time/gnotime/patches/patch-an12
14 files changed, 1012 insertions, 5 deletions
diff --git a/time/gnotime/distinfo b/time/gnotime/distinfo
index 6b1a0b1486f..dcc956cf133 100644
--- a/time/gnotime/distinfo
+++ b/time/gnotime/distinfo
@@ -1,6 +1,18 @@
-$NetBSD: distinfo,v 1.2 2004/10/23 13:54:46 jmmv Exp $
+$NetBSD: distinfo,v 1.3 2004/11/24 22:35:25 kristerw Exp $
SHA1 (gnotime-2.2.0.tar.gz) = 895a516a52b0cc7745183c0c8c909896dbda60ab
Size (gnotime-2.2.0.tar.gz) = 1197945 bytes
-SHA1 (patch-aa) = e54c704d3089587e4dd6a6f474088b22c809ffe4
+SHA1 (patch-aa) = a1332ebd600c4611533f5337dbc729af92f2d8d3
SHA1 (patch-ab) = 8ce9db0b1059ac45aab9681116ac86c331818847
+SHA1 (patch-ac) = d9523a1561cf7a57056a3670b1ebac4e28629fed
+SHA1 (patch-ad) = 060bddad8f1807823b6e2f65bec1bf12d4940fd9
+SHA1 (patch-ae) = 4ed3ab60c71caf8f078657a5bbac9caed3dc4e4a
+SHA1 (patch-af) = adc0c63aab58c5ac15be9c194b7d76ac7a37736c
+SHA1 (patch-ag) = 4816d594079adfdef51a7471b587db62167c9d57
+SHA1 (patch-ah) = 8683366be0995489347cb7f72e4a3ce3ac1204cb
+SHA1 (patch-ai) = 440941dfaa4454f7d5dee90c43e79c950704d3ad
+SHA1 (patch-aj) = 0494c00b312ac73ee4107ef8d761f2d1047559bb
+SHA1 (patch-ak) = c198f95978471a946e0008d4d80f5630716ac991
+SHA1 (patch-al) = 36e08dfe8ee0a38a27db99f1edcb05669a57f29c
+SHA1 (patch-am) = d23fb795a5f2c6774e11cd7ac22f478b8f7266a8
+SHA1 (patch-an) = 120164b440724278e4bb4d4bc97404b3e4e76481
diff --git a/time/gnotime/patches/patch-aa b/time/gnotime/patches/patch-aa
index e2eacf8a833..2acb538d0c8 100644
--- a/time/gnotime/patches/patch-aa
+++ b/time/gnotime/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.1.1.1 2004/10/23 06:51:00 jdolecek Exp $
+$NetBSD: patch-aa,v 1.2 2004/11/24 22:35:25 kristerw Exp $
---- src/main.c.orig 2004-10-22 21:53:30.000000000 +0200
-+++ src/main.c 2004-10-22 21:53:36.000000000 +0200
+--- src/main.c.orig Mon Apr 26 00:46:20 2004
++++ src/main.c Wed Nov 24 22:31:20 2004
@@ -33,7 +33,7 @@
#include <unistd.h>
#include <utime.h>
@@ -11,3 +11,60 @@ $NetBSD: patch-aa,v 1.1.1.1 2004/10/23 06:51:00 jdolecek Exp $
#endif
#include <qof.h>
+@@ -299,6 +299,7 @@
+ char * xml_filepath;
+ gboolean read_is_ok;
+ char *errmsg, *qmsg;
++ GtkWidget *mb;
+
+ xml_filepath = resolve_old_path (config_data_url);
+
+@@ -347,7 +348,6 @@
+ _("Do you want to continue?"),
+ NULL);
+
+- GtkWidget *mb;
+ mb = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+@@ -398,13 +398,13 @@
+ {
+ const char *fp;
+ char *errmsg, *qmsg;
++ GtkWidget *mb;
+ fp = gtt_get_config_filepath();
+ errmsg = gtt_err_to_string (conf_errcode, fp);
+ qmsg = g_strconcat (errmsg,
+ _("Shall I setup a new configuration?"),
+ NULL);
+
+- GtkWidget *mb;
+ mb = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+@@ -724,6 +724,8 @@
+ memset(&reapchildren, 0, sizeof reapchildren);
+ #endif /* WNOHANG/SA_NOCLDWAIT */
+
++ {
++ GnomeClient *client;
+ static char *geometry_string = NULL;
+ static const struct poptOption geo_options[] =
+ {
+@@ -745,7 +747,7 @@
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
+
+- GnomeClient *client = gnome_master_client();
++ client = gnome_master_client();
+ g_signal_connect(G_OBJECT(client), "save_yourself",
+ G_CALLBACK(save_state), (gpointer) argv[0]);
+ g_signal_connect(G_OBJECT(client), "die",
+@@ -806,6 +808,7 @@
+
+ scm_boot_guile (argc, argv, guile_inner_main, NULL);
+ return 0; /* not reached !? */
++ }
+ }
+
+ /* ======================= END OF FILE =================== */
diff --git a/time/gnotime/patches/patch-ac b/time/gnotime/patches/patch-ac
new file mode 100644
index 00000000000..e4c1ebe7053
--- /dev/null
+++ b/time/gnotime/patches/patch-ac
@@ -0,0 +1,38 @@
+$NetBSD: patch-ac,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/export.c.orig Wed Nov 24 18:55:31 2004
++++ src/export.c Wed Nov 24 18:57:12 2004
+@@ -124,12 +124,14 @@
+ export_really (GtkWidget *widget, export_format_t *xp)
+ {
+ gboolean rc;
++ GnomeVFSURI *parsed_uri;
++ gboolean exists;
++ GnomeVFSResult result;
+
+ xp->uri = gtk_file_selection_get_filename (xp->picker);
+
+- GnomeVFSURI *parsed_uri;
+ parsed_uri = gnome_vfs_uri_new (xp->uri);
+- gboolean exists = gnome_vfs_uri_exists (parsed_uri);
++ exists = gnome_vfs_uri_exists (parsed_uri);
+ if (exists)
+ {
+ GtkWidget *w;
+@@ -144,14 +146,14 @@
+ if (0 == gnome_dialog_run (GNOME_DIALOG (w))) goto done;
+ }
+
+- GnomeVFSResult result;
+ result = gnome_vfs_create (&xp->handle, xp->uri, GNOME_VFS_OPEN_WRITE,
+ FALSE, 0644);
+ if (GNOME_VFS_OK != result)
+ {
+ char *s;
++ GtkWidget *w;
+ s = g_strdup_printf (_("File %s dould not be opened"), xp->uri);
+- GtkWidget *w = gnome_error_dialog (s);
++ w = gnome_error_dialog (s);
+ gnome_dialog_set_parent (GNOME_DIALOG (w), GTK_WINDOW (xp->picker));
+ g_free (s);
+ goto done;
diff --git a/time/gnotime/patches/patch-ad b/time/gnotime/patches/patch-ad
new file mode 100644
index 00000000000..82e82ddedda
--- /dev/null
+++ b/time/gnotime/patches/patch-ad
@@ -0,0 +1,64 @@
+$NetBSD: patch-ad,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/ghtml.c.orig Wed Nov 24 18:57:51 2004
++++ src/ghtml.c Wed Nov 24 18:59:31 2004
+@@ -169,8 +169,9 @@
+ type = SCM_CDR (node);
+ if (SCM_SYMBOLP(type) || SCM_STRINGP (type))
+ {
++ char *buff;
+ cur_type = GTT_NONE;
+- char *buff = SCM_STRING_CHARS (type);
++ buff = SCM_STRING_CHARS (type);
+
+ if ((!strncmp (buff, "gtt-project-ptr",15)) ||
+ (!strncmp (buff, "gtt-project-list",16)))
+@@ -1255,6 +1256,8 @@
+ static SCM
+ my_catch_handler (void *data, SCM tag, SCM throw_args)
+ {
++ SCM fmt;
++ SCM s_str;
+ printf ("Error: GnoTime caught error during scheme parse\n");
+ if (SCM_SYMBOLP(tag))
+ {
+@@ -1263,8 +1266,8 @@
+ }
+ scm_backtrace();
+
+- SCM fmt = scm_makfrom0str ("~S");
+- SCM s_str = scm_simple_format (SCM_BOOL_F, fmt, SCM_LIST1(throw_args));
++ fmt = scm_makfrom0str ("~S");
++ s_str = scm_simple_format (SCM_BOOL_F, fmt, SCM_LIST1(throw_args));
+ printf ("\tthrow_args=%s\n", SCM_STRING_CHARS (s_str));
+
+ return SCM_EOL;
+@@ -1281,8 +1284,9 @@
+ /* no-op for now, just copy it into the window */
+ if (ghtml->write_stream)
+ {
++ size_t nr;
+ (ghtml->write_stream) (ghtml, "<link", 5, ghtml->user_data);
+- size_t nr = strlen (str);
++ nr = strlen (str);
+ (ghtml->write_stream) (ghtml, str, nr, ghtml->user_data);
+ (ghtml->write_stream) (ghtml, ">", 1, ghtml->user_data);
+ }
+@@ -1297,6 +1301,8 @@
+ GString *template;
+ char *start, *end, *scmstart, *comstart, *linkstart;
+ size_t nr;
++ GnomeVFSResult result;
++ GnomeVFSHandle *handle;
+
+ if (!ghtml) return;
+ if (prj) ghtml->prj = prj;
+@@ -1311,8 +1317,6 @@
+ }
+
+ /* Try to get the ghtml file ... */
+- GnomeVFSResult result;
+- GnomeVFSHandle *handle;
+ result = gnome_vfs_open (&handle, filepath, GNOME_VFS_OPEN_READ);
+ if ((GNOME_VFS_OK != result) && (0==ghtml->open_count))
+ {
diff --git a/time/gnotime/patches/patch-ae b/time/gnotime/patches/patch-ae
new file mode 100644
index 00000000000..16705e2b81c
--- /dev/null
+++ b/time/gnotime/patches/patch-ae
@@ -0,0 +1,172 @@
+$NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/journal.c.orig Wed Nov 24 22:18:52 2004
++++ src/journal.c Wed Nov 24 22:26:45 2004
+@@ -195,11 +195,12 @@
+ static void
+ save_to_gnomevfs (Wiggy *wig, const char * filename)
+ {
+-
++ gboolean exists;
++ GnomeVFSResult result;
+ /* Don't clobber the file, ask user for permission */
+ GnomeVFSURI *parsed_uri;
+ parsed_uri = gnome_vfs_uri_new (filename);
+- gboolean exists = gnome_vfs_uri_exists (parsed_uri);
++ exists = gnome_vfs_uri_exists (parsed_uri);
+ gnome_vfs_uri_unref (parsed_uri);
+ if (exists)
+ {
+@@ -215,7 +216,6 @@
+ }
+
+ /* Try to open the file for writing */
+- GnomeVFSResult result;
+ result = gnome_vfs_create (&wig->handle, filename,
+ GNOME_VFS_OPEN_WRITE, FALSE, 0644);
+
+@@ -509,6 +509,7 @@
+ static void
+ task_delete_memo_clicked_cb(GtkWidget * w, gpointer data)
+ {
++ GList * ctl;
+ Wiggy *wig = (Wiggy *) data;
+
+ /* It is physically impossible to cut just the memo, without
+@@ -517,7 +518,7 @@
+
+ gtt_task_merge_up (wig->task);
+
+- GList * ctl = g_list_prepend(cutted_task_list, wig->task);
++ ctl = g_list_prepend(cutted_task_list, wig->task);
+ gtt_task_remove (wig->task);
+ cutted_task_list = ctl;
+ }
+@@ -697,10 +698,11 @@
+ static void
+ on_close_clicked_cb (GtkWidget *w, gpointer data)
+ {
++ GtkWidget *topper;
+ Wiggy *wig = (Wiggy *) data;
+
+ if (NULL == wig->top) return; /* avoid recursive double-free */
+- GtkWidget *topper = wig->top; /* avoid recursion */
++ topper = wig->top; /* avoid recursion */
+ wig->top = NULL;
+ gtk_widget_destroy (topper);
+
+@@ -786,19 +788,20 @@
+ html_url_requested_cb(GtkHTML *doc, const gchar * url,
+ GtkHTMLStream *handle, gpointer data)
+ {
++ GnomeVFSResult result;
++ GnomeVFSHandle *vfs;
++#define BSZ 16000
++ char buff[BSZ];
++ GnomeVFSFileSize bytes_read;
++
+ Wiggy *wig = data;
+ const char * path = gtt_ghtml_resolve_path (url, wig->filepath);
+ if (!path) return;
+
+- GnomeVFSResult result;
+- GnomeVFSHandle *vfs;
+ result = gnome_vfs_open (&vfs, path, GNOME_VFS_OPEN_READ);
+
+ if (GNOME_VFS_OK != result) return;
+
+-#define BSZ 16000
+- char buff[BSZ];
+- GnomeVFSFileSize bytes_read;
+ result = gnome_vfs_read (vfs, buff, BSZ, &bytes_read);
+ while (GNOME_VFS_OK == result)
+ {
+@@ -859,8 +862,10 @@
+ return msg;
+ }
+
++ {
+ char * msg = _("Left-click to bring up menu");
+ return g_strdup (msg);
++ }
+ }
+
+ static gint
+@@ -922,8 +927,13 @@
+ /* Create and initialize the hover-help window */
+ if (!wig->hover_help_window)
+ {
++ GtkWindow *wino;
++ GtkWidget *frame;
++ GtkWidget *align;
++ GtkWidget *label;
++ int px=0, py=0, rx=0, ry=0;
+ wig->hover_help_window = gtk_window_new(GTK_WINDOW_POPUP);
+- GtkWindow *wino = GTK_WINDOW (wig->hover_help_window);
++ wino = GTK_WINDOW (wig->hover_help_window);
+ gtk_window_set_decorated (wino, FALSE);
+ gtk_window_set_destroy_with_parent (wino, TRUE);
+ gtk_window_set_transient_for (wino, GTK_WINDOW(wig->top));
+@@ -931,19 +941,19 @@
+ gtk_window_set_resizable (wino, FALSE); /* FALSE to enable auto-resize */
+
+ /* There must be a better way to draw a line around the box ?? */
+- GtkWidget *frame = gtk_frame_new (NULL);
++ frame = gtk_frame_new (NULL);
+ gtk_container_add(GTK_CONTAINER(wino), frame);
+ gtk_container_set_resize_mode (GTK_CONTAINER(frame), GTK_RESIZE_PARENT);
+ gtk_widget_show (frame);
+
+ /* There must be a better way to pad the text all around ?? */
+- GtkWidget *align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
++ align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+ // gtk_alignment_set_padding (GTK_ALIGNMENT(align), 6, 6, 6, 6);
+ gtk_container_add(GTK_CONTAINER(frame), align);
+ gtk_container_set_resize_mode (GTK_CONTAINER(align), GTK_RESIZE_PARENT);
+ gtk_widget_show (align);
+
+- GtkWidget *label = gtk_label_new ("xxx");
++ label = gtk_label_new ("xxx");
+ wig->hover_label = GTK_LABEL (label);
+ gtk_container_add(GTK_CONTAINER(align), label);
+ gtk_widget_show (label);
+@@ -952,7 +962,6 @@
+ gtk_window_set_focus (GTK_WINDOW(wig->top), GTK_WIDGET(wig->html));
+
+ /* Set up in initial default, so later move works. */
+- int px=0, py=0, rx=0, ry=0;
+ gtk_widget_get_pointer (GTK_WIDGET(wig->top), &px, &py);
+ gtk_window_get_position (GTK_WINDOW(wig->top), &rx, &ry);
+ gtk_window_move (wino, rx+px, ry+py);
+@@ -1003,25 +1012,28 @@
+ perform_form_query (KvpFrame *kvpf)
+ {
+ GList *results, *n;
++ char *user_debug;
++ QofSqlQuery *q;
++ char *query_string;
+
+ if (!kvpf) return NULL;
+
+ /* Allow the user to enable form debugging by adding the following html:
+ * <input type="hidden" name="debug" value="1">
+ */
+- char *user_debug = kvp_frame_get_string (kvpf, "debug");
++ user_debug = kvp_frame_get_string (kvpf, "debug");
+ if (user_debug)
+ {
+ printf ("Debug: HTML Form Input=%s\n", kvp_frame_to_string (kvpf));
+ }
+
+- QofSqlQuery *q = qof_sql_query_new();
++ q = qof_sql_query_new();
+
+ if (!book) book = qof_book_new();
+ qof_sql_query_set_book (q, book);
+ qof_sql_query_set_kvp (q, kvpf);
+
+- char *query_string = kvp_frame_get_string (kvpf, "query");
++ query_string = kvp_frame_get_string (kvpf, "query");
+ if (!query_string) return NULL;
+ if (0 == query_string[0]) return NULL;
+
diff --git a/time/gnotime/patches/patch-af b/time/gnotime/patches/patch-af
new file mode 100644
index 00000000000..508475a0b6d
--- /dev/null
+++ b/time/gnotime/patches/patch-af
@@ -0,0 +1,27 @@
+$NetBSD: patch-af,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/log.c.orig Wed Nov 24 22:27:06 2004
++++ src/log.c Wed Nov 24 22:28:10 2004
+@@ -37,6 +37,8 @@
+ char *filename;
+ GnomeVFSHandle *handle;
+ GnomeVFSResult result;
++ int rc;
++ GnomeVFSFileSize bytes_written;
+
+ g_return_val_if_fail (logstr != NULL, FALSE);
+
+@@ -67,12 +69,11 @@
+ t = time(NULL);
+
+ /* Translators: Format to use in the gnotime logfile */
+- int rc = strftime (date, sizeof (date), _("%b %d %H:%M:%S"), localtime(&t));
++ rc = strftime (date, sizeof (date), _("%b %d %H:%M:%S"), localtime(&t));
+ if (0 >= rc) strcpy (date, "???");
+
+ /* Append to end of file */
+ gnome_vfs_seek (handle, GNOME_VFS_SEEK_END, 0);
+- GnomeVFSFileSize bytes_written;
+ gnome_vfs_write (handle, date, strlen(date), &bytes_written);
+ gnome_vfs_write (handle, logstr, strlen(logstr), &bytes_written);
+ gnome_vfs_write (handle, "\n", 1, &bytes_written);
diff --git a/time/gnotime/patches/patch-ag b/time/gnotime/patches/patch-ag
new file mode 100644
index 00000000000..9f84505eb73
--- /dev/null
+++ b/time/gnotime/patches/patch-ag
@@ -0,0 +1,52 @@
+$NetBSD: patch-ag,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/menucmd.c.orig Wed Nov 24 22:31:41 2004
++++ src/menucmd.c Wed Nov 24 22:33:52 2004
+@@ -343,6 +343,7 @@
+ cut_project(GtkWidget *w, gpointer data)
+ {
+ GttProject *cut_prj;
++ GttProject *prj;
+
+ /* Do NOT cut unless the ctree window actually has focus.
+ * Otherwise, it will lead to cutting mayhem.
+@@ -364,7 +365,7 @@
+
+ /* Update various subsystems */
+ /* Set the notes are to whatever the new focus project is. */
+- GttProject *prj = ctree_get_focus_project (global_ptw);
++ prj = ctree_get_focus_project (global_ptw);
+ notes_area_set_project (global_na, prj);
+
+ menu_set_states(); /* To enable paste menu item */
+@@ -424,6 +425,7 @@
+ copy_project(GtkWidget *w, gpointer data)
+ {
+ GttProject *prj;
++ GList *n;
+ prj = ctree_get_focus_project (global_ptw);
+
+ if (!prj) return;
+@@ -434,7 +436,7 @@
+ * the list of earlier cut projects. We do this in order
+ * to allow the most recently copied project to be pasted
+ * multiple times. */
+- GList *n = cutted_project_list;
++ n = cutted_project_list;
+ for (n=cutted_project_list; n; n=n->next)
+ {
+ GttProject *p = n->data;
+@@ -519,12 +521,12 @@
+ menu_howto_edit_times (GtkWidget *w,gpointer data)
+ {
+ char * msg;
++ GtkWidget *mb;
+
+ msg = _("To edit the timer interval for this project,\n"
+ "open the Journal window and click on a link.\n"
+ "This will bring up a menu of time editing options.\n");
+
+- GtkWidget *mb;
+ mb = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_INFO,
diff --git a/time/gnotime/patches/patch-ah b/time/gnotime/patches/patch-ah
new file mode 100644
index 00000000000..1b3236cb66f
--- /dev/null
+++ b/time/gnotime/patches/patch-ah
@@ -0,0 +1,24 @@
+$NetBSD: patch-ah,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/plug-in.c.orig Wed Nov 24 22:34:26 2004
++++ src/plug-in.c Wed Nov 24 22:35:31 2004
+@@ -96,6 +96,8 @@
+ {
+ const char *title, *path, *tip;
+ NewPluginDialog *dlg = data;
++ GnomeVFSURI *parsed_uri;
++ gboolean exists;
+
+ /* Get the dialog contents */
+ title = gtk_entry_get_text (dlg->plugin_name);
+@@ -103,9 +105,8 @@
+ tip = gtk_entry_get_text (dlg->plugin_tooltip);
+
+ /* Do a basic sanity check */
+- GnomeVFSURI *parsed_uri;
+ parsed_uri = gnome_vfs_uri_new (path);
+- gboolean exists = gnome_vfs_uri_exists (parsed_uri);
++ exists = gnome_vfs_uri_exists (parsed_uri);
+ gnome_vfs_uri_unref (parsed_uri);
+ if (!exists)
+ {
diff --git a/time/gnotime/patches/patch-ai b/time/gnotime/patches/patch-ai
new file mode 100644
index 00000000000..a2ad924750f
--- /dev/null
+++ b/time/gnotime/patches/patch-ai
@@ -0,0 +1,103 @@
+$NetBSD: patch-ai,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/prefs.c.orig Wed Nov 24 22:35:57 2004
++++ src/prefs.c Wed Nov 24 22:40:01 2004
+@@ -199,11 +199,12 @@
+ static int
+ scan_time_string (const char *str)
+ {
++ char * p;
+ int hours=0, minutes=0, seconds = 0;
+ char buff[24];
+ strncpy (buff, str, 24);
+ buff[23]=0;
+- char * p = strchr (buff, ':');
++ p = strchr (buff, ':');
+ if (p) *p = 0;
+ hours = atoi (buff);
+ if (p)
+@@ -221,9 +222,11 @@
+ minutes %= 60;
+ hours %= 24;
+
++ {
+ int totalsecs = hours*3600 + minutes*60 + seconds;
+ if (12*3600 < totalsecs) totalsecs -= 24*3600;
+ return totalsecs;
++ }
+ }
+
+ /* ============================================================== */
+@@ -372,15 +375,17 @@
+
+ if (5 == page)
+ {
++ int off, day;
++ const char * buff;
+ int change = 0;
+ config_idle_timeout = atoi(gtk_entry_get_text(GTK_ENTRY(odlg->idle_secs)));
+
+ /* Hunt for the hour-of night on which to start */
+- const char * buff = gtk_entry_get_text (odlg->daystart_secs);
+- int off = scan_time_string (buff);
++ buff = gtk_entry_get_text (odlg->daystart_secs);
++ off = scan_time_string (buff);
+ SET_VAL (config_daystart_offset,off);
+
+- int day = get_optionmenu_item (odlg->weekstart_menu);
++ day = get_optionmenu_item (odlg->weekstart_menu);
+ SET_VAL (config_weekstart_offset, day);
+
+ if (change)
+@@ -420,6 +425,8 @@
+ static void
+ options_dialog_set(PrefsDialog *odlg)
+ {
++ int hour, day, secs;
++ char buff[24];
+ char s[30];
+
+ SET_ACTIVE(secs);
+@@ -495,7 +502,6 @@
+ gtk_entry_set_text(GTK_ENTRY(odlg->idle_secs), s);
+
+ /* Set the correct menu item based on current values */
+- int hour;
+ if (0<config_daystart_offset)
+ {
+ hour = (config_daystart_offset +1800)/3600;
+@@ -510,14 +516,13 @@
+ set_optionmenu_item (odlg->daystart_menu, hour);
+
+ /* Print the daystart offset as a string in 24 hour time */
+- int secs = config_daystart_offset;
++ secs = config_daystart_offset;
+ if (0 > secs) secs += 24*3600;
+- char buff[24];
+ qof_print_hours_elapsed_buff (buff, 24, secs, config_show_secs);
+ gtk_entry_set_text (odlg->daystart_secs, buff);
+
+ /* Set the correct menu item based on current values */
+- int day = config_weekstart_offset;
++ day = config_weekstart_offset;
+ set_optionmenu_item (odlg->weekstart_menu, day);
+
+ /* set to unmodified as it reflects the current state of the app */
+@@ -529,14 +534,15 @@
+ static void
+ daystart_menu_changed (gpointer data, GtkOptionMenu *w)
+ {
++ int secs;
++ char buff[24];
+ PrefsDialog *dlg = data;
+
+ int hour = get_optionmenu_item (dlg->daystart_menu);
+ hour += -3; /* menu starts at 9PM */
+
+- int secs = hour * 3600;
++ secs = hour * 3600;
+ if (0 > secs) secs += 24*3600;
+- char buff[24];
+ qof_print_hours_elapsed_buff (buff, 24, secs, config_show_secs);
+ gtk_entry_set_text (dlg->daystart_secs, buff);
+ }
diff --git a/time/gnotime/patches/patch-aj b/time/gnotime/patches/patch-aj
new file mode 100644
index 00000000000..ef5e14680eb
--- /dev/null
+++ b/time/gnotime/patches/patch-aj
@@ -0,0 +1,28 @@
+$NetBSD: patch-aj,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/proj.c.orig Wed Nov 24 22:40:26 2004
++++ src/proj.c Wed Nov 24 22:41:13 2004
+@@ -2306,10 +2306,10 @@
+ gtt_task_get_secs_earliest (GttTask *tsk)
+ {
+ GList *node;
+- if (NULL == tsk->interval_list) return 0;
+-
+ time_t earliest = INT_MAX;
+
++ if (NULL == tsk->interval_list) return 0;
++
+ for (node=tsk->interval_list; node; node=node->next)
+ {
+ GttInterval * ivl = node->data;
+@@ -2322,9 +2322,8 @@
+ gtt_task_get_secs_latest (GttTask *tsk)
+ {
+ GList *node;
+- if (NULL == tsk->interval_list) return 0;
+-
+ time_t latest = INT_MIN;
++ if (NULL == tsk->interval_list) return 0;
+
+ for (node=tsk->interval_list; node; node=node->next)
+ {
diff --git a/time/gnotime/patches/patch-ak b/time/gnotime/patches/patch-ak
new file mode 100644
index 00000000000..a5d8dbdf5f2
--- /dev/null
+++ b/time/gnotime/patches/patch-ak
@@ -0,0 +1,18 @@
+$NetBSD: patch-ak,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/query.c.orig Wed Nov 24 22:41:39 2004
++++ src/query.c Wed Nov 24 22:41:55 2004
+@@ -74,12 +74,12 @@
+
+ while (1)
+ {
++ GttBucket *bu;
+ /* Check error bounds, should never happen */
+ if ((0 > arr_day) || (arr_day >= da->array_len))
+ {
+ return 1;
+ }
+- GttBucket *bu;
+ bu = &g_array_index (da->buckets, GttBucket, arr_day);
+
+ stm.tm_mday ++;
diff --git a/time/gnotime/patches/patch-al b/time/gnotime/patches/patch-al
new file mode 100644
index 00000000000..51f60adff65
--- /dev/null
+++ b/time/gnotime/patches/patch-al
@@ -0,0 +1,145 @@
+$NetBSD: patch-al,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- lib/qof/qofgobj.c.orig Wed Nov 24 18:04:20 2004
++++ lib/qof/qofgobj.c Wed Nov 24 18:11:07 2004
+@@ -57,10 +57,10 @@
+ void
+ qof_gobject_shutdown (void)
+ {
++ GSList *n;
+ if (!initialized) return;
+ initialized = FALSE;
+
+- GSList *n;
+ for (n=paramList; n; n=n->next) g_free(n->data);
+ g_slist_free (paramList);
+
+@@ -83,11 +83,13 @@
+ void
+ qof_gobject_register_instance (QofBook *book, QofType type, GObject *gob)
+ {
++ QofCollection *coll;
++ GSList * instance_list;
+ if (!book || !type) return;
+
+- QofCollection *coll = qof_book_get_collection (book, type);
++ coll = qof_book_get_collection (book, type);
+
+- GSList * instance_list = qof_collection_get_data (coll);
++ instance_list = qof_collection_get_data (coll);
+ instance_list = g_slist_prepend (instance_list, gob);
+ qof_collection_set_data (coll, instance_list);
+ }
+@@ -106,41 +108,45 @@
+ * mapping below ... */
+ if (G_IS_PARAM_SPEC_STRING(gps))
+ {
++ const char * str;
+ GValue gval = {G_TYPE_INVALID};
+ g_value_init (&gval, G_TYPE_STRING);
+ g_object_get_property (gob, getter->param_name, &gval);
+
+- const char * str = g_value_get_string (&gval);
++ str = g_value_get_string (&gval);
+ return (gpointer) str;
+ }
+ else
+ if (G_IS_PARAM_SPEC_INT(gps))
+ {
++ int ival;
+ GValue gval = {G_TYPE_INVALID};
+ g_value_init (&gval, G_TYPE_INT);
+ g_object_get_property (gob, getter->param_name, &gval);
+
+- int ival = g_value_get_int (&gval);
++ ival = g_value_get_int (&gval);
+ return (gpointer) ival;
+ }
+ else
+ if (G_IS_PARAM_SPEC_UINT(gps))
+ {
++ int ival;
+ GValue gval = {G_TYPE_INVALID};
+ g_value_init (&gval, G_TYPE_UINT);
+ g_object_get_property (gob, getter->param_name, &gval);
+
+- int ival = g_value_get_uint (&gval);
++ ival = g_value_get_uint (&gval);
+ return (gpointer) ival;
+ }
+ else
+ if (G_IS_PARAM_SPEC_BOOLEAN(gps))
+ {
++ int ival;
+ GValue gval = {G_TYPE_INVALID};
+ g_value_init (&gval, G_TYPE_BOOLEAN);
+ g_object_get_property (gob, getter->param_name, &gval);
+
+- int ival = g_value_get_boolean (&gval);
++ ival = g_value_get_boolean (&gval);
+ return (gpointer) ival;
+ }
+
+@@ -161,21 +167,23 @@
+ * mapping below ... */
+ if (G_IS_PARAM_SPEC_FLOAT(gps))
+ {
++ double fval;
+ GValue gval = {G_TYPE_INVALID};
+ g_value_init (&gval, G_TYPE_FLOAT);
+ g_object_get_property (gob, getter->param_name, &gval);
+
+- double fval = g_value_get_float (&gval);
++ fval = g_value_get_float (&gval);
+ return fval;
+ }
+ else
+ if (G_IS_PARAM_SPEC_DOUBLE(gps))
+ {
++ double fval;
+ GValue gval = {G_TYPE_INVALID};
+ g_value_init (&gval, G_TYPE_DOUBLE);
+ g_object_get_property (gob, getter->param_name, &gval);
+
+- double fval = g_value_get_double (&gval);
++ fval = g_value_get_double (&gval);
+ return fval;
+ }
+
+@@ -204,17 +212,17 @@
+ void
+ qof_gobject_register (QofType e_type, GObjectClass *obclass)
+ {
+-
++ int i, j=0;
++ QofParam *qof_param_list;
+ /* Get the GObject properties, convert to QOF properties */
+ GParamSpec **prop_list;
+ int n_props;
+ prop_list = g_object_class_list_properties (obclass, &n_props);
+
+- QofParam * qof_param_list = g_new0 (QofParam, n_props);
++ qof_param_list = g_new0 (QofParam, n_props);
+ paramList = g_slist_prepend (paramList, qof_param_list);
+
+ PINFO ("object %s has %d props", e_type, n_props);
+- int i, j=0;
+ for (i=0; i<n_props; i++)
+ {
+ GParamSpec *gparam = prop_list[i];
+@@ -288,6 +296,7 @@
+
+ /* ------------------------------------------------------ */
+ /* Now do the class itself */
++ {
+ QofObject *class_def = g_new0 (QofObject, 1);
+ classList = g_slist_prepend (classList, class_def);
+
+@@ -304,6 +313,7 @@
+ class_def->printable = NULL;
+
+ qof_object_register (class_def);
++ }
+ }
+
+ /* ======================= END OF FILE ================================ */
diff --git a/time/gnotime/patches/patch-am b/time/gnotime/patches/patch-am
new file mode 100644
index 00000000000..30c15c8f80e
--- /dev/null
+++ b/time/gnotime/patches/patch-am
@@ -0,0 +1,255 @@
+$NetBSD: patch-am,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- lib/qof/qofsql.c.orig Wed Nov 24 18:11:27 2004
++++ lib/qof/qofsql.c Wed Nov 24 18:25:14 2004
+@@ -155,8 +155,9 @@
+ if (('\'' == str[0]) ||
+ ('\"' == str[0]))
+ {
++ size_t len;
+ str ++;
+- size_t len = strlen(str);
++ len = strlen(str);
+ str[len-1] = 0;
+ }
+ return str;
+@@ -168,6 +169,15 @@
+ char tmpbuff[128];
+ GSList *param_list;
+ QofQueryPredData *pred_data = NULL;
++ QofQueryCompare qop;
++ char *table_name;
++ char *param_name;
++ sql_field_item * sparam;
++ char * qparam_name;
++ sql_field_item * svalue;
++ char * qvalue_name;
++ QofType param_type;
++ QofQuery *qq;
+
+ if (NULL == cond)
+ {
+@@ -183,14 +193,14 @@
+ PWARN("missing left paramter");
+ return NULL;
+ }
+- sql_field_item * sparam = cond->d.pair.left->item;
++ sparam = cond->d.pair.left->item;
+ if (SQL_name != sparam->type)
+ {
+ PWARN("we support only paramter names at this time (parsed %d)",
+ sparam->type);
+ return NULL;
+ }
+- char * qparam_name = sparam->d.name->data;
++ qparam_name = sparam->d.name->data;
+ if (NULL == qparam_name)
+ {
+ PWARN ("missing paramter name");
+@@ -205,13 +215,13 @@
+ PWARN ("missing right paramter");
+ return NULL;
+ }
+- sql_field_item * svalue = cond->d.pair.right->item;
++ svalue = cond->d.pair.right->item;
+ if (SQL_name != svalue->type)
+ {
+ PWARN("we support only simple values (parsed as %d)", svalue->type);
+ return NULL;
+ }
+- char * qvalue_name = svalue->d.name->data;
++ qvalue_name = svalue->d.name->data;
+ if (NULL == qvalue_name)
+ {
+ PWARN("missing value");
+@@ -224,16 +234,18 @@
+ * If it is, look up the value. */
+ if (0 == strncasecmp (qvalue_name, "kvp://", 6))
+ {
++ KvpValue *kv;
++ KvpValueType kvt;
+ if (NULL == query->kvp_join)
+ {
+ PWARN ("missing kvp frame");
+ return NULL;
+ }
+- KvpValue *kv = kvp_frame_get_value (query->kvp_join, qvalue_name+5);
++ kv = kvp_frame_get_value (query->kvp_join, qvalue_name+5);
+ /* If there's no value, its not an error;
+ * we just don't do this predicate */
+ if (!kv) return NULL;
+- KvpValueType kvt = kvp_value_get_type (kv);
++ kvt = kvp_value_get_type (kv);
+
+ tmpbuff[0] = 0x0;
+ qvalue_name = tmpbuff;
+@@ -273,7 +285,6 @@
+ param_list = qof_query_build_param_list (qparam_name, NULL);
+
+ /* Get the where-term comparison operator */
+- QofQueryCompare qop;
+ switch (cond->op)
+ {
+ case SQL_eq: qop = QOF_COMPARE_EQUAL; break;
+@@ -292,8 +303,6 @@
+ /* OK, need to know the type of the thing being matched
+ * in order to build the correct predicate. Get the type
+ * from the object parameters. */
+- char *table_name;
+- char *param_name;
+ get_table_and_param (qparam_name, &table_name, &param_name);
+ if (NULL == table_name)
+ {
+@@ -306,7 +315,7 @@
+ return NULL;
+ }
+
+- QofType param_type = qof_class_get_parameter_type (table_name, param_name);
++ param_type = qof_class_get_parameter_type (table_name, param_name);
+ if (!param_type) return NULL; /* Can't happen */
+
+ if (!strcmp (param_type, QOF_TYPE_STRING))
+@@ -343,19 +352,20 @@
+ }
+ else if (!strcmp (param_type, QOF_TYPE_DATE))
+ {
++ time_t exact;
++ int rc;
++ Timespec ts;
+ // XXX FIXME: this doesn't handle time strings, only date strings
+ // XXX should also see if we need to do a day-compare or time-compare.
+ /* work around highly bogus locale setting */
+ qof_date_format_set(QOF_DATE_FORMAT_US);
+
+- time_t exact;
+- int rc = qof_scan_date_secs (qvalue_name, &exact);
++ rc = qof_scan_date_secs (qvalue_name, &exact);
+ if (0 == rc)
+ {
+ PWARN ("unable to parse date: %s", qvalue_name);
+ return NULL;
+ }
+- Timespec ts;
+ ts.tv_sec = exact;
+ ts.tv_nsec = 0;
+ pred_data = qof_query_date_predicate (qop, QOF_DATE_MATCH_DAY, ts);
+@@ -375,6 +385,7 @@
+ }
+ else if (!strcmp (param_type, QOF_TYPE_GUID))
+ {
++ GList *guid_list;
+ GUID *guid = guid_malloc();
+ gboolean rc = string_to_guid (qvalue_name, guid);
+ if (0 == rc)
+@@ -386,7 +397,7 @@
+ // XXX match any means eqal, what about not equal ??
+ // XXX less, than greater than don't make sense,
+ // should check for those bad conditions
+- GList *guid_list = g_list_append (NULL, guid);
++ guid_list = g_list_append (NULL, guid);
+ pred_data = qof_query_guid_predicate (QOF_GUID_MATCH_ANY, guid_list);
+ // XXX FIXME the above is a memory leak! we leak both guid and glist.
+ }
+@@ -404,7 +415,7 @@
+ return NULL;
+ }
+
+- QofQuery *qq = qof_query_create();
++ qq = qof_query_create();
+ qof_query_add_term (qq, param_list, pred_data, QOF_QUERY_FIRST_TERM);
+ return qq;
+ }
+@@ -418,11 +429,12 @@
+ {
+ case SQL_pair:
+ {
++ QofQuery * qq;
++ QofQueryOp qop;
+ QofQuery *qleft = handle_where (query, swear->d.pair.left);
+ QofQuery *qright = handle_where (query, swear->d.pair.right);
+ if (NULL == qleft) return qright;
+ if (NULL == qright) return qleft;
+- QofQueryOp qop;
+ switch (swear->d.pair.op)
+ {
+ case SQL_and: qop = QOF_QUERY_AND; break;
+@@ -433,7 +445,7 @@
+ qof_query_destroy (qright);
+ return NULL;
+ }
+- QofQuery * qq = qof_query_merge (qleft, qright, qop);
++ qq = qof_query_merge (qleft, qright, qop);
+ qof_query_destroy (qleft);
+ qof_query_destroy (qright);
+ return qq;
+@@ -460,12 +472,11 @@
+ static void
+ handle_sort_order (QofSqlQuery *query, GList *sorder_list)
+ {
+- if (!sorder_list) return;
+-
+ GSList *qsp[3];
+ gboolean direction[3];
+ int i;
+
++ if (!sorder_list) return;
+ for (i=0; i<3; i++)
+ {
+ qsp[i] = NULL;
+@@ -473,14 +484,16 @@
+
+ if (sorder_list)
+ {
++ char * qparam_name;
++ GList *n;
+ sql_order_field *sorder = sorder_list->data;
+
+ /* Set the sort direction */
+ if (SQL_asc == sorder->order_type) direction[i] = TRUE;
+
+ /* Find the paramter name */
+- char * qparam_name = NULL;
+- GList *n = sorder->name;
++ qparam_name = NULL;
++ n = sorder->name;
+ if (n)
+ {
+ qparam_name = n->data;
+@@ -509,6 +522,10 @@
+ qof_sql_query_run (QofSqlQuery *query, const char *str)
+ {
+ GList *node;
++ GList *tables;
++ sql_select_statement *sss;
++ sql_where * swear;
++ GList *results;
+
+ if (!query) return NULL;
+ query->parse_result = sql_parse (str);
+@@ -531,14 +548,14 @@
+ * user wrote "SELECT * FROM tableA, tableB WHERE ..."
+ * then we don't have a single unique table-name.
+ */
+- GList *tables = sql_statement_get_tables (query->parse_result);
++ tables = sql_statement_get_tables (query->parse_result);
+ if (1 == g_list_length (tables))
+ {
+ query->single_global_tablename = tables->data;
+ }
+
+- sql_select_statement *sss = query->parse_result->statement;
+- sql_where * swear = sss->where;
++ sss = query->parse_result->statement;
++ swear = sss->where;
+ if (swear)
+ {
+ /* Walk over the where terms, turn them into QOF predicates */
+@@ -562,7 +579,7 @@
+ qof_query_set_book (query->qof_query, query->book);
+
+ // qof_query_print (query->qof_query);
+- GList *results = qof_query_run (query->qof_query);
++ results = qof_query_run (query->qof_query);
+
+ return results;
+ }
diff --git a/time/gnotime/patches/patch-an b/time/gnotime/patches/patch-an
new file mode 100644
index 00000000000..485008267c3
--- /dev/null
+++ b/time/gnotime/patches/patch-an
@@ -0,0 +1,12 @@
+$NetBSD: patch-an,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+
+--- src/app.c.orig Wed Nov 24 23:13:21 2004
++++ src/app.c Wed Nov 24 23:13:49 2004
+@@ -26,6 +26,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <pthread.h>
+
+ #include <qof/gnc-date.h>
+