Tue Dec 15 00:35:36 2009 UTC ()
Put space after comma in the C code example.


(enami)
diff -r1.17 -r1.18 src/lib/libc/locale/nl_langinfo.3

cvs diff -r1.17 -r1.18 src/lib/libc/locale/nl_langinfo.3 (expand / switch to unified diff)

--- src/lib/libc/locale/nl_langinfo.3 2009/03/12 12:50:31 1.17
+++ src/lib/libc/locale/nl_langinfo.3 2009/12/15 00:35:36 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: nl_langinfo.3,v 1.17 2009/03/12 12:50:31 joerg Exp $ 1.\" $NetBSD: nl_langinfo.3,v 1.18 2009/12/15 00:35:36 enami Exp $
2.\" 2.\"
3.\" Written by J.T. Conklin <jtc@NetBSD.org>. 3.\" Written by J.T. Conklin <jtc@NetBSD.org>.
4.\" Public domain. 4.\" Public domain.
5.\" 5.\"
6.Dd February 12, 2003 6.Dd February 12, 2003
7.Dt NL_LANGINFO 3 7.Dt NL_LANGINFO 3
8.Os 8.Os
9.Sh NAME 9.Sh NAME
10.Nm nl_langinfo 10.Nm nl_langinfo
11.Nd get locale information 11.Nd get locale information
12.Sh LIBRARY 12.Sh LIBRARY
13.Lb libc 13.Lb libc
14.Sh SYNOPSIS 14.Sh SYNOPSIS
@@ -103,27 +103,27 @@ to obtain the date and time format for t @@ -103,27 +103,27 @@ to obtain the date and time format for t
103 103
104int main(void) 104int main(void)
105{ 105{
106 char datestring[100]; 106 char datestring[100];
107 struct tm *tm; 107 struct tm *tm;
108 time_t t; 108 time_t t;
109 char *ptr; 109 char *ptr;
110 110
111 t = time(NULL); 111 t = time(NULL);
112 tm = localtime(\*[Am]t); 112 tm = localtime(\*[Am]t);
113 (void)setlocale(LC_ALL, ""); 113 (void)setlocale(LC_ALL, "");
114 ptr = nl_langinfo(D_T_FMT); 114 ptr = nl_langinfo(D_T_FMT);
115 strftime(datestring, sizeof(datestring), ptr, tm); 115 strftime(datestring, sizeof(datestring), ptr, tm);
116 printf("%s\en",datestring); 116 printf("%s\en", datestring);
117 return (0); 117 return (0);
118} 118}
119.Ed 119.Ed
120.\" .Pp 120.\" .Pp
121.\" The following example uses 121.\" The following example uses
122.\" .Fn nl_langinfo 122.\" .Fn nl_langinfo
123.\" to obtain the setting of the currency symbol for the current locale: 123.\" to obtain the setting of the currency symbol for the current locale:
124.\" .Pp 124.\" .Pp
125.\" .Bd 125.\" .Bd
126.\" #include \*[Lt]langinfo.h\*[Gt] 126.\" #include \*[Lt]langinfo.h\*[Gt]
127.\" #include \*[Lt]locale.h\*[Gt] 127.\" #include \*[Lt]locale.h\*[Gt]
128.\" int main(void) 128.\" int main(void)
129.\" { 129.\" {