From: "Luigi Semenzato" <luigi@semenzato.com>
To: "Mike Gran" <spk121@yahoo.com>
Cc: guile-user@gnu.org
Subject: Re: Clean Guile code from C program
Date: Fri, 7 Mar 2008 11:01:54 -0800 [thread overview]
Message-ID: <c6bf18db0803071101m33c9884bs4c36e5be86cc9f15@mail.gmail.com> (raw)
In-Reply-To: <283059.72019.qm@web37910.mail.mud.yahoo.com>
It's not clear that Mike's asking the right question here.
If he wants to get rid of Guile from his program, first he
needs to check if the program contains any Guile code
which uses this code. It's possible that a substantial
amount of the program's functionality has been
written in Guile. In that case converting these
functions, which are Guile-specific, to C won't help much.
A better approach is to understand what the Guile
part of the program is doing and figuring out how
to convert that part to C. Most likely, the best way
of doing that will not use any of the C-Guile interface.
It's possible (but quite unlikely) that all calls into this code
come from other C code. Then the advice applies, although
even in this case it may be easier to rewrite the C code
from scratch.
Also, the code is a little suspicious. Take a look at this
fragment below:
SCM check_text_sections(SCM tag)
{
if (tag == SCM_BOOL_F) {
TextFile::CheckNewline = 0;
} else if (tag == SCM_BOOL_F) {
TextFile::CheckNewline = 1;
...
Before asking Guile-specific questions, Mike should backtrack
and get advice on how to solve his problem (probably on a different
forum). He may very well be going down the wrong path.
Luigi
On 3/7/08, Mike Gran <spk121@yahoo.com> wrote:
> --- Jose Martin <maitai02@excite.com> wrote:
>
> > I looked at the program's code and it looks a bit
> > difficult to change it, and I must say I'm a
> > beginner in C. Could anyone give me the steps of the
> > changes I'd need to remove Guile-dependent code from
> > C code?
>
>
> Wow. The Guile stuff is pretty well entangled. If
> you don't know enough C (and I think I saw some C++ in
> there as well) you might be in over your head.
>
> But, FWIW, here's how you'd do it.
next prev parent reply other threads:[~2008-03-07 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-07 18:02 Clean Guile code from C program Jose Martin
2008-03-07 18:30 ` Mike Gran
2008-03-07 19:01 ` Luigi Semenzato [this message]
2008-03-07 20:04 ` Neil Jerram
-- strict thread matches above, loose matches on Subject: below --
2008-03-08 20:10 Jose Martin
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=c6bf18db0803071101m33c9884bs4c36e5be86cc9f15@mail.gmail.com \
--to=luigi@semenzato.com \
--cc=guile-user@gnu.org \
--cc=spk121@yahoo.com \
/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).