File: cw.h

package info (click to toggle)
unixcw 1.1-3
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 204 kB
  • ctags: 286
  • sloc: ansic: 2,469; makefile: 32; sh: 16
file content (51 lines) | stat: -rw-r--r-- 2,075 bytes parent folder | download
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
/*
 * cw - header and definitions for morse code sender program; include
 *      in any program that will need to interface with the sender
 */

#ifndef _CW_H
#define	_CW_H

/* general command and query introducers */
#define	CW_CMD_ESCAPE	'@'		/* command escape character */
#define	CW_CMD_QUERY	'?'		/* query subcommand */
#define	CW_CMD_CWQUERY	'>'		/* cw report query subcommand */
#define	CW_CMD_END	';'		/* completes an embedded command */

/* specific command value specifiers */
#define	CW_CMDV_TONE	'T'		/* CW tone */
#define	CW_CMDV_WPM	'W'		/* CW words-per-minute */
#define	CW_CMDV_GAP	'G'		/* CW extra gaps in sending */
#define	CW_CMDV_ADJ	'A'		/* CW adjustment % on speed */
#define	CW_CMDV_ECHO	'E'		/* CW echo chars to stdout */
#define	CW_CMDV_MSGS	'M'		/* CW error msgs to stderr */
#define	CW_CMDV_CMDS	'C'		/* CW responds to @... embedded cmds */
#define	CW_CMDV_COMBO	'O'		/* CW allows [..] combinations */
#define	CW_CMDV_COMMENT	'P'		/* CW allows {..} combinations */
#define	CW_CMDV_QUIT	'Q'		/* CW program exit command */

/* combination and comment start and end characters */
#define	CW_COMBO_START		'['	/* begin [..] */
#define	CW_COMBO_END		']'	/* end [..] */
#define	CW_COMMENT_START	'{'	/* begin {..} */
#define	CW_COMMENT_END		'}'	/* begin {..} */

/* status values - first character of stderr messages */
#define	CW_STATUS_OK		'='	/* =... command accepted OK */
#define	CW_STATUS_ERR		'?'	/* ?... error in command */

/* limits on values of CW parameters */
#define	CW_MIN_TONE		0	/* lowest tone allowed (0=silent) */
#define	CW_MAX_TONE		10000	/* highest tone allowed */
#define	CW_MIN_WPM		1	/* lowest WPM allowed */
#define	CW_MAX_WPM		60	/* highest WPM allowed */
#define	CW_MIN_GAP		0	/* lowest extra gap allowed */
#define	CW_MAX_GAP		100	/* highest extra gap allowed */
#define	CW_MIN_ADJ		-50	/* allow timing shortened by 50% */
#define	CW_MAX_ADJ		50	/* allow timing lengthened by 50% */

/* list of sendable (soundable) characters */
#define	CW_OK_CHARS	" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"'$()+,-./:;=?_"

#endif /* _CW_H */