Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/locale/querylocale.3
Show All 21 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd May 3, 2013 | .Dd September 3, 2018 | ||||
.Dt QUERYLOCALE 3 | .Dt QUERYLOCALE 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm querylocale | .Nm querylocale | ||||
.Nd Look up the locale name for a specified category | .Nd Look up the locale name for a specified category | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In locale.h | .In locale.h | ||||
.Ft const char * | .Ft const char * | ||||
.Fn querylocale "int mask" "locale_t locale" | .Fn querylocale "int mask" "locale_t locale" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
Returns the name of the locale for the category specified by | Returns the name of the locale for the category specified by | ||||
.Fa mask . | .Fa mask . | ||||
This possible values for the mask are the same as those in | This possible values for the mask are the same as those in | ||||
.Xr newlocale 3 . | .Xr newlocale 3 . | ||||
If more than one bit in the mask is set, the returned value is undefined. | If more than one bit in the mask is set, the returned value is undefined. | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr duplocale 3 , | .Xr duplocale 3 , | ||||
.Xr freelocale 3 , | .Xr freelocale 3 , | ||||
.Xr localeconv 3 , | .Xr localeconv 3 , | ||||
.Xr newlocale 3 , | .Xr newlocale 3 , | ||||
.Xr querylocaleversion 3 , | |||||
kib: Do you intent to only allow to detect change, or also to define a 'newer than' relation ? | |||||
Not Done Inline ActionsI don't think 'newer than' would be very useful on its own, and it would require a complicated specification of the version string which wouldn't work well with my goal of convincing other operating systems to adopt this via a the standards process. Consider that not everyone uses CLDR, and sometimes OSes change to a different source of collation data (as we did). (A much more ambitious project would be to support multiple versions installed at the same time, and then you might want to be able to order them, but I don't have the resources to propose that; I merely want to fix the problem of silent changes that result in corrupted persistent data, because that is very arguably a "defect" in the standard). munro_ip9.org: I don't think 'newer than' would be very useful on its own, and it would require a complicated… | |||||
.Xr uselocale 3 , | .Xr uselocale 3 , | ||||
.Xr xlocale 3 | .Xr xlocale 3 |
Do you intent to only allow to detect change, or also to define a 'newer than' relation ?