aboutsummaryrefslogtreecommitdiff
path: root/examples/ex4.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@celest.fr>2011-06-18 00:24:47 +0200
committerThomas Preud'homme <thomas.preudhomme@celest.fr>2011-06-18 00:45:20 +0200
commitcb2138f8b098feb1b51a407343a4b99e25d5b506 (patch)
tree7d5478518bd141a0f3dee5ea61898b7812768325 /examples/ex4.c
parent3511e6e2a8b08f306cba73805fe7622a67d74fac (diff)
downloadtinycc-cb2138f8b098feb1b51a407343a4b99e25d5b506.tar.gz
tinycc-cb2138f8b098feb1b51a407343a4b99e25d5b506.tar.bz2
Make examples' shebang use target tcc bindir path
Use @BINDIR@ in shebang of examples to put the right path on the target system. That is, use #!/usr/local/bin/tcc if tcc is installed in /usr/local/bin and #!/usr/bin/tcc if tcc is installed in /usr/bin/tcc.
Diffstat (limited to 'examples/ex4.c')
-rwxr-xr-xexamples/ex4.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/examples/ex4.c b/examples/ex4.c
deleted file mode 100755
index b33b033..0000000
--- a/examples/ex4.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#!./tcc -run -L/usr/X11R6/lib -lX11
-#include <stdlib.h>
-#include <stdio.h>
-#include <X11/Xlib.h>
-
-/* Yes, TCC can use X11 too ! */
-
-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;
-}