unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Martín" <mardani29@yahoo.es>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org,  Lars Ingebrigtsen <larsi@gnus.org>
Subject: Re: master ed84f24a21: Make `signal-process' allow completing over signal names
Date: Mon, 27 Jun 2022 10:47:15 +0200	[thread overview]
Message-ID: <m1pmiu8pd8.fsf@yahoo.es> (raw)
In-Reply-To: <87ilomewbp.fsf@yahoo.com> (Po Lu's message of "Mon, 27 Jun 2022 09:20:26 +0800")

Po Lu <luangruo@yahoo.com> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> +DEFUN ("signal-names", Fsignal_names, Ssignal_names, 0, 0, 0,
>> +       doc: /* Return a list of known signal names on this system.  */)
>> +  (void)
>> +{
>> +  char name[SIG2STR_MAX];
>> +  Lisp_Object names = Qnil;
>> +  for (int i = 0; i < 255; ++i)
>> +    {
>> +      if (!sig2str (i, name))
>> +	{
>> +	  names = Fcons (build_string (name), names);
>> +	}
>> +    }
>> +  return names;
>> +}
>> +
>
> Shouldn't the "255" be NSIG instead? And what about systems where POSIX
> signal handling doesn't really apply, such as MS Windows and MS-DOS?
>

In the same header that defines SIG2STR_MAX there is SIGNUM_BOUND.  It
is defined depending on the availability of other macros, including
NSIG.  Couldn't it be used instead?



  parent reply	other threads:[~2022-06-27  8:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <165627647702.21409.11158107897633930882@vcs2.savannah.gnu.org>
     [not found] ` <20220626204757.57AB1C01685@vcs2.savannah.gnu.org>
2022-06-27  1:20   ` master ed84f24a21: Make `signal-process' allow completing over signal names Po Lu
2022-06-27  6:37     ` Lars Ingebrigtsen
2022-06-27  6:51       ` Po Lu
2022-06-27  6:56         ` Lars Ingebrigtsen
2022-06-27  7:04           ` Po Lu
2022-06-27  7:10             ` Lars Ingebrigtsen
2022-06-27  8:10               ` Po Lu
2022-06-27  8:12                 ` Lars Ingebrigtsen
2022-06-27  8:25                   ` Po Lu
2022-06-27  8:47     ` Daniel Martín [this message]
2022-06-27 10:55       ` Lars Ingebrigtsen
2022-06-27 11:36     ` Eli Zaretskii
2022-06-28 11:23       ` Lars Ingebrigtsen
2022-06-28 13:19         ` Po Lu
2022-06-28 13:25           ` Lars Ingebrigtsen
2022-06-28 13:28             ` Po Lu
2022-06-28 13:32               ` Lars Ingebrigtsen
2022-06-28 13:34                 ` Lars Ingebrigtsen
2022-06-28 13:35                 ` Po Lu

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=m1pmiu8pd8.fsf@yahoo.es \
    --to=mardani29@yahoo.es \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).