1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
/*
* Copyright 1986 by Larry Campbell, 73 Concord Street, Maynard MA 01754 USA
* (maynard!campbell). You may freely copy, use, and distribute this software
* subject to the following restrictions:
*
* 1) You may not charge money for it.
* 2) You may not remove or alter this copyright notice.
* 3) You may not claim you wrote it.
* 4) If you make improvements (or other changes), you are requested
* to send them to me, so there's a focal point for distributing
* improved versions.
*
* John Chmielewski (tesla!jlc until 9/1/86, then rogue!jlc) assisted
* by doing the System V port and adding some nice features. Thanks!
*/
/*
* updated by Daniel Suthers, dbs@tanj.com 1996 -- 2000
*/
#include <stdio.h>
#include "x10.h"
char *E_2MANY = EM_2MANY;
char *E_INVCN = EM_INVCN;
char *E_WNA = EM_WNA;
char *E_NMA = EM_NMA;
char *E_NOCMD = EM_NOCMD;
void exit();
int usage(s)
char *s;
{
char RCSID[]= "@(#) $Id: message.c,v 1.12 1999/12/26 20:37:17 dbs Exp dbs $\n";
/*
* Don't combine the two calls to fputs or my compiler will
* gag with "token too long"
*/
display(RCSID);
if( s != NULL )
(void) fprintf(stderr, "Command error: %s\n", s);
(void) fputs("Usage:\n\
heyu date returns date in date(1) input format\n", stderr);
(void) fputs("\
heyu erase Zeroes EEPROM, eraseing all events and macros\n\
heyu help prints this message and exits\n\
heyu info gets current settings\n\
heyu monitor monitor X10 activity (end with <BREAK>)\n\
heyu preset ann vv sets unit to level vv for next dim/bright\n\
heyu reset [housecode] reset interface to 'A' or specified housecode\n\
heyu setclock sets X10 clock to system clock\n\
heyu status ann[,nn...] returns status of smart modules (rr501...)\n\
heyu stop stops the current relay daemon\n\
heyu turn ann[,nn...] on|off|dim|bright [vv]\n\
changes state of housecode a, unit nn by vv\n\
heyu upload [check] Uploads schedule to CM11a or checks the file\n\
heyu version prints the version and exits\n\
", stderr);
(void) fputs("Verbose mode is enabled if the first parameter is -v\n",
stderr);
exit(1);
}
void error(s)
char *s;
{
extern void quit();
(void) fprintf(stderr, "HEYU: %s\n", s);
quit();
}
|