diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-05-29 09:20:53 -0400 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-05-29 09:20:53 -0400 |
commit | dc7d93e5372573bcbe617fb50c9eb3341f117f14 (patch) | |
tree | 4d4b395a8767f14ae528b3851296cd36359c6974 | |
parent | 53d7134462df2933d997f7dd403510d2e27c1540 (diff) | |
download | gawk-feature/nl_langinfo.tar.gz |
Add nl_langinfo doc, update copyright in C file.feature/nl_langinfo
-rw-r--r-- | extension/nl_langinfo.3am | 90 | ||||
-rw-r--r-- | extension/nl_langinfo.c | 3 |
2 files changed, 92 insertions, 1 deletions
diff --git a/extension/nl_langinfo.3am b/extension/nl_langinfo.3am new file mode 100644 index 00000000..d8470d87 --- /dev/null +++ b/extension/nl_langinfo.3am @@ -0,0 +1,90 @@ +.TH NL_LANGINFO 3am "May 29 2015" "" "GNU Awk Extension Modules" +.SH NAME +nl_langinfo \- retrieve locale-specific information strings +.SH SYNOPSIS +.ft CW +@load "nl_langinfo" +.sp +result = nl_langinfo(LANGINFO["\f(CIvariable\fP"]) +.ft R +.SH DESCRIPTION +The +.I nl_langinfo +extension provides an AWK interface to the +.IR nl_langinfo (3) +routine. It adds a single function named +.BR nl_langinfo() , +and an array named +.BR LANGINFO . +.PP +The single argument in a call to +.B nl_langinfo() +should be one of the available values in the +.B LANGINFO +array. +.PP +The return value is the requested string, +or the empty string if an error occurred. +.PP +The indices of +.B LANGINFO +are the names of various available strings as given in the +POSIX standard: see +\f(CWhttp://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html\fP. +For example, \f(CW"D_T_FMT"\fP is the current locale's date and time +format for use with +.IR strftime (3). +See the standard for the full list. +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "nl_langinfo" + +BEGIN { + print strftime(nl_langinfo(["D_T_"FMT"])) +} +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.PP +.IR nl_langinfo (3). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.br +Copyright \(co 2015, Arnold David Robbins. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/nl_langinfo.c b/extension/nl_langinfo.c index e918fb9d..5bcf0e8c 100644 --- a/extension/nl_langinfo.c +++ b/extension/nl_langinfo.c @@ -7,7 +7,8 @@ */ /* - * Copyright (C) 2012, 2013, 2015 the Free Software Foundation, Inc. + * Copyright (C) 2012, 2013 the Free Software Foundation, Inc. + * Copyright (C) 2015 Arnold David Robbins. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. |