If the macro _FAR_NO_NAMELESS_UNIONS is not defined, the
FarDialogItem structure will be compatible with FAR Manager versions
prior to FAR 1.70 beta 3 (inclusive). So the
FarDialogItem structure will have the
following form:
struct FarDialogItem
{
...
union {
int Selected;
char *History;
char *Mask;
struct FarList *ListItems;
CHAR_INFO *VBuf;
};
...
union {
char Data[512];
struct {
DWORD PtrFlags;
int PtrLength;
char *PtrData;
char PtrTail[1];
} Ptr;
};
};
So to access the Data member of the
FarDialogItem structure
it will be suficient to write Data, and to access the Selected member
- Selected.
If the macro _FAR_NO_NAMELESS_UNIONS is defined, the structure will use named unions. Then it will be compatible with ANSI C compilers, but will not be source-level compatible with plugins written for FAR 1.65. The structure will have the following form:
struct FarDialogItem
{
...
union {
int Selected;
char *History;
char *Mask;
struct FarList *ListItems;
CHAR_INFO *VBuf;
} Param;
...
union {
char Data[512];
struct {
DWORD PtrFlags;
int PtrLength;
char *PtrData;
char PtrTail[1];
} Ptr;
} Data;
};
In this case to access the Data member of the structure
you will have to write Data.Data, and to access the Selected member
- Param.Selected.
The macro must be defined before the
#include "plugin.hpp" directive:
#define _FAR_NO_NAMELESS_UNIONS #include "plugin.hpp"
Attention!