On Wed, 23 Jan 2002, Prasad, Ragini wrote:

> I need to know which version of X Server is running. Can anyone help me as
> to which API to use to get the XFree86 version from a C program? 
> 

/*

gcc -o version version.c -L/usr/X11R6/lib -lX11

*/

#include <X11/X.h>
#include <X11/Xlib.h>
#include <stdio.h>

int main()
{
    Display *dpy;
    dpy = XOpenDisplay('\0');  /* $DISPLAY connection */
    printf("VendorRelease = %i\n", VendorRelease(dpy));
    XCloseDisplay(dpy);
    return 0;
}


                        Mark.

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to