From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: Using guile as an extension language for GNU make Date: Sun, 18 Sep 2011 17:30:03 +0200 Message-ID: <87wrd5x404.fsf@ambire.localdomain> References: <1316304616.28907.118.camel@homebase> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1316359919 17055 80.91.229.12 (18 Sep 2011 15:31:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Sep 2011 15:31:59 +0000 (UTC) Cc: guile-user@gnu.org To: psmith@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Sep 18 17:31:52 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R5JLU-0004va-C0 for guile-user@m.gmane.org; Sun, 18 Sep 2011 17:31:52 +0200 Original-Received: from localhost ([::1]:34336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5JLT-0007QQ-Lc for guile-user@m.gmane.org; Sun, 18 Sep 2011 11:31:51 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5JLR-0007PU-1W for guile-user@gnu.org; Sun, 18 Sep 2011 11:31:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5JLQ-0006gA-1e for guile-user@gnu.org; Sun, 18 Sep 2011 11:31:48 -0400 Original-Received: from smtp207.alice.it ([82.57.200.103]:51214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5JLO-0006e2-IW; Sun, 18 Sep 2011 11:31:46 -0400 Original-Received: from ambire.localdomain (62.211.148.139) by smtp207.alice.it (8.5.124.08) id 4DFA189A0835D40A; Sun, 18 Sep 2011 17:31:27 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1R5JJj-0001z1-NP; Sun, 18 Sep 2011 17:30:03 +0200 In-Reply-To: <1316304616.28907.118.camel@homebase> (Paul Smith's message of "Sat, 17 Sep 2011 20:10:16 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.103 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8799 Archived-At: () Paul Smith () Sat, 17 Sep 2011 20:10:16 -0400 char *str =3D scm_to_locale_string (scm_object_to_string (scm_c_eval_st= ring (argv[0]), SCM_UNDEFINED)); char *s =3D str; unsigned int l =3D strlen (s); if (s[0] =3D=3D '"' && s[l-1] =3D=3D '"') { s[l-1] =3D '\0'; ++s; l -=3D 2; } o =3D variable_buffer_output (o, s, l); free (str); The double-quote stripping is kind of hacky. I would create a port and =E2=80=98display=E2=80=99 the result of =E2=80=98scm_c_eval_string=E2=80=99= to it. Perhaps you could expose a =E2=80=98write=E2=80=99 variant, as well, for complete user contro= l. Similarly for the other funcs. Overall, i get the vague impression that points of exposure could be improved -- made more orthogonal, w/ fewer (but more powerful) funcs, but that's probably simply my ignorance of Make internals speaking.