/*- * Copyright (c) 1997 Antti Kaipila * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #define VERSION "0.92" #include #include #include #include #include #include #include #include #include #include #include #include #include struct cd_info { int c_track; int c_min; int c_sec; int c_seca; int c_frame; int l_track; int s_sec[256]; int s_min[256]; int s_frame[255]; int pause; int eject; }; struct cd_info cdinfo; int term_fd,cd_fd; char *message,*up_line,*cd_device; struct termios old_ttyattr; struct ioc_toc_header cd_header; struct ioc_read_subchannel cd_s; struct cd_sub_channel_info cd_data; /* CD handling stuff */ void init_cd(void); void update_cdinfo(void); void play_track(int); void next(void); void prev(void); void stop(void); void cdpause(void); void cdsoftpause(void); void ff(int); void rew(int); void eject(void); /* Terminal related functions */ void move_up(int); int init_term(void); void check_ws(void); void print_tail(void); void print_head(void); /* Misc functions */ void per(void); void die(char *); void print_help(void); void hs_cont(void); void hs_winch(void); void do_exit(int); void do_stop(void); void getcommand(char *command, int *repetivity); /* Awesome!!1!!1! 2 sound functions */ void more_vol(void); void less_vol(void);