From: Bruce Korb <bkorb@pacbell.net>
Cc: guile-devel@gnu.org
Subject: Re: delete-file ??
Date: Mon, 15 Jul 2002 17:03:16 -0700 [thread overview]
Message-ID: <3D3362C4.BEA25328@pacbell.net> (raw)
In-Reply-To: 87n0stwmwj.fsf@raven.i.defaultvalue.org
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
next prev parent reply other threads:[~2002-07-16 0:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-14 16:33 delete-file ?? Bruce Korb
2002-07-15 6:00 ` Rob Browning
2002-07-16 0:03 ` Bruce Korb [this message]
2002-07-16 1:56 ` Rob Browning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D3362C4.BEA25328@pacbell.net \
--to=bkorb@pacbell.net \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).