[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35062: [PATCH v3 2/3] constify a bit of xterm.c
From: |
Eli Zaretskii |
Subject: |
bug#35062: [PATCH v3 2/3] constify a bit of xterm.c |
Date: |
Sat, 13 Apr 2019 14:36:38 +0300 |
> Date: Sat, 13 Apr 2019 14:30:46 +0300
> From: Konstantin Kharlamov <hi-angel@yandex.ru>
> Cc: Paul Eggert <eggert@cs.ucla.edu>, 35062@debbugs.gnu.org
>
> I'd like to take this as an opportunity to ask a question: I see Emacs
> C code is using the old style where variables (mostly) are declared at
> the beginning of a function. Is it just a legacy from C89 days (I hope
> so), or is it a mandatory style?
It's legacy. Nowadays we allow declarations near the first usage, per
C99. But again, we only make changes in the order as part of other
code changes, not just by themselves.
> I'm asking because if I gonna work on the code, I'd for sure like to
> encapsulate variables as much as possible, which means I'd rather
> declare them on the first use (as a bonus, this often may allow to
> constify the variable too).
That's okay. We require C99 these days.
- bug#35062: [PATCH v3 1/3] Remove redundant comparison, Konstantin Kharlamov, 2019/04/06
- bug#35062: [PATCH v3 3/3] don't compare unsigned to less-than-zero, Konstantin Kharlamov, 2019/04/06
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/06
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Eli Zaretskii, 2019/04/13
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Paul Eggert, 2019/04/19
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/19
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/19
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Eli Zaretskii, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Eli Zaretskii, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/20
- bug#35062: [PATCH v3 2/3] constify a bit of xterm.c, Konstantin Kharlamov, 2019/04/20