Version 0.2.1 baby!
This commit is contained in:
parent
1ea5901e90
commit
c234420a44
2 changed files with 6 additions and 3 deletions
|
@ -2,18 +2,20 @@
|
||||||
* RSMeter - read from 22-168A series meters. See README for details.
|
* RSMeter - read from 22-168A series meters. See README for details.
|
||||||
* By Dan Ponte
|
* By Dan Ponte
|
||||||
*/
|
*/
|
||||||
|
/* $Amigan: rsmeter/src/main.c,v 1.3 2004/10/27 23:13:32 dcp1990 Exp $ */
|
||||||
#include "rsmeter.h"
|
#include "rsmeter.h"
|
||||||
short metertimeout = 12;
|
short metertimeout = 12;
|
||||||
|
char cvsid[] = "$Amigan: rsmeter/src/main.c,v 1.3 2004/10/27 23:13:32 dcp1990 Exp $";
|
||||||
char* logfi;
|
char* logfi;
|
||||||
time_t now, metertime = 0;
|
time_t now, metertime = 0;
|
||||||
void usage(char* whatcalled)
|
void usage(char* whatcalled)
|
||||||
{
|
{
|
||||||
|
|
||||||
fprintf(stderr, "RSMeter (C) Dan Ponte.\nUsage: %s [-c] [-l logfile] [-t timeout] -s <SerDevice>\n"
|
fprintf(stderr, "RSMeter v%s\n(C) Dan Ponte.\nUsage: %s [-c] [-l logfile] [-t timeout] -s <SerDevice>\n"
|
||||||
"\t-c: Hide cursor.\n"
|
"\t-c: Hide cursor.\n"
|
||||||
"\t-l logfile: logs to file. Will APPEND, not write over.\n"
|
"\t-l logfile: logs to file. Will APPEND, not write over.\n"
|
||||||
"\t-t timeout: Quit after timeout seconds of no response.\n",
|
"\t-t timeout: Quit after timeout seconds of no response.\n",
|
||||||
whatcalled);
|
VERSION, whatcalled);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
|
@ -58,7 +60,7 @@ int main(int argc, char* argv[])
|
||||||
nums = newwin(LPN + 3, (COLPN * 6) + 6, (LINES - (LPN + 3))/ 2, (COLS - (COLPN * 6)) / 2);
|
nums = newwin(LPN + 3, (COLPN * 6) + 6, (LINES - (LPN + 3))/ 2, (COLS - (COLPN * 6)) / 2);
|
||||||
alph = newwin(1, 20, ((LINES - (LPN + 3)) / 2) -1, (COLS - (COLPN * 6)) / 2);
|
alph = newwin(1, 20, ((LINES - (LPN + 3)) / 2) -1, (COLS - (COLPN * 6)) / 2);
|
||||||
refresh();
|
refresh();
|
||||||
printw("RSMeter (C)2004, Dan Ponte\n");
|
printw("RSMeter v%s. (C)2004, Dan Ponte\n", VERSION);
|
||||||
mvprintw(2, 1, " \n");
|
mvprintw(2, 1, " \n");
|
||||||
refresh();
|
refresh();
|
||||||
mvprintw(LINES - 1, 1, "Keys: q - quit\t\t%s", logging ? "s - stop logging" : "" );
|
mvprintw(LINES - 1, 1, "Keys: q - quit\t\t%s", logging ? "s - stop logging" : "" );
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#define VERSION "0.2.1"
|
||||||
int fd, siz, status, logging;
|
int fd, siz, status, logging;
|
||||||
FILE* logfil;
|
FILE* logfil;
|
||||||
struct tm tim;
|
struct tm tim;
|
||||||
|
|
Loading…
Reference in a new issue