[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-200-gc9f4ae9)
The branch, master has been updated
via c9f4ae9298141915f11214d6339c4d9a27bb3eee (commit)
via 9d9d09b0bddba85b5712cb063f3a6b806550cb3b (commit)
via 900274f0d6b08031f7cfc18a332da6b1939a44d1 (commit)
via 3f780a7f86e4c994c108146898419f4708e7fc48 (commit)
from d424abcf4e93934fd6268d9cb186f7415e0e83c2 (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
=========
gschem/configure.ac.in | 54 ++++++++++++++++++++++++++++++++++---------
gschem/src/Makefile.am | 9 +++++++
gschem/src/g_funcs.c | 2 +-
gschem/src/x_image.c | 12 +++++-----
libgeda/src/f_basic.c | 14 +++++-----
libgeda/src/o_box_basic.c | 12 +++++-----
libgeda/src/o_path_basic.c | 4 +-
libgeda/src/s_clib.c | 2 +-
utils/src/gsch2pcb.c | 4 +-
9 files changed, 76 insertions(+), 37 deletions(-)
=================
Commit Messages
=================
commit c9f4ae9298141915f11214d6339c4d9a27bb3eee
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:55 2008 +0100
gschem: Add ./configure support for detecting and disabling cairo
Since some users might not have cairo installed, and the intention
is to retain support for the old GDK drawing code (for now),
--disable-cairo is added to allow conditional compilation.
:100644 100644 6f03399... 0cbbc38... M gschem/configure.ac.in
:100644 100644 f9db66c... c47bf73... M gschem/src/Makefile.am
commit 9d9d09b0bddba85b5712cb063f3a6b806550cb3b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:55 2008 +0100
gschem: Bump minimum GTK / GLIB version requirement to 2.8
This is needed to enable the use of cairo rendering functions.
Remove AC_DEFINE for HAS_GTK24 since it isn't used. Switch configure.ac
variables such as GTK24_... to use just GTK_..., since we don't need to
specify the version in those. It just makes bumping the version harder.
:100644 100644 cc22235... 6f03399... M gschem/configure.ac.in
commit 900274f0d6b08031f7cfc18a332da6b1939a44d1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:55 2008 +0100
Fix non-literal format strings which cause compiler warnings.
We should be careful to avoid passing arbitrary strings into functions
which take printf style arguments. In that case, always use the construct
("%s", string) rather than passing string as the format argument.
Some cases were fixed by using g_strdup instead of g_strdup_printf(),
some simply replace printf() for puts().
:100644 100644 6809aa1... 981f119... M gschem/src/g_funcs.c
:100644 100644 c8338d7... 0725485... M gschem/src/x_image.c
:100644 100644 557f4fd... f53d9fb... M libgeda/src/f_basic.c
:100644 100644 66d75fd... b66dac7... M libgeda/src/s_clib.c
:100644 100644 9e7d2a0... 3b7df7d... M utils/src/gsch2pcb.c
commit 3f780a7f86e4c994c108146898419f4708e7fc48
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:54 2008 +0100
libgeda: Fix object fill breakage caused when making o_..._new()
Ensure we call o_set_line_options() and o_set_fill_options() on the new
object directly. In a couple of places, "object_list" was used, but the
code in commit #2550db8e1d981ccab55b7f2ae6e9932198a53b59 meant that the
new object wasn't yet linked into that list.
:100644 100644 8e9b624... 6d6a78e... M libgeda/src/o_box_basic.c
:100644 100644 cd7dc84... 332cc09... M libgeda/src/o_path_basic.c
=========
Changes
=========
commit c9f4ae9298141915f11214d6339c4d9a27bb3eee
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:55 2008 +0100
gschem: Add ./configure support for detecting and disabling cairo
Since some users might not have cairo installed, and the intention
is to retain support for the old GDK drawing code (for now),
--disable-cairo is added to allow conditional compilation.
diff --git a/gschem/configure.ac.in b/gschem/configure.ac.in
index 6f03399..0cbbc38 100644
--- a/gschem/configure.ac.in
+++ b/gschem/configure.ac.in
@@ -280,6 +280,34 @@ fi
############################################################################
############################################################################
+# Check for cairo start
+#
+
+AC_ARG_ENABLE(cairo,
+ AC_HELP_STRING([--disable-cairo],
+ [Disable the use of cairo for rendering]), , enable_cairo=yes)
+
+AM_CONDITIONAL(ENABLE_CAIRO, test "x$enable_cairo" = "xyes")
+
+PKG_CHECK_MODULES(CAIRO, cairo >= 1.2.0, CAIRO="yes", no_CAIRO="yes")
+
+if test "x$enable_cairo" != "xyes"
+then
+ AC_DEFINE(ENABLE_CAIRO, 1, [If cairo rendering is enabled, define this])
+
+ if test "$CAIRO" = "yes"
+ then
+ CAIRO_VERSION=`$PKG_CONFIG cairo --modversion`
+ else
+ AC_MSG_ERROR([Cannot find cairo 1.2.0 or later, please install or configure with --disable-cairo])
+ fi
+fi
+
+#
+# Check for cairo end
+############################################################################
+
+############################################################################
# Check for libgeda start
#
PKG_CHECK_MODULES(LIBGEDA, libgeda >= $DATE_VERSION, LIBGEDA="yes",
@@ -598,10 +626,18 @@ expandedGEDARCDIR=`eval "echo $GEDARCDIR"`
expandedXDGDATADIR=`eval "echo $XDGDATADIR"`
expandedGEDADOCDIR=`eval "echo $GEDADOCDIR"`
+if test "x$enable_cairo" = "xyes"
+then
+ cairo_report=$CAIRO_VERSION
+else
+ cairo_report="[[DISABLED]]"
+fi
+
AC_MSG_RESULT([
** Configuration summary for $PACKAGE $DOTTED_VERSION.$DATE_VERSION:
GTK+ library version: $GTK_VERSION
+ CAIRO library version: $cairo_report
GUILE library version: $GUILE_VERSION
libgeda library version: $LIBGEDA_VERSION
libstroke library: $LIBSTROKE
diff --git a/gschem/src/Makefile.am b/gschem/src/Makefile.am
index f9db66c..c47bf73 100644
--- a/gschem/src/Makefile.am
+++ b/gschem/src/Makefile.am
@@ -67,6 +67,15 @@ gschem_SOURCES = \
x_stroke.c \
x_window.c
+CAIRO_SRCS =
+
+EXTRA_gschem_SOURCES = \
+ ${CAIRO_SRCS}
+
+if ENABLE_CAIRO
+gschem_SOURCES += ${CAIRO_SRCS}
+endif
+
if CCISGCC
AM_CFLAGS = -Wall
endif
commit 9d9d09b0bddba85b5712cb063f3a6b806550cb3b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:55 2008 +0100
gschem: Bump minimum GTK / GLIB version requirement to 2.8
This is needed to enable the use of cairo rendering functions.
Remove AC_DEFINE for HAS_GTK24 since it isn't used. Switch configure.ac
variables such as GTK24_... to use just GTK_..., since we don't need to
specify the version in those. It just makes bumping the version harder.
diff --git a/gschem/configure.ac.in b/gschem/configure.ac.in
index cc22235..6f03399 100644
--- a/gschem/configure.ac.in
+++ b/gschem/configure.ac.in
@@ -244,25 +244,19 @@ if test $PKG_CONFIG = no; then
AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
fi
-PKG_CHECK_MODULES(GTK24, gtk+-2.0 >= 2.4.0, GTK24="yes", no_GTK24="yes")
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8.0, GTK="yes", no_GTK="yes")
# This next bit of code figures out what gtk we need to use.
-if test "$GTK24" = "yes"
+if test "$GTK" = "yes"
then
-
- AC_DEFINE(HAS_GTK24, 1, [If gtk+ 2.4.x has been installed, define this])
- GTK_CFLAGS=$GTK24_CFLAGS
- GTK_LIBS=$GTK24_LIBS
GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion`
# Search for glib
- PKG_CHECK_MODULES(GLIB24, glib-2.0 >= 2.4.0, GLIB24="yes", no_GLIB24="yes")
- if test "$GLIB24" != "yes"
+ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.8.0, GLIB="yes", no_GLIB="yes")
+ if test "$GLIB" != "yes"
then
- AC_MSG_ERROR([Cannot find glib 2.4.x, install it and rerun ./configure.])
+ AC_MSG_ERROR([Cannot find glib 2.8.0 or later, please install it and rerun ./configure.])
fi
- GLIB_CFLAGS=$GLIB24_CFLAGS
- GLIB_LIBS=$GLIB24_LIBS
GLIB_VERSION=`$PKG_CONFIG glib-2.0 --modversion`
# Search for gthread
@@ -278,7 +272,7 @@ fi
if test "$GTK_VERSION" = ""
then
- AC_MSG_ERROR([Cannot find gtk+ 2.4.x or later, please install gtk+.])
+ AC_MSG_ERROR([Cannot find gtk+ 2.8.0 or later, please install it and rerun ./configure.])
fi
#
commit 900274f0d6b08031f7cfc18a332da6b1939a44d1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:55 2008 +0100
Fix non-literal format strings which cause compiler warnings.
We should be careful to avoid passing arbitrary strings into functions
which take printf style arguments. In that case, always use the construct
("%s", string) rather than passing string as the format argument.
Some cases were fixed by using g_strdup instead of g_strdup_printf(),
some simply replace printf() for puts().
diff --git a/gschem/src/g_funcs.c b/gschem/src/g_funcs.c
index 6809aa1..981f119 100644
--- a/gschem/src/g_funcs.c
+++ b/gschem/src/g_funcs.c
@@ -126,7 +126,7 @@ SCM g_funcs_log(SCM msg)
SCM_ASSERT (scm_is_string (msg), msg,
SCM_ARG1, "gschem-log");
- s_log_message (SCM_STRING_CHARS (msg));
+ s_log_message ("%s", SCM_STRING_CHARS (msg));
return SCM_BOOL_T;
}
diff --git a/gschem/src/x_image.c b/gschem/src/x_image.c
index c8338d7..0725485 100644
--- a/gschem/src/x_image.c
+++ b/gschem/src/x_image.c
@@ -87,10 +87,10 @@ static void create_size_menu (GtkComboBox *combo)
char *default_size;
int i, default_index = 0;
- default_size = g_strdup_printf(X_IMAGE_DEFAULT_SIZE);
+ default_size = g_strdup (X_IMAGE_DEFAULT_SIZE);
for (i=0; x_image_sizes[i] != NULL;i++) {
/* Create a new string and add it as an option*/
- buf = g_strdup_printf(x_image_sizes[i]);
+ buf = g_strdup (x_image_sizes[i]);
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), buf);
/* Compare with the default size, to get the default index */
@@ -130,7 +130,7 @@ static void create_type_menu(GtkComboBox *combo)
while (ptr) {
if (gdk_pixbuf_format_is_writable (ptr->data)) {
/* Get the format description and add it to the menu */
- buf = g_strdup_printf(gdk_pixbuf_format_get_description(ptr->data));
+ buf = g_strdup (gdk_pixbuf_format_get_description(ptr->data));
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), buf);
/* If GTK < 2.6, then add it also to the descriptions list. */
@@ -140,7 +140,7 @@ static void create_type_menu(GtkComboBox *combo)
#endif
/* Compare the name with "png" and store the index */
- buf = g_strdup_printf(gdk_pixbuf_format_get_name(ptr->data));
+ buf = g_strdup (gdk_pixbuf_format_get_name(ptr->data));
if (strcasecmp(buf, X_IMAGE_DEFAULT_TYPE) == 0) {
default_index = i;
}
@@ -167,7 +167,7 @@ static void create_type_menu(GtkComboBox *combo)
* \note This function is only used in this file.
*/
static char *x_image_get_type_from_description(char *description) {
- gchar *descr = g_strdup_printf(description);
+ gchar *descr = g_strdup (description);
GSList *formats = gdk_pixbuf_get_formats ();
GSList *ptr;
gchar *ptr_descr;
@@ -373,7 +373,7 @@ void x_image_lowlevel(GSCHEM_TOPLEVEL *w_current, const char* filename,
if (!gdk_pixbuf_save(pixbuf, filename, filetype, &gerror, NULL)) {
s_log_message(_("x_image_lowlevel: Unable to write %s file %s.\n"),
filetype, filename);
- s_log_message(gerror->message);
+ s_log_message("%s", gerror->message);
/* Warn the user */
dialog = gtk_message_dialog_new (GTK_WINDOW(w_current->main_window),
diff --git a/libgeda/src/f_basic.c b/libgeda/src/f_basic.c
index 557f4fd..f53d9fb 100644
--- a/libgeda/src/f_basic.c
+++ b/libgeda/src/f_basic.c
@@ -254,7 +254,7 @@ int f_open_flags(TOPLEVEL *toplevel, const gchar *filename,
}
g_string_append (message, _("Gschem usually makes backup copies automatically, and this situation happens when it crashed or it was forced to exit abruptly.\n"));
if (toplevel->page_current->load_newer_backup_func == NULL) {
- g_warning (message->str);
+ g_warning ("%s", message->str);
g_warning (_("\nRun gschem and correct the situation.\n\n"));
} else {
/* Ask the user if load the backup or the original file */
@@ -495,13 +495,13 @@ gchar *f_normalize_filename (const gchar *name, GError **error)
if (name == NULL) {
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL,
- g_strerror (EINVAL));
+ "%s", g_strerror (EINVAL));
return NULL;
}
if (*name == '\0') {
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT,
- g_strerror (ENOENT));
+ "%s", g_strerror (ENOENT));
return NULL;
}
@@ -550,12 +550,12 @@ gchar *f_normalize_filename (const gchar *name, GError **error)
if (!g_file_test (rpath->str, G_FILE_TEST_EXISTS)) {
g_set_error (error,G_FILE_ERROR, G_FILE_ERROR_NOENT,
- g_strerror (ENOENT));
+ "%s", g_strerror (ENOENT));
goto error;
} else if (!g_file_test (rpath->str, G_FILE_TEST_IS_DIR) &&
*end != '\0') {
g_set_error (error,G_FILE_ERROR, G_FILE_ERROR_NOTDIR,
- g_strerror (ENOTDIR));
+ "%s", g_strerror (ENOTDIR));
goto error;
}
}
@@ -594,13 +594,13 @@ char *follow_symlinks (const gchar *filename, GError **err)
if (filename == NULL) {
g_set_error (err, G_FILE_ERROR, G_FILE_ERROR_INVAL,
- g_strerror (EINVAL));
+ "%s", g_strerror (EINVAL));
return NULL;
}
if (strlen (filename) + 1 > MAXPATHLEN) {
g_set_error (err, G_FILE_ERROR, G_FILE_ERROR_NAMETOOLONG,
- g_strerror (ENAMETOOLONG));
+ "%s", g_strerror (ENAMETOOLONG));
return NULL;
}
diff --git a/libgeda/src/s_clib.c b/libgeda/src/s_clib.c
index 66d75fd..b66dac7 100644
--- a/libgeda/src/s_clib.c
+++ b/libgeda/src/s_clib.c
@@ -471,7 +471,7 @@ static gchar *run_source_command (const gchar *command)
/* forward library command messages */
if (success && standard_error != NULL)
- s_log_message (standard_error);
+ s_log_message ("%s", standard_error);
g_free (standard_error);
diff --git a/utils/src/gsch2pcb.c b/utils/src/gsch2pcb.c
index 9e7d2a0..3b7df7d 100644
--- a/utils/src/gsch2pcb.c
+++ b/utils/src/gsch2pcb.c
@@ -1384,9 +1384,9 @@ static gchar *usage_string1 =
static void
usage()
{
- printf(usage_string0);
+ puts(usage_string0);
printf(" %s\n", default_m4_pcbdir);
- printf(usage_string1);
+ puts(usage_string1);
exit(0);
}
commit 3f780a7f86e4c994c108146898419f4708e7fc48
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Sep 28 18:40:54 2008 +0100
libgeda: Fix object fill breakage caused when making o_..._new()
Ensure we call o_set_line_options() and o_set_fill_options() on the new
object directly. In a couple of places, "object_list" was used, but the
code in commit #2550db8e1d981ccab55b7f2ae6e9932198a53b59 meant that the
new object wasn't yet linked into that list.
diff --git a/libgeda/src/o_box_basic.c b/libgeda/src/o_box_basic.c
index 8e9b624..6d6a78e 100644
--- a/libgeda/src/o_box_basic.c
+++ b/libgeda/src/o_box_basic.c
@@ -349,13 +349,13 @@ OBJECT *o_box_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
/* create a new box */
new_obj = o_box_new(toplevel, type, color, d_x1, d_y1, d_x2, d_y2);
/* set its line options */
- o_set_line_options(toplevel, object_list,
- box_end, box_type, box_width,
- box_length, box_space);
+ o_set_line_options (toplevel, new_obj,
+ box_end, box_type, box_width,
+ box_length, box_space);
/* set its fill options */
- o_set_fill_options(toplevel, object_list,
- box_filling, fill_width,
- pitch1, angle1, pitch2, angle2);
+ o_set_fill_options (toplevel, new_obj,
+ box_filling, fill_width,
+ pitch1, angle1, pitch2, angle2);
/* Add the box to the object list */
object_list = s_basic_link_object(new_obj, object_list);
return(object_list);
diff --git a/libgeda/src/o_path_basic.c b/libgeda/src/o_path_basic.c
index cd7dc84..332cc09 100644
--- a/libgeda/src/o_path_basic.c
+++ b/libgeda/src/o_path_basic.c
@@ -219,10 +219,10 @@ OBJECT *o_path_read (TOPLEVEL *toplevel, OBJECT *object_list,
g_free (string);
/* set its line options */
- o_set_line_options (toplevel, object_list,
+ o_set_line_options (toplevel, new_obj,
line_end, line_type, line_width, line_length, line_space);
/* set its fill options */
- o_set_fill_options (toplevel, object_list,
+ o_set_fill_options (toplevel, new_obj,
fill_type, fill_width, pitch1, angle1, pitch2, angle2);
/* Add the path to the object list */
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs