aboutsummaryrefslogtreecommitdiff
path: root/libxkbfile/src
diff options
context:
space:
mode:
Diffstat (limited to 'libxkbfile/src')
-rw-r--r--libxkbfile/src/XKBfileInt.h5
-rw-r--r--libxkbfile/src/config.h4
-rw-r--r--libxkbfile/src/makefile18
-rwxr-xr-x[-rw-r--r--]libxkbfile/src/xkmout.c9
-rw-r--r--libxkbfile/src/xkmread.c2
5 files changed, 37 insertions, 1 deletions
diff --git a/libxkbfile/src/XKBfileInt.h b/libxkbfile/src/XKBfileInt.h
index e810e6131..ef188095d 100644
--- a/libxkbfile/src/XKBfileInt.h
+++ b/libxkbfile/src/XKBfileInt.h
@@ -61,6 +61,11 @@
#endif
+#include <unistd.h>
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
_XFUNCPROTOBEGIN
static inline
diff --git a/libxkbfile/src/config.h b/libxkbfile/src/config.h
new file mode 100644
index 000000000..6cd15164b
--- /dev/null
+++ b/libxkbfile/src/config.h
@@ -0,0 +1,4 @@
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#endif
diff --git a/libxkbfile/src/makefile b/libxkbfile/src/makefile
new file mode 100644
index 000000000..5c76670f4
--- /dev/null
+++ b/libxkbfile/src/makefile
@@ -0,0 +1,18 @@
+LIBRARY = libxkbfile
+
+CSRCS = cout.c \
+ maprules.c \
+ srvmisc.c \
+ xkbatom.c \
+ xkbbells.c \
+ xkbconfig.c \
+ xkbdraw.c \
+ xkberrs.c \
+ xkbmisc.c \
+ xkbout.c \
+ xkbtext.c \
+ xkmout.c \
+ xkmread.c
+
+INCLUDES := . $(MHMAKECONF)\X11\extensions $(MHMAKECONF) $(MHMAKECONF)\include
+
diff --git a/libxkbfile/src/xkmout.c b/libxkbfile/src/xkmout.c
index 79d86efe1..de6d12d31 100644..100755
--- a/libxkbfile/src/xkmout.c
+++ b/libxkbfile/src/xkmout.c
@@ -336,6 +336,7 @@ char * name;
if (type->level_names!=NULL)
wire.nLevelNames= type->num_levels;
else wire.nLevelNames= 0;
+ wire.pad = 0;
tmp= fwrite(&wire,SIZEOF(xkmKeyTypeDesc),1,file);
size+= tmp*SIZEOF(xkmKeyTypeDesc);
for (n=0,entry= type->map;n<type->map_count;n++,entry++) {
@@ -352,6 +353,7 @@ char * name;
for (n=0,pre=type->preserve;n<type->map_count;n++,pre++) {
p_entry.realMods= pre->real_mods;
p_entry.virtualMods= pre->vmods;
+ p_entry.pad = 0;
tmp= fwrite(&p_entry,SIZEOF(xkmModsDesc),1,file);
size+= tmp*SIZEOF(xkmModsDesc);
}
@@ -455,6 +457,7 @@ unsigned tmp,size=0;
if (info->group_compat&bit) {
modsWire.realMods= xkb->compat->groups[i].real_mods;
modsWire.virtualMods= xkb->compat->groups[i].vmods;
+ modsWire.pad = 0;
fwrite(&modsWire,SIZEOF(xkmModsDesc),1,file);
size+= SIZEOF(xkmModsDesc);
}
@@ -962,6 +965,7 @@ unsigned tmp,size= 0;
sectionWire.num_rows= section->num_rows;
sectionWire.num_doodads= section->num_doodads;
sectionWire.num_overlays= section->num_overlays;
+ sectionWire.pad2 = 0;
tmp= fwrite(&sectionWire,SIZEOF(xkmSectionDesc),1,file);
size+= tmp*SIZEOF(xkmSectionDesc);
if (section->rows) {
@@ -975,6 +979,7 @@ unsigned tmp,size= 0;
rowWire.left= row->left;
rowWire.num_keys= row->num_keys;
rowWire.vertical= row->vertical;
+ rowWire.pad = 0;
tmp= fwrite(&rowWire,SIZEOF(xkmRowDesc),1,file);
size+= tmp*SIZEOF(xkmRowDesc);
for (k=0,key=row->keys;k<row->num_keys;k++,key++) {
@@ -1027,6 +1032,7 @@ unsigned tmp,size= 0;
wire.num_sections= geom->num_sections;
wire.num_doodads= geom->num_doodads;
wire.num_key_aliases= geom->num_key_aliases;
+ wire.pad1 = 0;
size+= xkmPutCountedAtomString(dpy,file,geom->name);
tmp= fwrite(&wire,SIZEOF(xkmGeometryDesc),1,file);
size+= tmp*SIZEOF(xkmGeometryDesc);
@@ -1069,6 +1075,7 @@ unsigned tmp,size= 0;
xkmPointDesc ptWire;
olWire.num_points= ol->num_points;
olWire.corner_radius= ol->corner_radius;
+ olWire.pad = 0;
tmp= fwrite(&olWire,SIZEOF(xkmOutlineDesc),1,file);
size+= tmp*SIZEOF(xkmOutlineDesc);
for (p=0,pt=ol->points;p<ol->num_points;p++,pt++) {
@@ -1316,7 +1323,7 @@ int (*getTOC)(
XkbFileInfo * /* result */,
XkmInfo * /* info */,
int /* max_to */,
- xkmSectionInfo */* toc_rtrn */
+ xkmSectionInfo * /* toc_rtrn */
);
switch (result->type) {
diff --git a/libxkbfile/src/xkmread.c b/libxkbfile/src/xkmread.c
index ae056617b..e5127c910 100644
--- a/libxkbfile/src/xkmread.c
+++ b/libxkbfile/src/xkmread.c
@@ -1213,6 +1213,8 @@ char name[100];
return _XkbDupString(name);
break;
default:
+ fseek(file,toc->offset,SEEK_SET);
+ fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file);
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
break;