This repository has been archived on 2024-03-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
gtkmeat/patches/patch-0.5.5-b.gtkmeat
2024-03-20 09:25:47 -05:00

95 lines
2.3 KiB
Text

*** gtkmeat-0.5.5/gtkmeat.c Tue Jan 12 04:01:53 1999
--- gtkmeat-0.5.5b/gtkmeat.c Wed Jan 13 09:55:53 1999
***************
*** 99,105 ****
static
BOOL app_loadFile(GtkWidget *list, const gchar *fname) {
gchar *line;
! gchar *article[2], *link;
FILE *fHnd;
gint i;
--- 99,105 ----
static
BOOL app_loadFile(GtkWidget *list, const gchar *fname) {
gchar *line;
! gchar *article[3], *link; /* Changed 2 ==> 3 */
FILE *fHnd;
gint i;
***************
*** 116,125 ****
gtk_clist_freeze(GTK_CLIST(list));
link = NULL;
rewind(fHnd);
- while (line) {
- 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);
if (line) {
--- 116,125 ----
gtk_clist_freeze(GTK_CLIST(list));
link = NULL;
rewind(fHnd);
if (line) /* should only happen once from above */
g_free(line);
+ while (line) {
+ gboolean bGotit = FALSE;
for (i = 0 ; i<num_fields; i++) {
line = app_getLine(fHnd);
if (line) {
***************
*** 143,150 ****
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]);
}
--- 143,151 ----
if (bGotit) {
gint index;
index = gtk_clist_append(GTK_CLIST(list), article);
+ /* article[ 2 ] = link ; /* Added */
gtk_clist_set_row_data(GTK_CLIST(list), index, link);
! for (i=0; i<2; i++) { /* Changed lim 3 ==> 2 */
if (article[i])
g_free(article[i]);
}
***************
*** 160,165 ****
--- 161,167 ----
static
BOOL app_startApp(const gchar *cmd, BOOL bWait, WORD wShowState) {
#ifndef WIN32
+ #if 0
char **args, *work, *twrk;
int cnt, len, scnt, pid, sta;
***************
*** 209,214 ****
--- 211,220 ----
}
}
return TRUE;
+ #else
+ int rc = system( cmd );
+ return ( (rc == 0 ) ? TRUE : FALSE ) ;
+ #endif
#else /* Win32 */
STARTUPINFO startupinfo;
PROCESS_INFORMATION processinfo;
***************
*** 347,352 ****
--- 353,359 ----
} else {
sprintf(cmd, browser_cmd, url);
}
+ g_free( fname ); /* Added */
#else
sprintf(cmd, browser_cmd, url);
#endif /* WIN32 */