home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_12
/
8n12122b
< prev
next >
Wrap
Text File
|
1990-10-30
|
644b
|
41 lines
/**** LISTING 4 *******/
/* State names */
static char *state_name[] = {
"Error",
"OFF",
"POWER",
"READY",
"PLAY",
"FAST_F",
"REWIND",
"RECORD",
};
/* Functions in the Function Lists */
int disp_state(arg)
ARG *arg;
{
printf("State is: %s\n", state_name[arg->cur_state]);
}
int inc_channel(arg)
ARG *arg;
{
arg->chan++;
printf("Channel is: %d\n", (arg->chan % MAX_CHAN) + 1);
}
int dec_channel(arg)
ARG *arg;
{
arg->chan--;
if (!arg->chan)
arg->chan = MAX_CHAN;
printf("Channel is: %d\n", (arg->chan % MAX_CHAN) + 1);
}