diff options
Diffstat (limited to 'geometry.c')
-rw-r--r-- | geometry.c | 77 |
1 files changed, 33 insertions, 44 deletions
@@ -247,7 +247,7 @@ typedef struct _GeometryInfo } GeometryInfo; static char * -ddText(Display * dpy, DoodadInfo * di) +ddText(Display *dpy, const DoodadInfo *di) { static char buf[64]; @@ -269,7 +269,7 @@ ddText(Display * dpy, DoodadInfo * di) /***====================================================================***/ static void -InitPropertyInfo(PropertyInfo * pi, GeometryInfo * info) +InitPropertyInfo(PropertyInfo *pi, const GeometryInfo *info) { pi->defs.defined = 0; pi->defs.fileID = info->fileID; @@ -301,7 +301,7 @@ FreeProperties(PropertyInfo * pi, GeometryInfo * info) } static void -InitKeyInfo(KeyInfo * key, RowInfo * row, GeometryInfo * info) +InitKeyInfo(KeyInfo *key, RowInfo *row, const GeometryInfo *info) { if (key != &row->dfltKey) @@ -337,7 +337,7 @@ ClearKeyInfo(KeyInfo * key) } static void -FreeKeys(KeyInfo * key, RowInfo * row, GeometryInfo * info) +FreeKeys(KeyInfo *key, RowInfo *row, const GeometryInfo *info) { KeyInfo *tmp; KeyInfo *next; @@ -357,7 +357,7 @@ FreeKeys(KeyInfo * key, RowInfo * row, GeometryInfo * info) } static void -InitRowInfo(RowInfo * row, SectionInfo * section, GeometryInfo * info) +InitRowInfo(RowInfo *row, SectionInfo *section, const GeometryInfo *info) { if (row != §ion->dfltRow) { @@ -380,7 +380,7 @@ InitRowInfo(RowInfo * row, SectionInfo * section, GeometryInfo * info) } static void -ClearRowInfo(RowInfo * row, GeometryInfo * info) +ClearRowInfo(RowInfo *row, const GeometryInfo *info) { row->defs.defined &= ~_GR_Default; row->top = row->left = 0; @@ -394,7 +394,7 @@ ClearRowInfo(RowInfo * row, GeometryInfo * info) } static void -FreeRows(RowInfo * row, SectionInfo * section, GeometryInfo * info) +FreeRows(RowInfo *row, SectionInfo *section, const GeometryInfo *info) { RowInfo *next; @@ -557,7 +557,8 @@ InitSectionInfo(SectionInfo * si, GeometryInfo * info) } static void -DupSectionInfo(SectionInfo * into, SectionInfo * from, GeometryInfo * info) +DupSectionInfo(SectionInfo *into, const SectionInfo *from, + const GeometryInfo *info) { CommonInfo defs; @@ -710,7 +711,7 @@ NextProperty(GeometryInfo * info) } static PropertyInfo * -FindProperty(GeometryInfo * info, char *name) +FindProperty(const GeometryInfo *info, const char *name) { PropertyInfo *old; @@ -1088,7 +1089,7 @@ NextSection(GeometryInfo * info) } static SectionInfo * -FindMatchingSection(GeometryInfo * info, SectionInfo * new) +FindMatchingSection(GeometryInfo *info, const SectionInfo *new) { for (SectionInfo *old = info->sections; old != NULL; old = (SectionInfo *) old->defs.next) @@ -1399,9 +1400,8 @@ HandleIncludeGeometry(IncludeStmt * stmt, XkbDescPtr xkb, GeometryInfo * info, } static int -SetShapeField(ShapeInfo * si, - const char *field, - ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info) +SetShapeField(ShapeInfo *si, const char *field, + const ExprDef *arrayNdx, const ExprDef *value, GeometryInfo *info) { ExprResult tmp; @@ -1431,10 +1431,8 @@ SetShapeField(ShapeInfo * si, } static int -SetShapeDoodadField(DoodadInfo * di, - const char *field, - ExprDef * arrayNdx, - ExprDef * value, SectionInfo * si, GeometryInfo * info) +SetShapeDoodadField(DoodadInfo *di, const char *field, const ExprDef *arrayNdx, + const ExprDef *value, SectionInfo *si, GeometryInfo *info) { ExprResult tmp; const char *typeName; @@ -1501,10 +1499,8 @@ SetShapeDoodadField(DoodadInfo * di, #define FIELD_USHORT 2 static int -SetTextDoodadField(DoodadInfo * di, - const char *field, - ExprDef * arrayNdx, - ExprDef * value, SectionInfo * si, GeometryInfo * info) +SetTextDoodadField(DoodadInfo *di, const char *field, const ExprDef *arrayNdx, + const ExprDef *value, SectionInfo *si, GeometryInfo *info) { ExprResult tmp; unsigned def; @@ -1651,11 +1647,9 @@ SetTextDoodadField(DoodadInfo * di, } static int -SetIndicatorDoodadField(DoodadInfo * di, - const char *field, - ExprDef * arrayNdx, - ExprDef * value, - SectionInfo * si, GeometryInfo * info) +SetIndicatorDoodadField(DoodadInfo * di, const char *field, + const ExprDef *arrayNdx, const ExprDef *value, + SectionInfo *si, GeometryInfo *info) { ExprResult tmp; @@ -1696,10 +1690,8 @@ SetIndicatorDoodadField(DoodadInfo * di, } static int -SetLogoDoodadField(DoodadInfo * di, - const char *field, - ExprDef * arrayNdx, - ExprDef * value, SectionInfo * si, GeometryInfo * info) +SetLogoDoodadField(DoodadInfo *di, const char *field, const ExprDef *arrayNdx, + const ExprDef *value, SectionInfo *si, GeometryInfo *info) { ExprResult tmp; const char *typeName = "logo doodad"; @@ -1777,10 +1769,9 @@ SetLogoDoodadField(DoodadInfo * di, } static int -SetDoodadField(DoodadInfo * di, - const char *field, - ExprDef * arrayNdx, - ExprDef * value, SectionInfo * si, GeometryInfo * info) +SetDoodadField(DoodadInfo *di, const char *field, + const ExprDef *arrayNdx, const ExprDef *value, + SectionInfo *si, GeometryInfo *info) { ExprResult tmp; @@ -1880,9 +1871,9 @@ SetDoodadField(DoodadInfo * di, } static int -SetSectionField(SectionInfo * si, - const char *field, - ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info) +SetSectionField(SectionInfo *si, const char *field, + const ExprDef *arrayNdx, const ExprDef *value, + GeometryInfo *info) { unsigned short *pField; unsigned def; @@ -1968,9 +1959,8 @@ SetSectionField(SectionInfo * si, } static int -SetRowField(RowInfo * row, - const char *field, - ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info) +SetRowField(RowInfo *row, const char *field, + const ExprDef *arrayNdx, const ExprDef *value, GeometryInfo *info) { ExprResult tmp; @@ -2034,9 +2024,8 @@ SetRowField(RowInfo * row, } static int -SetKeyField(KeyInfo * key, - const char *field, - ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info) +SetKeyField(KeyInfo *key, const char *field, + const ExprDef *arrayNdx, const ExprDef *value, GeometryInfo *info) { ExprResult tmp; @@ -2112,7 +2101,7 @@ SetKeyField(KeyInfo * key, } static int -SetGeometryProperty(GeometryInfo * info, char *property, ExprDef * value) +SetGeometryProperty(GeometryInfo *info, char *property, const ExprDef *value) { PropertyInfo pi; ExprResult result; |