|
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 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 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 |
} |
|---|