unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: reading the C source of Emacs
Date: 17 Jan 2003 12:41:46 +0100	[thread overview]
Message-ID: <x5k7h40zr9.fsf@lola.goethe.zz> (raw)
In-Reply-To: uznq0pe7n.fsf@ID-87814.user.dfncis.de

Oliver Scholz <alkibiades@gmx.de> writes:

> Thank you all for you advice. You helped to set me on the track. But
> it is indeed a rather difficult read for me. My head dizzles is still
> a bit dizzling.
> 
> Below are my very first steps in C: a version of `find-if' as a
> starter. I'd appreciate any comment. (Did I miss something important,
> for example?)
> 
> One thing that I noticed is that my `find-if' causes an infinite loop,
> when applied to a recursive (?) list, à la:

There are several tricks for dealing with recursive data structures.
One is to have two traversals active at the same time, where one
traversal progresses just at every second step.  If they should ever
catch up, you have encountered a loop in a data structure.

I doubt this would be worth the trouble: just make sure that C-g will
be able to abort your function should it get stuck.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2003-01-17 11:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-11 17:03 reading the C source of Emacs Oliver Scholz
2003-01-11 17:43 ` David Kastrup
2003-01-12 16:31   ` Oliver Scholz
2003-01-11 21:26 ` Kai Großjohann
2003-01-12 16:37   ` Oliver Scholz
2003-01-12 19:56     ` Kai Großjohann
2003-01-12 21:45       ` Oliver Scholz
2003-01-12 22:16         ` David Kastrup
2003-01-12 20:59 ` Stefan Monnier <foo@acm.com>
2003-01-17  4:55   ` Oliver Scholz
2003-01-17 11:41     ` David Kastrup [this message]
2003-01-17 17:09     ` Kai Großjohann
2003-01-13  5:52 ` Janusz S. Bień
     [not found] ` <mailman.202.1042437305.21513.help-gnu-emacs@gnu.org>
2003-01-13  6:17   ` Miles Bader

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/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5k7h40zr9.fsf@lola.goethe.zz \
    --to=dak@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).