X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7+dev X-Exmh-Isig-CompType: comp X-Exmh-Isig-Folder: inbox From: "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Subject: [geda-user] pcb --show-libdir, a request Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1680252897_3450" Message-Id: <20230331085518.AA23685F72C7@turkos.aspodata.se> Date: Fri, 31 Mar 2023 10:55:18 +0200 (CEST) X-Virus-Scanned: ClamAV using ClamSMTP Reply-To: geda-user AT delorie DOT com This is a multipart MIME message. --==_Exmh_1680252897_3450 Content-Type: text/plain; charset="utf-8" Hello pcb devs, to be able to do runtime detection of pcb share'd dir, I'd request attatched patch to be applied to pcb sources. Regards, /Karl Hammar --==_Exmh_1680252897_3450 Content-Type: text/plain; charset="utf-8" ; name="patch" Content-Description: patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch" diff --git a/src/main.c b/src/main.c index a4646a39..eb337db8 100644 --- a/src/main.c +++ b/src/main.c @@ -1685,6 +1685,13 @@ print_version () exit (0); } = +static void +print_libdir () +{ + printf ("%s\n", lrealpath(pcblibdir)); + exit (0); +} + /* ---------------------------------------------------------------------= - * Figure out the canonical name of the executed program * and fix up the defaults for various paths @@ -2035,6 +2042,8 @@ main (int argc, char *argv[]) usage (); if (argc > 1 && strcmp (argv[1], "-V") =3D=3D 0) print_version (); + if (argc > 1 && strcmp (argv[1], "--show-libdir") =3D=3D 0) + print_libdir (); /* Export pcb from command line if requested. */ if (argc > 1 && strcmp (argv[1], "-p") =3D=3D 0) { --==_Exmh_1680252897_3450--