From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: Takashi Yano <tyan0@sourceware.org>
Cc: cygwin-patches@cygwin.com
Subject: Re: [newlib-cygwin] Cygwin: ctty: Add comments for the special values: -1 and -2.
Date: Tue, 10 Jan 2023 15:29:19 +0100 [thread overview]
Message-ID: <Y712P2K2u15BNnZS@calimero.vinschen.de> (raw)
In-Reply-To: <20230110131557.3B148385843E@sourceware.org>
On Jan 10 13:15, Takashi Yano via Cygwin-cvs wrote:
> https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3b7df69aaa5752f78537eafa5838f65a1ddfc938
>
> commit 3b7df69aaa5752f78537eafa5838f65a1ddfc938
> Author: Takashi Yano <takashi.yano@nifty.ne.jp>
> Date: Tue Jan 10 22:04:40 2023 +0900
>
> Cygwin: ctty: Add comments for the special values: -1 and -2.
>
> _pinfo::ctty has two special values other than the device id of
> the allocated ctty:
> -1: CTTY is not initialized yet. Can be associated with the TTY
> which is associated with the session leader.
> -2: CTTY has been released by setsid(). Can be associate only with
> new TTY which is not associated with any other session as CTTY,
> but cannot be associate with the TTYs already associated with
> other sessions.
> This patch adds the comments in some source files.
Oh, ok. I was more thinking along the lines of using symbolic values,
kind of like this:
#define CTTY_UNINITIALIZED -1
#define CTTY_RELEASED -2
#define CTTY_IS_FREE(_c) ((_c) < 0)
I'm not sure the names make sense, but you see what I mean. The
comments could precede the definitions in the header file then.
Corinna
parent reply other threads:[~2023-01-10 14:29 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20230110131557.3B148385843E@sourceware.org>]
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=Y712P2K2u15BNnZS@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-patches@cygwin.com \
--cc=tyan0@sourceware.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).