From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.user Subject: Re: argz SMOB Date: Thu, 15 Jan 2004 19:21:50 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1074219331 17231 80.91.224.253 (16 Jan 2004 02:15:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2004 02:15:31 +0000 (UTC) Cc: guile-user@gnu.org, Daniel Skarda <0rfelyus@ucw.cz> Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jan 16 03:15:26 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AhJWA-0005Fo-00 for ; Fri, 16 Jan 2004 03:15:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhJ3L-00050I-AR for guile-user@m.gmane.org; Thu, 15 Jan 2004 20:45:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AhJ15-0004hH-A7 for guile-user@gnu.org; Thu, 15 Jan 2004 20:43:19 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AhIMB-0004pS-Ng for guile-user@gnu.org; Thu, 15 Jan 2004 20:01:35 -0500 Original-Received: from [129.22.104.63] (helo=harris.CNS.CWRU.Edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhHkf-0006RU-UJ for guile-user@gnu.org; Thu, 15 Jan 2004 19:22:18 -0500 Original-Received: from conversion-daemon.smtp-a.cwru.edu by smtp-a.cwru.edu (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) id <0HRK001013LOM6@smtp-a.cwru.edu> for guile-user@gnu.org; Thu, 15 Jan 2004 19:21:51 -0500 (EST) Original-Received: from multivac.cwru.edu (multivac.ITS.CWRU.Edu [129.22.114.26]) by smtp-a.cwru.edu (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0HRK00IC03OEHD@smtp-a.cwru.edu> for guile-user@gnu.org; Thu, 15 Jan 2004 19:21:50 -0500 (EST) Original-Received: (qmail 8592 invoked by uid 500); Fri, 16 Jan 2004 00:22:12 +0000 In-reply-to: Original-To: Brian S McQueen Mail-followup-to: Brian S McQueen , Daniel Skarda <0rfelyus@ucw.cz>, guile-user@gnu.org Mail-Copies-To: nobody User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) Original-Lines: 26 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.lisp.guile.user:2602 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2602 Brian S McQueen wrote: > Particularly, I wonder about the best way to produce a null > terminated C string from a scheme string. SCM_STRING_COERCE_0TERMINATION_X(scheme_string); char* s=SCM_STRING_CHARS(scheme_string); Or do you need a separate copy? > static SCM printer_hostile_printer(SCM scm_out_buff) { > > struct argz_holder out_buff; > > SCM_ASSERT (SCM_STRINGP (scm_out_buff), scm_out_buff, SCM_ARG1, > "printer_hostile_printer"); You could also write that as: #define FUNC_NAME s_printer_hostile_printer SCM_DEFINE(printer_hostile_printer, "printer_hostile_printer", 1, 0, 0, (SCM scm_out_buff)) { struct argz_holder out_buff; SCM_VALIDATE_STRING(SCM_ARG1, scm_out_buff); paul _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user