mcountd-general Mailing List for mcountd
Brought to you by:
kms
You can subscribe to this list here.
| 2000 |
Jan
(14) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-27 03:53:49
|
mcountd - millennium count down version 0.4. WHAT'S NEW: ========== - Various bug fixes and code clean-up. - Option for disabling roll-over such that the display will only show 00:00:00 when targettime is in the past. - Option for making mcountd exit at roll-over. Can f.ex. be used to trigger shell-scripts. - ELKS(i86) support is removed. AVAILABILITY: ============= http://mcountd.sourceforge.net ftp://download.sourceforge.net/pub/sourceforge/mcountd/ File archive: http://sourceforge.net/project/filelist.php?group_id=937 Karl -- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-23 20:03:05
|
On Sun, 23 Jan 2000, Joe Bentley wrote:
> I'm not familiar with ELKS. Last I heard the project still
> did not have a stable release. Has this changed?
I had a preliminary version of mcountd running on it, but ELKS is quite useless
at the moment. Other than the amusement factor, at least.
> > Just need to make a parser. Maybe I can use something from date?
>
> It's gpled. They _want_ you to use it. Or if you don't want
> to wrestle with importing someone else's code you could
> call date with system(3) and copy the output to a temp file.
I know it's GPL, but i thought that maybe the parsing would be too fancy for
mcountd. Anyway, I'm having a look at the date source to check it out.
> > > 4. the ability to end when the timer rolls over.
> > > This would make it possible to use it as a
> > > count-down timer for a shell script
> >
> > Simple. I will also add the function to have it display only zeros at
> > roll-over.
>
> And actually exit. So the user can make a script to the effect of
> mcountd ${auction_end_time}
> beep ; beep ; beep
2 extra options, one to stop the program before roll over, and one to let the
display stay at 00:00:00 after roll over.
> > The name is actually kind of stupid... I'll add your comment to the
> > webpage.
>
> The name was a great name until a few days ago. The only
> problem is that it is restrictive in the users mind. I see
> a 'millenial countdown timer' and have to exercise major
> cognition to realize that I can use the same thing for
> counting down to the end of an auction.
Well, I'm not really ready for a name change. I think I'll stick to mcountd
and not use "millennium count down" too much. That way, the "m" in mcountd can just
stand for some unknown word. I'll emphasize that this is a "general count down
utility" at freshmeat and on the webpages.
Karl
--
Karl-Martin Skontorp
E-Mail: <ksk...@cs...>
WWW: http://homepages.strath.ac.uk/~aeu99233/
|
|
From: Joe B. <rbe...@Pi...> - 2000-01-23 19:24:31
|
On Sun, 23 Jan 2000, Karl-Martin Skontorp wrote:
> On Thu, 20 Jan 2000, Joe Bentley wrote:
> > While we're on the subject of upgrades
> > 1. it would be helpful to use ncurses. that way
> > there wouldn't be that distracting scroll up
> > every second
>
> Indeed. My only concern is that this will very likely break the ELKS
> support, but since I do not have my 8088 machine here, there aren't really
> any i86 testing at all. I think I will remove all references to ELKS, this
> can be added again later, anyway.
I'm not familiar with ELKS. Last I heard the project still
did not have a stable release. Has this changed?
>
> Do you know ncurses?
I do know N curses for sufficiently small values of N :-)
>
> > 2. also it should use the environment variables
> > 'LINES' and 'COLS', if available, to determine
> > the proper size to draw the letters and scale
> > them to fit the screen. I generally use a
> > 140x44 window in X which makes the 80x25 look
> > really small
>
> Interesting ideas, but how can the scaling be implemented?
I think the easiest approach would be to use a vector
drawing approach for the digits. The digits are currently
specified with 10x13 bitmaps. Suppose we wish to convert
the representation of '3'. The vector form would be
=
|
-
|
-
moveto 1,0
lineto 8,0
-
||
-
|
-
moveto 9,1
lineto 9,5
-
|
=
|
-
moveto 1,6
lineto 8,6
-
|
-
||
-
moveto 9,7
lineto 9,11
-
|
-
|
=
moveto 1,12
lineto 8,12
Note that all those positions are against a 10x13 grid.
When you scale the grid by some factor dx,dy then you
also scale each of those positions. The result is a
scaled bitmap.
Except that that scaled bitmap would not look very good
for large resolutions because the segments would seem
to get thinner as the screen got bigger. So you have to
treat each segment as a rectangle. Right now each
rectangle has a width or a height of exactly one. That
would have to get scaled along with the grid.
>
> > 3. a more natural specification of time would
> > simplify the invocation. eg '12:34' instead
> > of calling date on the command line
>
> Just need to make a parser. Maybe I can use something from date?
It's gpled. They _want_ you to use it. Or if you don't want
to wrestle with importing someone else's code you could
call date with system(3) and copy the output to a temp file.
>
> > 4. the ability to end when the timer rolls over.
> > This would make it possible to use it as a
> > count-down timer for a shell script
>
> Simple. I will also add the function to have it display only zeros at
> roll-over.
And actually exit. So the user can make a script to the effect of
mcountd ${auction_end_time}
beep ; beep ; beep
>
> > 5. and a marketing shift. As a 'millenial count
> > down' it had a single purpose which ( depending
> > on your perspective of the y2k vs y2k+1 debate )
> > either passed or will pass in only 300+ days.
> > But it can be billed as the 'count down timer
> > _for_ the millenium'. Which extends its apparent
> > life for another thousand years.
>
> The name is actually kind of stupid... I'll add your comment to the
> webpage.
The name was a great name until a few days ago. The only
problem is that it is restrictive in the users mind. I see
a 'millenial countdown timer' and have to exercise major
cognition to realize that I can use the same thing for
counting down to the end of an auction.
>
> > For instance, I did not use it for counting down
> > on new year's eve, but I do use it for counting
> > down the time remaining on my ebay auctions.
>
> I had planned to use it at new years eve. I was going to bring my 8088
> laptop, which can withstand great impact, but failed to finish the port in
> time.
Champagne will do that to you.
|
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-23 15:12:00
|
On Thu, 20 Jan 2000, Joe Bentley wrote: > While we're on the subject of upgrades > 1. it would be helpful to use ncurses. that way > there wouldn't be that distracting scroll up > every second Indeed. My only concern is that this will very likely break the ELKS support, but since I do not have my 8088 machine here, there aren't really any i86 testing at all. I think I will remove all references to ELKS, this can be added again later, anyway. Do you know ncurses? > 2. also it should use the environment variables > 'LINES' and 'COLS', if available, to determine > the proper size to draw the letters and scale > them to fit the screen. I generally use a > 140x44 window in X which makes the 80x25 look > really small Interesting ideas, but how can the scaling be implemented? > 3. a more natural specification of time would > simplify the invocation. eg '12:34' instead > of calling date on the command line Just need to make a parser. Maybe I can use something from date? > 4. the ability to end when the timer rolls over. > This would make it possible to use it as a > count-down timer for a shell script Simple. I will also add the function to have it display only zeros at roll-over. > 5. and a marketing shift. As a 'millenial count > down' it had a single purpose which ( depending > on your perspective of the y2k vs y2k+1 debate ) > either passed or will pass in only 300+ days. > But it can be billed as the 'count down timer > _for_ the millenium'. Which extends its apparent > life for another thousand years. The name is actually kind of stupid... I'll add your comment to the webpage. > For instance, I did not use it for counting down > on new year's eve, but I do use it for counting > down the time remaining on my ebay auctions. I had planned to use it at new years eve. I was going to bring my 8088 laptop, which can withstand great impact, but failed to finish the port in time. Karl -- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-21 15:40:15
|
On Thu, 20 Jan 2000, Joe Bentley wrote: > [...] I'll answer all of your suggestions later today. > Let me know if I can help. Get yourself a sourceforge account (http://sourceforge.net), and I'll add you as a developer. Karl -- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Joe B. <rbe...@Pi...> - 2000-01-21 03:32:11
|
On Thu, 20 Jan 2000, Karl-Martin Skontorp wrote:
[ snip ]
>
> BTW, The new version of mcountd will probably be released tomorrow.
While we're on the subject of upgrades
1. it would be helpful to use ncurses. that way
there wouldn't be that distracting scroll up
every second
2. also it should use the environment variables
'LINES' and 'COLS', if available, to determine
the proper size to draw the letters and scale
them to fit the screen. I generally use a
140x44 window in X which makes the 80x25 look
really small
3. a more natural specification of time would
simplify the invocation. eg '12:34' instead
of calling date on the command line
4. the ability to end when the timer rolls over.
This would make it possible to use it as a
count-down timer for a shell script
5. and a marketing shift. As a 'millenial count
down' it had a single purpose which ( depending
on your perspective of the y2k vs y2k+1 debate )
either passed or will pass in only 300+ days.
But it can be billed as the 'count down timer
_for_ the millenium'. Which extends its apparent
life for another thousand years.
For instance, I did not use it for counting down
on new year's eve, but I do use it for counting
down the time remaining on my ebay auctions.
Let me know if I can help.
Thanks!
|
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-20 15:37:52
|
On Tue, 18 Jan 2000, Joe Bentley wrote: > In the home page on sourceforge > -- 'Creadits: Martin' > ++ 'Credits: Martin' Fixed! BTW, The new version of mcountd will probably be released tomorrow. -kms -- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Joe B. <rbe...@Pi...> - 2000-01-19 10:05:23
|
In the home page on sourceforge -- 'Creadits: Martin' ++ 'Credits: Martin' |
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-16 14:29:19
|
On Sun, 16 Jan 2000, Joe Bentley wrote: > In the sourceforge web page, in the section > 'About Mcountd-general' Fixed! > The next set of bugs deal with the .c file. I'll have a look at it later on, and perhaps release a new version. Thanks, Karl -- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Joe B. <rbe...@Pi...> - 2000-01-16 13:58:42
|
In the sourceforge web page, in the section
'About Mcountd-general'
-- 'is a very simple porgram'
++ 'is a very simple program'
The next set of bugs deal with the .c file.
The most serious bug is the use of the variable
timeleft ( declared in main() ). The source had
had two lines that referred to the address of
timeleft. I think one started with
sprintf( &timeleft, . . .
and the other with
print_number( &timeleft );
The problem here is that timeleft is declared as
char * timeleft;
sprintf and print_number require a 'char *'.
Taking the address of a 'char *' results in a
'char **'. This is not good. timeleft starts out
pointing to some random location in memory. The
sprintf overwrites the value of timeleft and any
nearby local variables.
Some other things I fixed were making print_number
a little clearer and faster, taking out some
superfluous code at the end of the options parsing,
using usleep(3) so that the display wouldnt miss
seconds, simplifying some of the time computations,
changing the display format so each field ( hours,
minutes, seconds ) displays with two digits, and
removing the redundant parentheses from the main
return ( ugh, modula2 ).
I am appending the modified files. Everything I
changed I marked with a '//'. You can remove the
'//' once you verify the changes.
### from mcountd.h
#define CHARACTER_IMAGE_HEIGHT 13
char *colon_pointer[ CHARACTER_IMAGE_HEIGHT ]=
. . .
char *number_pointer[ '9'-'0'+1 ][ CHARACTER_IMAGE_HEIGHT ]={
. . .
### from mcountd.c
/*
* mcountd.c - millennium count down
* version 0.3
*
* Copyright (c) by Karl-Martin Skontorp <ksk...@cs...>
* Martin Dahl <da...@vf...>
* Anders Hermansen <ahe...@vf...>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <unistd.h> //
#include "mcountd.h"
int main(int argc, char *argv[]);
void print_number(char *nmbr );
void show_params();
void show_version();
int main(int argc, char **argv)
{
/* Time for January 1, 2000 00:00:00 */
long targettime = 946681200;
long curtime;
long difftime;
long last_time_printed;
int rollover = 0;
int dayss;
int hours;
int mins;
int secs;
int filler_lines; //
char timeleft[ 128 ]; //
int a;
#ifdef i86
int i;
#endif
/* Parse the command line */
if (argc!= 1)
{
for (a=1; a<argc; a++)
{
if (argv[a][0]!='-')
show_params();
else /* -* */
{
if (argv[a][1]=='t') /* -t targettime */
{
a++;
targettime = atol(argv[a]);
} else
{
if (argv[a][1]=='u') /* -u updaterate */
{
a++;
updaterate = atol(argv[a]);
} else
{
if (argv[a][1]=='h')
{
show_params();
} else
{
if (argv[a][1]=='v')
{
show_version();
} else
{
if (argv[a][1]!=104)
{
printf("Unknown parameter.\n");
show_params();
}
}
}
}
}
}
}
}
//
last_time_printed = -1; //
while (1)
{
/* Compute times */
curtime = time(0);
if( last_time_printed != curtime ) //
{
rollover = targettime < curtime; //
difftime = abs( targettime - curtime ); //
dayss=difftime/86400;
hours=(difftime%86400)/3600;
mins=(difftime%3600)/60;
secs=difftime%60;
if (rollover)
{
printf("%i days since roll-over.\n\n", dayss);
} else
{
printf("%i days left.\n\n", dayss);
}
sprintf( timeleft, "%2.2i:%2.2i:%2.2i", hours,mins,secs); //
print_number( timeleft );
filler_lines = tlines - ( CHARACTER_IMAGE_HEIGHT + 2 );
while( filler_lines-- )
fputc( '\n', stdout );
last_time_printed = curtime;
}
#ifdef i386
usleep( 250 ); //
#endif
#ifdef i86
for (i = 0; i < c ; i++)
{
}
#endif
}
return 0; //
}
//
void print_number(char *nmbr )
{
unsigned y;
int c;
char * nmbr_index,
** image_source;
for( y = 0; y < CHARACTER_IMAGE_HEIGHT; y++ )
{
for( nmbr_index = nmbr; ( c = *nmbr_index++ ); )
{
image_source = isdigit( c )
? number_pointer[ c - '0' ]
: colon_pointer;
printf( "%s ", image_source[ y ] );
}
fputc( '\n', stdout );
}
}
void show_version(){
printf("mcountd - millennium count down, version 0.3\n");
printf("This is free software with ABSOLUTELY NO WARRANTY.\n");
printf("See included file COPYING for more information.\n");
exit(1);
}
void show_params() {
printf("mcountd - millennium count down, version 0.3\n");
printf(" by Karl-Martin Skontorp,\n");
printf(" Martin Dahl and Anders Hermansen.\n");
printf(" http://mcountd.sourceforge.net\n");
printf("\n");
printf("This is free software with ABSOLUTELY NO WARRANTY.\n");
printf("See included file COPYING for more information.\n");
printf("\n");
printf("options: -t Targettime for count down in seconds since\n");
printf(" 01.01.1970 00:00:00. Default: 01.01.2000 00:00:00.\n");
printf(" -u Seconds between update. Default: 1.\n");
printf(" -v Show version.\n");
printf(" -h Show this message.\n");
exit(1);
}
|
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-14 00:06:57
|
-- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-13 03:57:25
|
mcountd - millennium count down version 0.3 WHAT'S NEW: ========== Added these command line options: - for displaying version, - and for adjusting update rate. Roll-over function is also added. This means that if the targettime is in the past, the program will count the time that has elapsed since targettime instead of just showing zeros. AVAILABILITY: ============= http://mcountd.sourceforge.net File archive: http://sourceforge.net/project/filelist.php?group_id=937 Karl -- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-09 23:28:48
|
mcountd - millennium count down version 0.2 WHAT'S NEW: ========== - The ability to specify targettime from the command line is added. See README for more information. AVAILABILITY: ============= http://mcountd.sourceforge.net File archive: http://sourceforge.net/project/filelist.php?group_id=937 Karl -- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |
|
From: Karl-Martin S. <ksk...@cs...> - 2000-01-06 11:15:03
|
-- Karl-Martin Skontorp E-Mail: <ksk...@cs...> WWW: http://homepages.strath.ac.uk/~aeu99233/ |