* [Bug 2278] ACTS flag3 mismatch between code and driver18.html.
+* Use an enum for the ACTS state table.
(4.2.7p306) 2012/09/15 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 752] ToS cleanup from Mike Tatarinov.
(4.2.7p305) 2012/09/15 Released by Harlan Stenn <stenn@ntp.org>
/*
* State machine codes
*/
-#define S_IDLE 0 /* wait for poll */
-#define S_SETUP 1 /* send modem setup */
-#define S_CONNECT 2 /* wait for answer */
-#define S_MSG 3 /* wait for timecode */
+typedef enum {
+ S_IDLE, /* wait for poll */
+ S_SETUP, /* send modem setup */
+ S_CONNECT, /* wait for answer */
+ S_MSG /* wait for timecode */
+} teModemState;
/*
* Unit control structure
static void acts_message (struct peer *, const char *);
static void acts_timecode (struct peer *, const char *);
static void acts_poll (int, struct peer *);
-static void acts_timeout (struct peer *, int);
+static void acts_timeout (struct peer *, teModemState);
static void acts_timer (int, struct peer *);
static void acts_close (struct peer *);
static void
acts_timeout(
struct peer *peer,
- int dstate
+ teModemState dstate
)
{
struct actsunit *up;