root/trunk/licq/bin/beep.c

Revision 4526, 474 bytes (checked in by erijo, 2 years ago)

Removed svn:keywords from all files that don't need it. May make your
checkout a tiny bit faster :)

  • Property svn:eol-style set to native
Line 
1 #include <stdlib.h>
2 #include <Xlib.h>
3
4 /* Simple program to beep the X11 bell at the specified volumen (0 - 100)
5    compile with:
6    gcc beep.c -o beep -I/usr/include/X11 -L/usr/X11/lib -lX11
7  */
8
9 int main(int argc, char **argv)
10 {
11   unsigned short v = 50;
12   Display *d = XOpenDisplay(getenv("DISPLAY"));
13   if (d != NULL)
14   {
15     if (argc > 1) v = atoi(argv[1]);
16     if (!v ) v = 100;
17     XBell(d, v);
18     XCloseDisplay(d);
19   }
20   else
21   {
22     printf("\a");
23   }
24   return 0;
25 }
Note: See TracBrowser for help on using the browser.