From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel Subject: Re: delete-file ?? Date: Mon, 15 Jul 2002 17:03:16 -0700 Organization: Home Sender: guile-devel-admin@gnu.org Message-ID: <3D3362C4.BEA25328@pacbell.net> References: <3D31A7BD.F6BA53F1@pacbell.net> <87n0stwmwj.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: main.gmane.org 1026781239 2786 127.0.0.1 (16 Jul 2002 01:00:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2002 01:00:39 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17UGhh-0000ig-00 for ; Tue, 16 Jul 2002 03:00:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UGeP-0000Xr-00; Mon, 15 Jul 2002 20:57:13 -0400 Original-Received: from mta6.snfc21.pbi.net ([206.13.28.240]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UGdO-0000MK-00 for ; Mon, 15 Jul 2002 20:56:10 -0400 Original-Received: from pacbell.net ([64.170.152.167]) by mta6.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GZB00EZ3H9LRD@mta6.snfc21.pbi.net> for guile-devel@gnu.org; Mon, 15 Jul 2002 17:56:09 -0700 (PDT) Original-To: Rob Browning X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.18 i686) X-Accept-Language: en Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 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:809 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:809 Rob Browning wrote: > That sounds like a good idea to me, though we might need another > function. I'm not sure what the error/return semantics of delete-file... Read the source, Luke :-( > SCM_DEFINE (scm_delete_file, "delete-file", 1, 0, 0, > (SCM str), > "Deletes (or \"unlinks\") the file specified by @var{path}.") > #define FUNC_NAME s_scm_delete_file > { > int ans; > SCM_VALIDATE_STRING (1, str); > SCM_SYSCALL (ans = unlink (SCM_STRING_CHARS (str))); > if (ans != 0) > SCM_SYSERROR; > return SCM_UNSPECIFIED; > } > #undef FUNC_NAME You're right: > SCM_DEFINE (scm_unlink, "unlink", 1, 0, 0, > (SCM path), > "Unlinks (or \"deletes\") the file specified by @var{path}.") > #define FUNC_NAME s_scm_unlink > { > int ans; > SCM_VALIDATE_STRING (1, path); > SCM_SYSCALL (ans = unlink (SCM_STRING_CHARS (path))); > return gh_int2scm( ans ); > } > #undef FUNC_NAME > > SCM_DEFINE (scm_delete_file, "delete-file", 1, 0, 0, > (SCM path), > "Deletes (or \"unlinks\") the file specified by @var{path}.") > #define FUNC_NAME s_scm_delete_file > { > SCM res = scm_unlink( path ); > return (gh_scm2int( res ) != 0) ? SCM_SYSERROR : SCM_UNSPECIFIED; > } > #undef FUNC_NAME And, yes, I know "gh_*" is deprecated. I'm sure you can fix it. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel