#include <stdio.h> /* Standard input/output definitions */ #include <string.h> /* String function definitions */ #include <unistd.h> /* UNIX standard function definitions */ #include <fcntl.h> /* File control definitions */ #include <errno.h> /* Error number definitions */ #include <termios.h> /* POSIX terminal control definitions */ #include <unistd.h> /* required for sleep function*/ #include <dirent.h> /* directory access library */ #include <sys/stat.h> /* needed to distinguish directories from files */ #include <signal.h> /* needed for process signal capture */ #include <sys/wait.h> /* needed for process signal capture */ //#include <curses.h> /* used for writing to specific screen locations */ // Global variable declarations #define GLOBAL_DECL true #define CTRLC 3 #define DIRDEBUG 0 #define OUTPUTDEBUG 0 #define USE_IR 0 #define LCD_CHARACTERS 20 #define SCROLL_DELAY 3 #define PRE_SCROLL_DELAY 15 //#define PLAYER_PATH "mp3blaster --sound-device=/dev/dsp " #define PLAYER_PATH "mp3blaster" #define HOME_DIR "/shared/mp3s" // Function prototypes int pad_space_to_eol(char* strText); int pad_dash_to_eol(char* strText); int is_mp3(char* strFname); int kbhit(void); int getch(); void play_mp3(char*); int common_keys(char chrKey); void send_cls(void); int display_list(int intLine, int intScrollPos); void send_text(char* strText, int intLineNo, int intPos);
syntax highlighted by Code2HTML, v. 0.9.1