aboutsummaryrefslogtreecommitdiff
path: root/ex4.c
diff options
context:
space:
mode:
authorbellard <bellard>2005-04-14 23:56:18 +0000
committerbellard <bellard>2005-04-14 23:56:18 +0000
commit02af482c320ac71d9c85a89c1345c7e91855dabd (patch)
tree5f03592dd1843b51bf3818d5b8cf8534f67b95a6 /ex4.c
parent7baf96810201273d76b29b37dea570517965c05c (diff)
downloadtinycc-02af482c320ac71d9c85a89c1345c7e91855dabd.tar.gz
tinycc-02af482c320ac71d9c85a89c1345c7e91855dabd.tar.bz2
moved examples
Diffstat (limited to 'ex4.c')
-rwxr-xr-xex4.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/ex4.c b/ex4.c
deleted file mode 100755
index 3a3fed7..0000000
--- a/ex4.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#!./tcc -run -L/usr/X11R6/lib -lX11
-#include <stdlib.h>
-/* Yes, TCC can use X11 too ! */
-#include <stdio.h>
-#include <X11/Xlib.h>
-
-int main(int argc, char **argv)
-{
- Display *display;
- Screen *screen;
-
- display = XOpenDisplay("");
- if (!display) {
- fprintf(stderr, "Could not open X11 display\n");
- exit(1);
- }
- printf("X11 display opened.\n");
- screen = XScreenOfDisplay(display, 0);
- printf("width = %d\nheight = %d\ndepth = %d\n",
- screen->width,
- screen->height,
- screen->root_depth);
- XCloseDisplay(display);
- return 0;
-}