Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src comments



details:   https://anonhg.NetBSD.org/src/rev/464d3ba3c4c0
branches:  trunk
changeset: 780604:464d3ba3c4c0
user:      yamt <yamt%NetBSD.org@localhost>
date:      Mon Jul 30 23:04:42 2012 +0000

description:
comments

diffstat:

 include/dirent.h      |   8 +++++++-
 lib/libintl/gettext.c |  21 +++++++++++++++++----
 2 files changed, 24 insertions(+), 5 deletions(-)

diffs (76 lines):

diff -r 5ba3337ad90b -r 464d3ba3c4c0 include/dirent.h
--- a/include/dirent.h  Mon Jul 30 23:02:41 2012 +0000
+++ b/include/dirent.h  Mon Jul 30 23:04:42 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dirent.h,v 1.34 2010/09/26 02:26:59 yamt Exp $ */
+/*     $NetBSD: dirent.h,v 1.35 2012/07/30 23:11:13 yamt Exp $ */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -56,7 +56,13 @@
 
 /* structure describing an open directory. */
 struct _dirdesc {
+       /*
+        * dd_fd should be kept intact to preserve ABI compat.  see dirfd().
+        */
        int     dd_fd;          /* file descriptor associated with directory */
+       /*
+        * the rest is hidden from user.
+        */
        long    dd_loc;         /* offset in current buffer */
        long    dd_size;        /* amount of data returned by getdents */
        char    *dd_buf;        /* data buffer */
diff -r 5ba3337ad90b -r 464d3ba3c4c0 lib/libintl/gettext.c
--- a/lib/libintl/gettext.c     Mon Jul 30 23:02:41 2012 +0000
+++ b/lib/libintl/gettext.c     Mon Jul 30 23:04:42 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gettext.c,v 1.27 2012/03/21 10:10:36 matt Exp $        */
+/*     $NetBSD: gettext.c,v 1.28 2012/07/30 23:04:42 yamt Exp $        */
 
 /*-
  * Copyright (c) 2000, 2001 Citrus Project,
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: gettext.c,v 1.27 2012/03/21 10:10:36 matt Exp $");
+__RCSID("$NetBSD: gettext.c,v 1.28 2012/07/30 23:04:42 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -215,6 +215,10 @@
        char *p, *q;
        char lpath_tmp[BUFSIZ];
 
+       /*
+        * LANGUAGE is a colon separated list of locale names.
+        */
+
        strlcpy(lpath_tmp, lpath, sizeof(lpath_tmp));
        q = lpath_tmp;
        /* CONSTCOND */
@@ -808,12 +812,21 @@
 {
        const char *lang;
 
-       /* 1. see LANGUAGE variable first. */
+       /*
+        * 1. see LANGUAGE variable first.
+        *
+        * LANGUAGE is a GNU extension.
+        * It's a colon separated list of locale names.
+        */
        lang = getenv("LANGUAGE");
        if (lang)
                return lang;
 
-       /* 2. if LANGUAGE isn't set, see LC_ALL, LC_xxx, LANG. */
+       /*
+        * 2. if LANGUAGE isn't set, see LC_ALL, LC_xxx, LANG.
+        *
+        * It's essentially setlocale(LC_xxx, NULL).
+        */
        lang = getenv("LC_ALL");
        if (!lang)
                lang = getenv(category_name);



Home | Main Index | Thread Index | Old Index