I would think that since âC and C++â are compiled with âgccâ that any flag
would have to be set in the makefile prefix, and gcc would have to be compiled with the flag set.
It is not a compiler flag, it is a C function called set-flag()
It is not in the list of C library functions.
It must be something special, but it is not with the program code⊠the progrsm uses it but does not define it?
I notice that your makefile knowledge is expanding. You are getting something out of LFS.
I only saw the declaration, and missed the definition.
Last time I compiled this code it was in FreeBSD⊠it must have been defined there or the code would not have worked. Linux is a different world when it comes to what is available to the compiler.
int colorflag = 0; /* Flag is non-zero if Color menu is mapped */
Widget shell, form, label;
so shell is a variable of type Widget
typedef struct _WidgetRec *Widget;
so Widget is a pointer to _WidgetRec
typedef struct _WidgetRec {
CorePart core;
} WidgetRec, CoreRec;
and _WidgetRec is a structure
From reading the X Toolkit Intrinsics Programmiong Manual I found out that a âshell widgetâ is a widget that is the parent of all other widgets.
but
there is no mention in the manual of using set_flag().
I did not write this software. I think what the writer is doing is
inserting a flag directly into one of the X structures , perhaps by ORâing it with what is already there, perhaps by simply copying it into the shell pointer, ie
*shell = colorflag
or maybe he is doing the reverse, ie setting up the flag
*colorflag = shell
I cant be sure. I need to see the set_flag() function.
This was never an issue when I compiled it in BSD, so I am going back to FreeBSD to see if I can find the set_flag() function.
Where did you get the code from ? Without any hint, it is impossible to even try to find-out what set_flag() could be.
It surely does not come from X11/Xt, as they (normally) use X/Xt prefixes, nor from standard includes, as it references some X structure.
The best bet would be to have a look into code itself, if you can share it (with Makefile, and any other possible configuration file (configure script, CMakeLists.txt, etcâŠ).
It is very old code from Solaris and BSD in 1990âs
I cant share it, it is copyrighted.
I have permission to have a copy for my own use only.
This question was âWhere did you get the code fromâ, and did not imply you need to share the code.
Maybe it could be possible to get the same license as you got, for personal use only ?
Good you kept your âpersonal licenseâ after you quit the job, and did not have to sign a clause asking you to delete any copy of company document/code
My former employers were more strict there, but as human is fallibleâŠ