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

Re: gEDA-user: pcb command options



Hi, Kai-Martin;

On 9/15/09, Kai-Martin Knaak <kmk@xxxxxxxxxxxxxxx> wrote:
> I just skipped through the prolific list of pcb options. Some of them I
> still don't quite understand. For example, there is a number of command
> options
>
> $ pcb -h 2>&1 | grep command
>  --font-command <string>
>  --file-command <string>       	Command to read a file.
>  --element-command <string>
>  --lib-command-dir <string>
>  --lib-command <string>
>  --lib-contents-command <string>
>  --save-command <string>
>  --rat-command <string>
>  --save-last-command
>  --lprcommand <string>         	Command to print
>
> What is the purpose of these options?

According to the sources they define command lines for pre- and
postprocessing pipes; with exception of --save-last-command, which
seems to have no visible effect.

> BTW, has the bug that prevents execution of action scripts with non GUI
> HIDs been fixed in current head?

What head do you mean? in my local one, yes, it has. my version of
your patch is attached (BTW, thanks for the patch).

Kindest regards,
Ineiev
From 2010f293e18cf9d030f187bb87e763d4163de69e Mon Sep 17 00:00:00 2001
From: Kai-Martin Knaak <kmk@xxxxxxxxxxxxxxx>
Date: Thu, 9 Jul 2009 16:06:10 +0400
Subject: [PATCH 01/11] enable scripts with -x option

The patch moves the processing
of action scripts and strings a little up. So they are executed with export
options too. The file hidnogui.c needs a little patch to, to not exit if
nogui_invalidate_lr is hit.

patch from
http://www.mail-archive.com/geda-user@xxxxxxxxxxxxxx/msg16493.html,
slightly modified
---
 src/hid/common/hidnogui.c |    2 +-
 src/main.c                |   70 +++++++++++++++++++++-----------------------
 2 files changed, 34 insertions(+), 38 deletions(-)

diff --git a/src/hid/common/hidnogui.c b/src/hid/common/hidnogui.c
index 4d6baa0..d7fc7e2 100644
--- a/src/hid/common/hidnogui.c
+++ b/src/hid/common/hidnogui.c
@@ -58,7 +58,7 @@ nogui_invalidate_wh (int x, int y, int width, int height, int last)
 static void
 nogui_invalidate_lr (int l, int r, int t, int b, int last)
 {
-  CRASH;
+/*  CRASH; */
 }
 
 static void
diff --git a/src/main.c b/src/main.c
index a0b38f3..6d083cc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -965,6 +965,24 @@ main (int argc, char *argv[])
     {
       LayerStringToLayerStack (Settings.InitialLayerStack);
     }
+  /*
+   * Set this flag to zero.  Then if we have a startup
+   * action which includes Quit(), the flag will be set
+   * to -1 and we can avoid ever calling gtk_main();
+   */
+  Settings.init_done = 0;
+  if (Settings.ScriptFilename)
+    {
+      Message (_("Executing startup script file %s\n"),
+              Settings.ScriptFilename);
+      hid_actionl ("ExecuteFile", Settings.ScriptFilename, NULL);
+    }
+
+  if (Settings.ActionString)
+    {
+      Message (_("Executing startup action %s\n"), Settings.ActionString);
+      hid_parse_actions (Settings.ActionString, 0);
+    }
 
   if (gui->printer || gui->exporter)
     {
@@ -991,52 +1009,30 @@ main (int argc, char *argv[])
 #ifdef HAVE_LIBSTROKE
   stroke_init ();
 #endif
-  /*
-   * Set this flag to zero.  Then if we have a startup
-   * action which includes Quit(), the flag will be set
-   * to -1 and we can avoid ever calling gtk_main();
-   */
-  Settings.init_done = 0;
-
-  if (Settings.ScriptFilename)
-    {
-      Message (_("Executing startup script file %s\n"),
-	       Settings.ScriptFilename);
-      hid_actionl ("ExecuteFile", Settings.ScriptFilename, NULL);
-    }
-  if (Settings.ActionString)
-    {
-      Message (_("Executing startup action %s\n"), Settings.ActionString);
-      hid_parse_actions (Settings.ActionString, 0);
-    }
-
-  if (Settings.init_done == 0)
-    {
-      Settings.init_done = 1;
+  Settings.init_done = 1;
 #if HAVE_DBUS
-      pcb_dbus_setup();
+  pcb_dbus_setup();
 #endif
 
-      EnableAutosave ();
+  EnableAutosave ();
 
 #ifdef DEBUG
-      printf ("Settings.LibraryCommandDir = \"%s\"\n",
-	      Settings.LibraryCommandDir);
-      printf ("Settings.FontPath          = \"%s\"\n", 
-	      Settings.FontPath);
-      printf ("Settings.ElementPath       = \"%s\"\n", 
-	      Settings.ElementPath);
-      printf ("Settings.LibraryPath       = \"%s\"\n", 
-	      Settings.LibraryPath);
-      printf ("Settings.LibraryTree       = \"%s\"\n", 
-	      Settings.LibraryTree);
+  printf ("Settings.LibraryCommandDir = \"%s\"\n",
+	  Settings.LibraryCommandDir);
+  printf ("Settings.FontPath          = \"%s\"\n",
+	  Settings.FontPath);
+  printf ("Settings.ElementPath       = \"%s\"\n",
+	  Settings.ElementPath);
+  printf ("Settings.LibraryPath       = \"%s\"\n",
+	  Settings.LibraryPath);
+  printf ("Settings.LibraryTree       = \"%s\"\n",
+	  Settings.LibraryTree);
 #endif
 
-      gui->do_export (0);
+  gui->do_export (0);
 #if HAVE_DBUS
-      pcb_dbus_finish();
+  pcb_dbus_finish();
 #endif
-    }
 
   return (0);
 }
-- 
1.6.4.1


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user