[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gEDA/gaf: Changes to 'experimental'
Makefile | 2 -
README | 7 -
README.Cygwin | 2 -
README.w32 | 521 +++++++++++++++++++++++++++++++++++++++++
README.win32 | 521 -----------------------------------------
a_new_dir/README | 2 +
a_new_file | 3 -
a_renamed_file2 | 23 ++
gattrib/src/s_object.c | 4 +-
gschem/include/prototype.h | 3 +-
gschem/lib/system-gschemrc.in | 19 +-
gschem/src/i_basic.c | 3 +-
gschem/src/i_callbacks.c | 86 ++++----
gschem/src/o_attrib.c | 34 ++--
gschem/src/o_basic.c | 20 +-
gschem/src/o_buffer.c | 20 +-
gschem/src/o_complex.c | 8 +-
gschem/src/o_copy.c | 209 ++++++++---------
gschem/src/o_delete.c | 10 +-
gschem/src/o_find.c | 12 +-
gschem/src/o_grips.c | 3 +-
gschem/src/o_misc.c | 13 +-
gschem/src/o_move.c | 23 +-
gschem/src/o_net.c | 3 +-
gschem/src/o_picture.c | 6 +-
gschem/src/o_select.c | 72 +++---
gschem/src/o_text.c | 17 +-
gschem/src/x_attribedit.c | 7 +-
gschem/src/x_autonumber.c | 3 +-
gschem/src/x_dialog.c | 9 +-
gschem/src/x_event.c | 39 ++--
gschem/src/x_image.c | 8 +-
gschem/src/x_multiattrib.c | 2 +-
gschem/src/x_pagesel.c | 72 ++----
gschem/src/x_print.c | 6 +-
libgeda/Makefile.am | 2 +-
libgeda/configure.ac | 4 +-
libgeda/include/Makefile.am | 3 +-
libgeda/include/geda.h | 27 +++
libgeda/include/geda_list.h | 61 +++++
libgeda/include/prototype.h | 13 +-
libgeda/include/struct.h | 8 +-
libgeda/lib/.cvsignore | 2 +
libgeda/lib/Makefile.am | 8 +
libgeda/lib/system-gafrc | 50 ++++
libgeda/scheme/.cvsignore | 2 +
libgeda/scheme/Makefile.am | 8 +
libgeda/scheme/geda.scm | 6 +
libgeda/src/Makefile.am | 3 +-
libgeda/src/g_register.c | 7 +
libgeda/src/geda_list.c | 214 +++++++++++++++++
libgeda/src/o_complex_basic.c | 2 +-
libgeda/src/o_embed.c | 2 +-
libgeda/src/o_net_basic.c | 22 +-
libgeda/src/o_selection.c | 108 +++++----
libgeda/src/s_clib.c | 108 +++++++--
libgeda/src/s_page.c | 13 +-
symbols/Makefile.am | 4 +-
symbols/configure.ac | 3 +-
symbols/geda-clib.scm | 62 +++++
symbols/geda-font.scm | 130 ++++++++++
symbols/system-gafrc.in | 337 --------------------------
62 files changed, 1650 insertions(+), 1351 deletions(-)
diff --git a/Makefile b/Makefile
index cdc0b0a..25660ed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
#
# gEDA/gaf Toplevel Makefile
#
-# Oooh.. this lives on a branch
-#
#
# Change this to the real version of the distribution
diff --git a/README b/README
index 0b8fd91..92208b7 100644
--- a/README
+++ b/README
@@ -1,15 +1,8 @@
-Line1
-Line2
-Line3
-
-Line5
gEDA
GPL Electronic Design Automation
------------------------------------------------------------------------------
-Test edit...
-on experimental
README for gEDA/gaf
diff --git a/README.Cygwin b/README.Cygwin
index 82e709d..79c649a 100644
--- a/README.Cygwin
+++ b/README.Cygwin
@@ -1,7 +1,5 @@
gEDA / gaf - Cygwin
-an edit
-
GPL'd Suite of Electronic Design Automation tools
This readme describes one way to build gEDA/gaf (gschem and friends) on
diff --git a/README.w32 b/README.w32
new file mode 100644
index 0000000..781bcb4
--- /dev/null
+++ b/README.w32
@@ -0,0 +1,521 @@
+gEDA / gaf - MinGW
+
+change
+
+GPL Electronic Design Automation
+--------------------------------------------------------------------------
+To run the binary distribution of gEDA/gaf - MinGW:
+
+Remove any previous version of gEDA/gaf - Cygwin (or older build of the
+mingw version).
+
+You should not have to install anything else other than the .zip or .exe for
+gEDA/gaf. gEDA/gaf - MinGW is fairly self contained.
+
+1) Grab geda-mingw32-VERSION.zip and unzip it into c:\ At this stage
+ in the game, it really should be in c:\ Unzipping the zip file
+ should create a directory called "geda" (c:\geda)
+
+2) Set the following environment variables:
+ TMP (some temp directory, say C:\TEMP , make sure this dir exists)
+ HOME (some home directory, say C:\ , make sure this dir exists)
+
+3) Add c:\geda\bin to your PATH variable
+
+4) Run gschem by typing: gschem in a cmd window. It should run. If not
+ please e-mail ahvezda@xxxxxxxxxxxxx with the error message. You can
+ also create a shortcut on the desktop to the binary, just change the
+ Run option to run "minimized" if you don't want to see the console.
+
+Please keep in mind that this port is really new and may do really
+stupid things. PLEASE BACKUP ANY DATA YOU VALUE. gEDA/gaf - MinGW
+(or any gEDA software) comes with NO WARRANTY (I hate having to say this).
+Please let me know if there are any problems.
+
+---------------------------------------------------------------------------
+Recommended (but optional if you install into c:\geda)
+Required (if you install into some other directory than c:\geda)
+
+If you want to put the geda directory somewhere else, then you can do
+that too, but you will need to set the environment variable:
+
+GEDADATA
+to
+[new_path_to_geda]\geda\share\gEDA
+
+Examples:
+set GEDADATA=c:\gnu\geda\share\gEDA
+set GEDADATA=d:\geda\share\gEDA
+
+Do not forget to put [new_path_to_geda]\geda\bin into
+your PATH. You also need to set:
+
+GUILE_LOAD_PATH
+to
+[new_path_to_geda]\geda\share\guile\1.4.1
+
+Getting these environment variables right is best done by trial and error.
+You will know when you got it right when 1) gschem starts and doesn't
+complain, and 2) you can place components (via Add/Component...).
+
+--------------------------------------------------------------------------
+The rest of this readme describes how to build gEDA/gaf (gschem and
+friends) on a win32 machine (WinNT/Win2K/WinXP). It uses mingw32 as the
+layer between win32 and the unix world (ie gcc, make etc...).
+A useful reference to various porting issues is:
+http://gnuwin32.sourceforge.net/compile.html
+
+gEDA/gaf should build and run out of the box if you follow these
+instructions.
+
+* If any part of this document is unclear, please post on geda-dev.
+* If any part of this document is wrong, please post on geda-dev.
+* If you are not familiar with compiling programs, please use a
+ binary distribution of gEDA/gaf - MinGW.
+
+It is recommend that gEDA/gaf and all libraries are installed into c:/geda
+If you want an alternative location, make sure all dependancies are installed
+into the new location as well.
+
+For this doc, a "%" is the bash shell prompt from msys.
+Build instructions for gEDA/gaf - MinGW (gEDA running on Win32 machines)
+
+But first an important warning:
+
+These instructions assume the user has a significant amount of knowledge
+of build unix programs under mingw32. You need to be familiar with
+the ./configure process, installing mingw32 properly, and resolving the
+occasional build bug.
+
+--------------------------------------------------------------------------
+
+1) Download:
+
+ Build environment
+ * MSYS-1.0.7-i686-2.exe (http://www.mingw.org)
+ (use the proper ?86 version for your CPU!)
+ * MinGW-1.1.tar.gz (http://www.mingw.org)
+
+ External libraries part of build environment
+ * zlib-1.1.3-1.zip (https://sourceforge.net/projects/mingwrep/)
+ * readline-4.2-20010727.zip
+ * regex-0.12-20010123.zip
+ * rx-1.5-20010502.zip
+ * libpng-1.0.6-20000724.zip
+ * libpng-devel-1.0.6-20000724.zip
+ ---OR---
+ Grab the corresponding .tar.gz files for the above .zips from:
+ http://www.geda.seul.org/devel/win32/build
+
+ gEDA/gaf guile library (from http://www.geda.seul.org/devel/win32/mingw)
+ guile-1.4.1-gaf.tar.gz
+
+ gEDA/gaf gtk/glib libs (from http://www.geda.seul.org/devel/win32/mingw)
+ gtk+-1.3.0-20020313-gaf.tar.gz
+
+ gEDA/gaf itself (http://www.geda.seul.org/devel)
+ geda-gnetlist-VERSION.tar.gz
+ geda-gschem-VERSION.tar.gz
+ geda-gsymcheck-VERSION.tar.gz
+ geda-symbols-VERSION.tar.gz
+ geda-utils-VERSION.tar.gz
+ libgeda-VERSION.tar.gz
+ Makefile
+
+ gEDA/gaf optional libraries (http://www.geda.seul.org/dist)
+ libstroke-0.5.1.tar.gz
+ libgdgeda-1.8.tar.gz
+
+ Any VERSION >= 20020527 should build under MinGW.
+
+2) Install MSYS by running:
+
+ MSYS-1.0.7-i686-2.exe
+
+3) Double click on the Msys icon on the desktop to get a shell (bash prompt)
+
+4) Install Mingw (the compilers, development environment, and libraries)
+ % cd /
+ % mkdir mingw
+ % cd mingw !! This step is important; do not untar in / !!
+ % tar xvfz MinGW-1.1.tar.gz
+
+ Unzip the other .zip files using winzip or use the .tar.gz I provided.
+ If you decide to unzip the .zip files, then unzip directly into
+ c:/msys/1.0/mingw (the mingw directory).
+
+ % cd /mingw !! This step is important; do not untar into / !!
+ % tar xvfz zlib-1.1.3-1.tar.gz
+ % tar xvfz readline-4.2-20010727.tar.gz
+ % tar xvfz regex-0.12-20010123.tar.gz
+ % tar xvfz rx-1.5-20010502.tar.gz
+ % tar xvfz libpng-1.0.6-20000724.tar.gz
+ % tar xvfz libpng-devel-1.0.6-20000724.tar.gz
+ % cd bin
+ % mv make.exe makeold.exe
+
+ Doing the last step is very important. The make.exe in /mingw/bin is
+quite pathetic.
+
+ You may see an error message like doing the untar operations:
+
+tar: Child died with signal 13
+tar: Error exit delayed from previous errors
+
+ I checked and all the files untarred okay, your milage may vary.
+
+5) Build a test program (like hellow) to test the compilers
+ You can use vi to input the code or your favorite editor.
+
+--- Cut here for hellow.c ---
+#include <stdio.h>
+
+int
+main(int argc, char **argv)
+{
+ printf("Hello World!\n");
+ return 0;
+}
+--- Cut here for hellow.c ---
+
+ Build it like this:
+ % gcc -o hellow hellow.c
+ Run it:
+ % ./hellow
+
+ If this does not work. Do not continue until you have fixed any problems.
+
+6) Create the destination install directory
+ % mkdir c:/geda
+ % ls c:/geda
+
+7) Add c:/geda/bin to your path in your msys shell
+
+ % export PATH=/c/geda/bin:$PATH
+
+ Use /c/... not c:/...
+
+8) Build guile-1.4.1-gaf
+
+ guile-1.4.1-gaf is a hacked version of guile-1.4.1 for gEDA/gaf
+ and the Mingw port. Please don't use it unless you are building gEDA/gaf.
+ For the real thing (real guile), please see http://www.gnu.org
+
+ Make sure you have installed all the *.tar.gz library files mentioned
+ above before doing this step.
+
+ % cd
+ % tar xvfz guile-1.4.1-gaf.tar.gz
+ % cd guile-1.4.1-gaf
+ % ./configure --prefix=c:/geda --enable-posix --enable-regex --without-modules --enable-guile-debug --without-threads --disable-networking --enable-ltdl-convenience
+ % cd libltdl
+
+ Edit the Makefile in libltdl searching for -I. change one of these to
+ -I.. (two periods, parent directory; this fixes the "cannot find
+ libguile.h").
+
+ % make
+ % cd ../ice-9
+ % make install
+
+ You might get an error about and-let-star.scm or and-let-*.scm;
+ I ignored it.
+
+ % cd ../guile-config
+ % cp guile-config.geda guile-config
+ % cd ../libguile
+ % make libpath.h
+ % make -f Makefile.Win32 install
+
+ Guile errors and workarounds. You may or may not see these.
+
+ * ./configure error:
+
+checking whether make sets ${MAKE}..... ./configure: eval: line 1: unexpected EOF while looking for matching `"'
+./configure: eval: line 2: syntax error: unexpected end of file
+no
+ I ignored it. :-)
+
+9) Post guile install steps and test
+
+ Copy a few dlls into c:\geda\bin
+
+ % cd /mingw/bin
+ % cp librx.dll c:/geda/bin
+ % cp libreadline.dll c:/geda/bin
+ % cp libregex.dll c:/geda/bin
+ % cp libz.dll c:/geda/bin
+ % cp libpng.2.1.dll c:/geda/bin
+
+ Make sure that libguile.dll got installed in c:\geda\bin
+
+ Open up a cmd shell (dos command box) and do the following:
+
+ Add c:/geda/bin to your path:
+ c:\> set PATH=%PATH%;c:\geda\bin
+ c:\> guile.exe
+
+ At this point you should see a guile> prompt.
+
+ guile> (display "Hello World!") (newline)
+ guile> (quit)
+
+ Try building a very basic guile program:
+
+-- Cut here for gtest.c --
+#include <guile/gh.h>
+
+void main_prog(int argc, char *argv[])
+{
+ scm_shell(argc, argv);
+}
+
+int
+main(int argc, char **argv)
+{
+ gh_enter(argc, argv, main_prog);
+ return 0;
+
+}
+-- Cut here for gtest.c --
+
+ Build it like this:
+
+ % gcc -o gtest gtest.c `guile-config compile` `guile-config link`
+
+ Run it:
+
+ % ./gtest
+ guile> (display "gtest") (newline)
+ guile> (quit)
+
+ If the above steps do not work, please go back and get this working,
+ otherwise the following steps will not work either.
+
+
+10) Untar gtk
+
+ % cd $HOME
+ % tar xvfz gtk+-1.3.0-20020313-gaf.tar.gz
+
+ This will create $HOME/gtk. If you untar in a different location you
+ will need to change gtk/bin/gtk-config and gtk/bin/glib-config.
+
+ gtk+-1.3.0-20020313-gaf.tar.gz is a repackaged version of Tor Lillqvist's
+ "gtk+ for Win32". I (Ales) repackaged to make build life easier for
+ gEDA/gaf users. Without Tor's work, gEDA/gaf - MinGW would NOT
+ be possible.
+
+ % cd gtk/lib
+ % cp *.dll c:/geda/bin
+ % cd ../bin
+ % cp gtk-config glib-config c:/geda/bin
+
+11) Test gtk
+
+ Use the following test program (ghellow.c) to test gtk on your system.
+(This test program came from the gtk-1.2 tutorial, helloworld.c) You can
+find ghellow.c in $HOME/gtk.
+
+-- Cut here for ghellow.c --
+ #include <gtk/gtk.h>
+
+ /* This is a callback function. The data arguments are ignored
+ * in this example. More on callbacks below. */
+ void hello( GtkWidget *widget,
+ gpointer data )
+ {
+ g_print ("Hello World\n");
+ }
+
+ gint delete_event( GtkWidget *widget,
+ GdkEvent *event,
+ gpointer data )
+ {
+ /* If you return FALSE in the "delete_event" signal handler,
+ * GTK will emit the "destroy" signal. Returning TRUE means
+ * you don't want the window to be destroyed.
+ * This is useful for popping up 'are you sure you want to quit?'
+ * type dialogs. */
+
+ g_print ("delete event occurred\n");
+
+ /* Change TRUE to FALSE and the main window will be destroyed with
+ * a "delete_event". */
+
+ return(TRUE);
+ }
+
+ /* Another callback */
+ void destroy( GtkWidget *widget,
+ gpointer data )
+ {
+ gtk_main_quit();
+ }
+
+ int main( int argc,
+ char *argv[] )
+ {
+ /* GtkWidget is the storage type for widgets */
+ GtkWidget *window;
+ GtkWidget *button;
+
+ /* This is called in all GTK applications. Arguments are parsed
+ * from the command line and are returned to the application. */
+ gtk_init(&argc, &argv);
+
+ /* create a new window */
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ /* When the window is given the "delete_event" signal (this is given
+ * by the window manager, usually by the "close" option, or on the
+ * titlebar), we ask it to call the delete_event () function
+ * as defined above. The data passed to the callback
+ * function is NULL and is ignored in the callback function. */
+ gtk_signal_connect (GTK_OBJECT (window), "delete_event",
+ GTK_SIGNAL_FUNC (delete_event), NULL);
+
+ /* Here we connect the "destroy" event to a signal handler.
+ * This event occurs when we call gtk_widget_destroy() on the window,
+ * or if we return FALSE in the "delete_event" callback. */
+ gtk_signal_connect (GTK_OBJECT (window), "destroy",
+ GTK_SIGNAL_FUNC (destroy), NULL);
+
+ /* Sets the border width of the window. */
+ gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+
+ /* Creates a new button with the label "Hello World". */
+ button = gtk_button_new_with_label ("Hello World");
+
+ /* When the button receives the "clicked" signal, it will call the
+ * function hello() passing it NULL as its argument. The hello()
+ * function is defined above. */
+ gtk_signal_connect (GTK_OBJECT (button), "clicked",
+ GTK_SIGNAL_FUNC (hello), NULL);
+
+ /* This will cause the window to be destroyed by calling
+ * gtk_widget_destroy(window) when "clicked". Again, the destroy
+ * signal could come from here, or the window manager. */
+ gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
+ GTK_SIGNAL_FUNC (gtk_widget_destroy),
+ GTK_OBJECT (window));
+
+ /* This packs the button into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (window), button);
+
+ /* The final step is to display this newly created widget. */
+ gtk_widget_show (button);
+
+ /* and the window */
+ gtk_widget_show (window);
+
+ /* All GTK applications must have a gtk_main(). Control ends here
+ * and waits for an event to occur (like a key press or
+ * mouse event). */
+ gtk_main ();
+
+ return(0);
+ }
+-- Cut here for ghellow.c --
+
+ Build it:
+
+ % gcc -o ghellow ghellow.c `gtk-config --cflags --libs`
+
+ Run it:
+
+ % ./hellow
+
+ If it fails to run, the fix the problem before continuing. As usual, if
+ the test program does not link and run, then you will NOT be able to build
+ and run gEDA/gaf.
+
+12) Build and install libstroke into /mingw
+
+ Build and install libstroke if you want stroke support in gschem.
+
+ % tar xvfz libstroke-0.5.1.tar.gz
+ % cd libstroke-0.5.1
+
+ Edit configure script commenting out the following:
+
+#if test "$X11LIB" = no; then
+# { echo "configure: error: Cannot find -lX11 library" 1>&2; exit 1; }
+#fi
+
+ % ./configure --prefix=/mingw --disable-gtktest --disable-tcl
+ % cd libstroke
+ % make install
+
+ Install libstroke into /mingw and not c:/geda since it will make
+gEDA/gaf's build much easier.
+
+13) Build and install libgdgeda into c:/geda
+
+ Build and install libgdgeda if you want the ability to generate png images
+from schematics in gschem.
+
+ % tar xvfz libgdgeda-1.8.tar.gz
+
+ Edit the Makefile to change:
+ ln -sf include gdgeda
+ to:
+ cp -rp include gdgeda
+
+ Edit configure script changing the string png_read_init to
+ png_get_copyright
+
+Example:
+int main() {
+png_get_copyright()
+; return 0; }
+
+ % ./configure --prefix=c:/geda
+ % make
+ % cd include
+ % make install
+ % cd ../src
+ % make install
+ % cd ..
+ % cp libgdgeda-config c:/geda/bin
+
+14) Build/install gEDA/gaf itself
+
+ Untar all of the gEDA/gaf tarballs into a directory.
+ Put that Makefile into this toplevel directory.
+
+ Edit the Makefile so that:
+
+CD_VERSION=-$(VERSION)
+DIR_PREFIX=geda-
+
+ is commented in. And that the prefix in the Makefile is set to:
+
+prefix=c:/geda
+
+ Also make sure the VERSION variable is correct.
+
+ Start the build:
+
+ % make install
+
+ You may see the following errors:
+
+ * ./configure error:
+
+checking whether make sets ${MAKE}..... ./configure: eval: line 1: unexpected EOF while looking for matching `"'
+./configure: eval: line 2: syntax error: unexpected end of file
+no
+ I ignored it everytime.
+
+ The symbols are installed twice for some odd reason.
+
+ If everything completes okay (no FATAL errors), then
+gEDA/gaf - MinGW has build successfully. Congratulations.
+
+
+--------------------------------------------------------------------------
+ The MinGW port has been brought to you by many many months of work,
+several crashed Windows machines (seriously), and a few close calls where
+I almost gave up on the port. :->
+
diff --git a/README.win32 b/README.win32
deleted file mode 100644
index 8577e50..0000000
--- a/README.win32
+++ /dev/null
@@ -1,521 +0,0 @@
-gEDA / gaf - MinGW
-
-more changes
-
-GPL Electronic Design Automation
---------------------------------------------------------------------------
-To run the binary distribution of gEDA/gaf - MinGW:
-
-Remove any previous version of gEDA/gaf - Cygwin (or older build of the
-mingw version).
-
-You should not have to install anything else other than the .zip or .exe for
-gEDA/gaf. gEDA/gaf - MinGW is fairly self contained.
-
-1) Grab geda-mingw32-VERSION.zip and unzip it into c:\ At this stage
- in the game, it really should be in c:\ Unzipping the zip file
- should create a directory called "geda" (c:\geda)
-
-2) Set the following environment variables:
- TMP (some temp directory, say C:\TEMP , make sure this dir exists)
- HOME (some home directory, say C:\ , make sure this dir exists)
-
-3) Add c:\geda\bin to your PATH variable
-
-4) Run gschem by typing: gschem in a cmd window. It should run. If not
- please e-mail ahvezda@xxxxxxxxxxxxx with the error message. You can
- also create a shortcut on the desktop to the binary, just change the
- Run option to run "minimized" if you don't want to see the console.
-
-Please keep in mind that this port is really new and may do really
-stupid things. PLEASE BACKUP ANY DATA YOU VALUE. gEDA/gaf - MinGW
-(or any gEDA software) comes with NO WARRANTY (I hate having to say this).
-Please let me know if there are any problems.
-
----------------------------------------------------------------------------
-Recommended (but optional if you install into c:\geda)
-Required (if you install into some other directory than c:\geda)
-
-If you want to put the geda directory somewhere else, then you can do
-that too, but you will need to set the environment variable:
-
-GEDADATA
-to
-[new_path_to_geda]\geda\share\gEDA
-
-Examples:
-set GEDADATA=c:\gnu\geda\share\gEDA
-set GEDADATA=d:\geda\share\gEDA
-
-Do not forget to put [new_path_to_geda]\geda\bin into
-your PATH. You also need to set:
-
-GUILE_LOAD_PATH
-to
-[new_path_to_geda]\geda\share\guile\1.4.1
-
-Getting these environment variables right is best done by trial and error.
-You will know when you got it right when 1) gschem starts and doesn't
-complain, and 2) you can place components (via Add/Component...).
-
---------------------------------------------------------------------------
-The rest of this readme describes how to build gEDA/gaf (gschem and
-friends) on a win32 machine (WinNT/Win2K/WinXP). It uses mingw32 as the
-layer between win32 and the unix world (ie gcc, make etc...).
-A useful reference to various porting issues is:
-http://gnuwin32.sourceforge.net/compile.html
-
-gEDA/gaf should build and run out of the box if you follow these
-instructions.
-
-* If any part of this document is unclear, please post on geda-dev.
-* If any part of this document is wrong, please post on geda-dev.
-* If you are not familiar with compiling programs, please use a
- binary distribution of gEDA/gaf - MinGW.
-
-It is recommend that gEDA/gaf and all libraries are installed into c:/geda
-If you want an alternative location, make sure all dependancies are installed
-into the new location as well.
-
-For this doc, a "%" is the bash shell prompt from msys.
-Build instructions for gEDA/gaf - MinGW (gEDA running on Win32 machines)
-
-But first an important warning:
-
-These instructions assume the user has a significant amount of knowledge
-of build unix programs under mingw32. You need to be familiar with
-the ./configure process, installing mingw32 properly, and resolving the
-occasional build bug.
-
---------------------------------------------------------------------------
-
-1) Download:
-
- Build environment
- * MSYS-1.0.7-i686-2.exe (http://www.mingw.org)
- (use the proper ?86 version for your CPU!)
- * MinGW-1.1.tar.gz (http://www.mingw.org)
-
- External libraries part of build environment
- * zlib-1.1.3-1.zip (https://sourceforge.net/projects/mingwrep/)
- * readline-4.2-20010727.zip
- * regex-0.12-20010123.zip
- * rx-1.5-20010502.zip
- * libpng-1.0.6-20000724.zip
- * libpng-devel-1.0.6-20000724.zip
- ---OR---
- Grab the corresponding .tar.gz files for the above .zips from:
- http://www.geda.seul.org/devel/win32/build
-
- gEDA/gaf guile library (from http://www.geda.seul.org/devel/win32/mingw)
- guile-1.4.1-gaf.tar.gz
-
- gEDA/gaf gtk/glib libs (from http://www.geda.seul.org/devel/win32/mingw)
- gtk+-1.3.0-20020313-gaf.tar.gz
-
- gEDA/gaf itself (http://www.geda.seul.org/devel)
- geda-gnetlist-VERSION.tar.gz
- geda-gschem-VERSION.tar.gz
- geda-gsymcheck-VERSION.tar.gz
- geda-symbols-VERSION.tar.gz
- geda-utils-VERSION.tar.gz
- libgeda-VERSION.tar.gz
- Makefile
-
- gEDA/gaf optional libraries (http://www.geda.seul.org/dist)
- libstroke-0.5.1.tar.gz
- libgdgeda-1.8.tar.gz
-
- Any VERSION >= 20020527 should build under MinGW.
-
-2) Install MSYS by running:
-
- MSYS-1.0.7-i686-2.exe
-
-3) Double click on the Msys icon on the desktop to get a shell (bash prompt)
-
-4) Install Mingw (the compilers, development environment, and libraries)
- % cd /
- % mkdir mingw
- % cd mingw !! This step is important; do not untar in / !!
- % tar xvfz MinGW-1.1.tar.gz
-
- Unzip the other .zip files using winzip or use the .tar.gz I provided.
- If you decide to unzip the .zip files, then unzip directly into
- c:/msys/1.0/mingw (the mingw directory).
-
- % cd /mingw !! This step is important; do not untar into / !!
- % tar xvfz zlib-1.1.3-1.tar.gz
- % tar xvfz readline-4.2-20010727.tar.gz
- % tar xvfz regex-0.12-20010123.tar.gz
- % tar xvfz rx-1.5-20010502.tar.gz
- % tar xvfz libpng-1.0.6-20000724.tar.gz
- % tar xvfz libpng-devel-1.0.6-20000724.tar.gz
- % cd bin
- % mv make.exe makeold.exe
-
- Doing the last step is very important. The make.exe in /mingw/bin is
-quite pathetic.
-
- You may see an error message like doing the untar operations:
-
-tar: Child died with signal 13
-tar: Error exit delayed from previous errors
-
- I checked and all the files untarred okay, your milage may vary.
-
-5) Build a test program (like hellow) to test the compilers
- You can use vi to input the code or your favorite editor.
-
---- Cut here for hellow.c ---
-#include <stdio.h>
-
-int
-main(int argc, char **argv)
-{
- printf("Hello World!\n");
- return 0;
-}
---- Cut here for hellow.c ---
-
- Build it like this:
- % gcc -o hellow hellow.c
- Run it:
- % ./hellow
-
- If this does not work. Do not continue until you have fixed any problems.
-
-6) Create the destination install directory
- % mkdir c:/geda
- % ls c:/geda
-
-7) Add c:/geda/bin to your path in your msys shell
-
- % export PATH=/c/geda/bin:$PATH
-
- Use /c/... not c:/...
-
-8) Build guile-1.4.1-gaf
-
- guile-1.4.1-gaf is a hacked version of guile-1.4.1 for gEDA/gaf
- and the Mingw port. Please don't use it unless you are building gEDA/gaf.
- For the real thing (real guile), please see http://www.gnu.org
-
- Make sure you have installed all the *.tar.gz library files mentioned
- above before doing this step.
-
- % cd
- % tar xvfz guile-1.4.1-gaf.tar.gz
- % cd guile-1.4.1-gaf
- % ./configure --prefix=c:/geda --enable-posix --enable-regex --without-modules --enable-guile-debug --without-threads --disable-networking --enable-ltdl-convenience
- % cd libltdl
-
- Edit the Makefile in libltdl searching for -I. change one of these to
- -I.. (two periods, parent directory; this fixes the "cannot find
- libguile.h").
-
- % make
- % cd ../ice-9
- % make install
-
- You might get an error about and-let-star.scm or and-let-*.scm;
- I ignored it.
-
- % cd ../guile-config
- % cp guile-config.geda guile-config
- % cd ../libguile
- % make libpath.h
- % make -f Makefile.Win32 install
-
- Guile errors and workarounds. You may or may not see these.
-
- * ./configure error:
-
-checking whether make sets ${MAKE}..... ./configure: eval: line 1: unexpected EOF while looking for matching `"'
-./configure: eval: line 2: syntax error: unexpected end of file
-no
- I ignored it. :-)
-
-9) Post guile install steps and test
-
- Copy a few dlls into c:\geda\bin
-
- % cd /mingw/bin
- % cp librx.dll c:/geda/bin
- % cp libreadline.dll c:/geda/bin
- % cp libregex.dll c:/geda/bin
- % cp libz.dll c:/geda/bin
- % cp libpng.2.1.dll c:/geda/bin
-
- Make sure that libguile.dll got installed in c:\geda\bin
-
- Open up a cmd shell (dos command box) and do the following:
-
- Add c:/geda/bin to your path:
- c:\> set PATH=%PATH%;c:\geda\bin
- c:\> guile.exe
-
- At this point you should see a guile> prompt.
-
- guile> (display "Hello World!") (newline)
- guile> (quit)
-
- Try building a very basic guile program:
-
--- Cut here for gtest.c --
-#include <guile/gh.h>
-
-void main_prog(int argc, char *argv[])
-{
- scm_shell(argc, argv);
-}
-
-int
-main(int argc, char **argv)
-{
- gh_enter(argc, argv, main_prog);
- return 0;
-
-}
--- Cut here for gtest.c --
-
- Build it like this:
-
- % gcc -o gtest gtest.c `guile-config compile` `guile-config link`
-
- Run it:
-
- % ./gtest
- guile> (display "gtest") (newline)
- guile> (quit)
-
- If the above steps do not work, please go back and get this working,
- otherwise the following steps will not work either.
-
-
-10) Untar gtk
-
- % cd $HOME
- % tar xvfz gtk+-1.3.0-20020313-gaf.tar.gz
-
- This will create $HOME/gtk. If you untar in a different location you
- will need to change gtk/bin/gtk-config and gtk/bin/glib-config.
-
- gtk+-1.3.0-20020313-gaf.tar.gz is a repackaged version of Tor Lillqvist's
- "gtk+ for Win32". I (Ales) repackaged to make build life easier for
- gEDA/gaf users. Without Tor's work, gEDA/gaf - MinGW would NOT
- be possible.
-
- % cd gtk/lib
- % cp *.dll c:/geda/bin
- % cd ../bin
- % cp gtk-config glib-config c:/geda/bin
-
-11) Test gtk
-
- Use the following test program (ghellow.c) to test gtk on your system.
-(This test program came from the gtk-1.2 tutorial, helloworld.c) You can
-find ghellow.c in $HOME/gtk.
-
--- Cut here for ghellow.c --
- #include <gtk/gtk.h>
-
- /* This is a callback function. The data arguments are ignored
- * in this example. More on callbacks below. */
- void hello( GtkWidget *widget,
- gpointer data )
- {
- g_print ("Hello World\n");
- }
-
- gint delete_event( GtkWidget *widget,
- GdkEvent *event,
- gpointer data )
- {
- /* If you return FALSE in the "delete_event" signal handler,
- * GTK will emit the "destroy" signal. Returning TRUE means
- * you don't want the window to be destroyed.
- * This is useful for popping up 'are you sure you want to quit?'
- * type dialogs. */
-
- g_print ("delete event occurred\n");
-
- /* Change TRUE to FALSE and the main window will be destroyed with
- * a "delete_event". */
-
- return(TRUE);
- }
-
- /* Another callback */
- void destroy( GtkWidget *widget,
- gpointer data )
- {
- gtk_main_quit();
- }
-
- int main( int argc,
- char *argv[] )
- {
- /* GtkWidget is the storage type for widgets */
- GtkWidget *window;
- GtkWidget *button;
-
- /* This is called in all GTK applications. Arguments are parsed
- * from the command line and are returned to the application. */
- gtk_init(&argc, &argv);
-
- /* create a new window */
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- /* When the window is given the "delete_event" signal (this is given
- * by the window manager, usually by the "close" option, or on the
- * titlebar), we ask it to call the delete_event () function
- * as defined above. The data passed to the callback
- * function is NULL and is ignored in the callback function. */
- gtk_signal_connect (GTK_OBJECT (window), "delete_event",
- GTK_SIGNAL_FUNC (delete_event), NULL);
-
- /* Here we connect the "destroy" event to a signal handler.
- * This event occurs when we call gtk_widget_destroy() on the window,
- * or if we return FALSE in the "delete_event" callback. */
- gtk_signal_connect (GTK_OBJECT (window), "destroy",
- GTK_SIGNAL_FUNC (destroy), NULL);
-
- /* Sets the border width of the window. */
- gtk_container_set_border_width (GTK_CONTAINER (window), 10);
-
- /* Creates a new button with the label "Hello World". */
- button = gtk_button_new_with_label ("Hello World");
-
- /* When the button receives the "clicked" signal, it will call the
- * function hello() passing it NULL as its argument. The hello()
- * function is defined above. */
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (hello), NULL);
-
- /* This will cause the window to be destroyed by calling
- * gtk_widget_destroy(window) when "clicked". Again, the destroy
- * signal could come from here, or the window manager. */
- gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (gtk_widget_destroy),
- GTK_OBJECT (window));
-
- /* This packs the button into the window (a gtk container). */
- gtk_container_add (GTK_CONTAINER (window), button);
-
- /* The final step is to display this newly created widget. */
- gtk_widget_show (button);
-
- /* and the window */
- gtk_widget_show (window);
-
- /* All GTK applications must have a gtk_main(). Control ends here
- * and waits for an event to occur (like a key press or
- * mouse event). */
- gtk_main ();
-
- return(0);
- }
--- Cut here for ghellow.c --
-
- Build it:
-
- % gcc -o ghellow ghellow.c `gtk-config --cflags --libs`
-
- Run it:
-
- % ./hellow
-
- If it fails to run, the fix the problem before continuing. As usual, if
- the test program does not link and run, then you will NOT be able to build
- and run gEDA/gaf.
-
-12) Build and install libstroke into /mingw
-
- Build and install libstroke if you want stroke support in gschem.
-
- % tar xvfz libstroke-0.5.1.tar.gz
- % cd libstroke-0.5.1
-
- Edit configure script commenting out the following:
-
-#if test "$X11LIB" = no; then
-# { echo "configure: error: Cannot find -lX11 library" 1>&2; exit 1; }
-#fi
-
- % ./configure --prefix=/mingw --disable-gtktest --disable-tcl
- % cd libstroke
- % make install
-
- Install libstroke into /mingw and not c:/geda since it will make
-gEDA/gaf's build much easier.
-
-13) Build and install libgdgeda into c:/geda
-
- Build and install libgdgeda if you want the ability to generate png images
-from schematics in gschem.
-
- % tar xvfz libgdgeda-1.8.tar.gz
-
- Edit the Makefile to change:
- ln -sf include gdgeda
- to:
- cp -rp include gdgeda
-
- Edit configure script changing the string png_read_init to
- png_get_copyright
-
-Example:
-int main() {
-png_get_copyright()
-; return 0; }
-
- % ./configure --prefix=c:/geda
- % make
- % cd include
- % make install
- % cd ../src
- % make install
- % cd ..
- % cp libgdgeda-config c:/geda/bin
-
-14) Build/install gEDA/gaf itself
-
- Untar all of the gEDA/gaf tarballs into a directory.
- Put that Makefile into this toplevel directory.
-
- Edit the Makefile so that:
-
-CD_VERSION=-$(VERSION)
-DIR_PREFIX=geda-
-
- is commented in. And that the prefix in the Makefile is set to:
-
-prefix=c:/geda
-
- Also make sure the VERSION variable is correct.
-
- Start the build:
-
- % make install
-
- You may see the following errors:
-
- * ./configure error:
-
-checking whether make sets ${MAKE}..... ./configure: eval: line 1: unexpected EOF while looking for matching `"'
-./configure: eval: line 2: syntax error: unexpected end of file
-no
- I ignored it everytime.
-
- The symbols are installed twice for some odd reason.
-
- If everything completes okay (no FATAL errors), then
-gEDA/gaf - MinGW has build successfully. Congratulations.
-
-
---------------------------------------------------------------------------
- The MinGW port has been brought to you by many many months of work,
-several crashed Windows machines (seriously), and a few close calls where
-I almost gave up on the port. :->
-
diff --git a/a_new_dir/README b/a_new_dir/README
index 42c957c..1bdc759 100644
--- a/a_new_dir/README
+++ b/a_new_dir/README
@@ -1 +1,3 @@
Just a README
+
+with a change
diff --git a/a_new_file b/a_new_file
deleted file mode 100644
index fc6b2ee..0000000
--- a/a_new_file
+++ /dev/null
@@ -1,3 +0,0 @@
-test
-
-this is a change
diff --git a/a_renamed_file2 b/a_renamed_file2
new file mode 100644
index 0000000..83dd448
--- /dev/null
+++ b/a_renamed_file2
@@ -0,0 +1,23 @@
+test2
+
+change by geda
+
+change by ahvezda
+
+Changing a file that has been branched
+
+one change, test username
+
+more test changes agin
+
+Changed by werner
+
+Changed by Ales again
+ another change
+ again
+ again*2
+ again*3
+ again*4
+ another change
+ change
+ change on branch
diff --git a/gattrib/src/s_object.c b/gattrib/src/s_object.c
index 22a2549..9f2b989 100644
--- a/gattrib/src/s_object.c
+++ b/gattrib/src/s_object.c
@@ -322,8 +322,8 @@ OBJECT *s_object_attrib_add_attrib_in_object(TOPLEVEL * pr_current, char *text_s
pr_current->page_current->object_tail, o_current);
}
- o_selection_add(&(pr_current->page_current->selection_list),
- pr_current->page_current->object_tail);
+ o_selection_add( pr_current->page_current->selection_list,
+ pr_current->page_current->object_tail);
pr_current->page_current->CHANGED = 1;
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index efdbe77..b7e3a5d 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -472,7 +472,7 @@ void o_arc_rubberarc_xor(TOPLEVEL *w_current);
void o_arc_draw_grips(TOPLEVEL *w_current, OBJECT *o_current);
void o_arc_erase_grips(TOPLEVEL *w_current, OBJECT *o_current);
/* o_attrib.c */
-void o_attrib_add_selected(TOPLEVEL *w_current, GList **selection_list, OBJECT *selected);
+void o_attrib_add_selected(TOPLEVEL *w_current, SELECTION *selection, OBJECT *selected);
void o_attrib_toggle_visibility(TOPLEVEL *w_current, GList *list);
void o_attrib_toggle_show_name_value(TOPLEVEL *w_current, GList *list, int new_show_name_value);
void o_attrib_start(TOPLEVEL *w_current, int screen_x, int screen_y);
@@ -847,7 +847,6 @@ void x_multiattrib_open (TOPLEVEL *toplevel, OBJECT *object);
void x_pagesel_open (TOPLEVEL *toplevel);
void x_pagesel_close (TOPLEVEL *toplevel);
void x_pagesel_update (TOPLEVEL *toplevel);
-GtkWidget *e_gtk_button_new_with_icon(const char *text, const char *stock);
/* x_preview.c */
/* x_print.c */
void x_print_setup(TOPLEVEL *w_current, char *filename);
diff --git a/gschem/lib/system-gschemrc.in b/gschem/lib/system-gschemrc.in
index aff40d9..81d27c8 100644
--- a/gschem/lib/system-gschemrc.in
+++ b/gschem/lib/system-gschemrc.in
@@ -1,4 +1,4 @@
-
+; -*-Scheme-*-
;
; Init file for gschem
;
@@ -9,7 +9,6 @@
; colors are not case sensitive
;
-
; gschem-version string
;
; Specifies the version of this file. This number is used to make sure
@@ -18,12 +17,6 @@
;
(gschem-version "@VERSION@")
-; Setup data path variables.
-;
-; Contains paths needed for all gaf programs
-(define gedadata (getenv "GEDADATA"))
-(define gedadatarc (getenv "GEDADATARC"))
-
;
; Start of color section
;
@@ -31,8 +24,8 @@
; Comment out the first line and comment in the second line for a
; dark (black) background. The dark background is the original look.
;
-(load (string-append gedadatarc "@PATHSEP@gschem-darkbg")) ; dark background
-;(load (string-append gedadatarc "@PATHSEP@gschem-lightbg")) ; light background
+(load (build-path geda-rc-path "gschem-darkbg")) ; dark background
+;(load (build-path geda-rc-path "gschem-lightbg")) ; light background
;
; End of color section
@@ -826,7 +819,7 @@
; Comment in this scheme code if you want automatic numbering when
; placing new component and copying components
;
-;(load (string-append gedadata "/scheme/auto-uref.scm"))
+;(load-from-path "auto-uref.scm")
;(add-hook! add-component-hook auto-uref)
;(add-hook! copy-component-hook auto-uref)
@@ -1097,7 +1090,7 @@
; Comment in this to load the functions to place the attributes automatically.
-(load (string-append gedadata "/scheme/auto-place-attribs.scm"))
+(load-from-path "auto-place-attribs.scm")
; Autoplace pin text attributes hook.
; Comment in these if you want the pin attributes to be automatically placed.
@@ -1779,5 +1772,5 @@
;; and there are known (and easy) ways to crash pcb and/or gschem with this code.
;; The short answer is neither program likes a pipe to break.
;;
-; (load (string-append gedadata "/scheme/pcb.scm"))
+; (load-from-path "pcb.scm")
diff --git a/gschem/src/i_basic.c b/gschem/src/i_basic.c
index f280345..aa39472 100644
--- a/gschem/src/i_basic.c
+++ b/gschem/src/i_basic.c
@@ -23,6 +23,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -387,7 +388,7 @@ void i_update_menus(TOPLEVEL *w_current)
g_assert(w_current != NULL);
g_assert(w_current->page_current != NULL);
- if (w_current->page_current->selection_list != NULL) {
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) != NULL ) {
/* since one or more things are selected, we set these TRUE */
/* These strings should NOT be internationalized */
x_menus_sensitivity(w_current, "Edit/Cut Buffer", TRUE);
diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index 9feb6fb..a27be45 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -27,6 +27,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -744,7 +745,7 @@ DEFINE_I_CALLBACK(edit_edit)
exit_if_null(w_current);
i_update_middle_button(w_current, i_callback_edit_edit, _("Edit"));
- o_edit(w_current, w_current->page_current->selection_list);
+ o_edit(w_current, geda_list_get_glist( w_current->page_current->selection_list ) );
}
/*! \todo Finish function documentation!!!
@@ -835,7 +836,7 @@ DEFINE_I_CALLBACK(edit_rotate_90_hotkey)
exit_if_null(w_current);
o_redraw_cleanstates(w_current);
- object_list = w_current->page_current->selection_list;
+ object_list = geda_list_get_glist( w_current->page_current->selection_list );
if (object_list) {
i_update_middle_button(w_current,
@@ -884,7 +885,7 @@ DEFINE_I_CALLBACK(edit_mirror_hotkey)
o_redraw_cleanstates(w_current);
- object_list = w_current->page_current->selection_list;
+ object_list = geda_list_get_glist( w_current->page_current->selection_list );
if (object_list) {
i_update_middle_button(w_current,
@@ -991,7 +992,7 @@ DEFINE_I_CALLBACK(edit_embed)
if (o_select_selected(w_current)) {
/* yes, embed each selected component */
GList *s_current =
- w_current->page_current->selection_list;
+ geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
o_current = (OBJECT *) s_current->data;
@@ -1029,7 +1030,7 @@ DEFINE_I_CALLBACK(edit_unembed)
if (o_select_selected(w_current)) {
/* yes, unembed each selected component */
GList *s_current =
- w_current->page_current->selection_list;
+ geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
o_current = (OBJECT *) s_current->data;
@@ -1075,7 +1076,7 @@ DEFINE_I_CALLBACK(edit_update)
/* left selected. */
/* g_list_copy does a shallow copy which is exactly what we need here */
- selection_copy = g_list_copy(w_current->page_current->selection_list);
+ selection_copy = g_list_copy( geda_list_get_glist( w_current->page_current->selection_list ));
s_current = selection_copy;
while (s_current != NULL) {
o_current = (OBJECT *) s_current->data;
@@ -1086,13 +1087,12 @@ DEFINE_I_CALLBACK(edit_update)
else
{
/* object was not a OBJ_COMPLEX, so unselect it. */
- o_selection_remove (&(w_current->page_current->selection_list),
- o_current);
+ o_selection_remove( w_current->page_current->selection_list, o_current);
}
s_current = s_current->next;
}
g_list_free(selection_copy);
-
+
/* Make sure the display is up to date */
o_redraw_all(w_current);
} else {
@@ -1240,7 +1240,7 @@ DEFINE_I_CALLBACK(edit_linetype)
/* anything selected ? */
if (o_select_selected(w_current)) {
GList *s_current =
- w_current->page_current->selection_list;
+ geda_list_get_glist( w_current->page_current->selection_list );
GList *objects = NULL;
/* yes, build a list of relevant objects */
@@ -1283,7 +1283,7 @@ DEFINE_I_CALLBACK(edit_filltype)
/* anything selected ? */
if (o_select_selected(w_current)) {
GList *s_current =
- w_current->page_current->selection_list;
+ geda_list_get_glist( w_current->page_current->selection_list );
GList *objects = NULL;
/* yes, build a list of relevant objects */
@@ -1797,8 +1797,8 @@ DEFINE_I_CALLBACK(buffer_copy1)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_copy1, _("Copy 1"));
o_buffer_copy(w_current, 0);
@@ -1816,8 +1816,8 @@ DEFINE_I_CALLBACK(buffer_copy2)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_copy2, _("Copy 2"));
o_buffer_copy(w_current, 1);
@@ -1835,8 +1835,8 @@ DEFINE_I_CALLBACK(buffer_copy3)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_copy3, _("Copy 3"));
o_buffer_copy(w_current, 2);
@@ -1854,8 +1854,8 @@ DEFINE_I_CALLBACK(buffer_copy4)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_copy4, _("Copy 4"));
o_buffer_copy(w_current, 3);
@@ -1873,8 +1873,8 @@ DEFINE_I_CALLBACK(buffer_copy5)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_copy5, _("Copy 5"));
o_buffer_copy(w_current, 4);
@@ -1892,8 +1892,8 @@ DEFINE_I_CALLBACK(buffer_cut1)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_cut1, _("Cut 1"));
o_buffer_cut(w_current, 0);
@@ -1911,8 +1911,8 @@ DEFINE_I_CALLBACK(buffer_cut2)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_cut2, _("Cut 2"));
o_buffer_cut(w_current, 1);
@@ -1930,8 +1930,8 @@ DEFINE_I_CALLBACK(buffer_cut3)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_cut3, _("Cut 3"));
o_buffer_cut(w_current, 2);
@@ -1949,8 +1949,8 @@ DEFINE_I_CALLBACK(buffer_cut4)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_cut4, _("Cut 4"));
o_buffer_cut(w_current, 3);
@@ -1968,8 +1968,8 @@ DEFINE_I_CALLBACK(buffer_cut5)
exit_if_null(w_current);
- if (w_current->page_current->selection_list == NULL)
- return;
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) == NULL )
+ return;
i_update_middle_button(w_current, i_callback_buffer_cut5, _("Cut 5"));
o_buffer_cut(w_current, 4);
@@ -2958,7 +2958,7 @@ DEFINE_I_CALLBACK(attributes_attach)
_("Attach"));
/* skip over head */
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
if (!s_current) {
return;
}
@@ -3007,7 +3007,7 @@ DEFINE_I_CALLBACK(attributes_detach)
_("Detach"));
/* skip over head */
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
o_current = (OBJECT *) s_current->data;
if (o_current) {
@@ -3047,9 +3047,8 @@ DEFINE_I_CALLBACK(attributes_show_name)
_("ShowN"));
if (object != NULL) {
- o_attrib_toggle_show_name_value(w_current,
- w_current->page_current->
- selection_list,
+ o_attrib_toggle_show_name_value(w_current,
+ geda_list_get_glist( w_current->page_current->selection_list ),
SHOW_NAME);
}
}
@@ -3078,9 +3077,8 @@ DEFINE_I_CALLBACK(attributes_show_value)
_("ShowV"));
if (object != NULL) {
- o_attrib_toggle_show_name_value(w_current,
- w_current->page_current->
- selection_list,
+ o_attrib_toggle_show_name_value(w_current,
+ geda_list_get_glist( w_current->page_current->selection_list ),
SHOW_VALUE);
}
}
@@ -3109,9 +3107,8 @@ DEFINE_I_CALLBACK(attributes_show_both)
_("ShowB"));
if (object != NULL) {
- o_attrib_toggle_show_name_value(w_current,
- w_current->page_current->
- selection_list,
+ o_attrib_toggle_show_name_value(w_current,
+ geda_list_get_glist( w_current->page_current->selection_list ),
SHOW_NAME_VALUE);
}
}
@@ -3141,9 +3138,8 @@ DEFINE_I_CALLBACK(attributes_visibility_toggle)
_("VisToggle"));
if (object != NULL) {
- o_attrib_toggle_visibility(w_current,
- w_current->page_current->
- selection_list);
+ o_attrib_toggle_visibility(w_current,
+ geda_list_get_glist( w_current->page_current->selection_list ) );
}
}
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index 6b14cda..21f6176 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -25,6 +25,7 @@
#include <math.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -51,12 +52,12 @@
*
* \todo get a better name
*/
-void o_attrib_add_selected(TOPLEVEL *w_current, GList** selection_list_ptr,
- OBJECT *selected)
+void o_attrib_add_selected(TOPLEVEL *w_current, SELECTION *selection,
+ OBJECT *selected)
{
ATTRIB *a_current;
- if (!(*selection_list_ptr)) return;
+ g_assert( selection != NULL );
/* deal with attributes here? */
if (selected->attribs != NULL) {
@@ -67,12 +68,9 @@ void o_attrib_add_selected(TOPLEVEL *w_current, GList** selection_list_ptr,
if (a_current->object) {
- /* make sure object isn't selected already */
+ /* make sure object isn't selected already */
if (a_current->object->saved_color == -1) {
- o_selection_add(selection_list_ptr,
- /* w_current->page_current->
- selection2_head,*/
- a_current->object);
+ o_selection_add(selection, a_current->object);
o_redraw_single(w_current, a_current->object);
}
@@ -333,8 +331,14 @@ void o_attrib_end(TOPLEVEL *w_current)
/* here is where you attach the stuff */
/* if an object is selected, else just place it */
- /* selection_head should never be null since it has a head struct */
- object = (OBJECT *) g_list_first (w_current->page_current->selection_list)->data;
+
+ GList *iter = geda_list_get_glist( w_current->page_current->selection_list );
+
+ if ( iter == NULL )
+ object = NULL;
+ else
+ object = (OBJECT *)iter->data;
+
if (object != NULL) {
/* should attribute be selected? probably */
/* this is probably okay, NEWSEL, since tail is a single obj */
@@ -344,9 +348,9 @@ void o_attrib_end(TOPLEVEL *w_current)
object);
}
- o_selection_add(&(w_current->page_current->selection_list),
- w_current->page_current->object_tail);
- o_undo_savestate(w_current, UNDO_ALL);
+ o_selection_add( w_current->page_current->selection_list,
+ w_current->page_current->object_tail );
+ o_undo_savestate( w_current, UNDO_ALL );
}
/*! \todo Finish function documentation!!!
@@ -471,8 +475,8 @@ OBJECT *o_attrib_add_attrib(TOPLEVEL *w_current,
o_current);
}
- o_selection_add(&(w_current->page_current->selection_list),
- w_current->page_current->object_tail);
+ o_selection_add( w_current->page_current->selection_list,
+ w_current->page_current->object_tail );
o_text_erase(w_current, w_current->page_current->object_tail);
o_text_draw(w_current, w_current->page_current->object_tail);
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index a802a7b..8c35c78 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -26,6 +26,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/x_states.h"
#include "../include/prototype.h"
@@ -57,21 +58,21 @@ void o_redraw_all(TOPLEVEL *w_current)
switch(w_current->event_state) {
case(MOVE):
case(ENDMOVE):
- o_erase_selected(w_current);
- /* continue */
+ o_erase_selected(w_current);
+ /* continue */
case(ENDCOPY):
case(ENDMCOPY):
- o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ o_drawbounding(w_current, NULL,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), FALSE);
break;
case(DRAWCOMP):
case(ENDCOMP):
- o_drawbounding(w_current,
+ o_drawbounding(w_current,
NULL,
- w_current->page_current->complex_place_list,
+ w_current->page_current->complex_place_list,
x_get_darkcolor(w_current->bb_color), FALSE);
break;
@@ -153,7 +154,7 @@ void o_unselect_all(TOPLEVEL *w_current)
if (!w_current->SHIFTKEY) {
o_select_run_hooks(w_current, NULL, 2);
o_selection_unselect_list(w_current,
- &(w_current->page_current->selection_list));
+ w_current->page_current->selection_list );
}
}
@@ -197,14 +198,13 @@ void o_draw_selected(TOPLEVEL *w_current)
return;
}
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
o_current = (OBJECT *) s_current->data;
if (o_current) {
o_redraw_single(w_current, o_current);
}
-
s_current=s_current->next;
}
@@ -223,7 +223,7 @@ void o_erase_selected(TOPLEVEL *w_current)
return;
}
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
o_current = (OBJECT *) s_current->data;
diff --git a/gschem/src/o_buffer.c b/gschem/src/o_buffer.c
index 01198ae..c8a3ee4 100644
--- a/gschem/src/o_buffer.c
+++ b/gschem/src/o_buffer.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -42,7 +43,7 @@ void o_buffer_copy(TOPLEVEL *w_current, int buf_num)
return;
}
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
if (object_buffer[buf_num] == NULL) {
object_buffer[buf_num] = s_basic_init_object("buffer0_head");
@@ -80,7 +81,7 @@ void o_buffer_cut(TOPLEVEL *w_current, int buf_num)
return;
}
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
if (object_buffer[buf_num] == NULL) {
object_buffer[buf_num] = s_basic_init_object("buffer0_head");
@@ -172,7 +173,7 @@ void o_buffer_paste_end(TOPLEVEL *w_current, int screen_x, int screen_y,
int w_diff_x, w_diff_y;
OBJECT *o_current;
OBJECT *o_saved;
- GList *temp_list;
+ SELECTION *temp_list = o_selection_new();
PAGE *p_current;
GList *connected_objects = NULL;
@@ -216,11 +217,10 @@ void o_buffer_paste_end(TOPLEVEL *w_current, int screen_x, int screen_y,
p_current->object_tail = return_tail(p_current->object_head);
o_current = o_saved->next;
- temp_list = NULL;
/* now add new objects to the selection list */
while (o_current != NULL) {
- o_selection_add(&temp_list, o_current);
+ o_selection_add( temp_list, o_current );
s_conn_update_object(w_current, o_current);
if (o_current->type == OBJ_COMPLEX || o_current->type == OBJ_PLACEHOLDER) {
connected_objects = s_conn_return_complex_others(
@@ -238,12 +238,14 @@ void o_buffer_paste_end(TOPLEVEL *w_current, int screen_x, int screen_y,
o_cue_draw_list(w_current, connected_objects);
g_list_free(connected_objects);
connected_objects = NULL;
-
+
+#warning SELECT HOOKS WANT FIXING
o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list(w_current,
- &(w_current->page_current->selection_list));
- w_current->page_current->selection_list = temp_list;
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+ geda_list_add_glist( w_current->page_current->selection_list, geda_list_get_glist( temp_list ) );
+
+ g_object_unref( temp_list );
w_current->page_current->CHANGED = 1;
o_redraw(w_current, o_saved->next, TRUE); /* only redraw new objects */
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index edb52a1..e6f9e27 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -440,13 +440,11 @@ void o_complex_end(TOPLEVEL *w_current, int screen_x, int screen_y)
/* This doesn't allow anything else to be in the selection
* list when you add a component */
- o_selection_unselect_list(w_current,
- &(w_current->page_current->selection_list));
- o_selection_add(&(w_current->page_current->selection_list),
- w_current->page_current->object_tail);
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+ o_selection_add( w_current->page_current->selection_list, w_current->page_current->object_tail);
/* the o_redraw_selected is in x_events.c after this call
* returns */
- o_attrib_add_selected(w_current, &(w_current->page_current->selection_list),
+ o_attrib_add_selected(w_current, w_current->page_current->selection_list,
w_current->page_current->object_tail);
s_conn_update_complex(w_current, o_current->complex->prim_objs);
diff --git a/gschem/src/o_copy.c b/gschem/src/o_copy.c
index 091ada2..1b5a275 100644
--- a/gschem/src/o_copy.c
+++ b/gschem/src/o_copy.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -37,7 +38,7 @@
*/
void o_copy_start(TOPLEVEL *w_current, int x, int y)
{
- if (w_current->page_current->selection_list != NULL) {
+ if (geda_list_get_glist( w_current->page_current->selection_list ) != NULL) {
/* This is commented out since it breaks the copy of objects. See below. */
#if 0
@@ -53,7 +54,7 @@ void o_copy_start(TOPLEVEL *w_current, int x, int y)
w_current->last_x = w_current->start_x = fix_x(w_current, x);
w_current->last_y = w_current->start_y = fix_y(w_current, y);
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), TRUE);
w_current->inside_action = 1;
}
@@ -66,7 +67,7 @@ void o_copy_start(TOPLEVEL *w_current, int x, int y)
*/
void o_copy_end(TOPLEVEL *w_current)
{
- GList *temp_list = NULL;
+ SELECTION *temp_list = o_selection_new();
GList *s_current = NULL;
GList *new_objects = NULL;
GList *connected_objects=NULL;
@@ -94,15 +95,11 @@ void o_copy_end(TOPLEVEL *w_current)
screen_diff_y = w_current->last_y - w_current->start_y;
SCREENtoWORLD(w_current,
- w_current->last_x,
- w_current->last_y,
- &lx,
- &ly);
+ w_current->last_x, w_current->last_y,
+ &lx, &ly);
SCREENtoWORLD(w_current,
- w_current->start_x,
- w_current->start_y,
- &sx,
- &sy);
+ w_current->start_x, w_current->start_y,
+ &sx, &sy);
lx = snap_grid(w_current,lx);
ly = snap_grid(w_current,ly);
sx = snap_grid(w_current,sx);
@@ -111,9 +108,7 @@ void o_copy_end(TOPLEVEL *w_current)
diff_x = lx - sx;
diff_y = ly - sy;
- /* skip over head node */
- s_current = w_current->page_current->selection_list;
- temp_list = NULL;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
new_objects_head = s_basic_init_object("object_head");
while(s_current != NULL) {
@@ -129,13 +124,13 @@ void o_copy_end(TOPLEVEL *w_current)
case(OBJ_NET):
- /* ADDING_SEL is a bad name, rename hack */
- /* basically I don't want to add the */
- /* connections till much later */
+ /* ADDING_SEL is a bad name, rename hack */
+ /* basically I don't want to add the */
+ /* connections till much later */
w_current->ADDING_SEL=1;
- new_object = (OBJECT *) o_net_copy(w_current,
- return_tail(new_objects_head),
- object);
+ new_object = (OBJECT *) o_net_copy( w_current,
+ return_tail(new_objects_head),
+ object );
w_current->ADDING_SEL=0;
if (w_current->actionfeedback_mode == OUTLINE) {
@@ -148,7 +143,7 @@ void o_copy_end(TOPLEVEL *w_current)
diff_x, diff_y,
new_object);
- o_selection_add(&temp_list, new_object);
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_net_draw(w_current, new_object);
@@ -157,11 +152,11 @@ void o_copy_end(TOPLEVEL *w_current)
connected_objects = s_conn_return_others(connected_objects,
new_object);
break;
-
+
case(OBJ_PIN):
- /* ADDING_SEL is a bad name, rename hack */
- /* basically I don't want to add the */
- /* connections till much later */
+ /* ADDING_SEL is a bad name, rename hack */
+ /* basically I don't want to add the */
+ /* connections till much later */
w_current->ADDING_SEL=1;
new_object = (OBJECT *) o_pin_copy(w_current,
return_tail(new_objects_head),
@@ -170,19 +165,18 @@ void o_copy_end(TOPLEVEL *w_current)
if (w_current->actionfeedback_mode == OUTLINE) {
o_pin_draw_xor(w_current,
- screen_diff_x,
- screen_diff_y,
+ screen_diff_x, screen_diff_y,
object);
}
o_pin_translate_world(w_current,
diff_x, diff_y,
new_object);
-
- o_selection_add(&temp_list, new_object);
+
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_pin_draw(w_current, new_object);
-
+
s_conn_update_object(w_current, new_object);
new_objects = g_list_append(new_objects, new_object);
connected_objects = s_conn_return_others(connected_objects,
@@ -190,9 +184,9 @@ void o_copy_end(TOPLEVEL *w_current)
break;
case(OBJ_BUS):
- /* ADDING_SEL is a bad name, rename hack */
- /* basically I don't want to add the */
- /* connections till much later */
+ /* ADDING_SEL is a bad name, rename hack */
+ /* basically I don't want to add the */
+ /* connections till much later */
w_current->ADDING_SEL=1;
new_object = (OBJECT *) o_bus_copy(w_current,
return_tail(new_objects_head),
@@ -208,25 +202,25 @@ void o_copy_end(TOPLEVEL *w_current)
o_bus_translate_world(w_current,
diff_x, diff_y,
new_object);
-
- o_selection_add(&temp_list, new_object);
+
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_bus_draw(w_current, new_object);
-
+
s_conn_update_object(w_current, new_object);
new_objects = g_list_append(new_objects, new_object);
connected_objects = s_conn_return_others(connected_objects,
new_object);
break;
-
+
case(OBJ_COMPLEX):
case(OBJ_PLACEHOLDER):
w_current->ADDING_SEL=1;
if (o_complex_is_embedded(object)) {
new_object = (OBJECT *)
- o_complex_copy_embedded(w_current,
- return_tail(new_objects_head),
+ o_complex_copy_embedded(w_current,
+ return_tail(new_objects_head),
object);
} else {
@@ -235,7 +229,7 @@ void o_copy_end(TOPLEVEL *w_current)
object);
}
w_current->ADDING_SEL=0;
-
+
complex_object = new_object;
if (w_current->actionfeedback_mode == OUTLINE) {
@@ -244,14 +238,13 @@ void o_copy_end(TOPLEVEL *w_current)
}
o_complex_world_translate_toplevel(w_current,
- diff_x,
- diff_y,
+ diff_x, diff_y,
new_object);
- o_selection_add(&temp_list, new_object);
+ o_selection_add( temp_list, new_object );
- /* NEWSEL: this needs to be fixed too */
- /* this may not be needed anymore? */
+ /* NEWSEL: this needs to be fixed too */
+ /* this may not be needed anymore? */
o_attrib_slot_copy(w_current, object,
new_object);
new_object->saved_color = object->saved_color;
@@ -273,13 +266,13 @@ void o_copy_end(TOPLEVEL *w_current)
object);
}
- w_current->ADDING_SEL=1;
+ w_current->ADDING_SEL=1;
o_line_translate_world(w_current,
diff_x, diff_y,
new_object);
w_current->ADDING_SEL=0;
- o_selection_add(&temp_list, new_object);
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_line_draw(w_current, new_object);
break;
@@ -290,44 +283,42 @@ void o_copy_end(TOPLEVEL *w_current)
object);
if (w_current->actionfeedback_mode == OUTLINE) {
o_box_draw_xor(w_current,
- screen_diff_x,
- screen_diff_y,
+ screen_diff_x, screen_diff_y,
object);
}
- w_current->ADDING_SEL=1;
+ w_current->ADDING_SEL=1;
o_box_translate_world(w_current,
diff_x, diff_y,
new_object);
- w_current->ADDING_SEL=0;
-
- o_selection_add(&temp_list, new_object);
+ w_current->ADDING_SEL=0;
+
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_box_draw(w_current, new_object);
-
+
break;
case(OBJ_PICTURE):
new_object = (OBJECT *) o_picture_copy(w_current,
- return_tail(new_objects_head),
- object);
+ return_tail(new_objects_head),
+ object);
if (w_current->actionfeedback_mode == OUTLINE) {
o_picture_draw_xor(w_current,
- screen_diff_x,
- screen_diff_y,
- object);
+ screen_diff_x, screen_diff_y,
+ object);
}
- w_current->ADDING_SEL=1;
+ w_current->ADDING_SEL=1;
o_picture_translate_world(w_current,
- diff_x, diff_y,
- new_object);
- w_current->ADDING_SEL=0;
-
- o_selection_add(&temp_list, new_object);
+ diff_x, diff_y,
+ new_object);
+ w_current->ADDING_SEL=0;
+
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_picture_draw(w_current, new_object);
-
+
break;
case(OBJ_CIRCLE):
@@ -337,41 +328,39 @@ void o_copy_end(TOPLEVEL *w_current)
if (w_current->actionfeedback_mode == OUTLINE) {
o_circle_draw_xor(w_current,
- screen_diff_x,
- screen_diff_y,
+ screen_diff_x, screen_diff_y,
object);
}
- w_current->ADDING_SEL=1;
+ w_current->ADDING_SEL=1;
o_circle_translate_world(w_current,
diff_x, diff_y,
new_object);
- w_current->ADDING_SEL=0;
+ w_current->ADDING_SEL=0;
- o_selection_add(&temp_list, new_object);
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_circle_draw(w_current, new_object);
break;
case(OBJ_ARC):
- new_object = (OBJECT *) o_arc_copy(w_current,
- return_tail(new_objects_head),
- object);
+ new_object = (OBJECT *) o_arc_copy( w_current,
+ return_tail(new_objects_head),
+ object );
if (w_current->actionfeedback_mode == OUTLINE) {
o_arc_draw_xor(w_current,
- screen_diff_x,
- screen_diff_y,
+ screen_diff_x, screen_diff_y,
object);
}
- w_current->ADDING_SEL=1;
+ w_current->ADDING_SEL=1;
o_arc_translate_world(w_current,
diff_x, diff_y,
new_object);
- w_current->ADDING_SEL=0;
-
- o_selection_add(&temp_list, new_object);
+ w_current->ADDING_SEL=0;
+
+ o_selection_add( temp_list, new_object );
new_object->saved_color = object->saved_color;
o_arc_draw(w_current, new_object);
break;
@@ -384,8 +373,7 @@ void o_copy_end(TOPLEVEL *w_current)
s_current = s_current->next;
}
- /* skip over head */
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while(s_current != NULL) {
object = (OBJECT *) s_current->data;
@@ -409,7 +397,7 @@ void o_copy_end(TOPLEVEL *w_current)
if (object->attached_to->copied_to) {
o_attrib_attach(w_current, new_objects_head,
new_object, object->attached_to-> copied_to);
-
+
/*! \todo I have no idea if this is
really needed.... ? */
#if 0
@@ -422,20 +410,20 @@ void o_copy_end(TOPLEVEL *w_current)
object->attached_to->copied_to = NULL;
}
}
-
+
if (w_current->actionfeedback_mode == OUTLINE) {
o_text_draw_xor(w_current,
screen_diff_x,
screen_diff_y,
object);
- }
+ }
w_current->ADDING_SEL=1;
o_text_translate_world(w_current, diff_x, diff_y, new_object);
w_current->ADDING_SEL=0;
- /* old object was attr */
- if (!new_object->attribute &&
+ /* old object was attr */
+ if (!new_object->attribute &&
object->attribute) {
new_object->color = w_current-> detachedattr_color;
o_complex_set_color(new_object, new_object->color);
@@ -445,21 +433,19 @@ void o_copy_end(TOPLEVEL *w_current)
color = object->saved_color;
}
- o_selection_add(&temp_list, new_object);
+ o_selection_add( temp_list, new_object );
new_object->saved_color = color;
-
- /* signify that object is no longer an attribute */
- o_text_draw(w_current, new_object);
- o_complex_set_saved_color_only(
- new_object->text->prim_objs,
- color);
+ /* signify that object is no longer an attribute */
+ o_text_draw(w_current, new_object);
+
+ o_complex_set_saved_color_only( new_object->text->prim_objs,
+ color);
break;
}
w_current->page_current->object_tail =
- (OBJECT *) return_tail(w_current->page_current->
- object_head);
+ (OBJECT *) return_tail( w_current->page_current->object_head );
s_current = s_current->next;
}
@@ -478,29 +464,29 @@ void o_copy_end(TOPLEVEL *w_current)
/* Add the new objects */
w_current->page_current->object_tail = (OBJECT *)
- return_tail(w_current->page_current->object_head);
+ return_tail(w_current->page_current->object_head);
s_basic_link_object(new_objects_head, w_current->page_current->object_tail);
/* Run the copy component hook */
object = new_objects_head->next;
while (object != NULL) {
- if ((object->type == OBJ_COMPLEX) &&
- (scm_hook_empty_p(copy_component_hook) == SCM_BOOL_F)) {
+ if ( (object->type == OBJ_COMPLEX) &&
+ (scm_hook_empty_p(copy_component_hook) == SCM_BOOL_F)) {
scm_run_hook(copy_component_hook,
- scm_cons (g_make_attrib_smob_list(w_current, object),
- SCM_EOL));
+ scm_cons (g_make_attrib_smob_list(w_current, object),
+ SCM_EOL));
}
object = object->next;
}
-
+
/* And redraw them */
object = new_objects_head;
while (object) {
o_redraw_single(w_current, object);
object=object->next;
}
-
+
/* Delete the new object head */
/* new_objects_head->next = NULL;
s_delete_list_fromstart(w_current, new_objects_head); */
@@ -511,15 +497,16 @@ void o_copy_end(TOPLEVEL *w_current)
/* erase the bounding box */
if (w_current->actionfeedback_mode == BOUNDINGBOX) {
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), TRUE);
}
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list(w_current,
- &(w_current->page_current->selection_list));
- w_current->page_current->selection_list = NULL;
- w_current->page_current->selection_list = temp_list;
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+ geda_list_add_glist( w_current->page_current->selection_list, geda_list_get_glist( temp_list ) );
+
+ g_object_unref( temp_list );
w_current->page_current->CHANGED = 1;
@@ -527,11 +514,11 @@ void o_copy_end(TOPLEVEL *w_current)
o_cue_draw_list(w_current, new_objects);
o_cue_undraw_list(w_current, connected_objects);
o_cue_draw_list(w_current, connected_objects);
-
+
g_list_free(new_objects);
g_list_free(connected_objects);
new_objects = NULL;
connected_objects = NULL;
-
+
o_undo_savestate(w_current, UNDO_ALL);
}
diff --git a/gschem/src/o_delete.c b/gschem/src/o_delete.c
index 97e69e0..eb71167 100644
--- a/gschem/src/o_delete.c
+++ b/gschem/src/o_delete.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -245,7 +246,7 @@ void o_delete(TOPLEVEL *w_current)
/* skip over head node */
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while(s_current != NULL) {
@@ -299,10 +300,9 @@ void o_delete(TOPLEVEL *w_current)
w_current->inside_action = 0;
- /* Objects have been deleted. Free the list, without freeing again
- the objects */
- g_list_free(w_current->page_current->selection_list);
- w_current->page_current->selection_list = NULL;
+ /* Objects in the selection list have been deleted. Empty the list without touching the objects */
+ geda_list_remove_all( w_current->page_current->selection_list );
+
w_current->page_current->CHANGED=1;
/* no longer needed */
diff --git a/gschem/src/o_find.c b/gschem/src/o_find.c
index b96fe37..beaa0f5 100644
--- a/gschem/src/o_find.c
+++ b/gschem/src/o_find.c
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/x_states.h"
#include "../include/prototype.h"
@@ -114,14 +115,13 @@ gboolean o_find_object(TOPLEVEL *w_current, int screen_x, int screen_y,
/* deselect everything only if shift key isn't pressed and
the caller allows it */
if (change_selection && (!w_current->SHIFTKEY)) {
-
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list (w_current,
- &(w_current->page_current->selection_list));
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks(w_current, NULL, 2);
+ o_selection_unselect_list (w_current, w_current->page_current->selection_list );
}
i_update_menus(w_current);
-
+
return (object_found);
}
@@ -140,7 +140,7 @@ gboolean o_find_selected_object(TOPLEVEL *w_current,
SCREENtoWORLD( w_current, screen_x, screen_y, &w_x, &w_y );
w_slack = WORLDabs( w_current, w_current->select_slack_pixels );
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
/* do first search */
while (s_current != NULL) {
o_current = (OBJECT *) s_current->data;
diff --git a/gschem/src/o_grips.c b/gschem/src/o_grips.c
index 783dd2b..1099e1e 100644
--- a/gschem/src/o_grips.c
+++ b/gschem/src/o_grips.c
@@ -22,6 +22,7 @@
#include <math.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -102,7 +103,7 @@ OBJECT *o_grips_search_world(TOPLEVEL *w_current, int x, int y, int *whichone)
w_size = WORLDabs( w_current, size );
/* skip over head */
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
object = (OBJECT *) s_current->data;
if (object) {
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index f870629..928ce79 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -30,6 +30,7 @@
#include <unistd.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -128,7 +129,7 @@ void o_lock(TOPLEVEL *w_current)
GList *s_current = NULL;
/* skip over head */
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while(s_current != NULL) {
object = (OBJECT *) s_current->data;
@@ -166,7 +167,7 @@ void o_unlock(TOPLEVEL *w_current)
OBJECT *object = NULL;
GList *s_current = NULL;
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while(s_current != NULL) {
object = (OBJECT *) s_current->data;
@@ -1068,7 +1069,7 @@ void o_update_component(TOPLEVEL *w_current, OBJECT *o_current)
const GList *symlist = NULL;
g_assert (o_current->complex_basename != NULL);
- symlist = s_clib_glob (o_current->complex_basename);
+ symlist = s_clib_search (o_current->complex_basename, CLIB_EXACT);
if (symlist == NULL) {
s_log_message (_("Could not find symbol [%s] in library. Update failed.\n"),
@@ -1093,8 +1094,7 @@ void o_update_component(TOPLEVEL *w_current, OBJECT *o_current)
/* delete its connections */
s_conn_remove_complex (w_current, o_current);
/* and unselect it */
- o_selection_remove (&(w_current->page_current->selection_list),
- o_current);
+ o_selection_remove( w_current->page_current->selection_list, o_current);
/* build a temporary list and add a complex to this list */
tmp_list = s_basic_init_object ("update component");
@@ -1171,8 +1171,7 @@ void o_update_component(TOPLEVEL *w_current, OBJECT *o_current)
/* reconnect, re-select and redraw */
s_conn_update_complex (w_current, o_current->complex->prim_objs);
- o_selection_add (&(w_current->page_current->selection_list),
- o_current);
+ o_selection_add( w_current->page_current->selection_list, o_current );
o_redraw_single (w_current, o_current);
/* Re-flag as embedded if necessary */
diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c
index b37d1e1..62615db 100644
--- a/gschem/src/o_move.c
+++ b/gschem/src/o_move.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -36,7 +37,7 @@
*/
void o_move_start(TOPLEVEL * w_current, int x, int y)
{
- if (w_current->page_current->selection_list != NULL) {
+ if ( geda_list_get_glist( w_current->page_current->selection_list ) != NULL) {
/* Save the current state. When rotating the selection when moving,
we have to come back to here */
@@ -48,18 +49,18 @@ void o_move_start(TOPLEVEL * w_current, int x, int y)
w_current->last_y = w_current->start_y = fix_y(w_current, y);
o_erase_selected(w_current);
-
+
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), TRUE);
if (w_current->netconn_rubberband) {
o_move_prep_rubberband(w_current);
o_move_stretch_rubberband(w_current);
}
-
- o_select_move_to_place_list(w_current);
- w_current->inside_action = 1;
+
+ o_select_move_to_place_list(w_current);
+ w_current->inside_action = 1;
}
}
@@ -208,12 +209,12 @@ void o_move_end(TOPLEVEL * w_current)
if (w_current->actionfeedback_mode == OUTLINE) {
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), TRUE);
}
-
+
/* skip over head node */
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
@@ -279,7 +280,7 @@ void o_move_end(TOPLEVEL * w_current)
/* erase the bounding box */
if (w_current->actionfeedback_mode == BOUNDINGBOX) {
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), FALSE);
}
@@ -430,7 +431,7 @@ void o_move_prep_rubberband(TOPLEVEL * w_current)
printf("\n\n\n");
#endif
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
object = (OBJECT *) s_current->data;
if (object) {
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index 7db67b2..182a840 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -1123,7 +1123,8 @@ int o_net_add_busrippers(TOPLEVEL *w_current, OBJECT *net_obj,
s_conn_remove(w_current, net_obj);
if (w_current->bus_ripper_type == COMP_BUS_RIPPER) {
- GList *symlist = s_clib_glob (w_current->bus_ripper_symname);
+ GList *symlist =
+ s_clib_search (w_current->bus_ripper_symname, CLIB_EXACT);
if (symlist != NULL) {
rippersym = (CLibSymbol *) symlist->data;
}
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index 61a23e3..b29f16a 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -21,6 +21,8 @@
#include <stdio.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
+
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -648,10 +650,10 @@ void o_picture_exchange (TOPLEVEL *w_current, GdkPixbuf *pixbuf,
{
GList *list;
- list = w_current->page_current->selection_list;
+ list = geda_list_get_glist( w_current->page_current->selection_list );
while (list != NULL) {
OBJECT *object;
-
+
object = (OBJECT *) list->data;
if (object == NULL) {
fprintf(stderr, _("ERROR: NULL object!\n"));
diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c
index 27b04eb..d7f8189 100644
--- a/gschem/src/o_select.c
+++ b/gschem/src/o_select.c
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/x_states.h"
@@ -161,18 +162,18 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
/* condition: for both multiple and single object added */
/* result: remove all objects from selection */
if (count == 0 && !CONTROLKEY) {
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list (w_current,
- &(w_current->page_current->selection_list));
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list (w_current,w_current->page_current->selection_list);
}
break;
} /* end shift key switch */
/* object not select, add it to the selection list */
- o_select_run_hooks(w_current, o_current, 1);
- o_selection_add(&(w_current->page_current->selection_list),
- o_current);
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, o_current, 1 );
+ o_selection_add( w_current->page_current->selection_list, o_current);
break;
@@ -186,9 +187,9 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
/* condition: not doing multiple */
/* result: remove object from selection */
if (type != MULTIPLE) {
- o_select_run_hooks(w_current, o_current, 0);
- o_selection_remove(&(w_current->page_current->selection_list),
- o_current);
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, o_current, 0 );
+ o_selection_remove( w_current->page_current->selection_list, o_current );
}
break;
@@ -201,13 +202,13 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
/* 1st result: remove all objects from selection */
/* 2nd result: add object to selection */
if (type == MULTIPLE && count == 0 && !CONTROLKEY) {
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list (w_current,
- &(w_current->page_current->selection_list));
-
- o_select_run_hooks(w_current, o_current, 1);
- o_selection_add(&(w_current->page_current->selection_list),
- o_current);
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list (w_current, w_current->page_current->selection_list );
+
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, o_current, 1 );
+ o_selection_add( w_current->page_current->selection_list, o_current);
}
/* condition: doing single object add */
@@ -215,19 +216,19 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
/* 1st result: remove all objects from selection */
/* 2nd result: add object to selection list */
if (type == SINGLE && !CONTROLKEY) {
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list (w_current,
- &(w_current->page_current->selection_list));
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+#warning SELECT HOOKS WANT FIXING
o_select_run_hooks (w_current, o_current, 1);
- o_selection_add(&(w_current->page_current->selection_list),
- o_current);
+ o_selection_add( w_current->page_current->selection_list, o_current);
}
if (CONTROLKEY) {
+#warning SELECT HOOKS WANT FIXING
o_select_run_hooks(w_current, o_current, 0);
- o_selection_remove(&(w_current->page_current->selection_list),
- o_current);
+ o_selection_remove( w_current->page_current->selection_list, o_current);
}
break;
@@ -236,8 +237,7 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
}
/* do the attributes */
- o_attrib_add_selected(w_current, &(w_current->page_current->selection_list),
- o_current);
+ o_attrib_add_selected(w_current, w_current->page_current->selection_list, o_current);
/* finally redraw object */
o_redraw_single(w_current, o_current);
@@ -431,9 +431,9 @@ void o_select_box_search(TOPLEVEL *w_current)
/* zero, and you need to deselect anything remaining (unless the shift */
/* key was pressed */
if (count == 0 && !SHIFTKEY) {
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list( w_current,
- &(w_current->page_current->selection_list) );
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
}
i_update_menus(w_current);
}
@@ -442,10 +442,10 @@ void o_select_box_search(TOPLEVEL *w_current)
/* This function always looks at the current page selection list */
OBJECT *o_select_return_first_object(TOPLEVEL *w_current)
{
- if (! (w_current && w_current->page_current && w_current->page_current->selection_list))
+ if (! (w_current && w_current->page_current && geda_list_get_glist( w_current->page_current->selection_list )))
return NULL;
else
- return((OBJECT *) g_list_first(w_current->page_current->selection_list)->data);
+ return (OBJECT *)g_list_first( geda_list_get_glist( w_current->page_current->selection_list ))->data;
}
/*! \todo Finish function documentation!!!
@@ -457,7 +457,7 @@ OBJECT *o_select_return_first_object(TOPLEVEL *w_current)
*/
int o_select_selected(TOPLEVEL *w_current)
{
- if (w_current->page_current->selection_list) {
+ if ( geda_list_get_glist( w_current->page_current->selection_list )) {
return(TRUE);
}
return(FALSE);
@@ -470,9 +470,9 @@ int o_select_selected(TOPLEVEL *w_current)
*/
void o_select_unselect_all(TOPLEVEL *w_current)
{
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list (w_current,
- &(w_current->page_current->selection_list));
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
}
/*! \todo Finish function documentation!!!
@@ -485,8 +485,8 @@ o_select_move_to_place_list(TOPLEVEL *w_current)
{
GList *selection;
OBJECT *o_current;
-
- selection= w_current->page_current->selection_list;
+
+ selection = geda_list_get_glist( w_current->page_current->selection_list );
if (!selection) {
return;
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 6024424..e4754be 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -29,6 +29,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -489,7 +490,7 @@ void o_text_end(TOPLEVEL *w_current)
/*! \todo make this VIS and SHOW default configurable */
w_current->page_current->object_tail =
o_text_add(w_current, w_current->page_current->object_tail,
- /* type changed from TEXT to TEXT */
+ /* type changed from TEXT to TEXT */
OBJ_TEXT,
w_current->text_color,
world_x, world_y, LOWER_LEFT,
@@ -528,12 +529,10 @@ void o_text_end(TOPLEVEL *w_current)
w_current->override_color = -1;
w_current->page_current->CHANGED=1;
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list(w_current,
- &(w_current->page_current->selection_list));
- o_selection_add(&(w_current->page_current->selection_list),
- w_current->page_current->object_tail);
-
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+ o_selection_add( w_current->page_current->selection_list, w_current->page_current->object_tail );
/* object_tail is the object that was just added */
if (w_current->page_current->object_tail->draw_func != NULL &&
@@ -588,8 +587,8 @@ void o_text_edit_end(TOPLEVEL *w_current, char *string, int len, int text_size,
int numselect;
/* skip over head */
- s_current = w_current->page_current->selection_list;
- numselect = g_list_length(w_current->page_current->selection_list);
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
+ numselect = g_list_length( geda_list_get_glist( w_current->page_current->selection_list ));
while(s_current != NULL) {
object = (OBJECT *) s_current->data;
diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index 6dd541f..77cf01e 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -29,6 +29,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/i_vars.h"
#include "../include/globals.h"
@@ -131,7 +132,7 @@ void attrib_edit_dialog_ok(GtkWidget * w, TOPLEVEL * w_current)
int world_x, world_y;
OBJECT *new = NULL;
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while (s_current != NULL) {
object = (OBJECT *)s_current->data;
if (object == NULL) {
@@ -143,7 +144,7 @@ void attrib_edit_dialog_ok(GtkWidget * w, TOPLEVEL * w_current)
}
s_current = s_current->next;
}
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
if (nsel > 1) {
addtoallbutton =
@@ -315,7 +316,7 @@ void attrib_edit_dialog(TOPLEVEL * w_current, OBJECT * list, int flag)
return;
/* gschem specific: What do we count here? (Werner) */
- for (s_current = w_current->page_current->selection_list;
+ for (s_current = geda_list_get_glist( w_current->page_current->selection_list );
s_current != NULL;
s_current = s_current->next) {
if (!((OBJECT *) s_current->data)->attached_to) {
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index 4a94f67..2dffb96 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -587,8 +587,7 @@ void autonumber_remove_number(AUTONUMBER_TEXT * autotext, OBJECT *o_current)
if (slot_str != NULL && o_slot != NULL) {
g_free(slot_str);
/* delete the slot attribute */
- o_selection_remove (&(autotext->toplevel->page_current->selection_list),
- o_slot);
+ o_selection_remove (autotext->toplevel->page_current->selection_list, o_slot);
o_delete_text (autotext->toplevel, o_slot);
/* redraw the slotted object. So that the pinnumbers appear as with slot=1 */
/* --> No: should be done by o_delete_text as several dialog use it. */
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 862072d..4365058 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -28,6 +28,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/i_vars.h"
#include "../include/globals.h"
@@ -424,7 +425,7 @@ void text_edit_dialog_ok(GtkWidget *w, TOPLEVEL *w_current)
GtkTextIter start, end;
GtkWidget *widget;
- num_selected = g_list_length(w_current->page_current->selection_list);
+ num_selected = g_list_length( geda_list_get_glist( w_current->page_current->selection_list ));
/* text string entry will only show up if one object is selected */
if (num_selected == 1) {
@@ -538,7 +539,7 @@ void text_edit_dialog (TOPLEVEL *w_current, char *string, int text_size,
gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
/* add a text box if only one object is selected */
- num_selected = g_list_length(w_current->page_current->selection_list);
+ num_selected = g_list_length( geda_list_get_glist( w_current->page_current->selection_list ));
if (num_selected == 1) {
label = gtk_label_new (_("<b>Text Content</b>"));
@@ -2272,7 +2273,7 @@ static GtkWidget *create_color_menu (TOPLEVEL * w_current, int * select_index)
menu = gtk_menu_new ();
group = NULL;
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
if (s_current != NULL) {
@@ -2348,7 +2349,7 @@ void color_edit_dialog_apply(GtkWidget *w, TOPLEVEL *w_current)
GList *s_current = NULL;
OBJECT *object = NULL;
- s_current = w_current->page_current->selection_list;
+ s_current = geda_list_get_glist( w_current->page_current->selection_list );
while(s_current != NULL) {
diff --git a/gschem/src/x_event.c b/gschem/src/x_event.c
index af90696..4e058dd 100644
--- a/gschem/src/x_event.c
+++ b/gschem/src/x_event.c
@@ -25,6 +25,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -88,7 +89,7 @@ gint x_event_expose(GtkWidget *widget, GdkEventExpose *event,
case(ENDCOPY):
case(ENDMCOPY):
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), FALSE);
break;
case(DRAWCOMP):
@@ -169,8 +170,8 @@ gint x_event_button_pressed(GtkWidget *widget, GdkEventButton *event,
(w_current->event_state == STARTSELECT ||
w_current->event_state == SELECT)) {
o_find_object(w_current, (int) event->x, (int) event->y, TRUE);
- if (w_current->page_current->selection_list) {
- o_edit(w_current, w_current->page_current->selection_list);
+ if ( geda_list_get_glist( w_current->page_current->selection_list )) {
+ o_edit(w_current, geda_list_get_glist( w_current->page_current->selection_list ));
return(0);
}
}
@@ -429,40 +430,40 @@ gint x_event_button_pressed(GtkWidget *widget, GdkEventButton *event,
break;
case(ENDROTATEP):
- prev_state = w_current->DONT_REDRAW;
- w_current->DONT_REDRAW = 0;
-
+ prev_state = w_current->DONT_REDRAW;
+ w_current->DONT_REDRAW = 0;
+
SCREENtoWORLD( w_current,
- (int) event->x,
- (int) event->y,
- &w_x, &w_y );
+ (int) event->x,
+ (int) event->y,
+ &w_x, &w_y );
w_x = snap_grid(w_current, w_x);
w_y = snap_grid(w_current, w_y);
o_rotate_90_world(
w_current,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
w_x, w_y);
- w_current->DONT_REDRAW = prev_state;
+ w_current->DONT_REDRAW = prev_state;
w_current->inside_action = 0;
- i_set_state(w_current, SELECT);
+ i_set_state(w_current, SELECT);
i_update_toolbar(w_current);
break;
case(ENDMIRROR):
SCREENtoWORLD( w_current,
- (int) event->x,
- (int) event->y,
+ (int) event->x,
+ (int) event->y,
&w_x, &w_y );
o_mirror_world(w_current,
- w_current->page_current->selection_list,
- w_x, w_y);
+ geda_list_get_glist( w_current->page_current->selection_list ),
+ w_x, w_y);
w_x = snap_grid(w_current, w_x);
w_y = snap_grid(w_current, w_y);
w_current->inside_action = 0;
- i_set_state(w_current, SELECT);
+ i_set_state(w_current, SELECT);
i_update_toolbar(w_current);
break;
@@ -1109,12 +1110,12 @@ gint x_event_motion(GtkWidget *widget, GdkEventMotion *event,
case(MCOPY):
if (w_current->inside_action) {
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), FALSE);
w_current->last_x = fix_x(w_current, (int) event->x);
w_current->last_y = fix_y(w_current, (int) event->y);
o_drawbounding(w_current, NULL,
- w_current->page_current->selection_list,
+ geda_list_get_glist( w_current->page_current->selection_list ),
x_get_darkcolor(w_current->bb_color), FALSE);
}
break;
diff --git a/gschem/src/x_image.c b/gschem/src/x_image.c
index 02be7e3..c0d421a 100644
--- a/gschem/src/x_image.c
+++ b/gschem/src/x_image.c
@@ -383,10 +383,10 @@ void x_image_lowlevel(TOPLEVEL *w_current, const char* filename,
page_center_top + (page_height / 2));
/* de select everything first */
- o_select_run_hooks(w_current, NULL, 2);
- o_selection_unselect_list(w_current,
- &(w_current->page_current->selection_list));
-
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+
#ifdef HAS_LIBGD
/* try to use recalc here */
diff --git a/gschem/src/x_multiattrib.c b/gschem/src/x_multiattrib.c
index 97caddb..8790f72 100644
--- a/gschem/src/x_multiattrib.c
+++ b/gschem/src/x_multiattrib.c
@@ -464,7 +464,7 @@ static void multiattrib_action_delete_attribute(TOPLEVEL *toplevel,
OBJECT *o_attrib)
{
/* actually deletes the attribute */
- o_selection_remove (&(toplevel->page_current->selection_list), o_attrib);
+ o_selection_remove ( toplevel->page_current->selection_list, o_attrib);
o_delete_text (toplevel, o_attrib);
toplevel->page_current->CHANGED=1;
o_undo_savestate (toplevel, UNDO_ALL);
diff --git a/gschem/src/x_pagesel.c b/gschem/src/x_pagesel.c
index 5780ed1..9842bf6 100644
--- a/gschem/src/x_pagesel.c
+++ b/gschem/src/x_pagesel.c
@@ -299,6 +299,28 @@ static void pagesel_popup_menu (Pagesel *pagesel,
}
+
+/*! \brief Handler for the notify::toplevel signal of GschemDialog
+ *
+ * \par Function Description
+ *
+ * When the toplevel property is set on the parent GschemDialog,
+ * we should update the pagesel dialog.
+ *
+ * \param [in] pspec the GParamSpec of the property which changed
+ * \param [in] gobject the object which received the signal.
+ * \param [in] user_data user data set when the signal handler was connected.
+ */
+static void notify_toplevel_cb (GObject *gobject,
+ GParamSpec *arg1,
+ gpointer user_data)
+{
+ Pagesel *pagesel = PAGESEL( gobject );
+
+ pagesel_update( pagesel );
+}
+
+
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
@@ -471,8 +493,8 @@ static void pagesel_init (Pagesel *pagesel)
-1);
#endif
- /* Strictly, this has the wrong prototype, but it doesn't matter */
- g_signal_connect( pagesel, "notify::toplevel", G_CALLBACK (pagesel_update), NULL );
+ g_signal_connect( pagesel, "notify::toplevel",
+ G_CALLBACK( notify_toplevel_cb ), NULL );
}
@@ -587,49 +609,3 @@ void pagesel_update (Pagesel *pagesel)
select_page (pagesel->treeview, NULL, toplevel->page_current);
}
-/*! \deprecated
- * This function was in the noweb file, but was not referenced.
- * Create a gtk button with a custom label <B>text</B> and a stock
- * icon <B>stock</B>.
- * <B>text</B>: The mnemonic text for the label.
- * <B>stock</B>: The name of the stock item to get the icon from.
- *
- * Return value: The widget.
- * Taken from evolution code:
- * http://lists.ximian.com/archives/public/evolution-patches/2003-April/000088.html
- */
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-/*
-GtkWidget *e_gtk_button_new_with_icon(const char *text, const char *stock)
-{
- GtkWidget *button, *label;
- GtkStockItem item;
-
- button = gtk_button_new();
- label = gtk_label_new_with_mnemonic(text);
- gtk_label_set_mnemonic_widget((GtkLabel *)label, button);
-
- if (gtk_stock_lookup(stock, &item)) {
- GtkWidget *image, *hbox, *align;
-
- image = gtk_image_new_from_stock(stock, GTK_ICON_SIZE_BUTTON);
- hbox = gtk_hbox_new(FALSE, 2);
- align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
- gtk_box_pack_start((GtkBox *)hbox, image, FALSE, FALSE, 0);
- gtk_box_pack_end((GtkBox *)hbox, label, FALSE, FALSE, 0);
- gtk_container_add((GtkContainer *)align, hbox);
- gtk_container_add((GtkContainer *)button, align);
- gtk_widget_show_all(align);
- } else {
- gtk_misc_set_alignment((GtkMisc *)label, 0.5, 0.5);
- gtk_container_add((GtkContainer *)button, label);
- gtk_widget_show(label);
- }
-
- return button;
-}
-*/
diff --git a/gschem/src/x_print.c b/gschem/src/x_print.c
index dc0ca58..2b964e5 100644
--- a/gschem/src/x_print.c
+++ b/gschem/src/x_print.c
@@ -27,6 +27,7 @@
#endif
#include <libgeda/libgeda.h>
+#include <libgeda/geda.h>
#include "../include/globals.h"
#include "../include/prototype.h"
@@ -766,8 +767,9 @@ x_print_setup (TOPLEVEL * w_current, char *filename)
&w_current->paper_height);
/* de select everything first */
- o_selection_unselect_list( w_current,
- &w_current->page_current->selection_list );
+#warning SELECT HOOKS WANT FIXING
+ o_select_run_hooks( w_current, NULL, 2 );
+ o_selection_unselect_list( w_current, w_current->page_current->selection_list );
if (usefile && filename[0])
/* Print to file */
diff --git a/libgeda/Makefile.am b/libgeda/Makefile.am
index 77fa989..1484d22 100644
--- a/libgeda/Makefile.am
+++ b/libgeda/Makefile.am
@@ -1,5 +1,5 @@
-SUBDIRS = src include scripts docs share
+SUBDIRS = src include scripts docs share lib scheme
EXTRA_DIST = HACKING BUGS autogen.sh
diff --git a/libgeda/configure.ac b/libgeda/configure.ac
index 7f16c3c..4ce879f 100644
--- a/libgeda/configure.ac
+++ b/libgeda/configure.ac
@@ -490,7 +490,9 @@ AC_CONFIG_FILES([Makefile
include/Makefile
docs/Makefile
libgeda.pc
- share/Makefile ])
+ share/Makefile
+ lib/Makefile
+ scheme/Makefile ])
AC_OUTPUT
diff --git a/libgeda/include/Makefile.am b/libgeda/include/Makefile.am
index eb5420f..c842ca8 100644
--- a/libgeda/include/Makefile.am
+++ b/libgeda/include/Makefile.am
@@ -3,7 +3,8 @@
libgedaincludedir = $(includedir)/libgeda
libgedainclude_HEADERS = \
colors.h defines.h funcs.h globals.h o_types.h \
- prototype.h struct.h libgeda.h i_vars.h papersizes.h
+ prototype.h struct.h libgeda.h i_vars.h papersizes.h \
+ geda.h geda_list.h
MOSTLYCLEANFILES = *.log core FILE *~
CLEANFILES = *.log core FILE *~
diff --git a/libgeda/include/geda.h b/libgeda/include/geda.h
new file mode 100644
index 0000000..8a563b4
--- /dev/null
+++ b/libgeda/include/geda.h
@@ -0,0 +1,27 @@
+/* gEDA - GPL Electronic Design Automation
+ * libgeda - gEDA's library
+ * Copyright (C) 1998-2007 Ales V. Hvezda
+ * Copyright (C) 2007 Peter Clifton
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
+ */
+
+#ifndef __GEDA_H
+#define __GEDA_H
+
+#include <libgeda/geda_list.h>
+
+#endif // ifndef __GEDA_H
+
diff --git a/libgeda/include/geda_list.h b/libgeda/include/geda_list.h
new file mode 100644
index 0000000..492c78c
--- /dev/null
+++ b/libgeda/include/geda_list.h
@@ -0,0 +1,61 @@
+/* gEDA - GPL Electronic Design Automation
+ * gschem - gEDA Schematic Capture
+ * Copyright (C) 1998-2004 Ales V. Hvezda
+ * Copyright (C) 2007 Peter Clifton
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library 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.
+ */
+
+
+#ifndef __GEDA_LIST_H__
+#define __GEDA_LIST_H__
+
+
+#define GEDA_TYPE_LIST (geda_list_get_type())
+#define GEDA_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GEDA_TYPE_LIST, GedaList))
+#define GEDA_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GEDA_TYPE_LIST, GedaListClass))
+#define GEDA_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GEDA_TYPE_LIST))
+#define GEDA_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GEDA_TYPE_LIST))
+#define GEDA_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GEDA_TYPE_LIST, GedaListClass))
+
+
+typedef struct _GedaList GedaList;
+typedef struct _GedaListClass GedaListClass;
+
+struct _GedaList {
+ GObject parent;
+ GList *glist;
+};
+
+struct _GedaListClass {
+ GObjectClass parent;
+};
+
+GType geda_list_get_type (void);
+
+/* It would be nice to add const qualifiers to some of these, but GLib
+ * is buggy in this respect, and doesn't have const where necessary. */
+GedaList *geda_list_new( void );
+void geda_list_add( GedaList *list, gpointer item );
+void geda_list_add_glist( GedaList *list, GList *items );
+void geda_list_remove( GedaList *list, gpointer item );
+/*void geda_list_remove_glist( GedaList *list, GList *items ); */ /* Undemanded as yet */
+void geda_list_remove_all( GedaList *list );
+
+/*const GList *geda_list_get_glist( GedaList *list ); */
+#define geda_list_get_glist(list) (list->glist)
+
+#endif /* __GEDA_LIST_H__ */
+
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index c98c166..3b394d2 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -424,12 +424,14 @@ void o_pin_modify(TOPLEVEL *w_current, OBJECT *object, int x, int y, int whichon
void o_pin_update_whichend(TOPLEVEL *w_current, OBJECT *object_list, int num_pins);
/* o_selection.c */
-void o_selection_add(GList **head, OBJECT *o_selected);
-void o_selection_print_all(const GList **head);
+SELECTION *o_selection_new( void );
+void o_selection_add(SELECTION *selection, OBJECT *o_selected);
+void o_selection_print_all(const SELECTION *selection);
+void o_selection_remove(SELECTION *selection, OBJECT *o_selected);
+void o_selection_unselect_list(TOPLEVEL *w_current, SELECTION *selection);
+
void o_selection_select(OBJECT *object, int color); /* DEPRECATED */
void o_selection_unselect(OBJECT *object); /* DEPRECATED */
-void o_selection_remove(GList **head, OBJECT *o_selected);
-void o_selection_unselect_list(TOPLEVEL *w_current, GList **head);
/* o_text_basic.c */
int world_get_text_bounds(TOPLEVEL *w_current, OBJECT *o_current, int *left, int *top, int *right, int *bottom);
@@ -514,7 +516,8 @@ const gchar *s_clib_symbol_get_name (const CLibSymbol *symbol);
gchar *s_clib_symbol_get_filename (const CLibSymbol *symbol);
const CLibSource *s_clib_symbol_get_source (const CLibSymbol *symbol);
gchar *s_clib_symbol_get_data (const CLibSymbol *symbol);
-GList *s_clib_glob (const gchar *glob);
+GList *s_clib_search (const gchar *pattern, const CLibSearchMode mode);
+void s_clib_flush_cache ();
gchar *s_clib_symbol_get_data_by_name (const gchar *name);
/* s_color.c */
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index e75b6ab..f53e318 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -22,6 +22,9 @@
#include <glib.h> /* Include needed to make GList work. */
+/* Wrappers around a new list mechanism */
+typedef struct _GedaList SELECTION;
+
/* gschem structures (gschem) */
typedef struct st_complex COMPLEX;
typedef struct st_line LINE;
@@ -62,6 +65,9 @@ typedef struct _TextBuffer TextBuffer;
typedef struct _CLibSource CLibSource;
typedef struct _CLibSymbol CLibSymbol;
+/* Component library search modes */
+typedef enum { CLIB_EXACT=0, CLIB_GLOB } CLibSearchMode;
+
/* PB : change begin */
/* PB : these enum are constant to define :
- the end of open line of an object ;
@@ -336,7 +342,7 @@ struct st_page {
OBJECT *object_head;
OBJECT *object_tail;
OBJECT *object_parent;
- GList *selection_list; /* new selection mechanism */
+ SELECTION *selection_list; /* new selection mechanism */
GList *complex_place_list;
OBJECT *attrib_place_head;
OBJECT *attrib_place_tail;
diff --git a/libgeda/lib/.cvsignore b/libgeda/lib/.cvsignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/libgeda/lib/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/libgeda/lib/Makefile.am b/libgeda/lib/Makefile.am
new file mode 100644
index 0000000..6f8d4f8
--- /dev/null
+++ b/libgeda/lib/Makefile.am
@@ -0,0 +1,8 @@
+
+rcdatadir = @GEDARCDIR@
+rcdata_DATA = system-gafrc
+
+MOSTLYCLEANFILES = *.log *~
+CLEANFILES = *.log *~
+DISTCLEANFILES = *.log *~
+MAINTAINERCLEANFILES = *.log *~ Makefile.in
diff --git a/libgeda/lib/system-gafrc b/libgeda/lib/system-gafrc
new file mode 100644
index 0000000..9a655a2
--- /dev/null
+++ b/libgeda/lib/system-gafrc
@@ -0,0 +1,50 @@
+; -*-Scheme-*-
+;;;
+;;; Common init file for gaf
+;;;
+
+; The following global variables are defined by libgeda:
+;
+; path-sep -- system path separator
+; geda-data-path -- path to gEDA system-wide data directory
+; geda-rc-path -- path to gEDA system-wide config directory
+
+
+;; The directory containing gaf Scheme code.
+(define geda-scheme-path (string-append geda-data-path path-sep "scheme"))
+; We need to add gaf's scheme library to the Guile load path.
+(set! %load-path (append (list geda-scheme-path) %load-path))
+; This is used in some places for error messages/listing gnetlist
+; backends
+(scheme-directory geda-scheme-path)
+
+; The libgeda Scheme library provides a number of useful functions for
+; writing Scheme code for embedding in gaf.
+(load-from-path "geda.scm")
+
+
+;; The directory containing various bitmaps (e.g. icons)
+(bitmap-directory (build-path geda-data-path "bitmap"))
+
+
+; Load the default component libraries
+(let ((clib-def-file (%search-load-path "geda-clib")))
+ (if clib-def-file
+ (load clib-def-file)
+ (display "Failed to load default component libraries.\n")))
+
+; Load the default font
+(let ((font-def-file (%search-load-path "geda-font")))
+ (if font-def-file
+ (load font-def-file)
+ (display "Failed to load default font.\n")))
+
+
+; Set the name of the postscript prolog file that will be
+; pasted into the postscript output after the DSC comments, but
+; before the main script.
+(postscript-prolog (build-path geda-data-path "prolog.ps"))
+
+; Set the list of attributes that are always promoted regardless of
+; their visibility.
+(always-promote-attributes "footprint device value model-name")
diff --git a/libgeda/scheme/.cvsignore b/libgeda/scheme/.cvsignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/libgeda/scheme/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/libgeda/scheme/Makefile.am b/libgeda/scheme/Makefile.am
new file mode 100644
index 0000000..dafee28
--- /dev/null
+++ b/libgeda/scheme/Makefile.am
@@ -0,0 +1,8 @@
+
+scmdatadir = @GEDADATADIR@@PATHSEP@scheme
+scmdata_DATA = geda.scm
+
+MOSTLYCLEANFILES = *.log *~
+CLEANFILES = *.log *~
+DISTCLEANFILES = *.log core FILE *~ prototype.bak
+MAINTAINERCLEANFILES = *.log *~ Makefile.in
diff --git a/libgeda/scheme/geda.scm b/libgeda/scheme/geda.scm
new file mode 100644
index 0000000..5a0b1b3
--- /dev/null
+++ b/libgeda/scheme/geda.scm
@@ -0,0 +1,6 @@
+; -*-Scheme-*-
+(define (build-path first . rest)
+ (if (null? rest) first
+ (apply build-path
+ (append (list (string-append first path-sep (car rest)))
+ (cdr rest)))))
diff --git a/libgeda/src/Makefile.am b/libgeda/src/Makefile.am
index ed03681..4131e56 100644
--- a/libgeda/src/Makefile.am
+++ b/libgeda/src/Makefile.am
@@ -23,7 +23,8 @@ libgeda_la_SOURCES = \
s_log.c s_textbuffer.c \
s_page.c s_slib.c s_color.c s_undo.c s_conn.c \
s_cue.c s_tile.c s_menu.c s_toplevel.c g_smob.c libgeda.c \
- g_register.c g_rc.c i_vars.c o_picture.c gdk-pixbuf-hacks.c
+ g_register.c g_rc.c i_vars.c o_picture.c gdk-pixbuf-hacks.c \
+ geda_list.c
INCLUDES = -I$(top_srcdir)/include @LIBGEDA_CFLAGS@
libgeda_la_LDFLAGS = @LIBTOOL_FLAGS@ @LIBGEDA_LDFLAGS@
diff --git a/libgeda/src/g_register.c b/libgeda/src/g_register.c
index 1bc0daa..0fb0497 100644
--- a/libgeda/src/g_register.c
+++ b/libgeda/src/g_register.c
@@ -103,6 +103,13 @@ void g_register_libgeda_funcs (void)
*/
void g_register_libgeda_vars (void)
{
+ scm_c_define("geda-rc-path",
+ scm_from_locale_string (g_rc_parse_path()));
+ scm_c_define("geda-data-path",
+ scm_from_locale_string (g_getenv ("GEDADATA")));
+ scm_c_define("path-sep",
+ scm_from_locale_string(G_DIR_SEPARATOR_S));
+
scm_c_define("OBJ_LINE", SCM_MAKE_CHAR((unsigned char) OBJ_LINE));
scm_c_define("OBJ_BOX", SCM_MAKE_CHAR((unsigned char) OBJ_BOX));
scm_c_define("OBJ_PICTURE", SCM_MAKE_CHAR((unsigned char) OBJ_PICTURE));
diff --git a/libgeda/src/geda_list.c b/libgeda/src/geda_list.c
new file mode 100644
index 0000000..61e7ac9
--- /dev/null
+++ b/libgeda/src/geda_list.c
@@ -0,0 +1,214 @@
+/* gEDA - GPL Electronic Design Automation
+ * libgeda - gEDA's library
+ * Copyright (C) 1998-2000 Ales V. Hvezda
+ * Copyright (C) 2007 Peter Clifton
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
+ */
+
+
+/* Shuold aim to be removing as many #includes as possible */
+#if 0
+#ifdef HAVE_LIBDMALLOC
+#include <dmalloc.h>
+#endif
+#endif
+
+#include <config.h>
+
+#include <glib-object.h>
+
+#include "geda_list.h"
+
+
+enum {
+ CHANGED,
+ LAST_SIGNAL
+};
+
+static guint geda_list_signals[ LAST_SIGNAL ] = { 0 };
+static GObjectClass *geda_list_parent_class = NULL;
+
+
+/*! \brief GType instance initialiser for GedaList
+ *
+ * \par Function Description
+ * GType instance initialiser for GedaList.
+ *
+ * \param [in] instance The GedaList we are initialising.
+ * \param [in] g_class The class of the type the instance is created for.
+ */
+static void geda_list_instance_init( GTypeInstance *instance, gpointer g_class )
+{
+ GedaList *list = (GedaList *)instance;
+
+ /* Strictly un-necessary, as the memory is zero'd after allocation */
+ list->glist = NULL;
+}
+
+
+/*! \brief GObject finalise handler
+ *
+ * \par Function Description
+ * Just before the GedaList GObject is finalized, free our
+ * allocated data, and then chain up to GObject's finalize handler.
+ *
+ * \param [in] widget The GObject being finalized.
+ */
+static void geda_list_finalize( GObject *object )
+{
+ GedaList *list = GEDA_LIST( object );
+ g_list_free( list->glist );
+}
+
+
+/*! \brief GType class initialiser for GedaList
+ *
+ * \par Function Description
+ * GType class initialiser for GedaList. We override our parents
+ * virtual class methods as needed and register our GObject signals.
+ *
+ * \param [in] klass The GedaList we are initialising
+ */
+static void geda_list_class_init( gpointer g_class, gpointer g_class_data )
+{
+ GedaListClass *klass = GEDA_LIST_CLASS( g_class );
+ GObjectClass *gobject_class = G_OBJECT_CLASS( klass );
+ geda_list_parent_class = g_type_class_peek_parent( klass );
+
+ gobject_class->finalize = geda_list_finalize;
+
+ geda_list_signals[ CHANGED ] =
+ g_signal_new ("changed",
+ G_OBJECT_CLASS_TYPE( gobject_class ),
+ 0 /*signal_flags */,
+ 0 /*class_offset */,
+ NULL, /* accumulator */
+ NULL, /* accu_data */
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0 /* n_params */
+ );
+}
+
+
+/*! \brief Function to retrieve GedaList's GType identifier.
+ *
+ * \par Function Description
+ * Function to retrieve GedaList's GType identifier.
+ * Upon first call, this registers the GedaList in the GType system.
+ * Subsequently it returns the saved value from its first execution.
+ *
+ * \return the GType identifier associated with GedaList.
+ */
+GType geda_list_get_type(void)
+{
+ static GType type = 0;
+ if (type == 0) {
+ static const GTypeInfo info = {
+ sizeof (GedaListClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ geda_list_class_init, /* class_init */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GedaList),
+ 0, /* n_preallocs */
+ geda_list_instance_init /* instance_init */
+ };
+ type = g_type_register_static (G_TYPE_OBJECT, "GedaList", &info, 0);
+ }
+ return type;
+}
+
+
+/*! \brief Returns a pointer to a new GedaList object.
+ *
+ * \par Function Description
+ * Returns a pointer to a new GedaList object.
+ *
+ * \return pointer to the new GedaList object.
+ */
+GedaList *geda_list_new( void ) {
+ return g_object_new( GEDA_TYPE_LIST, NULL );
+}
+
+
+/*! \brief Adds the given item to the GedaList
+ *
+ * \par Function Description
+ * Adds the given item to the GedaList
+ *
+ * \param [in] list Pointer to the GedaList
+ * \param [in] item item to add to the GedaList.
+ */
+void geda_list_add( GedaList *list, gpointer item )
+{
+ list->glist = g_list_append(list->glist, item );
+ g_signal_emit( list, geda_list_signals[ CHANGED ], 0 );
+}
+
+
+/*! \brief Adds the given glist of items to the GedaList
+ *
+ * \par Function Description
+ * Adds the given glist of items to the GedaList
+ * A copy is made, so the original GList is not modified.
+ *
+ * \param [in] list Pointer to the GedaList
+ * \param [in] items GList of items to add to the GedaList.
+ */
+void geda_list_add_glist( GedaList *list, GList *items )
+{
+ GList *glist_copy = g_list_copy( items );
+ list->glist = g_list_concat(list->glist, glist_copy );
+ g_signal_emit( list, geda_list_signals[ CHANGED ], 0 );
+}
+
+
+/*! \brief Removes the given item from the GedaList
+ *
+ * \par Function Description
+ * Removes the given item from the GedaList.
+ * It's ok to call this function with an item which
+ * is not necessarily in the list.
+ *
+ * \param [in] list Pointer to the GedaList
+ * \param [in] item to remove from the GedaList.
+ */
+void geda_list_remove( GedaList *list, gpointer item )
+{
+ if (g_list_find(list->glist, item) == NULL)
+ return;
+
+ list->glist = g_list_remove(list->glist, item);
+ g_signal_emit( list, geda_list_signals[ CHANGED ], 0 );
+}
+
+
+/*! \brief Removes all the items in the given GedaList.
+ *
+ * \par Function Description
+ * Removes all items in the given GedaList.
+ *
+ * \param [in] list Pointer to the GedaList
+ */
+void geda_list_remove_all( GedaList *list )
+{
+ g_list_free(list->glist);
+ list->glist = NULL;
+ g_signal_emit( list, geda_list_signals[ CHANGED ], 0 );
+}
+
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 065b59e..7948348 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -329,7 +329,7 @@ OBJECT *o_complex_add_by_name(TOPLEVEL *w_current, OBJECT *object_list,
const CLibSymbol *sym;
GList *symlist;
- symlist = s_clib_glob (basename);
+ symlist = s_clib_search (basename, CLIB_EXACT);
if (symlist == NULL) {
s_log_message("Component [%s] was not found in any component library\n",
diff --git a/libgeda/src/o_embed.c b/libgeda/src/o_embed.c
index b635900..74cae6a 100644
--- a/libgeda/src/o_embed.c
+++ b/libgeda/src/o_embed.c
@@ -96,7 +96,7 @@ void o_unembed(TOPLEVEL *w_current, OBJECT *o_current)
{
/* search for the symbol in the library */
- symlist = s_clib_glob (o_current->complex_basename);
+ symlist = s_clib_search (o_current->complex_basename, CLIB_EXACT);
if (!symlist) {
/* symbol not found in the symbol library: signal an error */
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index b7a19a5..620fa61 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -640,7 +640,7 @@ int o_net_consolidate_segments(TOPLEVEL *w_current, OBJECT *object)
OBJECT *other_object;
int changed = 0;
int reselect_new=FALSE;
-
+
if (object == NULL) {
return(0);
}
@@ -663,7 +663,7 @@ int o_net_consolidate_segments(TOPLEVEL *w_current, OBJECT *object)
if (other_object != NULL && conn->type == CONN_ENDPOINT &&
conn->other_whichone != -1 && conn->whichone != -1 &&
o_net_consolidate_nomidpoint(object, conn->x, conn->y) ) {
-
+
if (other_object->type == OBJ_NET) {
other_orient = o_net_orientation(other_object);
@@ -673,26 +673,24 @@ int o_net_consolidate_segments(TOPLEVEL *w_current, OBJECT *object)
object->sid != other_object->sid &&
other_orient != NEITHER) {
-#if DEBUG
+#if DEBUG
printf("consolidating %s to %s\n", object->name, other_object->name);
-#endif
-
+#endif
+
o_net_consolidate_lowlevel(object, other_object, other_orient);
changed++;
if (other_object->selected == TRUE ) {
- o_selection_remove(&(w_current->page_current->selection_list),
- other_object);
+ o_selection_remove( w_current->page_current->selection_list, other_object );
reselect_new=TRUE;
}
if (reselect_new == TRUE) {
- o_selection_remove(&(w_current->page_current->selection_list),
- object);
- o_selection_add(&(w_current->page_current->selection_list),
- object);
+#warning THIS IS A REDRAW HACK?
+ o_selection_remove( w_current->page_current->selection_list, object );
+ o_selection_add( w_current->page_current->selection_list, object );
}
-
+
s_conn_remove(w_current, other_object);
s_delete(w_current, other_object);
o_net_recalc(w_current, object);
diff --git a/libgeda/src/o_selection.c b/libgeda/src/o_selection.c
index c924519..f563f65 100644
--- a/libgeda/src/o_selection.c
+++ b/libgeda/src/o_selection.c
@@ -40,46 +40,92 @@
#include "o_types.h"
#include "colors.h"
+#include "geda_list.h"
+
#include "../include/prototype.h"
#ifdef HAVE_LIBDMALLOC
#include <dmalloc.h>
#endif
+/*! \brief Returns a pointer to a new SELECTION object.
+ * \par Returns a pointer to a new SELECTION object.
+ * \return pointer to the new SELECTION object.
+ */
+SELECTION *o_selection_new( void )
+{
+ return (SELECTION*)geda_list_new();
+}
+
/*! \brief Selects the given object and adds it to the selection list
* \par Selects the given object and does the needed work to make the
* object visually selected.
- * \param [in] head Pointer to the selection list
+ * \param [in] selection Pointer to the selection list
* \param [in] o_selected Object to select.
*/
-void o_selection_add(GList **head, OBJECT *o_selected)
+void o_selection_add(SELECTION *selection, OBJECT *o_selected)
+{
+ o_selection_select( o_selected, SELECT_COLOR );
+ geda_list_add( (GedaList *)selection, o_selected );
+}
+
+/*! \brief Removes the given object from the selection list
+ * \par Removes the given object from the selection list and does the
+ * needed work to make the object visually unselected.
+ * It's ok to call this function with an object which is not necessarily
+ * selected.
+ * \param [in] selection Pointer to the selection list
+ * \param [in] o_selected Object to unselect and remove from the list.
+ */
+void o_selection_remove(SELECTION *selection, OBJECT *o_selected )
{
- o_selection_select(o_selected, SELECT_COLOR);
- *head = g_list_append(*head, o_selected);
+ if (o_selected == NULL) {
+ fprintf(stderr, "Got NULL for o_selected in o_selection_remove\n");
+ return;
+ }
+ o_selection_unselect( o_selected );
+ geda_list_remove( (GedaList *)selection, o_selected );
+}
+
+/*! \brief Unselects all the objects in the given list.
+ * \par Unselects all objects in the given list, does the
+ * needed work to make the objects visually unselected, and redraw them.
+ * \param [in] w_current TOPLEVEL struct.
+ * \param [in] head Pointer to the selection list
+ */
+void o_selection_unselect_list(TOPLEVEL *w_current, SELECTION *selection)
+{
+ const GList *list = geda_list_get_glist( selection );
+
+ while ( list != NULL ) {
+ o_selection_unselect( (OBJECT *)list->data );
+ o_redraw_single( w_current, (OBJECT *)list->data );
+ list = g_list_next( list );
+ }
+
+ geda_list_remove_all( (GedaList *)selection );
}
/*! \brief Prints the given selection list.
* \par Prints the given selection list.
- * \param [in] head Pointer to selection list to print.
+ * \param [in] selection Pointer to selection list to print.
*
*/
-void o_selection_print_all(const GList **head)
+void o_selection_print_all(const SELECTION *selection)
{
const GList *s_current;
- s_current = *head;
+ s_current = geda_list_get_glist( selection );
printf("START printing selection ********************\n");
while(s_current != NULL) {
if (s_current->data) {
- printf("Selected object: %d\n",
- ( (OBJECT *) s_current->data)->sid);
+ printf("Selected object: %d\n", ((OBJECT *)s_current->data)->sid );
}
s_current = s_current->next;
}
printf("DONE printing selection ********************\n");
printf("\n");
-
}
/*! \brief Selects the given object.
@@ -141,45 +187,3 @@ void o_selection_unselect(OBJECT *object)
object->saved_color = -1;
}
-/*! \brief Removes the given object from the selection list
- * \par Removes the given object from the selection list and does the
- * needed work to make the object visually unselected.
- * It's ok to call this function with an object which is not necessarily
- * selected.
- * \param [in] head Pointer to the selection list
- * \param [in] o_selected Object to unselect and remove from the list.
- */
-void
-o_selection_remove(GList **head, OBJECT *o_selected)
-{
- if (o_selected == NULL) {
- fprintf(stderr, "Got NULL for o_selected in o_selection_remove\n");
- return;
- }
-
- if (g_list_find(*head, o_selected) != NULL) {
- o_selection_unselect(o_selected);
- *head = g_list_remove(*head, o_selected);
- }
-}
-
-/*! \brief Unselects all the objects in the given list.
- * \par Unselects all objects in the given list, does the
- * needed work to make the objects visually unselected, and redraw them.
- * \param [in] w_current TOPLEVEL struct.
- * \param [in] head Pointer to the selection list
- */
-void
-o_selection_unselect_list(TOPLEVEL *w_current, GList **head)
-{
- GList *list = *head;
-
- while (list != NULL) {
- o_selection_unselect((OBJECT *) list->data);
- o_redraw_single(w_current, (OBJECT *) list->data);
- list = list->next;
- }
-
- g_list_free(*head);
- *head = NULL;
-}
diff --git a/libgeda/src/s_clib.c b/libgeda/src/s_clib.c
index ed42d99..a25e709 100644
--- a/libgeda/src/s_clib.c
+++ b/libgeda/src/s_clib.c
@@ -64,7 +64,7 @@
* -# Do not use whitespace, or any of the characters "<tt>/:!*?</tt>".
* -# Try to use unique names.
*
- * The component database may be queried using s_clib_glob(). A
+ * The component database may be queried using s_clib_search(). A
* null-terminated buffer containing symbol data (suitable for
* loading using o_read_buffer()) may be obtained using
* s_clib_symbol_get_data(). If an exact symbol name is known, the
@@ -217,10 +217,12 @@ struct _CLibSymbol {
/*! Holds the list of all known component sources */
static GList *clib_sources = NULL;
+/*! Caches results of s_clib_search() */
+static GHashTable *clib_cache = NULL;
+
/* Local static functions
* ======================
*/
-
static void free_symbol (gpointer data, gpointer user_data);
static void free_source (gpointer data, gpointer user_data);
static gint compare_source_name (gconstpointer a, gconstpointer b);
@@ -247,6 +249,15 @@ void s_clib_init ()
if (clib_sources != NULL) {
s_clib_free ();
}
+
+ if (clib_cache != NULL) {
+ s_clib_flush_cache();
+ } else {
+ clib_cache = g_hash_table_new_full ((GHashFunc) g_str_hash,
+ (GEqualFunc)g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_list_free);
+ }
}
/*! \brief Iterator callback for freeing a symbol.
@@ -539,6 +550,8 @@ static void refresh_directory (CLibSource *source)
/* Now sort the list of symbols by name. */
source->symbols = g_list_sort (source->symbols,
(GCompareFunc) compare_symbol_name);
+
+ s_clib_flush_cache();
}
/*! \brief Re-poll a library command for symbols.
@@ -603,6 +616,8 @@ static void refresh_command (CLibSource *source)
/* Sort all symbols by name. */
source->symbols = g_list_sort (source->symbols,
(GCompareFunc) compare_symbol_name);
+
+ s_clib_flush_cache();
}
/*! \brief Re-poll a scheme procedure for symbols.
@@ -656,6 +671,8 @@ static void refresh_scm (CLibSource *source)
/* Now sort the list of symbols by name. */
source->symbols = g_list_sort (source->symbols,
(GCompareFunc) compare_symbol_name);
+
+ s_clib_flush_cache();
}
/*! \brief Rescan all available component libraries.
@@ -1074,10 +1091,16 @@ gchar *s_clib_symbol_get_data (const CLibSymbol *symbol)
}
-/*! \brief Find all symbols matching a glob pattern. \par Function
- * Description Searches the library, returning all symbols whose
- * names match \a glob (see the GLib documentation for details of the
- * glob syntax applicable).
+/*! \brief Find all symbols matching a pattern.
+ *
+ * \par Function Description
+ * Searches the library, returning all symbols whose
+ * names match \a pattern.
+ *
+ * Two search modes are available: \b CLIB_EXACT, where \a pattern is
+ * compared to the symbol name using strcmp(), and \b CLIB_GLOB,
+ * where \a pattern is assumed to be a glob pattern (see the GLib
+ * documentation for details of the glob syntax applicable).
*
* \warning The #CLibSymbol instances in the \b GList returned belong
* to the component library, and should be considered constants; they
@@ -1086,21 +1109,47 @@ gchar *s_clib_symbol_get_data (const CLibSymbol *symbol)
* needed. Note that the values returned will be invalidated by a
* call to s_clib_free() or s_clib_refresh().
*
- * \param glob The glob pattern to match against.
+ * \param pattern The pattern to match against.
+ * \param mode The search mode to use.
* \return A \b GList of matching #CLibSymbol structures.
*/
-GList *s_clib_glob (const gchar *glob)
+GList *s_clib_search (const gchar *pattern, const CLibSearchMode mode)
{
GList *sourcelist;
GList *symlist;
GList *result = NULL;
CLibSource *source;
CLibSymbol *symbol;
- GPatternSpec *pattern;
+ GPatternSpec *globpattern = NULL;
+ gchar *key;
+ gchar keytype;
- if (glob == NULL) return NULL;
+ if (pattern == NULL) return NULL;
- pattern = g_pattern_spec_new(glob);
+ /* Use different cache keys depending on what sort of search is being done */
+ switch (mode)
+ {
+ case CLIB_GLOB:
+ keytype = 'g';
+ break;
+ case CLIB_EXACT:
+ keytype = 's';
+ break;
+ default:
+ g_assert_not_reached();
+ }
+ key = g_strdup_printf("%c%s", keytype, pattern);
+
+ /* Check to see if the query is already in the cache */
+ result = (GList *) g_hash_table_lookup (clib_cache, key);
+ if (result != NULL) {
+ g_free (key);
+ return g_list_copy (result);
+ }
+
+ if (mode == CLIB_GLOB) {
+ globpattern = g_pattern_spec_new(pattern);
+ }
for (sourcelist = clib_sources;
sourcelist != NULL;
@@ -1114,21 +1163,46 @@ GList *s_clib_glob (const gchar *glob)
symbol = (CLibSymbol *) symlist->data;
- if (g_pattern_match_string (pattern, symbol->name)) {
- result = g_list_prepend (result, symbol);
- }
-
+ switch (mode)
+ {
+ case CLIB_EXACT:
+ if (strcmp (pattern, symbol->name) == 0) {
+ result = g_list_prepend (result, symbol);
+ }
+ break;
+ case CLIB_GLOB:
+ if (g_pattern_match_string (globpattern, symbol->name)) {
+ result = g_list_prepend (result, symbol);
+ }
+ break;
+ }
}
-
}
result = g_list_reverse (result);
- g_pattern_spec_free (pattern);
+ if (globpattern != NULL) {
+ g_pattern_spec_free (globpattern);
+ }
+
+ g_hash_table_insert (clib_cache, key, g_list_copy (result));
+ /* __don't__ free key here, it's stored by the hash table! */
return result;
}
+
+/*! \brief Flush the symbol name lookup cache.
+ * \par Function Description
+ * Clears the hashtable which caches the results of s_clib_search().
+ * You shouldn't ever need to call this, as all functions which
+ * invalidate the cache are supposed to make sure it's flushed.
+ */
+void s_clib_flush_cache ()
+{
+ g_hash_table_remove_all (clib_cache);
+}
+
/*! \brief Get symbol data for a given symbol name.
* \par Function Description
* Return the data for the first symbol found with the given name.
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index ec1d625..3ee0588 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -100,7 +100,7 @@ PAGE *s_page_new (TOPLEVEL *toplevel, const gchar *filename)
page->object_head->type = OBJ_HEAD;
/* new selection mechanism */
- page->selection_list = NULL;
+ page->selection_list = o_selection_new();
/* net/pin/bus stretch when doing moves */
page->stretch_head = page->stretch_tail = s_stretch_new_head();
@@ -166,7 +166,6 @@ void s_page_delete (TOPLEVEL *toplevel, PAGE *page)
gchar *real_filename;
gchar *only_filename;
gchar *dirname;
- int redraw_status=toplevel->DONT_REDRAW;
g_assert (page->pid != -1);
@@ -209,21 +208,19 @@ void s_page_delete (TOPLEVEL *toplevel, PAGE *page)
}
g_free(real_filename);
- /* first unselect the objects, without redrawing them */
- toplevel->DONT_REDRAW = 1;
- o_selection_unselect_list(toplevel, &(page->selection_list));
- toplevel->DONT_REDRAW = redraw_status;
+ /* Free the selection object */
+ g_object_unref( page->selection_list );
/* then delete objects of page */
s_delete_list_fromstart (toplevel, page->object_head);
-
+
toplevel->REMOVING_SEL = 1;
/* The complex place list contain a reference to the objects in the page */
/* So don't free the objects there. */
g_list_free (page->complex_place_list);
page->complex_place_list = NULL;
s_delete_list_fromstart (toplevel, page->attrib_place_head);
- toplevel->REMOVING_SEL = 0;
+ toplevel->REMOVING_SEL = 0;
#if DEBUG
printf("Freeing page: %s\n", page->page_filename);
diff --git a/symbols/Makefile.am b/symbols/Makefile.am
index 6a12a3f..b93b25f 100644
--- a/symbols/Makefile.am
+++ b/symbols/Makefile.am
@@ -6,8 +6,8 @@ SUBDIRS = \
opto diode relay vhdl power philips transistor switcap cascade \
asic asicpads gnetman minicircuits st apex allegro irf documentation
-rcdatadir = @GEDARCDIR@
-rcdata_DATA = system-gafrc
+scmdatadir = @GEDADATADIR@@PATHSEP@scheme
+scmdata_DATA = geda-clib.scm geda-font.scm
EXTRA_DIST = autogen.sh
diff --git a/symbols/configure.ac b/symbols/configure.ac
index 881bd0f..3101c2d 100644
--- a/symbols/configure.ac
+++ b/symbols/configure.ac
@@ -231,8 +231,7 @@ AC_CONFIG_FILES([
apex/Makefile
allegro/Makefile
irf/Makefile
- documentation/Makefile
- system-gafrc ])
+ documentation/Makefile ])
AC_OUTPUT
diff --git a/symbols/geda-clib.scm b/symbols/geda-clib.scm
new file mode 100644
index 0000000..e3b33a5
--- /dev/null
+++ b/symbols/geda-clib.scm
@@ -0,0 +1,62 @@
+; -*-Scheme-*-
+;;;
+;;; Add the default component libraries
+;;;
+
+(define geda-sym-path (build-path geda-data-path "sym"))
+
+; NOTE: Some of the below component libraries below are commented out.
+; This was done because there are conflicting filenames within these
+; libraries.
+(for-each
+ (lambda (dir)
+ (component-library (build-path geda-sym-path dir)))
+'(
+ "74"
+ "4000"
+ "IEC417"
+ "amphenol"
+ "analog"
+ "linear"
+ "altera"
+ "lattice"
+ "xilinx"
+ "idt"
+ "misc"
+ "power"
+ "philips"
+ "minicircuits"
+ "st"
+ "apex"
+ "allegro"
+ "irf"
+ "transistor"
+ "io"
+ "titleblock"
+ "memory"
+ "micro"
+ "maxim"
+ "national"
+ "radio"
+ "tube"
+ "connector"
+ "switch"
+ "switcap"
+ ;"verilog"
+ ;"vhdl"
+ "spice"
+ "rf"
+ "bus"
+ "pla"
+ "ecl"
+ "dec"
+ "supervisor"
+ "opto"
+ "diode"
+ "relay"
+ "cascade"
+ "asic"
+ "asicpads"
+ ;"gnetman"
+ "local"
+ ))
diff --git a/symbols/geda-font.scm b/symbols/geda-font.scm
new file mode 100644
index 0000000..6bcef71
--- /dev/null
+++ b/symbols/geda-font.scm
@@ -0,0 +1,130 @@
+; -*-Scheme-*-
+;;;
+;;; Define the default gaf font
+;;;
+
+(define geda-font-path (build-path geda-data-path "sym" "font"))
+(font-directory geda-font-path)
+
+(for-each
+ (lambda (fontmap)
+ (map-font-character-to-file
+ (car fontmap)
+ (build-path geda-font-path (cdr fontmap))))
+ '(
+ (" " . "space.sym")
+ ("\n" . "newline.sym")
+ ("!" . "excl.sym")
+ ("," . "comma.sym")
+ ("(" . "lparen.sym")
+ (")" . "lparen.sym")
+ ("-" . "minus.sym")
+ ("+" . "plus.sym")
+ ("#" . "pound.sym")
+ ("?" . "quest.sym")
+ ("\"" . "quote.sym")
+ (":" . "colon.sym")
+ ("@" . "at.sym")
+ ("=" . "equal.sym")
+ (">" . "more.sym")
+ ("<" . "less.sym")
+ ("/" . "slash.sym")
+ ("$" . "dollar.sym")
+ (";" . "semi.sym")
+ ("&" . "amper.sym")
+ ("\\" . "backslash.sym")
+ ("{" . "lbrace.sym")
+ ("}" . "rbrace.sym")
+ ("'" . "apost.sym")
+ ("`" . "backtick.sym")
+ ("^" . "caret.sym")
+ ("%" . "percent.sym")
+ ("[" . "lbrack.sym")
+ ("]" . "rbrack.sym")
+ ("*" . "astericks.sym")
+ (". " . "period.sym")
+ ("_" . "under.sym")
+ ("~" . "tilde.sym")
+ ("|" . "vbar.sym")
+
+ ;; A-umlaut finnish/swedish/german
+ ("Ã?" . "A-diaeresis.sym")
+ ;; A-ring finnish/swedish/danish/norwegian
+ ("Ã?" . "A-ring.sym")
+ ;; AE-diphtong danish/norwegian
+ ("Ã?" . "AE-lig.sym")
+ ;; O-umlaut finnish/swedish/german
+ ("Ã?" . "O-diaeresis.sym")
+ ;; O-double_acute_accent hungarian
+ ("Å?" . "O-double-acute-accent.sym")
+ ;; O-slash danish/norwegian
+ ("Ã?" . "O-slash.sym")
+ ;; U-umlaut german
+ ("Ã?" . "U-diaeresis.sym")
+ ;; U-double_acute_accent hungarian
+ ("Å°" . "U-double-acute-accent.sym")
+ ;; a-umlaut finnish/swedish/german
+ ("ä" . "a_-diaeresis.sym")
+ ;; a-ring finnish/swedish/danish/norwegian
+ ("Ã¥" . "a_-ring.sym")
+ ;; ae-diphtong danish/norwegian
+ ("æ" . "ae_-lig.sym")
+ ;; o-umlaut finnish/swedish/german
+ ("ö" . "o_-diaeresis.sym")
+ ;; o-double_acute_accent hungarian
+ ("Å?" . "o_-double-acute-accent.sym")
+ ;; o-slash danish/norwegian
+ ("ø" . "o_-slash.sym")
+ ;; u-umlaut german
+ ("ü" . "u_-diaeresis.sym")
+ ;; u-double_acute_accent hungarian
+ ("ű" . "u_-double-acute-accent.sym")
+ ;; a-acute_accent spanish
+ ("á" . "a_-acute-accent.sym")
+ ;; e-acute_accent spanish
+ ("é" . "e_-acute-accent.sym")
+ ;; i-acute_accent spanish
+ ("Ã" . "i_-acute-accent.sym")
+ ;; o-acute_accent spanish
+ ("ó" . "o_-acute-accent.sym")
+ ;; u-acute_accent spanish
+ ("ú" . "u_-acute-accent.sym")
+ ;; A-acute_accent spanish
+ ("Ã?" . "A-acute-accent.sym")
+ ;; E-acute_accent spanish
+ ("Ã?" . "E-acute-accent.sym")
+ ;; I-acute_accent spanish
+ ("Ã?" . "I-acute-accent.sym")
+ ;; O-acute_accent spanish
+ ("Ã?" . "O-acute-accent.sym")
+ ;; U-acute_accent spanish
+ ("Ã?" . "U-acute-accent.sym")
+ ;; n-tilde spanish
+ ("ñ" . "n_-tilde.sym")
+ ;; N-tilde spanish
+ ("Ã?" . "N-tilde.sym")
+ ;; open exclamation spanish
+ ("¡" . "excl-open.sym")
+ ;; open question spanish
+ ("¿" . "quest-open.sym")
+ ;;
+ ("Ä?" . "a_-ogonek.sym")
+ ("Ä?" . "A-ogonek.sym")
+ ("Ä?" . "c_-acute-accent.sym")
+ ("Ä?" . "C-acute-accent.sym")
+ ("Ä?" . "e_-ogonek.sym")
+ ("Ä?" . "E-ogonek.sym")
+ ("Å?" . "l_-slash.sym")
+ ("Å?" . "L-slash.sym")
+ ("Å?" . "n_-acute-accent.sym")
+ ("Å?" . "N-acute-accent.sym")
+ ("Å?" . "s_-acute-accent.sym")
+ ("Å?" . "S-acute-accent.sym")
+ ("ź" . "z_-acute-accent.sym")
+ ("Ź" . "Z-acute-accent.sym")
+ ("ż" . "z_-dot.sym")
+ ("Å»" . "Z-dot.sym")
+ ;; small mu character greek
+ ("µ" . "mu_.sym")
+ ("Ω" . "Omega.sym")
+ ))
diff --git a/symbols/system-gafrc.in b/symbols/system-gafrc.in
deleted file mode 100644
index e00755c..0000000
--- a/symbols/system-gafrc.in
+++ /dev/null
@@ -1,337 +0,0 @@
-
-;
-; Common init file for gEDA
-;
-
-;
-; Start of path related keywords
-;
-
-; component-library string
-; Specify where components exist.
-; The string after this keyword should be a valid directory name.
-; You should have read access to this directory and all the files inside
-; the directory.
-; The order of the component-library keywords determines the order they
-; are displayed, but they are searched *backwards*, ie last one in this list
-; is searched *first*.
-; All environment variables *MUST* be in the form ${variable_name}
-;
-; NOTE: Some of the below component libraries below are commented out.
-; This was done because there are conflicting filenames within these
-; libraries. Please see Jitterbug #9 on this gEDA/gaf limitation.
-; It will be fixed soon. AVH 01/04/2004
-;
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@74")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@4000")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@IEC417")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@amphenol")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@analog")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@linear")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@altera")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@lattice")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@xilinx")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@idt")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@misc")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@power")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@philips")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@minicircuits")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@st")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@apex")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@allegro")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@irf")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@transistor")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@io")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@titleblock")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@memory")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@micro")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@maxim")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@national")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@radio")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@tube")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@connector")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@switch")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@switcap")
-;(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@verilog")
-;(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@vhdl")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@spice")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@rf")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@bus")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@pla")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@ecl")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@dec")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@supervisor")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@opto")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@diode")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@relay")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@cascade")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@asic")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@asicpads")
-;(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@gnetman")
-(component-library "${GEDADATA}@PATHSEP@sym@PATHSEP@local")
-
-; component-library-search atring
-;
-; Specifies the directory where other component libraries can be found
-; The string after this keyword should be a valid directory name.
-; You should have read access to this directory and all the files inside
-; the directory.
-; The order of the component libraries found within the specified directory
-; is in inode order. The libraries found using this keyword will be searched
-; *before* the component libraries specified above.
-; All environment variables *MUST* be in the form ${variable_name}
-;
-; This is commented out since it will add in the above commented out
-; component libraries automatically and this will most certainly cause
-; schematics to break. AVH 01/04/2004
-;
-;(component-library-search "${GEDADATA}@PATHSEP@sym")
-
-; source-library string
-; Specify where source entities exist.
-; The string after this keyword should be a valid directory name.
-; You should have read access to this directory and all the files inside
-; the directory.
-; The order of the source-library keywords determines the order they
-; are displayed, but they are searched *backwards*, ie last one in this list
-; is searched *first*.
-; All environment variables *MUST* be in the form ${variable_name}
-;
-; Example:
-;(source-library "${HOME}@PATHSEP@projects@PATHSEP@my_schematics")
-
-; source-library-search atring
-;
-; Specifies the directory where other source libraries can be found
-; The string after this keyword should be a valid directory name.
-; You should have read access to this directory and all the files inside
-; the directory.
-; The order of the source libraries found within the specified directory
-; is in inode order. The libraries found using this keyword will be searched
-; *before* the source libraries specified above.
-; All environment variables *MUST* be in the form ${variable_name}
-;
-; Example:
-;(source-library-search "${HOME}@PATHSEP@projects@PATHSEP@my_schematics")
-
-; font-directory string
-; Specifies where the vector font definitions are stored.
-; You should have read access to this directory and all the files inside
-; the directory.
-; All environment variables *MUST* be in the form ${variable_name}
-;
-(define default-font-directory "${GEDADATA}@PATHSEP@sym@PATHSEP@font")
-(font-directory default-font-directory)
-
-
-; scheme-directory string
-; Specifies where the supporting scheme lives
-; You should have read access to this directory and all the files inside
-; the directory.
-; All environment variables *MUST* be in the form ${variable_name}
-;
-(scheme-directory "${GEDADATA}@PATHSEP@scheme")
-
-
-; bitmap-directory string
-; Specifies where the supporting bitmaps live
-; You should have read access to this directory and all the files inside
-; the directory.
-; All environment variables *MUST* be in the form ${variable_name}
-;
-(bitmap-directory "${GEDADATA}@PATHSEP@bitmap")
-
-
-; postscript-prolog
-;
-; Sets the name of the postscript prolog file that will be
-; pasted into the postscript output after the DSC comments, but
-; before the main script.
-(postscript-prolog "${GEDADATA}@PATHSEP@prolog.ps")
-
-
-
-
-;
-; End of path related keywords
-;
-
-;
-; Start of font related keywords
-;
-
-(map-font-character-to-file " " (string-append default-font-directory "@PATHSEP@"
- "space.sym"))
-
-(map-font-character-to-file "\n" (string-append default-font-directory "/"
- "newline.sym"))
-
-(map-font-character-to-file "!" (string-append default-font-directory "@PATHSEP@"
- "excl.sym"))
-(map-font-character-to-file "," (string-append default-font-directory "@PATHSEP@"
- "comma.sym"))
-(map-font-character-to-file "(" (string-append default-font-directory "@PATHSEP@"
- "lparen.sym"))
-(map-font-character-to-file ")" (string-append default-font-directory "@PATHSEP@"
- "rparen.sym"))
-(map-font-character-to-file "-" (string-append default-font-directory "@PATHSEP@"
- "minus.sym"))
-(map-font-character-to-file "+" (string-append default-font-directory "@PATHSEP@"
- "plus.sym"))
-(map-font-character-to-file "#" (string-append default-font-directory "@PATHSEP@"
- "pound.sym"))
-(map-font-character-to-file "?" (string-append default-font-directory "@PATHSEP@"
- "quest.sym"))
-(map-font-character-to-file "\"" (string-append default-font-directory "@PATHSEP@"
- "quote.sym"))
-(map-font-character-to-file ":" (string-append default-font-directory "@PATHSEP@"
- "colon.sym"))
-(map-font-character-to-file "@" (string-append default-font-directory "@PATHSEP@"
- "at.sym"))
-(map-font-character-to-file "=" (string-append default-font-directory "@PATHSEP@"
- "equal.sym"))
-(map-font-character-to-file ">" (string-append default-font-directory "@PATHSEP@"
- "more.sym"))
-(map-font-character-to-file "<" (string-append default-font-directory "@PATHSEP@"
- "less.sym"))
-(map-font-character-to-file "/" (string-append default-font-directory "@PATHSEP@"
- "slash.sym"))
-(map-font-character-to-file "$" (string-append default-font-directory "@PATHSEP@"
- "dollar.sym"))
-(map-font-character-to-file ";" (string-append default-font-directory "@PATHSEP@"
- "semi.sym"))
-(map-font-character-to-file "&" (string-append default-font-directory "@PATHSEP@"
- "amper.sym"))
-(map-font-character-to-file "\\" (string-append default-font-directory "@PATHSEP@"
- "backslash.sym"))
-(map-font-character-to-file "{" (string-append default-font-directory "@PATHSEP@"
- "lbrace.sym"))
-(map-font-character-to-file "}" (string-append default-font-directory "@PATHSEP@"
- "rbrace.sym"))
-(map-font-character-to-file "'" (string-append default-font-directory "@PATHSEP@"
- "apost.sym"))
-(map-font-character-to-file "`" (string-append default-font-directory "@PATHSEP@"
- "backtick.sym"))
-(map-font-character-to-file "^" (string-append default-font-directory "@PATHSEP@"
- "caret.sym"))
-(map-font-character-to-file "%" (string-append default-font-directory "@PATHSEP@"
- "percent.sym"))
-(map-font-character-to-file "[" (string-append default-font-directory "@PATHSEP@"
- "lbrack.sym"))
-(map-font-character-to-file "]" (string-append default-font-directory "@PATHSEP@"
- "rbrack.sym"))
-(map-font-character-to-file "*" (string-append default-font-directory "@PATHSEP@"
- "astericks.sym"))
-(map-font-character-to-file "." (string-append default-font-directory "@PATHSEP@"
- "period.sym"))
-(map-font-character-to-file "_" (string-append default-font-directory "@PATHSEP@"
- "under.sym"))
-(map-font-character-to-file "~" (string-append default-font-directory "@PATHSEP@"
- "tilde.sym"))
-(map-font-character-to-file "|" (string-append default-font-directory "@PATHSEP@"
- "vbar.sym"))
-
-(let ((dir (string-append default-font-directory "@PATHSEP@")))
- (for-each
- (lambda (c)
- (map-font-character-to-file (car c) (string-append dir (cdr c))))
- '(
- ;; A-umlaut finnish/swedish/german
- ("Ã?" . "A-diaeresis.sym")
- ;; A-ring finnish/swedish/danish/norwegian
- ("Ã?" . "A-ring.sym")
- ;; AE-diphtong danish/norwegian
- ("Ã?" . "AE-lig.sym")
- ;; O-umlaut finnish/swedish/german
- ("Ã?" . "O-diaeresis.sym")
- ;; O-double_acute_accent hungarian
- ("Å?" . "O-double-acute-accent.sym")
- ;; O-slash danish/norwegian
- ("Ã?" . "O-slash.sym")
- ;; U-umlaut german
- ("Ã?" . "U-diaeresis.sym")
- ;; U-double_acute_accent hungarian
- ("Å°" . "U-double-acute-accent.sym")
- ;; a-umlaut finnish/swedish/german
- ("ä" . "a_-diaeresis.sym")
- ;; a-ring finnish/swedish/danish/norwegian
- ("Ã¥" . "a_-ring.sym")
- ;; ae-diphtong danish/norwegian
- ("æ" . "ae_-lig.sym")
- ;; o-umlaut finnish/swedish/german
- ("ö" . "o_-diaeresis.sym")
- ;; o-double_acute_accent hungarian
- ("Å?" . "o_-double-acute-accent.sym")
- ;; o-slash danish/norwegian
- ("ø" . "o_-slash.sym")
- ;; u-umlaut german
- ("ü" . "u_-diaeresis.sym")
- ;; u-double_acute_accent hungarian
- ("ű" . "u_-double-acute-accent.sym")
- ;; a-acute_accent spanish
- ("á" . "a_-acute-accent.sym")
- ;; e-acute_accent spanish
- ("é" . "e_-acute-accent.sym")
- ;; i-acute_accent spanish
- ("Ã" . "i_-acute-accent.sym")
- ;; o-acute_accent spanish
- ("ó" . "o_-acute-accent.sym")
- ;; u-acute_accent spanish
- ("ú" . "u_-acute-accent.sym")
- ;; A-acute_accent spanish
- ("Ã?" . "A-acute-accent.sym")
- ;; E-acute_accent spanish
- ("Ã?" . "E-acute-accent.sym")
- ;; I-acute_accent spanish
- ("Ã?" . "I-acute-accent.sym")
- ;; O-acute_accent spanish
- ("Ã?" . "O-acute-accent.sym")
- ;; U-acute_accent spanish
- ("Ã?" . "U-acute-accent.sym")
- ;; n-tilde spanish
- ("ñ" . "n_-tilde.sym")
- ;; N-tilde spanish
- ("Ã?" . "N-tilde.sym")
- ;; open exclamation spanish
- ("¡" . "excl-open.sym")
- ;; open question spanish
- ("¿" . "quest-open.sym")
- ;;
- ("Ä?" . "a_-ogonek.sym")
- ("Ä?" . "A-ogonek.sym")
- ("Ä?" . "c_-acute-accent.sym")
- ("Ä?" . "C-acute-accent.sym")
- ("Ä?" . "e_-ogonek.sym")
- ("Ä?" . "E-ogonek.sym")
- ("Å?" . "l_-slash.sym")
- ("Å?" . "L-slash.sym")
- ("Å?" . "n_-acute-accent.sym")
- ("Å?" . "N-acute-accent.sym")
- ("Å?" . "s_-acute-accent.sym")
- ("Å?" . "S-acute-accent.sym")
- ("ź" . "z_-acute-accent.sym")
- ("Ź" . "Z-acute-accent.sym")
- ("ż" . "z_-dot.sym")
- ("Å»" . "Z-dot.sym")
- ;; small mu character greek
- ("µ" . "mu_.sym")
- ("Ω" . "Omega.sym")
- )))
-
-;
-; End of font related keywords
-;
-
-;
-; Start of attribute promotion keywords
-;
-
-; always-promote-attributes string
-;
-; Contains a list of attributes that are always promoted regardless of
-; their visibility.
-(always-promote-attributes "footprint device value model-name")
-
-;
-; End of attribute promotion keywords
-;
New commits:
commit dd3f6d95cedda76090b17495eca01473707cc60b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 20 07:48:47 2007 -0400
change on branch
commit 3e6c9c72d19b089ab84b8a5ffa362c77fe863478
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 20 07:40:25 2007 -0400
test commit2
commit fea70afbdfa12197cbce3948b793c85021460919
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 20 07:39:42 2007 -0400
test commit
commit 79e654a77bc1ed298ff7af885826ab5d95b8fbbb
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 19:26:52 2007 -0400
Another test commit
commit 0591a76ebd1cc7a548f31f7189cff798be33e07d
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 19:23:30 2007 -0400
test commit for commit msg test
commit ab3ff9acac60add24c3e96fdc40f1d8cbf3f0204
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 19:17:27 2007 -0400
test commit
commit a4c1734dbed4a12202d0ed76affb4326ebd808ca
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:47:40 2007 -0400
test commit more hook testing
commit 1e400cb792498c6d9e4afb2f94da3facfe384874
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:44:41 2007 -0400
more testing
commit 82ecfc9595b7768556aca818b7b3dd13b448fad6
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:41:52 2007 -0400
test commit more hook testing
commit 7a268a956105cff8a8ba49879592757703359138
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:34:42 2007 -0400
test commit ooh more
commit 117ff6eb08c6057fcde95de4e27a59af805c66f1
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:31:57 2007 -0400
test
commit 412094a0b09ce843a779a65b3ba4bca310018dbb
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:29:00 2007 -0400
test commit
commit 8bf2b72e80da6466f55e079e758e1501c0dac17d
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:27:29 2007 -0400
test commit one of many
commit bdf9ba5bdd18800bad3a91958e8f741f3de93ca0
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:26:20 2007 -0400
test commit again
commit 263733f2f292de7ebe26bfa91ea36c6d3b0a28b8
Merge: 3cc39591f8c178ed9287d5181a004cae26402cd2 45bbc8db9c80fcd141bca23af64dc3c23ffb62ff
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:22:32 2007 -0400
Merge branch 'master' of ssh://git.gpleda.org/home/git/gaf
commit 3cc39591f8c178ed9287d5181a004cae26402cd2
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:21:08 2007 -0400
test commit now
commit 45bbc8db9c80fcd141bca23af64dc3c23ffb62ff
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:20:07 2007 -0400
test commit
commit ddc7c334f698fdc7a65e0ed78477e58a26e9d198
Merge: af437b309bf83920ac241f3a79db09377a0c2941 d2792b9c2fd1c16c22cd5d0af22f93c8a0714602
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:16:55 2007 -0400
Merge branch 'master' of ssh://git.gpleda.org/home/git/gaf
commit af437b309bf83920ac241f3a79db09377a0c2941
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 17:16:04 2007 -0400
test commit (for testing hooks)
commit d2792b9c2fd1c16c22cd5d0af22f93c8a0714602
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Fri Jun 15 09:05:53 2007 +0100
Make comp. library search faster and more flexible
Replace s_clib_glob() with s_clib_search(), which can operate in
either exact matching or glob matching mode. Use a hashtable to cache
the results of library searches. The hashtable is cleared every time
it is invalidated (for instance if a component source is added or
removed, or the component sources are rescanned).
commit 8813ffb337c5fb4187223f6f4f84e0ed83661448
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 17 16:52:30 2007 -0400
test commit with new git version
commit 07c116ac6470fa114ae814a7b36c7d9a3cba8124
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Jun 17 02:25:55 2007 +0100
Remove unused function e_gtk_button_new_with_icon() from x_pagesel.c
commit 1c2393af92fa64cd1392b907a5853de8ddc2d257
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Jun 17 02:25:54 2007 +0100
Split out update(s) when notify::toplevel on GschemDialog is recieved.
We need to perform various setup actions when the toplevel property of our
parent GschemDialog is set. We need to make this a specific function, as
the current method of just calling pagesel_update isn't correct for all
future cases.
commit a1ed86e70a9f1dc62e2ecdb54906aae8677c2d20
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Jun 17 02:25:54 2007 +0100
Change selection code to use a generic GedaList typecast to SELECTION.
GedaList allows various parts of the program to keep track of changes
to the selection via callbacks attached to the GedaList object.
commit 36792b39442b3bcdf8c82bb3e87905397ae25ac2
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sun Jun 17 02:25:53 2007 +0100
Added new GedaList class derived from GObject
This abstracts a GList with API for write access. Its main use is in list
change notification, as it emits a "changed" g_signal when modified.
Read only access to the underlying GList is provided by an accessor,
currenly implemented as a macro.
commit 750a79a6a93bc36c1b655ba25a39da22f49114de
Merge: 86fd794224752c7e66f64808778ba2f5625cbf5d bf62d75e90682478f7fa7fbdafa049fdfff88067
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Sat Jun 16 14:24:23 2007 +0200
Merge branch 'master' of ssh://werner@xxxxxxxxxxxxxx/home/git/gaf
commit bf62d75e90682478f7fa7fbdafa049fdfff88067
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Jun 16 09:24:45 2007 +0100
Revert commit a796e1b2a7702f208d48bae7724b85bf1124be1c.
This patch should not have been pushed to the main tree.
commit 3b4d020db2b2a4373a76346c6363ca5666c9d942
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Fri Jun 15 09:06:56 2007 +0100
Refactor system RC files
Moved system-gafrc into the libgeda package, where it belongs.
Removed all environment and configure substitutions. Created separate
font and component library setup scripts in the symbols package,
automatically loaded by system-gafrc if they exist. Updated
system-gschemrc to use new infrastructure.
commit b42a4b792da67467007db33ba9fe733e2a6b99ed
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Fri Jun 15 09:06:55 2007 +0100
Add infrastructure for installing Scheme files with libgeda.
commit 23acf706098a592e7ad634d294eea2d6bb799b5e
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Fri Jun 15 09:06:55 2007 +0100
Make libgeda define Guile variables for the gEDA data paths.
Add three variables from libgeda to the Guile environment:
geda-rc-path, geda-data-path, and path-sep.
commit a796e1b2a7702f208d48bae7724b85bf1124be1c
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Fri Jun 15 09:06:55 2007 +0100
Don't install symbols by default. Development patch, not for CVS.
commit 86fd794224752c7e66f64808778ba2f5625cbf5d
Author: Werner Hoch <werner.ho@xxxxxx>
Date: Sat Jun 16 09:13:44 2007 +0200
test file change
commit c40224f5dc6392a772f3fa93f92fbf3de4a6198a
Merge: 3fbd9a1207223f1f7140b2ed25c803daea733904 60db7b112c5cd25db78cc4e2c86f104163df48e8
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Thu Jun 14 21:33:55 2007 -0400
Merge branch 'master' of ssh://git.gpleda.org/home/git/gaf
commit 3fbd9a1207223f1f7140b2ed25c803daea733904
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Thu Jun 14 21:33:38 2007 -0400
test commit, different repro
commit 60db7b112c5cd25db78cc4e2c86f104163df48e8
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 22:01:49 2007 -0400
test edit
commit 4f69982ba23b2c3e1a0deebe6ce330ac7203f856
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 21:58:27 2007 -0400
test edit
commit 146680b50d258fbc3049a02d5e6f2e1d70200f70
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:22:41 2007 -0400
test
commit 149c582b210d7d288f3d22292f41851713cca023
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:21:52 2007 -0400
test
commit 98ffe9a5ea88142a2c7d652f0e0a788d0e6c368b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:17:46 2007 -0400
test
commit 2de10e12bd7fd925b623b167a5e6b5ed3770bd8d
Merge: d33947a81a4cc0c462cee152b70dbfbd0634753b 154458ef3b953393909b81def7a9ba33ce5c8f0f
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:09:50 2007 -0400
Merge branch 'master' of ssh://pcjc2@xxxxxxxxxxxxxx/home/git/gaf
commit d33947a81a4cc0c462cee152b70dbfbd0634753b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:09:36 2007 -0400
test commit
commit 154458ef3b953393909b81def7a9ba33ce5c8f0f
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:02:56 2007 -0400
test change
commit 5e2ab73727aab22051c18c871b221c977defbdf4
Merge: 7c56f99f3424fb7901ed89060481c3cd3d9c58dc 2b210983a8369304782c62314db4653491103d01
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:01:17 2007 -0400
Merge branch 'master' of ssh://git.gpleda.org/home/git/gaf
commit 7c56f99f3424fb7901ed89060481c3cd3d9c58dc
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:01:01 2007 -0400
another commit
commit 2b210983a8369304782c62314db4653491103d01
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 08:00:07 2007 -0400
test commit again and again
commit f1d42b85d1ee89b74d309110316cb6e273478b4d
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 07:56:24 2007 -0400
test commit
commit 0770cff12c72465abae13835b167741f138c1662
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 07:47:23 2007 -0400
another commit
commit ea534ef0c7fde07106b5a2c63b0071930ca2dd6e
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 07:47:02 2007 -0400
test commit
commit 25fad9e8abb5470f3ab85b2babffee39487a906e
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 07:31:03 2007 -0400
another test commit
commit 2be084023c08caf0dfbc4fe326bcfde2e920ce7b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Wed Jun 13 07:24:05 2007 -0400
test commit
commit 60eb84a22ca4a8557d6d8692ef9ff45a05ac4bfd
Merge: c32f50051b826582923df645c6eb14d310a4e6e0 ffd3b3d75df9c76f8d427c9c2b447ee44d66890b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 10 23:22:48 2007 -0400
Merge branch 'branch1'
commit c32f50051b826582923df645c6eb14d310a4e6e0
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 10 23:22:13 2007 -0400
changed a renamed file (on a difference branch)
commit ffd3b3d75df9c76f8d427c9c2b447ee44d66890b
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 10 23:20:53 2007 -0400
Renamed a file
commit c871cceccc79f21b0507653f949a5eec6f57b3b9
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 10 19:02:57 2007 -0400
commit by ales
commit af50d1dc5cd0ee7661b2fdb60dd4162148f3080c
Author: geda <geda@xxxxxxxxxxxxxxx>
Date: Sun Jun 10 15:59:49 2007 -0700
commit by geda
commit 82027c989199a870e836d7af4e279b6eb14eae2f
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jun 10 17:39:27 2007 -0400
changes
commit 25ef45d394407e2e2852e24570b57e3f9473c34a
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 10 17:35:34 2007 -0400
Removed changes manually
commit 6ca92e103da2d988b89903769b9953adb7592986
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 10 17:33:55 2007 -0400
final cleanup
commit dd4d3c516d103719010f4b97ed15a12ae1fd5d99
Merge: 69fb8d24b0ac97715d8c0d3bdec48fb8030324d9 9bcf15edee66ef2467ceb744af29436e951146cb
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 10 17:33:02 2007 -0400
Merge branch 'experimental'
commit 69fb8d24b0ac97715d8c0d3bdec48fb8030324d9
Author: Ales Hvezda <ahvezda@xxxxxxxxxxxxxxx>
Date: Sun Jun 10 17:31:55 2007 -0400
more changes (another line)
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs