9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] more questions
Date: Wed, 28 Mar 2001 11:21:08 +0100	[thread overview]
Message-ID: <20010328101459.DF9E1199C0@mail.cse.psu.edu> (raw)

i've been bitten by that regexp problem before.  your problem is that
the matches array is being used uninitialised.  as the documentation
says:

          If match[0].sp is nonzero on entry, regexec starts matching
          at that point within string. If match[0].ep is nonzero on
          entry, the last character matched is the one preceding that
          point.

in a larger program, your code would probably have broken... and then
you'd probably have found the problem!

  cheers,
    rog.



             reply	other threads:[~2001-03-28 10:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-28 10:21 rog [this message]
2001-04-04  9:14 ` Quinn Dunkan
  -- strict thread matches above, loose matches on Subject: below --
2001-04-04 19:05 Quinn Dunkan
2001-03-28 18:15 rob pike
2001-03-28  7:54 Quinn Dunkan
2001-03-28  5:56 Russ Cox

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

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

  git send-email \
    --in-reply-to=20010328101459.DF9E1199C0@mail.cse.psu.edu \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /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 NNTP newsgroup(s).