random patches
This commit is contained in:
parent
e3e6450c9c
commit
5d22f01466
3 changed files with 210 additions and 0 deletions
78
patches/gtkmeat.patch
Normal file
78
patches/gtkmeat.patch
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
--- tmp/gtkmeat-0.5.5/gtkmeat.c Tue Jan 12 05:01:53 1999
|
||||
+++ gtkmeat-0.5.5/gtkmeat.c Wed Jan 20 14:54:17 1999
|
||||
@@ -102,6 +102,7 @@
|
||||
gchar *article[2], *link;
|
||||
FILE *fHnd;
|
||||
gint i;
|
||||
+ int eof_found;
|
||||
|
||||
fHnd = fopen(fname, "rb");
|
||||
if (!fHnd) {
|
||||
@@ -112,16 +113,21 @@
|
||||
fclose(fHnd);
|
||||
return FALSE;
|
||||
}
|
||||
+ g_free(line);
|
||||
gtk_clist_clear(GTK_CLIST(list));
|
||||
gtk_clist_freeze(GTK_CLIST(list));
|
||||
link = NULL;
|
||||
rewind(fHnd);
|
||||
- while (line) {
|
||||
+ for (i=0; i<2; i++)
|
||||
+ article[i]=NULL;
|
||||
+ for (eof_found=0;!eof_found;) {
|
||||
gboolean bGotit = FALSE;
|
||||
- if (line) /* should only happen once from above */
|
||||
- g_free(line);
|
||||
for (i = 0 ; i<num_fields; i++) {
|
||||
line = app_getLine(fHnd);
|
||||
+ /* we stuff line either into article, into link
|
||||
+ or we free it immediatly. The stuff in article
|
||||
+ will be freed down below, the link will be freed
|
||||
+ with GtkDestroyNotify */
|
||||
if (line) {
|
||||
bGotit = TRUE;
|
||||
switch (i) {
|
||||
@@ -138,17 +144,23 @@
|
||||
g_free(line);
|
||||
break;
|
||||
}
|
||||
- }
|
||||
+ } else {
|
||||
+ eof_found=1;
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
if (bGotit) {
|
||||
- gint index;
|
||||
- index = gtk_clist_append(GTK_CLIST(list), article);
|
||||
- gtk_clist_set_row_data(GTK_CLIST(list), index, link);
|
||||
- for (i=0; i<3; i++) {
|
||||
- if (article[i])
|
||||
- g_free(article[i]);
|
||||
- }
|
||||
+ gint index;
|
||||
+ index = gtk_clist_append(GTK_CLIST(list), article);
|
||||
+ gtk_clist_set_row_data_full(GTK_CLIST(list), index, link, &g_free);
|
||||
}
|
||||
+ for (i=0; i<2; i++) {
|
||||
+ if (article[i])
|
||||
+ {
|
||||
+ g_free(article[i]);
|
||||
+ article[i]=NULL;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
fclose(fHnd);
|
||||
gtk_clist_thaw(GTK_CLIST(list));
|
||||
diff -ur tmp/gtkmeat-0.5.5/gtkmeatrc gtkmeat-0.5.5/gtkmeatrc
|
||||
--- tmp/gtkmeat-0.5.5/gtkmeatrc Mon Jan 4 08:49:37 1999
|
||||
+++ gtkmeat-0.5.5/gtkmeatrc Wed Jan 20 14:47:19 1999
|
||||
@@ -23,6 +23,7 @@
|
||||
# Curl command, %s is replaced by ~/recentnews.tmp
|
||||
# Default: none
|
||||
#curl-cmd "C:\Util\curl.exe -s -o %s http://files.freshmeat.net/freshmeat/recentnews.txt"
|
||||
+#curl-cmd "/usr/local/bin/wget -q -O %s http://files.freshmeat.net/freshmeat/recentnews.txt"
|
||||
curl-cmd "/usr/local/bin/curl -s -o %s http://files.freshmeat.net/freshmeat/recentnews.txt"
|
||||
|
||||
# If you'd like to run gtkmeat in "compact" mode (without
|
||||
Reference in a new issue