diff -Ncr webalizer-2.01-06/README.ja webalizer-2.01-06-ja/README.ja *** webalizer-2.01-06/README.ja Thu Jan 1 09:00:00 1970 --- webalizer-2.01-06-ja/README.ja Wed Nov 1 18:36:55 2000 *************** *** 0 **** --- 1,97 ---- + ## + ## Webalizer Japanese Patch + ## Yasuyuki Furukawa + ## Keio University in Japan, 1999 + ## + + Require + ------- + o Gd(libgd) library version 1.7 or later with an option of Kanji + TrueType fonts rendering. + o Freetype(libttf) library for TrueType font redering. + o PNG(libpng) and ZIP(libz) library + + Last two libraries are necessary when compilng the gd library + required. Of course, it's also necessary for a web server such as + apache to work at your machine... + + + Apply this patch and Compile the Webalizer + ------------------------------------------ + + Please type following in command line: + + % tar zxvf webalizer-x.y-z.tar.gz + % cd webalizer-x.y-z + % patch -p1 < {this patch} + % ./configure --with-language=japanese + % make + + Where this, 'x.y-z' is the webalizer version number. + And please take a deep breath and type following as root user. + + % make install + + Try to see a file 'INSTALL' for more information. + + + Setting the Japanese Webalizer + ------------------------------ + + This patch adds an option 'TrueTypeFont' to the setting file of + webalizer. The default setting file is '/etc/webalizer.conf'. This option + is used for TrueType font selection. + + ex) + TrueTypeFont /usr/share/fonts/truetype/watanabe-mincho.ttf + + If this option is null, the webalizer uses built-in fonts in the gd + library. In this case, all Kanji character will be turned. + + Attention + --------- + o about Kanji code + In default, the webalizer (patched with this) dumps progress + log messages in Japanese-EUC(Extend UNIX Code) encoding. If + you run the webalizer as a cron process, you must use + "nkf(Network Kanji Filter)" command to convert log messages + into JIS encoding so as to do away with the character + turning at E-mail of log reports. + + ex) + % webalizer | nkf -j + + Or, if your machine have nkf command, you can also make JIS + encoding version by following way: + + % sh lang/mklang_ja_jis.sh + % ./configure --with-language=japanese-jis + % make + + If you hope to do away more easly with Kanji coding trouble, + we can say that it's wise to make progress log messges in + English but only output HTML in Japanese. Then, please + reconfigure such as following and recompile the webalizer: + + % ./configure --with-language=japanese --enable-mininls + % make + + o about Image Format + The gd library version 1.7 makes PNG images instead of GIF + (used in the gd library 1.3) because of the license problem + of GIF. The Japanese version webalizer uses Kanji True Type + font rendering function in GD library 1.7. + Therefore the Japanese webalizer is only for PNG. + But you should know that all web browsers can't print PNG + images (though PNG is recommended by W3C!). For the present, + Netscape Communicater 4.x and Microsoft IE5 are okay. + + Changelog + --------- + * Tue Mar 21 2000 Yasuyuki Furukawa + - update for webalizer 2.00-06 + + * Sat Oct 9 1999 Yasuyuki Furukawa + - update for webalizer 1.30-4 + - using standard gd 1.7.x with freetype + - instead of gd 1.3 patched using the VFlib library. diff -Ncr webalizer-2.01-06/configure webalizer-2.01-06-ja/configure *** webalizer-2.01-06/configure Fri Oct 6 16:51:48 2000 --- webalizer-2.01-06-ja/configure Wed Nov 1 18:36:55 2000 *************** *** 37,42 **** --- 37,44 ---- --enable-dns Enable DNS lookup code" ac_help="$ac_help --with-language=language Use 'language' (default is english)" + ac_help="$ac_help + --enable-mininls Suppress national language log messages(for Japanese only)." # Initialize some variables set by options. # The variables have the same names as the options, with *************** *** 1673,1724 **** fi fi - echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 - echo "configure:1678: checking for main in -lpng" >&5 - ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" - LIBS="-lpng $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - LIBS="$ac_save_LIBS" - - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lpng ${LIBS}" - else - echo "$ac_t""no" 1>&6 - LIBPNG="no" - fi - - if test "$LIBPNG" = "no"; then - { echo "configure: error: png library not found... please install png." 1>&2; exit 1; } - fi - if test "$EXTRA_GD" = ""; then if test "$EXTRA_GDLIB" = ""; then ! echo $ac_n "checking for gdImagePng in -lgd""... $ac_c" 1>&6 ! echo "configure:1721: checking for gdImagePng in -lgd" >&5 ! ac_lib_var=`echo gd'_'gdImagePng | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1675,1685 ---- fi fi if test "$EXTRA_GD" = ""; then if test "$EXTRA_GDLIB" = ""; then ! echo $ac_n "checking for gdImageFill in -lgd""... $ac_c" 1>&6 ! echo "configure:1681: checking for gdImageFill in -lgd" >&5 ! ac_lib_var=`echo gd'_'gdImageFill | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1730,1739 **** /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ ! char gdImagePng(); int main() { ! gdImagePng() ; return 0; } EOF if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then --- 1691,1700 ---- /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ ! char gdImageFill(); int main() { ! gdImageFill() ; return 0; } EOF if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then *************** *** 1954,1959 **** --- 1915,2110 ---- echo "$ac_t""$ETCDIR" 1>&6 + export LD_LIBRARY_PATH + export CPPFLAGS + CPPFLAGS_BAK=$CPPFLAGS + LD_LIBRARY_PATH=${GDLOC}:${LD_LIBLARY_PATH} + CPPFLAGS="$CPPFLAGS_BAK -lpng -lz" + + echo $ac_n "checking for gdImageFill in -lgd""... $ac_c" 1>&6 + echo "configure:1540: checking for gdImageFill in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageFill | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lpng -lz ${LIBS}"; HAVE_PNG="yes" + else + echo "$ac_t""no" 1>&6 + HAVE_PNG="no" + fi + + + if test "$HAVE_PNG" = "yes" ;then + echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 + echo "configure:1583: checking for main in -lpng" >&5 + ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lpng $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lpng ${LIBS}" + else + echo "$ac_t""no" 1>&6 + LIBPNG="no" + fi + + if test "$LIBPNG" = "no"; then + { echo "configure: error: png library not found... please install png." 1>&2; exit 1; } + fi + fi + + CPPFLAGS="$CPPFLAGS_BAK -lttf" + echo $ac_n "checking for gdttfchar in -lgd""... $ac_c" 1>&6 + echo "configure:1626: checking for gdttfchar in -lgd" >&5 + ac_lib_var=`echo gd'_'gdttfchar | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lttf ${LIBS}"; HAVE_TTF="yes" + else + echo "$ac_t""no" 1>&6 + HAVE_TTF="no" + fi + + CPPFLAGS=$CPPFLAGS_BAK + + echo $ac_n "checking for gdSetKanjiFont in -lgd""... $ac_c" 1>&6 + echo "configure:1669: checking for gdSetKanjiFont in -lgd" >&5 + ac_lib_var=`echo gd'_'gdSetKanjiFont | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lVFlib2 ${LIBS}"; HAVE_KANJI_OLDGD="yes" + else + echo "$ac_t""no" 1>&6 + HAVE_KANJI_OLDGD="no" + fi + + + if test "$HAVE_TTF" = "yes" ;then + cat >> confdefs.h <<\EOF + #define HAVE_TTF 1 + EOF + + fi + if test "$HAVE_PNG" = "yes" ;then + cat >> confdefs.h <<\EOF + #define HAVE_PNG 1 + EOF + + fi + LANG_CACHE=yes # Check whether --with-language or --without-language was given. if test "${with_language+set}" = set; then *************** *** 1964,1969 **** --- 2115,2149 ---- fi if test "$WEBALIZER_LANG" = "no"; then WEBALIZER_LANG=english; fi + + if test "$WEBALIZER_LANG" = "japanese"; then + if test "$HAVE_TTF" = "no" -a "$HAVE_KANJI_OLDGD" = "no" ; then + echo "WARNING!: Japanese webalizer require the gd library that supports" + echo " True Type fonts (1.7 or later) or the old 1.3 gd patched" + echo " for Kanji." + echo " Please reinstall gd library!" + else + cat >> confdefs.h <<\EOF + #define JAPANESE 1 + EOF + + fi + + fi + + # Check whether --enable-mininls or --disable-mininls was given. + if test "${enable_mininls+set}" = set; then + enableval="$enable_mininls" + MININLS=$enableval + fi + + if test "$MININLS" = yes; then + cat >> confdefs.h <<\EOF + #define MINI_NLS 1 + EOF + + fi + echo $ac_n "checking for language file""... $ac_c" 1>&6 echo "configure:1969: checking for language file" >&5 if test "$LANG_CACHE" = "yes"; then diff -Ncr webalizer-2.01-06/configure.in webalizer-2.01-06-ja/configure.in *** webalizer-2.01-06/configure.in Fri Oct 6 16:51:49 2000 --- webalizer-2.01-06-ja/configure.in Wed Nov 1 18:36:55 2000 *************** *** 113,128 **** fi fi - dnl Check for png library -lpng - AC_CHECK_LIB(png, main, LIBS="-lpng ${LIBS}", LIBPNG="no") - if test "$LIBPNG" = "no"; then - AC_MSG_ERROR(png library not found... please install png.) - fi - dnl check for gd graphics library -lgd if test "$EXTRA_GD" = ""; then if test "$EXTRA_GDLIB" = ""; then ! AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_LIBGD="yes", HAVE_LIBGD="") fi fi --- 113,122 ---- fi fi dnl check for gd graphics library -lgd if test "$EXTRA_GD" = ""; then if test "$EXTRA_GDLIB" = ""; then ! AC_CHECK_LIB(gd, gdImageFill,LIBS="-lgd ${LIBS}"; HAVE_LIBGD="yes", HAVE_LIBGD="") fi fi *************** *** 161,170 **** --- 155,218 ---- AC_MSG_RESULT($ETCDIR) AC_SUBST(ETCDIR) + dnl + dnl check for detail of gd library + dnl + export LD_LIBRARY_PATH + export CPPFLAGS + CPPFLAGS_BAK=$CPPFLAGS + LD_LIBRARY_PATH=${GDLOC}:${LD_LIBLARY_PATH} + CPPFLAGS="$CPPFLAGS_BAK -lpng -lz" + + AC_CHECK_LIB(gd, gdImagePng, LIBS="-lpng -lz ${LIBS}"; HAVE_PNG="yes", HAVE_PNG="no") + + dnl Check for png library -lpng + if test "$HAVE_PNG" = "yes" ;then + AC_CHECK_LIB(png, main, LIBS="-lpng ${LIBS}", LIBPNG="no") + if test "$LIBPNG" = "no"; then + AC_MSG_ERROR(png library not found... please install png.) + fi + fi + + CPPFLAGS="$CPPFLAGS_BAK -lttf" + AC_CHECK_LIB(gd, gdttfchar, LIBS="-lttf ${LIBS}"; HAVE_TTF="yes", HAVE_TTF="no") + CPPFLAGS=$CPPFLAGS_BAK + + AC_CHECK_LIB(gd, gdSetKanjiFont, LIBS="-lVFlib2 ${LIBS}"; HAVE_KANJI_OLDGD="yes", HAVE_KANJI_OLDGD="no") + + if test "$HAVE_TTF" = "yes" ;then + AC_DEFINE(HAVE_TTF) + fi + if test "$HAVE_PNG" = "yes" ;then + AC_DEFINE(HAVE_PNG) + fi + LANG_CACHE=yes AC_ARG_WITH(language,--with-language=language Use 'language' (default is english), WEBALIZER_LANG="${withval}"; LANG_CACHE=no, LANG_CACHE=yes) if test "$WEBALIZER_LANG" = "no"; then WEBALIZER_LANG=english; fi + + if test "$WEBALIZER_LANG" = "japanese"; then + if test "$HAVE_TTF" = "no" -a "$HAVE_KANJI_OLDGD" = "no" ; then + echo "WARNING!: Japanese webalizer require the gd library that supports" + echo " True Type fonts (1.7 or later) or the old 1.3 gd patched" + echo " for Kanji." + echo " Please reinstall gd library!" + else + AC_DEFINE(JAPANESE) + fi + + fi + + dnl + dnl check for japanese webalizer + dnl + AC_ARG_ENABLE(mininls, [--enable-mininls Suppress national language log messages(for Japanese only).], + MININLS=$enableval) + if test "$MININLS" = yes; then + AC_DEFINE(MINI_NLS) + fi + dnl dnl check for valid language file dnl diff -Ncr webalizer-2.01-06/graphs.c webalizer-2.01-06-ja/graphs.c *** webalizer-2.01-06/graphs.c Fri Sep 29 12:50:30 2000 --- webalizer-2.01-06-ja/graphs.c Wed Nov 1 18:36:55 2000 *************** *** 56,61 **** --- 56,67 ---- #define XRAD 240 /* X-axis radius */ #define YRAD 200 /* Y-axis radius */ + #ifdef HAVE_PNG + # define GDIMAGEOUT(im, out) gdImagePng(im, out) + #else + # define GDIMAGEOUT(im, out) gdImageGif(im, out) + #endif /* !HAVE_PNG */ + /* forward reference internal routines */ void init_graph(char *, int, int); *************** *** 79,84 **** --- 85,130 ---- int black, white, grey, dkgrey, red, blue, orange, green, cyan, yellow; + #ifdef HAVE_TTF + /* + * Simple wrapper of gdImageString() for TrueType fonts + * + * Japanese version webalizer require GD 1.7 or later that + * supports kanji(JISX208) TTF. + * So, we must use TrueType fonts instead of gd built‐in + * bitmap fonts. + * + */ + static void gdImageStringWrapper(gdImagePtr im, gdFontPtr f, + int x, int y, + unsigned char *s, int color, double rad) + { + double ptsize = 11.0; + int brect[8]; + extern char *ttf_file; + + if (ttf_file == NULL || strcmp(ttf_file, "") == 0) { + if (fabs(rad) < PI/4.0) + gdImageString(im, f, x, y, s, color); + else + gdImageStringUp(im, f, x, y, s, color); + } else { + if (f == gdFontSmall) + ptsize = 9.0; + + gdImageStringTTF(im, brect, color, ttf_file, ptsize, rad, + x + (int)(ptsize*sin(rad)), + y + (int)(ptsize*cos(rad)), s); + } + } + + #define gdImageString(im, f, x, y, s, color) \ + gdImageStringWrapper(im, f, x, y, s, color, 0.0) + #define gdImageStringUp(im, f, x, y, s, color) \ + gdImageStringWrapper(im, f, x, y, s, color, PI/2.0) + #endif /* HAVE_TTF */ + + /*****************************************************************/ /* */ /* YEAR_GRAPH6x - Year graph with six data sets */ *************** *** 278,284 **** /* save png image */ if ((out = fopen(fname, "wb")) != NULL) { ! gdImagePng(im, out); fclose(out); } /* deallocate memory */ --- 324,330 ---- /* save png image */ if ((out = fopen(fname, "wb")) != NULL) { ! GDIMAGEOUT(im, out); fclose(out); } /* deallocate memory */ *************** *** 485,491 **** /* open file for writing */ if ((out = fopen(fname, "wb")) != NULL) { ! gdImagePng(im, out); fclose(out); } /* deallocate memory */ --- 531,537 ---- /* open file for writing */ if ((out = fopen(fname, "wb")) != NULL) { ! GDIMAGEOUT(im, out); fclose(out); } /* deallocate memory */ *************** *** 592,598 **** /* save as png file */ if ( (out = fopen(fname, "wb")) != NULL) { ! gdImagePng(im, out); fclose(out); } /* deallocate memory */ --- 638,644 ---- /* save as png file */ if ( (out = fopen(fname, "wb")) != NULL) { ! GDIMAGEOUT(im, out); fclose(out); } /* deallocate memory */ *************** *** 676,682 **** /* save png image */ if ((out = fopen(fname, "wb")) != NULL) { ! gdImagePng(im, out); fclose(out); } /* deallocate memory */ --- 722,728 ---- /* save png image */ if ((out = fopen(fname, "wb")) != NULL) { ! GDIMAGEOUT(im, out); fclose(out); } /* deallocate memory */ diff -Ncr webalizer-2.01-06/lang/mklang_ja_jis.sh webalizer-2.01-06-ja/lang/mklang_ja_jis.sh *** webalizer-2.01-06/lang/mklang_ja_jis.sh Thu Jan 1 09:00:00 1970 --- webalizer-2.01-06-ja/lang/mklang_ja_jis.sh Wed Nov 1 18:36:55 2000 *************** *** 0 **** --- 1,15 ---- + #!/bin/sh + IN_EUC=lang/webalizer_lang.japanese + OUT_JIS=lang/webalizer_lang.japanese-jis + echo making japanese jis language file \"$OUT_JIS\"... + cat $IN_EUC |sed -e 's/(EUC)/(JIS)/' \ + -e 's/\\/\/134/g' \ + -e 's/\"/\/042/g' \ + -e 's/%/\/045/g'|\ + nkf -j |sed -e 's/\\/\\134/g'\ + -e 's/%/\\045/g' \ + -e 's/\"/\\042/g' \ + -e 's//\\033/g' \ + -e 's/\/042/\"/g' \ + -e 's/\/045/%/g' > $OUT_JIS + echo done diff -Ncr webalizer-2.01-06/lang/webalizer_lang.japanese webalizer-2.01-06-ja/lang/webalizer_lang.japanese *** webalizer-2.01-06/lang/webalizer_lang.japanese Thu Jan 1 09:00:00 1970 --- webalizer-2.01-06-ja/lang/webalizer_lang.japanese Wed Nov 1 18:36:55 2000 *************** *** 0 **** --- 1,677 ---- + /* + webalizer_lang.japanese + + Webalizer V2.0x Language Support file for Japanese + 15-May-1998 by Bradford L. Barrett (brad@mrunix.net) + 31-May-1998 Modified for level 1.1 support (brad@mrunix.net) + 23-Jul-1998 Modified for level 1.2 support (brad@mrunix.net) + 08-Mar-1999 Updated HTTP 1.1 response codes by Yves Lafon (ylafon@w3.org) + 28-Jun-1999 Modified for level 1.3 support (brad@mrunix.net) + 16-Feb-2000 Modified for level 2.0 support (brad@mrunix.net) + + Japanese translated by Yasuyuki Furukawa + Japanese translation updated by Shin Shirahata + + Language files are named using the following convention: + + webalizer_lang.LANGUAGE + + where 'LANGUAGE' is the name of the language the file is + translated into (ie: webalizer_lang.russian for russian). + Either copy the desired language file to webalizer_lang.h + or create a symbolic link, then re-compile. + + If you translate this file into a different language, please + send a copy to brad@mrunix.net. + + */ + /***********************************************************************/ + /* DEFINE LANGUAGE NAME here */ + /***********************************************************************/ + + char *language = "Japanese(EUC)"; + + /***********************************************************************/ + /* */ + /* Informational messages */ + /* */ + /* These messages are only displayed while The Webalizer is being run, */ + /* usually to the screen, and are not part of the HTML output. */ + /* */ + /***********************************************************************/ + + /* these are only used in timing totals */ + /* Format: XXX records (XXX ignored, XXX bad) in X.XX seconds */ + #ifdef MINI_NLS + char *msg_records = "records"; + char *msg_addresses="addresses"; + char *msg_ignored = "ignored"; + char *msg_bad = "bad"; + char *msg_in = "in"; + char *msg_seconds = "seconds"; + #else /* !MINI_NLS */ + char *msg_records = "レコードありました. "; + char *msg_addresses="アドレス"; + char *msg_ignored = "行が無効"; + char *msg_bad = "行が不正"; + char *msg_in = "処理時間:"; + char *msg_seconds = "秒"; + #endif + + /* progress and setup error messages */ + #ifdef MINI_NLS + char *msg_log_err = "Error: Can't open log file"; + char *msg_log_use = "Using logfile"; + char *msg_dir_err = "Error: Can't change directory to"; + char *msg_dir_use = "Creating output in"; + char *msg_cur_dir = "current directory"; + char *msg_hostname= "Hostname for reports is"; + char *msg_ign_hist= "Ignoring previous history..."; + char *msg_no_hist = "History file not found..."; + char *msg_get_hist= "Reading history file..."; + char *msg_put_hist= "Saving history information..."; + char *msg_hist_err= "Error: Unable to write history file"; + char *msg_bad_hist= "Error: Ignoring invalid history record"; + char *msg_bad_conf= "Error: Unable to open configuration file"; + char *msg_bad_key = "Warning: Invalid keyword"; + char *msg_bad_date= "Error: Skipping record (bad date)"; + char *msg_ign_nscp= "Skipping Netscape header record"; + char *msg_bad_rec = "Skipping bad record"; + char *msg_no_vrec = "No valid records found!"; + char *msg_gen_rpt = "Generating report for"; + char *msg_gen_sum = "Generating summary report"; + char *msg_get_data= "Reading previous run data.."; + char *msg_put_data= "Saving current run data..."; + char *msg_no_data = "Previous run data not found..."; + char *msg_bad_data= "Error: Unable to restore run data"; + char *msg_data_err= "Error: Unable to save current run data"; + char *msg_dup_data= "Warning: Possible duplicate data found"; + #else /* !MINI_NLS */ + char *msg_log_err = "エラー: ログファイルを開けません"; + char *msg_log_use = "ログファイル ― "; + char *msg_dir_err = "エラー: ディレクトリを変更できません: "; + char *msg_dir_use = "作成ディレクトリ:"; + char *msg_cur_dir = "カレントディレクトリ"; + char *msg_hostname= "ホスト名 ― "; + char *msg_ign_hist= "以前のヒストリを無効にします..."; + char *msg_no_hist = "ヒストリファイルが見つかりません..."; + char *msg_get_hist= "ヒストリファイルの読み込み..."; + char *msg_put_hist= "ヒストリ情報の保存..."; + char *msg_hist_err= "エラー: ヒストリファイルを書き込めません"; + char *msg_bad_hist= "エラー: 有効なヒストリレコードを無視します"; + char *msg_bad_conf= "エラー: 設定ファイルが開けません"; + char *msg_bad_key = "警告: キーワードが間違っています"; + char *msg_bad_date= "エラー: レコードをスキップしました (不正な日付)"; + char *msg_ign_nscp= "ネットスケープヘッダレコードをスキップします"; + char *msg_bad_rec = "不正レコードをスキップします"; + char *msg_no_vrec = "有効なレコードが見つかりません!"; + char *msg_gen_rpt = "月別レポート作成 ― "; + char *msg_gen_sum = "総合レポートの作成"; + char *msg_get_data= "以前の実行データを読み込んでいます..."; + char *msg_put_data= "現在の実行データを保存しています..."; + char *msg_no_data = "以前の実行データが見つかりません..."; + char *msg_bad_data= "エラー: 実行データを修復できません"; + char *msg_data_err= "エラー: 現在の実行データを保存できません"; + char *msg_dup_data= "警告: 同一データが複数見つかりました"; + #endif /* !MINI_NLS */ + + /* DNS Stuff */ + #ifdef MINI_NLS + char *msg_dns_nocf= "No cache file specified, aborting..."; + char *msg_dns_nodb= "Error: Unable to open DNS cache file"; + char *msg_dns_nolk= "Error: Unable to lock DNS cache file"; + char *msg_dns_usec= "Using DNS cache file"; + char *msg_dns_rslv= "DNS Lookup"; + char *msg_dns_none= "None to process"; + #else /* !MINI_NLS */ + char *msg_dns_nocf= "キャッシュファイルがありません, 中断します..."; + char *msg_dns_nodb= "エラー: DNSキャッシュファイルを開けません"; + char *msg_dns_nolk= "エラー: DNSキャッシュファイルをロックできません"; + char *msg_dns_usec= "DNSキャッシュファイルを使用します"; + char *msg_dns_rslv= "DNS ルックアップ"; + char *msg_dns_none= "処理するものがありません"; + #endif /* !MINI_NLS */ + + /* memory allocation errors */ + #ifdef MINI_NLS + char *msg_nomem_ts= "Can't allocate enough memory, Top Sites disabled!"; + char *msg_nomem_tr= "Can't allocate enough memory, Top Referrers disabled!"; + char *msg_nomem_tu= "Can't allocate enough memory, Top URLs disabled!"; + char *msg_nomem_tc= "Can't allocate enough memory, Top Countries disabled!"; + char *msg_nomem_ta= "Can't allocate enough memory, Top User Agents disabled!"; + char *msg_nomem_tsr="Can't allocate enough memory, Top Search Strings disabled!"; + char *msg_nomem_ti= "Can't allocate enough memory, Top Usernames disabled!"; + char *msg_nomem_dh= "Error adding host node (daily), skipping"; + char *msg_nomem_mh= "Error adding host node (monthly), skipping"; + char *msg_nomem_u = "Error adding URL node, skipping"; + char *msg_nomem_a = "Error adding User Agent node, skipping"; + char *msg_nomem_r = "Error adding Referrer node, skipping"; + char *msg_nomem_sc= "Error adding Search String Node, skipping"; + char *msg_nomem_i = "Error adding Username node, skipping"; + #else /* !MINI_NLS */ + char *msg_nomem_ts= "十分なメモリを確保できないため, 上位サイト表を作成できません"; + char *msg_nomem_tr= "十分なメモリを確保できないため, 上位リンク元の表を作成できません"; + char *msg_nomem_tu= "十分なメモリを確保できないため, 上位URL表を作成できません"; + char *msg_nomem_tc= "十分なメモリを確保できないため, 上位国の表を作成できません"; + char *msg_nomem_ta= "十分なメモリを確保できないため, 上位ブラウザ表を作成できません"; + char *msg_nomem_tsr="十分なメモリを確保できないため, 上位検索文字列を作成できません"; + char *msg_nomem_ti= "十分なメモリを確保できないため, 上位ユーザ名表を作成できません"; + char *msg_nomem_dh= "ホストノード(日別)追加のエラー, スキップします"; + char *msg_nomem_mh= "ホストノード(月別)追加のエラー, スキップします"; + char *msg_nomem_u = "URLノード追加のエラー, スキップします"; + char *msg_nomem_a = "使用ブラウザノード追加のエラー, スキップします"; + char *msg_nomem_r = "リンク元ノード追加のエラー, スキップします"; + char *msg_nomem_sc= "検索文字列ノードの追加エラー, スキップします"; + char *msg_nomem_i = "ユーザ名ノードの追加エラー, スキップします"; + #endif /* !MINI_NLS */ + + /* log record errors */ + #ifdef MINI_NLS + char *msg_big_rec = "Error: Skipping oversized log record"; + char *msg_big_host= "Warning: Truncating oversized hostname"; + char *msg_big_date= "Warning: Truncating oversized date field"; + char *msg_big_req = "Warning: Truncating oversized request field"; + char *msg_big_ref = "Warning: Truncating oversized referrer field"; + char *msg_big_user= "Warning: Truncating oversized username"; + char *msg_big_one = "Warning: String exceeds storage size"; + #else /* !MINI_NLS */ + char *msg_big_rec = "エラー: オーバーサイズのレコードをスキップします"; + char *msg_big_host= "警告: ホスト名のオーバーサイズ分を切捨てます"; + char *msg_big_date= "警告: データ欄のオーバーサイズ分を切捨てます"; + char *msg_big_req = "警告: リクエスト欄のオーバーサイズ分を切捨てます"; + char *msg_big_ref = "警告: リンク元欄のオーバーサイズ分を切捨てます"; + char *msg_big_user= "警告: ユーザ名のオーバーサイズ分を切捨てます"; + char *msg_big_one = "警告: 文字列がメモリサイズを超えました"; + #endif /* !MINI_NLS */ + + /* misc errors */ + #ifdef MINI_NLS + char *msg_no_open = "Error: Unable to open file"; + #else /* !MINI_NLS */ + char *msg_no_open = "エラー: ファイルが開けません"; + #endif /* !MINI_NLS */ + + /* Help display... */ + char *h_usage1 = "使用法"; + char *h_usage2 = "[オプション] [ログファイル]"; + char *h_msg[]= { + "-h = このヘルプメッセージの表示" , + "-v -V = バージョン情報の表示" , + "-d = デバッグ補助情報の表示" , + "-F 形式 = ログ形式 (clf | ftp | squid)" , + "-F = FTPログ形式を利用する" , + "-f = シーケンス・エラーでもそれを混ぜる", + "-i = ヒストリファイルを無効にする" , + "-p = 現在の状態を留め、追加していく" , + "-q = 経過メッセージを抑制する" , + "-Q = 全てのメッセージを抑制する" , + "-Y = 国別グラフを利用しない" , + "-G = 時間別グラフを利用しない" , + "-H = 時間別表を抑制する" , + "-L = 色付グラフラベルを利用しない" , + "-l 数値 = グラフの背景行数" , + "-m 数値 = 訪問タイムアウト値 (HHMMSS形式)" , + "-T = タイム情報を出力する" , + "-c ファイル = 設定ファイルの指定" , + "-n ホスト = HTTPサーバホスト名の指定" , + "-o dir = 出力ディレクトリの指定" , + "-t タイトル = レポートタイトルの指定" , + "-a ブラウザ = ユーザブラウザを隠す" , + "-r リンク元 = リンク元を隠す" , + "-s サイト = リモートサイト名を隠す" , + "-u URL = URL名を隠す" , + "-x 名前 = HTML拡張子の指定" , + "-P 名前 = ページ種類拡張 '名前'" , + "-I 名前 = インデックスエイリアス名の指定" , + "-A 数値 = 表示する上位ブラウザ数の指定" , + "-C 数値 = 表示する上位国の数の指定" , + "-R 数値 = 表示する上位リンク元の数の指定" , + "-S 数値 = 表示する上位リモートサイト数の指定", + "-U 数値 = 表示する上位URL数の指定" , + "-e 数値 = 表示する上位エントリページの数" , + "-E 数値 = 表示する上位終了ページの数" , + "-g 数値 = ドメイン名の'値'レベル" , + "-X = 独自サイトを隠す" , + "-D 名前 = DNSキャッシュファイルの指定" , + "-N 数値 = DNS処理数s (0=無効)" , + NULL}; + + #define LAST_HLP_MSG (int)(sizeof(h_msg)/sizeof(char *)) + + /***********************************************************************/ + /* */ + /* HTML strings */ + /* */ + /* These strings are used as part of the HTML output generated by The */ + /* Webalizer. */ + /* */ + /***********************************************************************/ + + /* header strings */ + char *msg_hhdr_sp = "統計期間 "; + char *msg_hhdr_gt = "作成日: "; + char *msg_hhdr_date = "%Y年%m月%d日 %H時%M分 %Z"; + char *msg_hhdr_gmtdate = "%Y年%m月%d日 %H時%M分 GMT"; + char *msg_year = "年"; + + /* main index strings */ + char *msg_main_us = "アクセス統計 ― "; + char *msg_main_per= "12ヵ月前から現在まで"; + char *msg_main_sum= "月別統計"; + char *msg_main_da = "一日平均"; + char *msg_main_mt = "月間合計"; + + /* month HTML page strings */ + char *msg_hmth_du = "日別アクセス統計グラフ ― "; + char *msg_hmth_hu = "時間別アクセス統計グラフ ― "; + + /* table header strings */ + char *msg_h_by = "での"; + char *msg_h_max = "最大"; + char *msg_h_avg = "平均"; + char *msg_h_total = "合計"; + char *msg_h_totals= "合計"; + char *msg_h_day = "日にち"; + char *msg_h_mth = " 月"; + char *msg_h_hour = "時間"; + char *msg_h_hits = "ヒット"; + char *msg_h_pages = "ページ"; + char *msg_h_visits= "訪問"; + char *msg_h_files = "ファイル"; + char *msg_h_sites = "サイト"; + char *msg_h_xfer = "キロバイト"; + char *msg_h_hname = "ホスト名"; + char *msg_h_url = "URL名"; + char *msg_h_agent = "使用ブラウザ"; + char *msg_h_ref = "リンク元URL"; + char *msg_h_ctry = "国名"; + char *msg_h_search= "検索文字列"; + char *msg_h_uname = "ユーザ名"; + + /* links along top of page */ + char *msg_hlnk_ds = "日別統計"; + char *msg_hlnk_hs = "時間別統計"; + char *msg_hlnk_u = "URL別統計"; + char *msg_hlnk_s = "サイト別統計"; + char *msg_hlnk_a = "ブラウザ別"; + char *msg_hlnk_c = "国別"; + char *msg_hlnk_r = "リンク元別"; + char *msg_hlnk_en = "入口別"; + char *msg_hlnk_ex = "出口別"; + char *msg_hlnk_sr = "検索語別"; + char *msg_hlnk_i = "ユーザ"; + + /* monthly total table */ + char *msg_mtot_ms = "月間集計: "; + char *msg_mtot_th = "合計ヒット数"; + char *msg_mtot_tf = "合計転送ファイル数"; + char *msg_mtot_tx = "合計転送キロバイト数"; + char *msg_mtot_us = "アクセスされたリモート・サイトの分類統計"; + char *msg_mtot_ur = "アクセスページへのリンク元の分類統計"; + char *msg_mtot_ua = "ブラウザの分類統計"; + char *msg_mtot_uu = "アクセスのあったURL分類統計"; + char *msg_mtot_ui = "ユーザ名の分類統計"; + char *msg_mtot_mhd= "1日当たりの最大ヒット数"; + char *msg_mtot_mhh= "1時間当たりの最大ヒット数"; + char *msg_mtot_mfd= "1日当たりのファイル数"; + char *msg_mtot_mpd= "1日当たりのページ数"; + char *msg_mtot_mvd= "1日当たりの訪問数"; + char *msg_mtot_mkd= "1日当たりのキロバイト数"; + char *msg_mtot_rc = "応答コード別ヒット数"; + + /* daily total table */ + char *msg_dtot_ds = "日別アクセス統計 ― "; + + /* hourly total table */ + char *msg_htot_hs = "時間別アクセス統計 ― "; + + /* country pie chart */ + char *msg_ctry_use= "国別アクセス統計グラフ ― "; + + /* top tables */ + /* Japanese formatted as "All xxx something Top xxx rank" */ + char *msg_top_top = " 上位"; + char *msg_top_of = "位"; + char *msg_top_all = "全"; + char *msg_top_s = "サイト中"; + char *msg_top_u = "URL中"; + char *msg_top_r = "リンク元中"; + char *msg_top_a = "ブラウザ中"; + char *msg_top_c = "ヵ国中"; + char *msg_top_en = "入口ページ中"; + char *msg_top_ex = "出口ページ中"; + char *msg_top_sr = "検索文字列中"; + char *msg_top_i = "ユーザ名中"; + char *msg_v_sites = "全サイトの閲覧"; + char *msg_v_urls = "全URLの閲覧"; + char *msg_v_refs = "全リンク元の閲覧"; + char *msg_v_agents= "全ブラウザの閲覧"; + char *msg_v_search= "全検索語の閲覧"; + char *msg_v_users = "全ユーザ名の閲覧"; + + /* short month names MUST BE 3 CHARS in size... pad if needed*/ + char *s_month[12]={ "1月", "2月", "3月", + "4月", "5月", "6月", + "7月", "8月", "9月", + "10月", "11月", "12月"}; + + /* long month names - can be any length */ + char *l_month[12]={ "1月", "2月", "3月", + "4月", "5月", "6月", + "7月", "8月", "9月", + "10月", "11月", "12月"}; + + /* response code descriptions... order IS important! */ + struct response_code response[] = + { { "未定義の応答コード", 0 }, + { "Code 100 - 継続(Continue)", 0 }, + { "Code 101 - プロトコルの切り替わり", 0 }, + { "Code 200 - 正常(OK)", 0 }, + { "Code 201 - 作成(Created)", 0 }, + { "Code 202 - 受け取り(Accepted)", 0 }, + { "Code 203 - 認証情報がありません", 0 }, + { "Code 204 - 文章を含んでいません", 0 }, + { "Code 205 - コンテンツのリセット", 0 }, + { "Code 206 - 不完全なコンテンツです", 0 }, + { "Code 300 - 複数選択", 0 }, + { "Code 301 - 恒久的に移動されました", 0 }, + { "Code 302 - 見付かりました", 0 }, + { "Code 303 - 他を当たってください", 0 }, + { "Code 304 - 更新されていません", 0 }, + { "Code 305 - プロキシの使用", 0 }, + { "Code 307 - 一時的に移動されました", 0 }, + { "Code 400 - 不正リクエストです", 0 }, + { "Code 401 - 認証されませんでした", 0 }, + { "Code 402 - 支払が要求されています", 0 }, + { "Code 403 - アクセス制限されています", 0 }, + { "Code 404 - 見付かりません", 0 }, + { "Code 405 - 許可されていない手段です", 0 }, + { "Code 406 - 受け付り不可能です", 0 }, + { "Code 407 - プロキシの認証の要求", 0 }, + { "Code 408 - リクエストタイムアウト", 0 }, + { "Code 409 - 衝突(Conflict)", 0 }, + { "Code 410 - 消失(Gone)", 0 }, + { "Code 411 - 長さの要求", 0 }, + { "Code 412 - 前提条件が異なります", 0 }, + { "Code 413 - 要求内容が大きすぎます", 0 }, + { "Code 414 - リクエストURIが長すぎます", 0 }, + { "Code 415 - 未サポートのメディア形式です", 0 }, + { "Code 416 - 成功不能な要求範囲です", 0 }, + { "Code 417 - 予想に失敗しました", 0 }, + { "Code 500 - サーバー内部エラー", 0 }, + { "Code 501 - インプリメントされていません", 0 }, + { "Code 502 - ゲートウェイが正しくありません", 0 }, + { "Code 503 - サービスは利用できません", 0 }, + { "Code 504 - ゲートウェイのタイムアウト", 0 }, + { "Code 505 - 未サポートのHTTPバージョン", 0 } }; + + char *msg_title = "アクセス統計:"; + char *msg_h_other = "その他"; + + /* Country codes (previously in ctry.h header file) */ + + struct country_code ctry[] = { + { 0, "不明/未定義", 0,0,0 }, + { IDX_3C('c','o','m'), "商業組織 (com)", 0,0,0 }, + { IDX_3C('e','d','u'), "アメリカ 教育機関", 0,0,0 }, + { IDX_3C('g','o','v'), "アメリカ 政府機関", 0,0,0 }, + { IDX_3C('i','n','t'), "国際団体 (int)", 0,0,0 }, + { IDX_3C('m','i','l'), "アメリカ 軍事機関", 0,0,0 }, + { IDX_3C('n','e','t'), "ネットワーク (net)", 0,0,0 }, + { IDX_3C('o','r','g'), "非商業組織 (org)", 0,0,0 }, + { IDX_4C('a','r','p','a'),"旧形式ARPANET (arpa)", 0,0,0 }, + { IDX_4C('n','a','t','o'),"NATO領域 (nato)", 0,0,0 }, + { IDX_2C('a','c'), "英領アセンション島", 0,0,0 }, + { IDX_2C('a','d'), "アンドラ公国", 0,0,0 }, + { IDX_2C('a','e'), "アラブ首長国連邦", 0,0,0 }, + { IDX_2C('a','f'), "アフガニスタン", 0,0,0 }, + { IDX_2C('a','g'), "アンティグア・バーブーダ", 0,0,0 }, + { IDX_2C('a','i'), "アンギラ", 0,0,0 }, + { IDX_2C('a','l'), "アルバニア", 0,0,0 }, + { IDX_2C('a','m'), "アルメニア", 0,0,0 }, + { IDX_2C('a','n'), "オランダ領アンティル", 0,0,0 }, + { IDX_2C('a','o'), "アンゴラ", 0,0,0 }, + { IDX_2C('a','q'), "南極大陸", 0,0,0 }, + { IDX_2C('a','r'), "アルゼンチン", 0,0,0 }, + { IDX_2C('a','s'), "アメリカンサモア", 0,0,0 }, + { IDX_2C('a','t'), "オーストリア", 0,0,0 }, + { IDX_2C('a','u'), "オーストラリア", 0,0,0 }, + { IDX_2C('a','w'), "アルバ", 0,0,0 }, + { IDX_2C('a','z'), "アゼルバイジャン", 0,0,0 }, + { IDX_2C('b','a'), "ボスニア・ヘルツェゴビナ", 0,0,0 }, + { IDX_2C('b','b'), "バルバドス", 0,0,0 }, + { IDX_2C('b','d'), "バングラディシュ", 0,0,0 }, + { IDX_2C('b','e'), "ベルギー", 0,0,0 }, + { IDX_2C('b','f'), "ブルキナ・ファソ", 0,0,0 }, + { IDX_2C('b','g'), "ブルガリア", 0,0,0 }, + { IDX_2C('b','h'), "バーレーン", 0,0,0 }, + { IDX_2C('b','i'), "ブルンディ", 0,0,0 }, + { IDX_2C('b','j'), "ベナン", 0,0,0 }, + { IDX_2C('b','m'), "英領バミューダ", 0,0,0 }, + { IDX_2C('b','n'), "ブルネイ", 0,0,0 }, + { IDX_2C('b','o'), "ボリビア", 0,0,0 }, + { IDX_2C('b','r'), "ブラジル", 0,0,0 }, + { IDX_2C('b','s'), "バハマ", 0,0,0 }, + { IDX_2C('b','t'), "ブータン", 0,0,0 }, + { IDX_2C('b','v'), "ノルウェー領ブーベ島", 0,0,0 }, + { IDX_2C('b','w'), "ボツワナ", 0,0,0 }, + { IDX_2C('b','y'), "ベラルーシ", 0,0,0 }, + { IDX_2C('b','z'), "ベリーズ", 0,0,0 }, + { IDX_2C('c','a'), "カナダ", 0,0,0 }, + { IDX_2C('c','c'), "豪領ココス諸島", 0,0,0 }, + { IDX_2C('c','d'), "コンゴ民主共和国", 0,0,0 }, + { IDX_2C('c','f'), "中央アフリカ共和国", 0,0,0 }, + { IDX_2C('c','g'), "コンゴ共和国", 0,0,0 }, + { IDX_2C('c','h'), "スイス", 0,0,0 }, + { IDX_2C('c','i'), "コートジボアール", 0,0,0 }, + { IDX_2C('c','k'), "クック諸島", 0,0,0 }, + { IDX_2C('c','l'), "チリ", 0,0,0 }, + { IDX_2C('c','m'), "カメルーン", 0,0,0 }, + { IDX_2C('c','n'), "中華人民共和国", 0,0,0 }, + { IDX_2C('c','o'), "コロンビア", 0,0,0 }, + { IDX_2C('c','r'), "コスタリカ", 0,0,0 }, + { IDX_2C('c','s'), "(旧)チェコスロバキア", 0,0,0 }, + { IDX_2C('c','u'), "キューバ", 0,0,0 }, + { IDX_2C('c','v'), "カーポベルデ", 0,0,0 }, + { IDX_2C('c','x'), "豪領クリスマス諸島", 0,0,0 }, + { IDX_2C('c','y'), "キプロス", 0,0,0 }, + { IDX_2C('c','z'), "チェコ", 0,0,0 }, + { IDX_2C('d','e'), "ドイツ", 0,0,0 }, + { IDX_2C('d','j'), "ジブチ", 0,0,0 }, + { IDX_2C('d','k'), "デンマーク", 0,0,0 }, + { IDX_2C('d','m'), "ドミニカ", 0,0,0 }, + { IDX_2C('d','o'), "ドミニカ共和国", 0,0,0 }, + { IDX_2C('d','z'), "アルジェリア", 0,0,0 }, + { IDX_2C('e','c'), "エクアドル", 0,0,0 }, + { IDX_2C('e','e'), "エストニア", 0,0,0 }, + { IDX_2C('e','g'), "エジプト", 0,0,0 }, + { IDX_2C('e','h'), "西サハラ", 0,0,0 }, + { IDX_2C('e','r'), "エリトリア", 0,0,0 }, + { IDX_2C('e','s'), "スペイン", 0,0,0 }, + { IDX_2C('e','t'), "エチオピア", 0,0,0 }, + { IDX_2C('e','u'), "ヨーロッパ連合", 0,0,0 }, + { IDX_2C('f','i'), "フィンランド", 0,0,0 }, + { IDX_2C('f','j'), "フィジー", 0,0,0 }, + { IDX_2C('f','k'), "英領フォークランド諸島", 0,0,0 }, + { IDX_2C('f','m'), "ミクロネシア連邦", 0,0,0 }, + { IDX_2C('f','o'), "デンマーク領フェロー諸島", 0,0,0 }, + { IDX_2C('f','r'), "フランス", 0,0,0 }, + { IDX_2C('f','x'), "フランス(本国)", 0,0,0 }, + { IDX_2C('g','a'), "ガボン", 0,0,0 }, + { IDX_2C('g','b'), "イギリス", 0,0,0 }, + { IDX_2C('g','d'), "グレナダ", 0,0,0 }, + { IDX_2C('g','e'), "グルジア", 0,0,0 }, + { IDX_2C('g','f'), "仏領ギアナ", 0,0,0 }, + { IDX_2C('g','g'), "英領ガーンジー島", 0,0,0 }, + { IDX_2C('g','h'), "ガーナ", 0,0,0 }, + { IDX_2C('g','i'), "英領ジブラルタル", 0,0,0 }, + { IDX_2C('g','l'), "グリーンランド", 0,0,0 }, + { IDX_2C('g','m'), "ガンビア", 0,0,0 }, + { IDX_2C('g','n'), "ギニア", 0,0,0 }, + { IDX_2C('g','p'), "仏領グアドループ", 0,0,0 }, + { IDX_2C('g','q'), "赤道ギニア", 0,0,0 }, + { IDX_2C('g','r'), "ギリシャ", 0,0,0 }, + { IDX_2C('g','s'), "サウスジョージア・サウスサンドイッチ島", + 0,0,0 }, + { IDX_2C('g','t'), "グアテマラ", 0,0,0 }, + { IDX_2C('g','u'), "グアム", 0,0,0 }, + { IDX_2C('g','w'), "ギニアビサオ", 0,0,0 }, + { IDX_2C('g','y'), "ガイアナ", 0,0,0 }, + { IDX_2C('h','k'), "香港", 0,0,0 }, + { IDX_2C('h','m'), "豪領ハード・マクドナルド諸島", 0,0,0 }, + { IDX_2C('h','n'), "ホンジェラス", 0,0,0 }, + { IDX_2C('h','r'), "クロアチア", 0,0,0 }, + { IDX_2C('h','t'), "ハイチ", 0,0,0 }, + { IDX_2C('h','u'), "ハンガリー", 0,0,0 }, + { IDX_2C('i','d'), "インドネシア", 0,0,0 }, + { IDX_2C('i','e'), "アイルランド", 0,0,0 }, + { IDX_2C('i','l'), "イスラエル", 0,0,0 }, + { IDX_2C('i','m'), "英属領マン島", 0,0,0 }, + { IDX_2C('i','n'), "インド", 0,0,0 }, + { IDX_2C('i','o'), "英インド洋領", 0,0,0 }, + { IDX_2C('i','q'), "イラク", 0,0,0 }, + { IDX_2C('i','r'), "イラン", 0,0,0 }, + { IDX_2C('i','s'), "アイスランド", 0,0,0 }, + { IDX_2C('i','t'), "イタリア", 0,0,0 }, + { IDX_2C('j','e'), "英領ジャージー島", 0,0,0 }, + { IDX_2C('j','m'), "ジャマイカ", 0,0,0 }, + { IDX_2C('j','o'), "ヨルダン", 0,0,0 }, + { IDX_2C('j','p'), "日本", 0,0,0 }, + { IDX_2C('k','e'), "ケニア", 0,0,0 }, + { IDX_2C('k','g'), "キリギスタン", 0,0,0 }, + { IDX_2C('k','h'), "カンボジア", 0,0,0 }, + { IDX_2C('k','i'), "キリバス", 0,0,0 }, + { IDX_2C('k','m'), "コモロ", 0,0,0 }, + { IDX_2C('k','n'), "セントクリストファー・ネイビス", 0,0,0 }, + { IDX_2C('k','p'), "北朝鮮", 0,0,0 }, + { IDX_2C('k','r'), "大韓民国", 0,0,0 }, + { IDX_2C('k','w'), "クエート", 0,0,0 }, + { IDX_2C('k','y'), "ケイマン諸島", 0,0,0 }, + { IDX_2C('k','z'), "英領カザフスタン", 0,0,0 }, + { IDX_2C('l','a'), "ラオス", 0,0,0 }, + { IDX_2C('l','b'), "レバノン", 0,0,0 }, + { IDX_2C('l','c'), "セントルシア", 0,0,0 }, + { IDX_2C('l','i'), "リヒレンシュタイン", 0,0,0 }, + { IDX_2C('l','k'), "スリランカ", 0,0,0 }, + { IDX_2C('l','r'), "リベリア", 0,0,0 }, + { IDX_2C('l','s'), "レソト", 0,0,0 }, + { IDX_2C('l','t'), "リトアニア", 0,0,0 }, + { IDX_2C('l','u'), "ルクセンブルク", 0,0,0 }, + { IDX_2C('l','v'), "ラトビア", 0,0,0 }, + { IDX_2C('l','y'), "リビア", 0,0,0 }, + { IDX_2C('m','a'), "モロッコ", 0,0,0 }, + { IDX_2C('m','c'), "モナコ", 0,0,0 }, + { IDX_2C('m','d'), "モルドバ", 0,0,0 }, + { IDX_2C('m','g'), "マダガスカル", 0,0,0 }, + { IDX_2C('m','h'), "マーシャル諸島", 0,0,0 }, + { IDX_2C('m','k'), "マケドニア", 0,0,0 }, + { IDX_2C('m','l'), "マリ", 0,0,0 }, + { IDX_2C('m','m'), "ミャンマー", 0,0,0 }, + { IDX_2C('m','n'), "モンゴル", 0,0,0 }, + { IDX_2C('m','o'), "マカオ", 0,0,0 }, + { IDX_2C('m','p'), "北マリアナ諸島", 0,0,0 }, + { IDX_2C('m','q'), "仏領マルチニーク", 0,0,0 }, + { IDX_2C('m','r'), "モーリタニア", 0,0,0 }, + { IDX_2C('m','s'), "英領モントセラト", 0,0,0 }, + { IDX_2C('m','t'), "マルタ", 0,0,0 }, + { IDX_2C('m','u'), "モーリシャス", 0,0,0 }, + { IDX_2C('m','v'), "モルジブ", 0,0,0 }, + { IDX_2C('m','w'), "マワウィ", 0,0,0 }, + { IDX_2C('m','x'), "メキシコ", 0,0,0 }, + { IDX_2C('m','y'), "マレーシア", 0,0,0 }, + { IDX_2C('m','z'), "モザンビーク", 0,0,0 }, + { IDX_2C('n','a'), "ナミビア", 0,0,0 }, + { IDX_2C('n','c'), "ニューカレドニア", 0,0,0 }, + { IDX_2C('n','e'), "仏領ニジェール", 0,0,0 }, + { IDX_2C('n','f'), "豪領ノースフォーク諸島", 0,0,0 }, + { IDX_2C('n','g'), "ナイジェリア", 0,0,0 }, + { IDX_2C('n','i'), "ニカラグア", 0,0,0 }, + { IDX_2C('n','l'), "オランダ", 0,0,0 }, + { IDX_2C('n','o'), "ノルウェー", 0,0,0 }, + { IDX_2C('n','p'), "ネパール", 0,0,0 }, + { IDX_2C('n','r'), "ナウル", 0,0,0 }, + { IDX_2C('n','u'), "ニウエ", 0,0,0 }, + { IDX_2C('n','z'), "ニュージーランド", 0,0,0 }, + { IDX_2C('o','m'), "オマーン", 0,0,0 }, + { IDX_2C('p','a'), "パナマ", 0,0,0 }, + { IDX_2C('p','e'), "ペルー", 0,0,0 }, + { IDX_2C('p','f'), "仏領ポリネシア", 0,0,0 }, + { IDX_2C('p','g'), "パプアニューギニア", 0,0,0 }, + { IDX_2C('p','h'), "フィリピン", 0,0,0 }, + { IDX_2C('p','k'), "パキスタン", 0,0,0 }, + { IDX_2C('p','l'), "ポーランド", 0,0,0 }, + { IDX_2C('p','m'), "仏領サンピエール・ミクロン諸島", 0,0,0 }, + { IDX_2C('p','n'), "英領ピトケアン諸島", 0,0,0 }, + { IDX_2C('p','r'), "プエルトリコ", 0,0,0 }, + { IDX_2C('p','s'), "パレスチナ", 0,0,0 }, + { IDX_2C('p','t'), "ポルトガル", 0,0,0 }, + { IDX_2C('p','w'), "パラオ", 0,0,0 }, + { IDX_2C('p','y'), "パラグアイ", 0,0,0 }, + { IDX_2C('q','a'), "カタール", 0,0,0 }, + { IDX_2C('r','e'), "仏領レユニオン島", 0,0,0 }, + { IDX_2C('r','o'), "ルーマニア", 0,0,0 }, + { IDX_2C('r','u'), "ロシア連邦", 0,0,0 }, + { IDX_2C('r','w'), "ルワンダ", 0,0,0 }, + { IDX_2C('s','a'), "サウジアラビア", 0,0,0 }, + { IDX_2C('s','B'), "ソロモン諸島", 0,0,0 }, + { IDX_2C('s','c'), "セイシェル", 0,0,0 }, + { IDX_2C('s','d'), "スーダン", 0,0,0 }, + { IDX_2C('s','e'), "スウェーデン", 0,0,0 }, + { IDX_2C('s','g'), "シンガポール", 0,0,0 }, + { IDX_2C('s','h'), "英領セントヘレナ島", 0,0,0 }, + { IDX_2C('s','i'), "スロベニア", 0,0,0 }, + { IDX_2C('s','j'), "スバールバル・ヤンマイエン諸島", 0,0,0 }, + { IDX_2C('s','k'), "スロバキア共和国", 0,0,0 }, + { IDX_2C('s','l'), "シエラレオネ", 0,0,0 }, + { IDX_2C('s','m'), "サンマリノ", 0,0,0 }, + { IDX_2C('s','n'), "セネガル", 0,0,0 }, + { IDX_2C('s','o'), "ソマリア", 0,0,0 }, + { IDX_2C('s','r'), "スリナム", 0,0,0 }, + { IDX_2C('s','t'), "サントメ・プリンシペ", 0,0,0 }, + { IDX_2C('s','u'), "(旧)ソビエト連邦", 0,0,0 }, + { IDX_2C('s','v'), "エルサルバドル", 0,0,0 }, + { IDX_2C('s','y'), "リシア", 0,0,0 }, + { IDX_2C('s','z'), "スワジランド", 0,0,0 }, + { IDX_2C('t','c'), "仏領タークス・ナイコス諸島", 0,0,0 }, + { IDX_2C('t','d'), "チャド", 0,0,0 }, + { IDX_2C('t','f'), "仏南方領土", 0,0,0 }, + { IDX_2C('t','g'), "トーゴ", 0,0,0 }, + { IDX_2C('t','h'), "タイ", 0,0,0 }, + { IDX_2C('t','j'), "タジキスタン", 0,0,0 }, + { IDX_2C('t','k'), "トケラウ", 0,0,0 }, + { IDX_2C('t','m'), "トルクメニスタン", 0,0,0 }, + { IDX_2C('t','n'), "チュニジア", 0,0,0 }, + { IDX_2C('t','o'), "トンガ", 0,0,0 }, + { IDX_2C('t','p'), "東ティモール", 0,0,0 }, + { IDX_2C('t','r'), "トルコ", 0,0,0 }, + { IDX_2C('t','t'), "トリニダード・トバゴ", 0,0,0 }, + { IDX_2C('t','v'), "トゥヴァル", 0,0,0 }, + { IDX_2C('t','w'), "台湾", 0,0,0 }, + { IDX_2C('t','z'), "タンザニア", 0,0,0 }, + { IDX_2C('u','a'), "ウクライナ", 0,0,0 }, + { IDX_2C('u','g'), "ウガンダ", 0,0,0 }, + { IDX_2C('u','k'), "イギリス", 0,0,0 }, + { IDX_2C('u','m'), "アメリカ合衆国周辺離島", 0,0,0 }, + { IDX_2C('u','s'), "アメリカ合衆国", 0,0,0 }, + { IDX_2C('u','y'), "ウルグアイ", 0,0,0 }, + { IDX_2C('u','z'), "ウズベキスタン", 0,0,0 }, + { IDX_2C('v','a'), "バチカン市国", 0,0,0 }, + { IDX_2C('v','c'), "セントビンセント・グレナディーン諸島", + 0,0,0 }, + { IDX_2C('v','e'), "ベネズエラ", 0,0,0 }, + { IDX_2C('v','g'), "英領バージン諸島", 0,0,0 }, + { IDX_2C('v','i'), "米領バージン諸島", 0,0,0 }, + { IDX_2C('v','n'), "ベトナム", 0,0,0 }, + { IDX_2C('v','u'), "バヌアツ", 0,0,0 }, + { IDX_2C('w','f'), "仏領ワリスフツナ諸島", 0,0,0 }, + { IDX_2C('w','s'), "サモア", 0,0,0 }, + { IDX_2C('y','e'), "イエメン", 0,0,0 }, + { IDX_2C('y','t'), "仏領マヨット島", 0,0,0 }, + { IDX_2C('y','u'), "ユーゴスラビア", 0,0,0 }, + { IDX_2C('z','a'), "南アフリカ", 0,0,0 }, + { IDX_2C('z','m'), "ザンビア", 0,0,0 }, + { IDX_2C('z','r'), "ザイール", 0,0,0 }, + { IDX_2C('z','w'), "ジンバブエ", 0,0,0 }, + { 0 , NULL, 0,0,0 }}; + + #define MAX_CTRY (int)(sizeof(ctry)/sizeof(struct country_code)) diff -Ncr webalizer-2.01-06/output.c webalizer-2.01-06-ja/output.c *** webalizer-2.01-06/output.c Fri Sep 29 12:51:42 2000 --- webalizer-2.01-06-ja/output.c Wed Nov 1 18:36:55 2000 *************** *** 129,134 **** --- 129,140 ---- #define CYAN "#00E0FF" #define GRPCOLOR "#D0D0E0" + #ifdef HAVE_PNG + #define IMG_SUFFIX "png" + #else + #define IMG_SUFFIX "gif" + #endif + /* sort arrays */ UNODEPTR *u_array = NULL; /* Sort array for URL's */ HNODEPTR *h_array = NULL; /* hostnames (sites) */ *************** *** 141,146 **** --- 147,236 ---- FILE *out_fp; /*********************************************/ + /* MSG_DATE - return date */ + /* (MM - YYYY) as a string */ + /*********************************************/ + #ifndef JAPANESE + #define MSG_DATE(mth, year, month_table) \ + c_msg_date(mth, year, month_table) + + char *c_msg_date(int mth, int year, char **month_table) + { + static char date_buf[32]; + + sprintf(date_buf, "%s %d", month_table[mth-1], year); + + return date_buf; + } + + #else + + #define MSG_DATE(mth, year, month_table) \ + ja_msg_date(mth, year, month_table) + + char *ja_msg_date(int mth, int year, char **month_table) + { + static char date_buf[32]; + extern char *msg_year; + + sprintf(date_buf, "%d%s %s", + year, msg_year, month_table[mth-1]); + + return date_buf; + } + #endif /* !JAPANESE */ + + /*********************************************/ + /* MSG_TITLE - return title name as a string */ + /*********************************************/ + #ifndef JAPANESE + #define MSG_TITLE(msg_top_title, msg_h_type, num, total_num) \ + c_msg_title(msg_top_title, msg_h_type, num, total_num) + + char *c_msg_title(char *msg_top_title, char *msg_h_type, + int num, unsigned long total_num) + { + static char title_buf[128]; + + if (msg_h_type) { + sprintf(title_buf, "%s %d %s %lu %s %s %s\n", + msg_top_top, num, msg_top_of, + total_num, msg_top_title, msg_h_by, msg_h_type); + } else { + sprintf(title_buf, "%s %d %s %lu %s", + msg_top_top, num, msg_top_of, + total_num, msg_top_title); + } + return title_buf; + } + + #else + + #define MSG_TITLE(msg_top_title, msg_h_type, num, total_num) \ + ja_msg_title(msg_top_title, msg_h_type, num, total_num) + + char *ja_msg_title(char *msg_top_title, char *msg_h_type, + int num, unsigned long total_num) + { + static char title_buf[128]; + extern char *msg_top_all; + + if (msg_h_type) { + sprintf(title_buf, "%s %lu %s %s %s %s %d %s", + msg_top_all, + total_num,msg_top_title,msg_h_type,msg_h_by, + msg_top_top,num,msg_top_of); + } else { + sprintf(title_buf, "%s %lu %s %s %d %s", + msg_top_all, total_num, msg_top_title, + msg_top_top, num, msg_top_of); + } + return title_buf; + } + + #endif /* !JAPANESE */ + + /*********************************************/ /* WRITE_HTML_HEAD - output top of HTML page */ /*********************************************/ *************** *** 279,285 **** char htitle[256]; if (verbose>1) ! printf("%s %s %d\n",msg_gen_rpt, l_month[cur_month-1], cur_year); /* update history */ i=cur_month-1; --- 369,375 ---- char htitle[256]; if (verbose>1) ! printf("%s %s\n",msg_gen_rpt, MSG_DATE(cur_month, cur_year, l_month)); /* update history */ i=cur_month-1; *************** *** 296,308 **** /* fill in filenames */ sprintf(html_fname,"usage_%04d%02d.%s",cur_year,cur_month,html_ext); ! sprintf(png1_fname,"daily_usage_%04d%02d.png",cur_year,cur_month); ! sprintf(png2_fname,"hourly_usage_%04d%02d.png",cur_year,cur_month); /* create PNG images for web page */ if (daily_graph) { ! sprintf(dtitle,"%s %s %d",msg_hmth_du,l_month[cur_month-1],cur_year); month_graph6 ( png1_fname, /* filename */ dtitle, /* graph title */ cur_month, /* graph month */ --- 386,398 ---- /* fill in filenames */ sprintf(html_fname,"usage_%04d%02d.%s",cur_year,cur_month,html_ext); ! sprintf(png1_fname,"daily_usage_%04d%02d." IMG_SUFFIX,cur_year,cur_month); ! sprintf(png2_fname,"hourly_usage_%04d%02d." IMG_SUFFIX,cur_year,cur_month); /* create PNG images for web page */ if (daily_graph) { ! sprintf(dtitle,"%s %s",msg_hmth_du,MSG_DATE(cur_month,cur_year,l_month)); month_graph6 ( png1_fname, /* filename */ dtitle, /* graph title */ cur_month, /* graph month */ *************** *** 317,323 **** if (hourly_graph) { ! sprintf(htitle,"%s %s %d",msg_hmth_hu,l_month[cur_month-1],cur_year); day_graph3( png2_fname, htitle, th_hit, --- 407,413 ---- if (hourly_graph) { ! sprintf(htitle,"%s %s",msg_hmth_hu,MSG_DATE(cur_month,cur_year,l_month)); day_graph3( png2_fname, htitle, th_hit, *************** *** 329,335 **** /* first, open the file */ if ( (out_fp=open_out_file(html_fname))==NULL ) return 1; ! sprintf(buffer,"%s %d",l_month[cur_month-1],cur_year); write_html_head(buffer, out_fp); month_links(); month_total_table(); --- 419,425 ---- /* first, open the file */ if ( (out_fp=open_out_file(html_fname))==NULL ) return 1; ! sprintf(buffer,MSG_DATE(cur_month,cur_year,l_month)); write_html_head(buffer, out_fp); month_links(); month_total_table(); *************** *** 524,530 **** fprintf(out_fp,"\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY,msg_mtot_ms,l_month[cur_month-1],cur_year); fprintf(out_fp,"\n"); /* Total Hits */ fprintf(out_fp,"\n" \ --- 614,620 ---- fprintf(out_fp,"
" \ ! "%s %s %d
%s
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", GREY, msg_mtot_ms, MSG_DATE(cur_month,cur_year,l_month)); fprintf(out_fp,"\n"); /* Total Hits */ fprintf(out_fp,"\n" \ *************** *** 658,665 **** fprintf(out_fp,"\n"); /* Daily statistics for ... */ fprintf(out_fp,"\n", ! GREY,msg_dtot_ds,l_month[cur_month-1], cur_year); fprintf(out_fp,"\n"); fprintf(out_fp,"\n" \ --- 748,755 ---- fprintf(out_fp,"\n"); /* Daily statistics for ... */ fprintf(out_fp,"\n", ! GREY,msg_dtot_ds,MSG_DATE(cur_month,cur_year,l_month)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n" \ *************** *** 738,745 **** fprintf(out_fp,"
" \ ! "%s %s
%s
" \ ! "%s %s %d
" \ "%s
" \ ! "%s %s
" \ "%s
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY,msg_htot_hs,l_month[cur_month-1], cur_year); fprintf(out_fp,"\n"); fprintf(out_fp,"\n" \ --- 828,835 ---- fprintf(out_fp,"
"\ ! "%s %s %d
" \ "%s
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY,msg_htot_hs,MSG_DATE(cur_month, cur_year,l_month)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n" \ *************** *** 846,857 **** fprintf(out_fp,"
"\ ! "%s %s
" \ "%s
\n"); fprintf(out_fp,"\n"); if (flag) fprintf(out_fp,"\n", ! GREY, msg_top_top,tot_num,msg_top_of, ! t_site,msg_top_s,msg_h_by,msg_h_xfer); else fprintf(out_fp,"\n", ! GREY,msg_top_top, tot_num, msg_top_of, t_site, msg_top_s); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); --- 936,946 ---- fprintf(out_fp,"
" \ ! "%s %lu %s %lu %s %s %s
" \ ! "%s %lu %s %lu %s
" \ "#
\n"); fprintf(out_fp,"\n"); if (flag) fprintf(out_fp,"\n", ! GREY, MSG_TITLE(msg_top_s, msg_h_xfer, tot_num, t_site)); else fprintf(out_fp,"\n", ! GREY, MSG_TITLE(msg_top_s, NULL, tot_num, t_site)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); *************** *** 1031,1042 **** fprintf(out_fp,"
" \ ! "%s
" \ ! "%s
" \ "#
\n"); fprintf(out_fp,"\n"); if (flag) fprintf(out_fp,"\n", ! GREY,msg_top_top,tot_num,msg_top_of, ! t_url,msg_top_u,msg_h_by,msg_h_xfer); else fprintf(out_fp,"\n", ! GREY,msg_top_top,tot_num,msg_top_of,t_url,msg_top_u); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); --- 1120,1130 ---- fprintf(out_fp,"
" \ ! "%s %lu %s %lu %s %s %s
" \ ! "%s %lu %s %lu %s
" \ "#
\n"); fprintf(out_fp,"\n"); if (flag) fprintf(out_fp,"\n", ! GREY,MSG_TITLE(msg_top_u, msg_h_xfer, tot_num, t_url)); else fprintf(out_fp,"\n", ! GREY,MSG_TITLE(msg_top_u, NULL, tot_num, t_url)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); *************** *** 1238,1246 **** --- 1326,1338 ---- fprintf(out_fp,"
" \ ! "%s
" \ ! "%s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", + GREY,MSG_TITLE((flag)?msg_top_ex:msg_top_en, NULL, tot_num, (flag)?u_exit:u_entry)); + #if 0 "%s %lu %s %lu %s\n", GREY,msg_top_top,tot_num,msg_top_of, (flag)?u_exit:u_entry,(flag)?msg_top_ex:msg_top_en); + #endif fprintf(out_fp,"\n"); fprintf(out_fp,"\n", *************** *** 1334,1341 **** fprintf(out_fp,"
" \ + "%s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY, msg_top_top, tot_num, msg_top_of, t_ref, msg_top_r); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", --- 1426,1433 ---- fprintf(out_fp,"
" \ ! "%s %lu %s %lu %s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY, MSG_TITLE(msg_top_r, NULL, tot_num, t_ref)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", *************** *** 1496,1503 **** fprintf(out_fp,"
" \ ! "%s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY, msg_top_top, tot_num, msg_top_of, t_agent, msg_top_a); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", --- 1588,1595 ---- fprintf(out_fp,"
" \ ! "%s %lu %s %lu %s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY, MSG_TITLE( msg_top_a, NULL, tot_num, t_agent)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", *************** *** 1641,1648 **** fprintf(out_fp,"
" \ ! "%s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY, msg_top_top, tot_num, msg_top_of, a_ctr, msg_top_sr); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", --- 1733,1740 ---- fprintf(out_fp,"
" \ ! "%s %lu %s %lu %s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY, MSG_TITLE(msg_top_sr, NULL, tot_num, a_ctr)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", *************** *** 1760,1767 **** fprintf(out_fp,"
" \ ! "%s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY,msg_top_top, tot_num, msg_top_of, t_user, msg_top_i); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); --- 1852,1859 ---- fprintf(out_fp,"
" \ ! "%s %lu %s %lu %s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY,MSG_TITLE(msg_top_i, NULL, tot_num, t_user)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); *************** *** 1998,2005 **** pie_data[i]=top_ctrys[i]->count; /* load the array */ pie_legend[i]=top_ctrys[i]->desc; } ! sprintf(pie_title,"%s %s %d",msg_ctry_use,l_month[cur_month-1],cur_year); ! sprintf(pie_fname,"ctry_usage_%04d%02d.png",cur_year,cur_month); pie_chart(pie_fname,pie_title,t_hit,pie_data,pie_legend); /* do it */ --- 2090,2097 ---- pie_data[i]=top_ctrys[i]->count; /* load the array */ pie_legend[i]=top_ctrys[i]->desc; } ! sprintf(pie_title,"%s %s",msg_ctry_use,MSG_DATE(cur_month, cur_year, l_month)); ! sprintf(pie_fname,"ctry_usage_%04d%02d." IMG_SUFFIX,cur_year,cur_month); pie_chart(pie_fname,pie_title,t_hit,pie_data,pie_legend); /* do it */ *************** *** 2013,2020 **** fprintf(out_fp,"
" \ ! "%s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY,msg_top_top,tot_num,msg_top_of,tot_ctry,msg_top_c); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); --- 2105,2112 ---- fprintf(out_fp,"
" \ ! "%s %d %s %d %s
" \ "#
\n"); fprintf(out_fp,"\n"); fprintf(out_fp,"\n", ! GREY, MSG_TITLE(msg_top_c, NULL, tot_num, tot_ctry)); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); *************** *** 2327,2333 **** i=(s_mth==12)?1:s_mth+1; ! year_graph6x( "usage.png", /* filename */ buffer, /* graph title */ i, /* last month */ hist_hit, /* data set 1 */ --- 2419,2425 ---- i=(s_mth==12)?1:s_mth+1; ! year_graph6x( "usage." IMG_SUFFIX, /* filename */ buffer, /* graph title */ i, /* last month */ hist_hit, /* data set 1 */ *************** *** 2348,2354 **** } write_html_head(msg_main_per, out_fp); /* year graph */ ! fprintf(out_fp,"\"%s\"

\n",buffer); /* month table */ fprintf(out_fp,"

" \ ! "%s
" \ "#
\n"); --- 2440,2446 ---- } write_html_head(msg_main_per, out_fp); /* year graph */ ! fprintf(out_fp,"\"%s\"

\n",buffer); /* month table */ fprintf(out_fp,"

\n"); *************** *** 2389,2397 **** if ((hist_month[s_mth]==0) && (hist_files[s_mth]==0)) continue; days_in_month=(hist_lday[s_mth]-hist_fday[s_mth])+1; fprintf(out_fp,"\n", hist_year[s_mth], hist_month[s_mth], html_ext, ! s_month[hist_month[s_mth]-1], hist_year[s_mth]); fprintf(out_fp,"\n", hist_hit[s_mth]/days_in_month); fprintf(out_fp,"\n", --- 2481,2489 ---- if ((hist_month[s_mth]==0) && (hist_files[s_mth]==0)) continue; days_in_month=(hist_lday[s_mth]-hist_fday[s_mth])+1; fprintf(out_fp,"\n", hist_year[s_mth], hist_month[s_mth], html_ext, ! MSG_DATE(hist_month[s_mth], hist_year[s_mth], s_month)); fprintf(out_fp,"\n", hist_hit[s_mth]/days_in_month); fprintf(out_fp,"\n", diff -Ncr webalizer-2.01-06/sample.conf webalizer-2.01-06-ja/sample.conf *** webalizer-2.01-06/sample.conf Fri Sep 29 12:51:42 2000 --- webalizer-2.01-06-ja/sample.conf Wed Nov 1 18:36:55 2000 *************** *** 41,46 **** --- 41,51 ---- #OutputDir /var/lib/httpd/htdocs/usage + # TrueTypeFont is True Type font file for text in output image. + # It's necessary to make gd to support the freetype library. + + #TrueTypeFont /usr/share/fonts/truetype/watanabe-mincho.ttf + # HistoryName allows you to specify the name of the history file produced # by the Webalizer. The history file keeps the data for up to 12 months # worth of logs, used for generating the main HTML page (index.html). diff -Ncr webalizer-2.01-06/webalizer.c webalizer-2.01-06-ja/webalizer.c *** webalizer-2.01-06/webalizer.c Tue Oct 17 13:15:53 2000 --- webalizer-2.01-06-ja/webalizer.c Wed Nov 1 18:36:55 2000 *************** *** 138,143 **** --- 138,146 ---- char *blank_str = ""; /* blank string */ char *dns_cache = NULL; /* DNS cache file name */ int dns_children = 0; /* DNS children (0=don't do)*/ + #ifdef HAVE_TTF + char *ttf_file = ""; /* truetype font file */ + #endif int ntop_sites = 30; /* top n sites to display */ int ntop_sitesK = 10; /* top n sites (by kbytes) */ *************** *** 272,278 **** /* get command line options */ opterr = 0; /* disable parser errors */ ! while ((i=getopt(argc,argv,"a:A:c:C:dD:e:E:fF:g:GhHiI:l:Lm:M:n:N:o:pP:qQr:R:s:S:t:Tu:U:vVx:XY"))!=EOF) { switch (i) { --- 275,284 ---- /* get command line options */ opterr = 0; /* disable parser errors */ ! #ifdef HAVE_TTF ! #define TTF_GETOPT "Z:" ! #endif ! while ((i=getopt(argc,argv,"a:A:c:C:dD:e:E:fF:g:GhHiI:l:Lm:M:n:N:o:pP:qQr:R:s:S:t:Tu:U:vVx:XY" TTF_GETOPT))!=EOF) { switch (i) { *************** *** 318,323 **** --- 324,332 ---- case 'x': html_ext=optarg; break; /* HTML file extension */ case 'X': hide_sites=1; break; /* Hide ind. sites */ case 'Y': ctry_graph=0; break; /* Supress ctry graph */ + #ifdef HAVE_TTF + case 'Z': ttf_file=optarg; break; /* TrueType font file */ + #endif } } *************** *** 1439,1444 **** --- 1448,1457 ---- "DNSChildren", /* DNS Children (0=no DNS) 85 */ "DailyGraph", /* Daily Graph (0=no) 86 */ "DailyStats" /* Daily Stats (0=no) 87 */ + #ifdef HAVE_TTF + , "TrueTypeFont" /* TrueType Font file 88 */ + #endif + }; FILE *fp; *************** *** 1582,1587 **** --- 1595,1603 ---- #endif /* USE_DNS */ case 86: daily_graph=(value[0]=='n')?0:1; break; /* HourlyGraph */ case 87: daily_stats=(value[0]=='n')?0:1; break; /* HourlyStats */ + #ifdef HAVE_TTF + case 88: ttf_file=save_opt(value); break; /* TrueType font */ + #endif } } fclose(fp); *************** *** 1692,1702 **** --- 1708,1728 ---- now = time(NULL); /* convert to timestamp string */ if (local_time) + #ifndef JAPANESE strftime(timestamp,sizeof(timestamp),"%d-%b-%Y %H:%M %Z", localtime(&now)); + #else + strftime(timestamp,sizeof(timestamp),msg_hhdr_date, + localtime(&now)); + #endif else + #ifndef JAPANESE strftime(timestamp,sizeof(timestamp),"%d-%b-%Y %H:%M GMT", gmtime(&now)); + #else + strftime(timestamp,sizeof(timestamp),msg_hhdr_gmtdate, + localtime(&now)); + #endif return timestamp; }
" \ ! "%s %d%lu%lu
" \ ! "%s%lu%lu