From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.devel Subject: Re: snarfer guard macro name decision: SCM_MAGIC_SNARFER Date: Wed, 13 Mar 2002 16:12:58 -0800 Sender: guile-devel-admin@gnu.org Message-ID: References: <877kognusb.fsf@zagadka.ping.de> <87henkgmbi.fsf@raven.i.defaultvalue.org> Reply-To: ttn@glug.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1016067273 14231 127.0.0.1 (14 Mar 2002 00:54:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2002 00:54:33 +0000 (UTC) Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16lJVo-0003hR-00 for ; Thu, 14 Mar 2002 01:54:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16lJVY-00012R-00; Wed, 13 Mar 2002 19:54:16 -0500 Original-Received: from ca-crlsbd-u3-c5c-122.crlsca.adelphia.net ([68.64.59.122] helo=giblet) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16lIu4-0004lI-00 for ; Wed, 13 Mar 2002 19:15:32 -0500 Original-Received: from ttn by giblet with local (Exim 3.33 #1 (Debian)) id 16lIra-0006Dx-00 for ; Wed, 13 Mar 2002 16:12:58 -0800 Original-To: guile-devel@gnu.org In-Reply-To: (message from Thien-Thi Nguyen on Wed, 13 Mar 2002 14:58:06 -0800) Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:32 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:32 From: Thien-Thi Nguyen Date: Wed, 13 Mar 2002 14:58:06 -0800 WARNING: the old_school_snarf is incomplete. ok, --compat=1.4 requirements is now clearer to me: when this is used, the environment is all new (new snarf.h, new scm_c_define_gsubr, etc). so really the compatibility is on the input (recognizing SCM_VCELL as SCM_VARIABLE, for example), instead of on the output as implied by the TODO comment in the guile-snarf.in post. below is first usable stab for anyone who wants to try guile-snarf on old code. i'm taking a guess w/ SCM_CONST_LONG (feedback requested). cut and paste as appropriate... thi ______________________________________ ## snarf funcs: $1 must be the input file and must be mutable (yuk!) modern_snarf () { ${cpp} -DSCM_MAGIC_SNARF_INITS "$@" > ${temp} && cpp_status=true grep "^ *\^ *\^" ${temp} | sed -e "s/^ *\^ *\^//" } old_school_snarf () { sed -e 's/SCM_CONST_LONG/SCM_GLOBAL_VCELL_INIT/g' \ -e 's/SCM_GLOBAL_VCELL_INIT/SCM_GLOBAL_VARIABLE_INIT/g' \ -e 's/SCM_GLOBAL_VCELL/SCM_GLOBAL_VARIABLE/g' \ -e 's/SCM_VCELL_INIT/SCM_VARIABLE_INIT/g' \ -e 's/SCM_VCELL/SCM_VARIABLE/g' \ $1 > ${temp} cp ${temp} $1 modern_snarf "$@" } ##### ---------8<------------------- ##### make sure snarf funcs' $1 is the input file: - $snarf "$@" $clean_infile ; + $snarf $clean_infile "$@" ; _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel