Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Japanese localization of pppcosts (fwd)
- To: "Tokyo Linux Abusers' Group" <tlug@example.com>
- Subject: Japanese localization of pppcosts (fwd)
- From: Dennis McMurchy <denismcm@example.com>
- Date: Sun, 10 Nov 1996 22:41:57 +0900 (GMT+0900)
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- Reply-To: tlug@example.com
- Sender: owner-tlug
Hi, Thought some of you might also find this tiny program a gem like I did. It keeps a running tally of your time on line and costs in a little window. I've sent the author some localizations for Japan, which I forward below. You can pick up the original program at: ftp.suse.de/Incoming/pppcosts-0.02.tgz It's only about 9K. Dennis McMurchy, Tojinmachi, Fukuoka ---------- Forwarded message ---------- Date: Sun, 10 Nov 1996 22:27:12 +0900 (GMT+0900) From: Dennis McMurchy <denismcm@example.com> To: tst@example.com Subject: Japanese localization of pppcosts Hi, Like your pppcosts stuff very much. It's minimalist and easy to use. Does exactly what I want (I've had a stopwatch on my modem and a pencil and paper record till now). The Japanese conversion was easy to do. I'm including the 'ntt-costs.c' file I made and a patch for 'pppcosts.c' to eliminate the .00 from the display, which is unnecessary for Japanese yen. I noticed that if the line in ntt_costs.c: #define COSTS_PER_UNIT 10. does not have the decimal (period), then there is no display of costs - it remains 0.00. Anyway, thanks for the great work and hope you'll include the Japanese stuff in your next distribution! Dennis McMurchy, Tojinmachi, Fukuoka ----------------------------------------------(ntt_costs.c) /* This file is part of PPPCOSTS, version 0.01. Copyright (c) 1996 Tillmann Steinbrecher. Modified by Dennis McMurchy for Japan NTT rates 11/96 May be distributed according to the terms of the GNU General Public License version 2. Phone costs for the Japan NTT . I think that ****** THE JAPAN NTT SUCKS BIGTIME ! ****** Have a look at these prices and you'll understand why! Please modify this file for your phone company's prices and send it to tst@example.com Thanks a lot! Local Area ("City-Tarif") prices. No warranty. */ /* FYI this unit cost of 10 Japanese yen = 0.13 DM = 0.09 US$*/ #define COSTS_PER_UNIT 10. #define CURRENCY "JY " int getunitlength(time_t tt){ int unitsecs; struct tm* ct; /* Phone unit lengths for Japan NTT - hardcoded. */ ct=localtime(&tt); /* printf(" It's %u o'clock.\n", ct->tm_hour); */ /* weekend discount does not affect local calls at all */ if(ct->tm_hour < 8) unitsecs=240; else if(ct->tm_hour>=8 && ct->tm_hour<23) unitsecs=180; else if(ct->tm_hour> 23) unitsecs=240; return unitsecs; } --------------------------------------------------(jp.patch) *** pppcosts.c.orig Sun Nov 10 22:36:07 1996 --- pppcosts.c Sun Nov 10 22:12:10 1996 *************** *** 15,19 **** #include <time.h> ! #include "dt-costs.c" #define PPP_PID_FILE "/var/run/ppp0.pid" --- 15,19 ---- #include <time.h> ! #include "ntt-costs.c" #define PPP_PID_FILE "/var/run/ppp0.pid" *************** *** 50,54 **** for(;;){ ! printf("Total online: %.2ld:%.2ld:%.2ld (%ld units, " CURRENCY "%.2f)\n", tottime / 3600 , (tottime % 3600) / 60, tottime % 60, totunits, totunits * COSTS_PER_UNIT); --- 50,54 ---- for(;;){ ! printf("Total online: %.2ld:%.2ld:%.2ld (%ld units, " CURRENCY "%.0f)\n", tottime / 3600 , (tottime % 3600) / 60, tottime % 60, totunits, totunits * COSTS_PER_UNIT); *************** *** 99,103 **** units++; ! fprintf(stderr, "ONLINE: %.2ld:%.2ld:%.2ld (%u units, " CURRENCY "%.2f) \r", online_secs / 3600 , (online_secs % 3600) / 60, online_secs % 60, units, units * COSTS_PER_UNIT); --- 99,103 ---- units++; ! fprintf(stderr, "ONLINE: %.2ld:%.2ld:%.2ld (%u units, " CURRENCY "%.0f) \r", online_secs / 3600 , (online_secs % 3600) / 60, online_secs % 60, units, units * COSTS_PER_UNIT); ----------------------------------------------------------------- a word from the sponsor will appear below ----------------------------------------------------------------- The TLUG mailing list is proudly sponsored by TWICS - Japan's First Public-Access Internet System. Now offering 20,000 yen/year flat rate Internet access with no time charges. Full line of corporate Internet and intranet products are available. info@example.com Tel: 03-3351-5977 Fax: 03-3353-6096
Home | Main Index | Thread Index
- Prev by Date: Re: Two new Japanese guides to Linux
- Next by Date: Japanese localization of pppcosts again
- Prev by thread: Web Page Update
- Next by thread: Japanese localization of pppcosts again
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links