freebsd-ports/editors/dedit/files/patch-src-file.c
Martin Wilke 2bd5751ba3 - Fix build with gcc 4.2
PR:		117801
Submitted by:	Pietro Cerutti <gahr@gahr.ch>
Approved by:	portmgr (pav)
2007-11-05 10:16:11 +00:00

46 lines
942 B
C

--- src/file.c.orig 2000-10-13 08:45:02.000000000 +0200
+++ src/file.c 2007-11-04 00:56:29.000000000 +0100
@@ -46,7 +46,7 @@
static void cancel_cb(GtkWidget *widget, gpointer *data);
gint fs_code;
-static GtkWidget *file_sel;
+GtkWidget *file_sel;
/*
*
@@ -80,7 +80,7 @@
gtk_widget_destroy(GTK_WIDGET(file_sel));
file_sel = NULL;
- if(file_name) {
+ if(file_name[0]) {
dedit_new_document(NULL, file_name);
}
@@ -318,7 +318,7 @@
gtk_widget_destroy(GTK_WIDGET(file_sel));
file_sel = NULL;
- if(tmp){
+ if(tmp[0]){
save_file(doc, tmp);
}
@@ -330,7 +330,6 @@
{
gchar *tmp;
gint i;
- struct stat status;
gzFile *gzfp = NULL;
gboolean gzMode = FALSE;
FILE *fp = NULL;
@@ -340,7 +339,7 @@
gchar backup[PATH_MAX];
gboolean bkFlag = FALSE;
- struct stat st0, st1;
+ struct stat st0;
#ifdef TRACE_FUNC
printf("save_file()\n");