*** empty log message ***
[m17n/m17n-lib.git] / example / mdate.c
index 6f46599..9f8103f 100644 (file)
@@ -1,5 +1,5 @@
-/* mdate.c -- Show the sysmet date and time in all locales.
-   Copyright (C) 2003, 2004
+/* mdate.c -- Show system date/time in all locales.    -*- coding: euc-jp; -*-
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H15PRO112
 
 
    You should have received a copy of the GNU Lesser General Public
    License along with the m17n library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    02111-1307, USA.  */
 
 /***en
-    @page mdate display date and time
+    @enpage m17n-date display date and time
 
-    @section mdate-synopsis SYNOPSIS
+    @section m17n-date-synopsis SYNOPSIS
 
-    mdate [ OPTION ... ]
+    m17n-date [ OPTION ... ]
 
-    @section mdate-description DESCRIPTION
+    @section m17n-date-description DESCRIPTION
 
     Display the system date and time in many locales on a window.
 
     Print this message.
     </ul>
 */
+/***ja
+    @japage m17n-date Æü»þ¤òɽ¼¨¤¹¤ë
+
+    @section m17n-date-synopsis ¥·¥Î¥×¥·¥¹
+
+    m17n-date [ OPTION ... ]
+
+    @section m17n-date-description ÀâÌÀ
+
+    ¥·¥¹¥Æ¥à¤ÎÆü»þ¤ò¤µ¤Þ¤¶¤Þ¤Ê¥í¥±¡¼¥ë¤Ç¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤¹¤ë¡£ 
+
+    °Ê²¼¤Î¥ª¥×¥·¥ç¥ó¤¬ÍøÍѤǤ­¤ë¡£ 
+
+    <ul>
+
+    <li> --version
+
+    ¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òɽ¼¨¤¹¤ë¡£ 
+
+    <li> -h, --help
+
+    ¤³¤Î¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤¹¤ë¡£
+
+    </ul>
+*/
 
 #ifndef FOR_DOXYGEN
 
@@ -57,8 +82,6 @@
 #include <m17n.h>
 #include <m17n-misc.h>
 
-#define VERSION "1.0"
-
 /* Return a plist of all locales currently avairable on the system.
    The keys and values of the plist are locale name symbols and
    pointers to MLocale respectively.  */
@@ -149,8 +172,8 @@ main (int argc, char **argv)
        help_exit (argv[0], 0);
       else if (! strcmp (argv[i], "--version"))
        {
-         printf ("mdate (m17n library) %s\n", VERSION);
-         printf ("Copyright (C) 2003 AIST, JAPAN\n");
+         printf ("m17n-date (m17n library) %s\n", M17NLIB_VERSION_NAME);
+         printf ("Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 AIST, JAPAN\n");
          exit (0);
        }
       else
@@ -163,7 +186,7 @@ main (int argc, char **argv)
   if (merror_code != MERROR_NONE)
     FATAL_ERROR ("%s\n", "Fail to initialize the m17n library.");
 
-  /* Get a local list in LOCALE_LIST, and generate an M-text that
+  /* Get a locale list in LOCALE_LIST, and generate an M-text that
      contains date string in each locale.  */
   locale_list = list_system_locales ();
   mt = mtext ();
@@ -197,7 +220,7 @@ main (int argc, char **argv)
 
   /* Show the generated M-text by another example program "mview".  */
   {
-    FILE *p = popen ("mview", "w");
+    FILE *p = popen ("m17n-view", "w");
 
     if (!p)
       FATAL_ERROR ("%s\n", "Can't run the program mview!");