[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-271-g94ced45)
The branch, master has been updated
via 94ced454b33f96700d003ebab7cf1df5fab7ecbe (commit)
from 333c7bc53e05e1c024486b8191b8f7031f0f506e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gsymcheck/include/prototype.h | 5 ++---
gsymcheck/src/Makefile.am | 11 +++++++++--
gsymcheck/src/globals.c | 28 ----------------------------
gsymcheck/src/gsymcheck.c | 3 ++-
gsymcheck/src/{i_vars.c => s_log.c} | 31 ++++++++++++++++---------------
5 files changed, 29 insertions(+), 49 deletions(-)
copy gsymcheck/src/{i_vars.c => s_log.c} (65%)
=================
Commit Messages
=================
commit 94ced454b33f96700d003ebab7cf1df5fab7ecbe
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Nov 1 13:17:00 2008 +0000
gsymcheck: Don't export x_log_update_func, it is a libgeda symbol
We set libgeda's exported x_log_update_func variable from
gsymcheck.c. (This is declared as extern in libgeda's funcs.h)
Move the logging function s_log_update() from globals.c (where
it didn't belong) into its own file, s_log.c, making minor edits
along the way. The log handler isn't called when "do_logging"
is FALSE, so we don't need to test that from within the handler.
:100644 100644 9d96152... b61a86a... M gsymcheck/include/prototype.h
:100644 100644 4bbba68... 773dd7f... M gsymcheck/src/Makefile.am
:100644 100644 1f01108... e953e1a... M gsymcheck/src/globals.c
:100644 100644 6861115... 235dbad... M gsymcheck/src/gsymcheck.c
:000000 100644 0000000... f6eaffe... A gsymcheck/src/s_log.c
=========
Changes
=========
commit 94ced454b33f96700d003ebab7cf1df5fab7ecbe
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Nov 1 13:17:00 2008 +0000
gsymcheck: Don't export x_log_update_func, it is a libgeda symbol
We set libgeda's exported x_log_update_func variable from
gsymcheck.c. (This is declared as extern in libgeda's funcs.h)
Move the logging function s_log_update() from globals.c (where
it didn't belong) into its own file, s_log.c, making minor edits
along the way. The log handler isn't called when "do_logging"
is FALSE, so we don't need to test that from within the handler.
diff --git a/gsymcheck/include/prototype.h b/gsymcheck/include/prototype.h
index 9d96152..b61a86a 100644
--- a/gsymcheck/include/prototype.h
+++ b/gsymcheck/include/prototype.h
@@ -3,9 +3,6 @@ SCM g_rc_gsymcheck_version(SCM version);
/* g_register.c */
void g_register_funcs(void);
SCM g_quit(void);
-/* globals.c */
-void s_log_update(const gchar *log_domain, GLogLevelFlags log_level,
- const gchar *buf);
/* gsymcheck.c */
void gsymcheck_quit(void);
void main_prog(void *closure, int argc, char *argv[]);
@@ -33,6 +30,8 @@ void s_check_connections(OBJECT *object_head, SYMCHECK *s_current);
void s_check_missing_attribute(OBJECT *object, char *attribute, SYMCHECK *s_current);
void s_check_missing_attributes(OBJECT *object_head, SYMCHECK *s_current);
void s_check_pintype(OBJECT *object_head, SYMCHECK *s_current);
+/* s_log.c */
+void s_log_update (const gchar *log_domain, GLogLevelFlags log_level, const gchar *buf);
/* s_symstruct.c */
SYMCHECK *s_symstruct_init(void);
void s_symstruct_print(SYMCHECK *s_current);
diff --git a/gsymcheck/src/Makefile.am b/gsymcheck/src/Makefile.am
index 4bbba68..773dd7f 100644
--- a/gsymcheck/src/Makefile.am
+++ b/gsymcheck/src/Makefile.am
@@ -4,8 +4,15 @@ bin_PROGRAMS = gsymcheck
# don't forget all *.h files */
gsymcheck_SOURCES = \
- g_rc.c g_register.c globals.c gsymcheck.c i_vars.c \
- parsecmd.c s_check.c s_symstruct.c
+ g_rc.c \
+ g_register.c \
+ globals.c \
+ gsymcheck.c \
+ i_vars.c \
+ parsecmd.c \
+ s_check.c \
+ s_log.c \
+ s_symstruct.c
if CCISGCC
AM_CFLAGS = -Wall
diff --git a/gsymcheck/src/globals.c b/gsymcheck/src/globals.c
index 1f01108..e953e1a 100644
--- a/gsymcheck/src/globals.c
+++ b/gsymcheck/src/globals.c
@@ -42,35 +42,7 @@ GdkColor black;
int logfile_fd=-1;
int logging_dest=STDOUT_TTY;
-/* these are required by libgeda */
-void (*x_log_update_func)() = s_log_update;
-
/* command line arguments */
int verbose_mode=FALSE;
int interactive_mode=FALSE;
int quiet_mode=FALSE;
-
-void s_log_update(const gchar *log_domain, GLogLevelFlags log_level,
- const gchar *buf)
-{
- if (do_logging == FALSE) {
- return;
- }
-
- if (buf == NULL) {
- return;
- }
-
- switch(logging_dest) {
- case(STDOUT_TTY):
- fputs(buf, stdout);
- break;
-
- default:
- break;
- }
-
-}
-
-
-
diff --git a/gsymcheck/src/gsymcheck.c b/gsymcheck/src/gsymcheck.c
index 6861115..235dbad 100644
--- a/gsymcheck/src/gsymcheck.c
+++ b/gsymcheck/src/gsymcheck.c
@@ -64,9 +64,10 @@ main_prog(void *closure, int argc, char *argv[])
/* create log file right away */
/* even if logging is enabled */
logfile = g_build_filename (cwd, "gsymcheck.log", NULL);
+ x_log_update_func = s_log_update;
s_log_init (logfile);
g_free (logfile);
-
+
logging_dest=STDOUT_TTY;
if (!quiet_mode)
{
diff --git a/gsymcheck/src/s_log.c b/gsymcheck/src/s_log.c
new file mode 100644
index 0000000..f6eaffe
--- /dev/null
+++ b/gsymcheck/src/s_log.c
@@ -0,0 +1,41 @@
+/* gEDA - GPL Electronic Design Automation
+ * gsymcheck - gEDA Symbol Check
+ * Copyright (C) 1998-2008 Ales Hvezda
+ * Copyright (C) 1998-2008 gEDA Contributors (see ChangeLog for details)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <libgeda/libgeda.h>
+
+void s_log_update (const gchar *log_domain, GLogLevelFlags log_level,
+ const gchar *buf)
+{
+ if (buf == NULL)
+ return;
+
+ switch (logging_dest) {
+ case STDOUT_TTY:
+ fputs (buf, stdout);
+ break;
+
+ default:
+ break;
+ }
+}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs