[gob] Sun Jul 15 06:21:55 2012 Jiri (George) Lebl <jirka 5z com>



commit 1c53f13badaacd4fc8dbd0aa830dff70b9ddd086
Author: Jiri (George) Lebl <jirka 5z com>
Date:   Sun Jul 15 06:28:33 2012 +0800

    Sun Jul 15 06:21:55 2012  Jiri (George) Lebl <jirka 5z com>
    
    	* src/main.c, src/out.c: Fix for empty file separator.  Thanks to
    	  H.-J. Schnitzer for pointing it out.
    
    	* src/lexer.l: add yywrap returning 1 as the default should
    	  not sure why I don't have -lfl working here.

 ChangeLog   |    8 ++++++++
 src/lexer.l |    3 ++-
 src/main.c  |    4 ++--
 src/out.c   |    5 ++++-
 4 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 056b25c..a54a974 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Jul 15 06:21:55 2012  Jiri (George) Lebl <jirka 5z com>
+
+	* src/main.c, src/out.c: Fix for empty file separator.  Thanks to
+	  H.-J. Schnitzer for pointing it out.
+
+	* src/lexer.l: add yywrap returning 1 as the default should
+	  not sure why I don't have -lfl working here.
+
 Thu Jan 06 11:30:03 2011  Jiri (George) Lebl <jirka 5z com>
 
 	* Release 2.0.18
diff --git a/src/lexer.l b/src/lexer.l
index bad0c9a..0dc3cda 100644
--- a/src/lexer.l
+++ b/src/lexer.l
@@ -95,9 +95,10 @@ add_gtk_doc_func(void)
 	gtk_doc_func = NULL;
 }
 
-/* Ugly warning avoiding */
+/* Ugly warning / error avoidings */
 #ifdef FLEX_SCANNER
 int yylex(void);
+int yywrap(void) { return 1; }
 #endif
 
 %}
diff --git a/src/main.c b/src/main.c
index 734efa4..921fe8e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3860,9 +3860,9 @@ print_includes(void)
 		p = g_strconcat(filebase, sep, "private.h", NULL);
 		if( ! g_list_find_custom(include_files, p,
 					 (GCompareFunc)strcmp)) {
-			out_printf(out, "#include \"%s%cprivate.h\"\n\n",
+			out_printf(out, "#include \"%s%sprivate.h\"\n\n",
 				   filebase,
-				   file_sep);
+				   sep);
 			if(found_header)
 				error_printf(GOB_WARN, 0,
 					    "Implicit private header include "
diff --git a/src/out.c b/src/out.c
index b6371f6..2d66570 100644
--- a/src/out.c
+++ b/src/out.c
@@ -92,9 +92,12 @@ out_addline_outfile(FILE *fp)
 		fprintf(fp,"#line %d \"%s.h\"\n",outhline,filebase);
 		in_outh = TRUE;
 	} else if(fp == outph) {
+		char sep[2] = {0,0};
 		if(in_outph) return;
 		outphline++;
-		fprintf(fp,"#line %d \"%s%cprivate.h\"\n",outphline,filebase,file_sep);
+		if (file_sep != 0)
+			sep[0] = file_sep;
+		fprintf(fp,"#line %d \"%s%sprivate.h\"\n",outphline,filebase,sep);
 		in_outph = TRUE;
 	} else
 		g_assert_not_reached();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]