Article View: comp.os.linux.x
Article #234parse error when compile?
From: Filippino
Date: Tue, 29 Sep 1998 00:00
Date: Tue, 29 Sep 1998 00:00
63 lines
2379 bytes
2379 bytes
When I was trying to compile the following code, I always got the
parsing error at line 32 before * .
I cannot find the error. Please tell me what's the normal cause of
the parsing error?
Also, how to use the XRecordInterceptProc with gtk+ widget? Anyone
has some experiences on that? Thanks.
Linux2.0.33, gcc 2.7.2.
=======
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xmd.h>
#include <X11/extensions/record.h>
#include <X11/extensions/recordstr.h>
Display *dpy1, *dpy2; /* open two connections. 1 control, 2 data */
XRecordContext rdcontext;
main(int argc, char* argv[]){
char *displayname=NULL;
Bool async = False;
int *rcmajor, *rcminor;
char* programName = argv[0];
dpy1 = XOpenDisplay(displayname);
if(!dpy1){
fprintf(stderr, "%s: unable to open display \"%s\".\n", programName, XDisplayName(displayname));
exit(1);
}
dpy2 = XOpenDisplay(displayname);
if(!dpy2){
fprintf(stderr, "%s unable to open display \"%s\".\n", programName, XDisplayName(displayname));
exit(1);
}
if(!XRecordQueryVersion(dpy1, rcmajor, rcminor)) {
exit(0);
}
if((*rcmajor < 1) && (*rcminor < 13)){
fprintf(stderr, "Please install the record extension greater than 1.13");
}
XRecordRange *rcRange[]; /* <=== parse error here before * . */
rcRange[0] = XRecordAllocRange();
int nclients = 0;
int nrange = 0;
int rcDataFlag = 0;
rdcontext = XRecordCreateContext(dpy1, rcDataFlag, XRecordAllClients, nclients, rcRange, nrange);
if(rdct == 0){
fprintf(stderr, "Cannot create RecordContext");
exit(1);
}
}
==
Technical Details
Message-ID:
<36102de8.0@ruby.hknet.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,8fe7b01c96b459ae X-Google-Attributes: gid11318c,public X-Google-Thread: f4bda,8fe7b01c96b459ae X-Google-Attributes: gidf4bda,public X-Google-Thread: 11038b,8fe7b01c96b459ae X-Google-Attributes: gid11038b,public From: Filippino@fair.game.com Subject: parse error when compile? Date: 1998/09/29 Message-ID: <36102de8.0@ruby.hknet.com> X-Deja-AN: 395811174 X-NNTP-Posting-Host: 202.67.235.135 Newsgroups: comp.os.linux.x,comp.windows.x.intrinsics,gnu.gcc.help