1 --- wmjmail.c Sat Apr 14 10:15:14 2001
2 +++ wmjmail.c.3 Sat Apr 14 10:13:35 2001
4 //#define APPLICATION "xterm -sb -sl 2000 +si +sk -title XTerm -fg black -bg wheat -geometry 71x50-0-0 -e mutt &"
7 +static char my_cmd[350];
8 static char my_folder[256];
9 static char my_app[256];
10 static char my_audio[512];
15 + snprintf (my_cmd, 350, "mailchk %s", my_folder);
16 snprintf (my_audio, 511, "%s %s &", my_aplayer, my_afile);
18 set_update_delay((i) ? i : 15); /* seconds */
22 if ( stat (my_folder, &buf) != 0 ) {
24 - fprintf (stderr, "Could not stat '%s'\n", my_folder);
27 + //fprintf (stderr, "Could not stat '%s'\n", my_folder);
32 if ( size != buf.st_size ) {
33 - FILE *f = popen ("mailchk", "r");
34 + FILE *f = popen (my_cmd, "r");
35 fscanf (f, "%i - %i - %i", &my_new, &my_tot, &my_read);
38 /* Do not play on startup, and only on NEW mails */
40 - size < buf.st_size )
42 + if ( size != 0 && size < buf.st_size ) {