[Perl/perl5] f06499: locale.c: Add clarifying comment

2024-01-08 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: f064991f3df268330e6a85d693a42a5612f25f54
  
https://github.com/Perl/perl5/commit/f064991f3df268330e6a85d693a42a5612f25f54
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: Add clarifying comment




[Perl/perl5] 104d78: locale.c: Recompute variable in 2nd part of function

2024-01-08 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 104d782601a4ac648be4646d0a28a42077995db6
  
https://github.com/Perl/perl5/commit/104d782601a4ac648be4646d0a28a42077995db6
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M embed.fnc
M locale.c
M proto.h

  Log Message:
  ---
  locale.c: Recompute variable in 2nd part of function

This is in preparation for the next commit splitting the function in
two, and the current 2nd part will not need or have this variable passed
in as an argument.


  Commit: 8e6366e3a669dbec0ba3ae1b0402b1b7a8cc005c
  
https://github.com/Perl/perl5/commit/8e6366e3a669dbec0ba3ae1b0402b1b7a8cc005c
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h

  Log Message:
  ---
  locale.c: Split a function in two

Prior to this commit, the function was #ifdef'd so that one or the other
part would compile.  But future commits will cause them both to need to
be compiled in some circumstances, with the first part potentially
calling the second part.

Note that the 2nd part doesn't need the parameter 'cat_index' that the
first part does.


  Commit: fdc7323930f3eab4e6028f99a057a202f956c788
  
https://github.com/Perl/perl5/commit/fdc7323930f3eab4e6028f99a057a202f956c788
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: Refactor two nested switch() statements

This slightly refactors these so that many case labels are no longer
repeated.  It does this by making the nested one the default: of the
outer one, and the outer's previous default: becomes the inner's
default (which formerly was useless, so panicked).


  Commit: 6ab10ea5bd0f52bf1302e1b6d2017cfb5cf574ae
  
https://github.com/Perl/perl5/commit/6ab10ea5bd0f52bf1302e1b6d2017cfb5cf574ae
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: Move GCC DIAG IGNORE

The previous commit changed two nested switch() statements.  The inner
one turned off implicit switch() case statement fallthrough warnings.
This commit applies that to the entire outer switch().


  Commit: 5ef81bf05e89742bbfb96c03f362effe0b84656c
  
https://github.com/Perl/perl5/commit/5ef81bf05e89742bbfb96c03f362effe0b84656c
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: Tighten circumstances some code is generated

This code need not be compiled except under the circumstances defined in
this commit.


  Commit: 9207ab4fad418cd6bb8eb22358bcb7679ae3d2b9
  
https://github.com/Perl/perl5/commit/9207ab4fad418cd6bb8eb22358bcb7679ae3d2b9
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h

  Log Message:
  ---
  locale.c: Always compile save__to_buffer()

The next commit will want to use it in more Configurations, and a future
commit in all Configurations.


  Commit: 3e9613c754ffb0bd2cd99e771bae33a335c73613
  
https://github.com/Perl/perl5/commit/3e9613c754ffb0bd2cd99e771bae33a335c73613
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h

  Log Message:
  ---
  locale.c: Compile S_emulate_langinfo() under more Configurations

This is in preparation for some code to be consolidated into just this
one function.


  Commit: 8f0e71899b82a2311a84f419bf5daf76d92966f6
  
https://github.com/Perl/perl5/commit/8f0e71899b82a2311a84f419bf5daf76d92966f6
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: Effectively white-space, comments only

The previous few commits have added/removed code blocks and #if
directives.  Adjust white space accordingly

This also adds explanatary comments


  Commit: aeec574d1effa562786a0ad5d4416f225be2206e
  
https://github.com/Perl/perl5/commit/aeec574d1effa562786a0ad5d4416f225be2206e
  Author: Karl Williamson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M locale.c

  Log Message:
  ---
  locale.c: Handle some ignored categories in langinfo emulation

It is possible to Configure perl to not allow any or all of the locale
categories on the platform to be changed away from the C locale,
generally due to libc limitations.  OpenBSD, for example, keeps every
category but one in C; so perl shouldn't even try to change any of
those.

On platforms without the libc nl_langinfo() function, perl emulates it.
Prior to this commit, the emulation did not properly handle the case
of categories needing to stay in C.  This did not lead to bugs, because
external to this file, any such calls we