Enable compiling with -Wwrite-strings (trivial fixups).

SVN revision: 9414
This commit is contained in:
Kim Woelders 2004-03-21 01:39:40 +00:00
parent fc8d3efb5c
commit 3b1f6e7c72
36 changed files with 459 additions and 446 deletions

View File

@ -95,7 +95,7 @@ Imlib_Image *im_title;
Imlib_Image *im_prev1, *im_prev2; Imlib_Image *im_prev1, *im_prev2;
Imlib_Image *im_next1, *im_next2; Imlib_Image *im_next1, *im_next2;
Imlib_Image *im_exit1, *im_exit2; Imlib_Image *im_exit1, *im_exit2;
char *docdir; char *docdir = NULL;
Window CreateWindow(Window parent, int x, int y, int ww, int hh); Window CreateWindow(Window parent, int x, int y, int ww, int hh);
int ReadHeader(FILE * f); int ReadHeader(FILE * f);
@ -222,7 +222,8 @@ main(int argc, char **argv)
int i, w, h, t, x, y; int i, w, h, t, x, y;
int wx, wy; int wx, wy;
FILE *f; FILE *f;
char *s, *docfile = NULL; char *s;
const char *docfile;
Pixmap draw = 0; Pixmap draw = 0;
Link *l = NULL, *ll = NULL; Link *l = NULL, *ll = NULL;
Imlib_Border ibd; Imlib_Border ibd;
@ -293,7 +294,6 @@ main(int argc, char **argv)
exit(1); exit(1);
} }
docdir = ".";
docfile = "MAIN"; docfile = "MAIN";
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
{ {
@ -309,6 +309,8 @@ main(int argc, char **argv)
else else
docdir = strdup(argv[i]); docdir = strdup(argv[i]);
} }
if (docdir == NULL)
docdir = strdup(".");
s = malloc(strlen(docdir) + strlen(docfile) + 2 + 20); s = malloc(strlen(docdir) + strlen(docfile) + 2 + 20);
sprintf(s, "%s/%s", docdir, docfile); sprintf(s, "%s/%s", docdir, docfile);
findLocalizedFile(s); findLocalizedFile(s);

View File

@ -279,7 +279,7 @@ typedef struct _link
} }
Link; Link;
void Efont_extents(Efont * f, char *text, void Efont_extents(Efont * f, const char *text,
int *font_ascent_return, int *font_ascent_return,
int *font_descent_return, int *width_return, int *font_descent_return, int *width_return,
int *max_ascent_return, int *max_ascent_return,
@ -291,9 +291,9 @@ void EFont_draw_string(Display * disp, Drawable win, GC gc,
int x, int y, char *text, int x, int y, char *text,
Efont * font, Visual * vis, Colormap cm); Efont * font, Visual * vis, Colormap cm);
char **TextGetLines(char *text, int *count); char **TextGetLines(const char *text, int *count);
void TextStateLoadFont(TextState * ts); void TextStateLoadFont(TextState * ts);
void TextSize(TextState * ts, char *text, void TextSize(TextState * ts, const char *text,
int *width, int *height, int fsize); int *width, int *height, int fsize);
void TextDraw(TextState * ts, Window win, char *text, void TextDraw(TextState * ts, Window win, char *text,
int x, int y, int w, int h, int fsize, int x, int y, int w, int h, int fsize,

View File

@ -123,7 +123,7 @@ word_mb(char *s, int num, char *wd, int *spaceflag)
int wcflg, mbflg; int wcflg, mbflg;
struct char_class struct char_class
{ {
char *name; const char *name;
wctype_t wt; wctype_t wt;
} *cc, char_class_tbl[] = } *cc, char_class_tbl[] =
{ {

View File

@ -24,7 +24,7 @@
#include "dox.h" #include "dox.h"
char ** char **
TextGetLines(char *text, int *count) TextGetLines(const char *text, int *count)
{ {
int i, j, k; int i, j, k;
char **list = NULL; char **list = NULL;
@ -146,7 +146,7 @@ TextStateLoadFont(TextState * ts)
} }
void void
TextSize(TextState * ts, char *text, int *width, int *height, int fsize) TextSize(TextState * ts, const char *text, int *width, int *height, int fsize)
{ {
char **lines; char **lines;
int i, num_lines; int i, num_lines;

View File

@ -95,7 +95,7 @@ Efont_load(char *file, int size)
} }
void void
Efont_extents(Efont * f, char *text, int *font_ascent_return, Efont_extents(Efont * f, const char *text, int *font_ascent_return,
int *font_descent_return, int *width_return, int *font_descent_return, int *width_return,
int *max_ascent_return, int *max_descent_return, int *max_ascent_return, int *max_descent_return,
int *lbearing_return __UNUSED__, int *rbearing_return __UNUSED__) int *lbearing_return __UNUSED__, int *rbearing_return __UNUSED__)

View File

@ -105,8 +105,8 @@ void *Emalloc(int size);
void *Erealloc(void *ptr, int size); void *Erealloc(void *ptr, int size);
void Efree(void *ptr); void Efree(void *ptr);
void *FindItem(char *name, int id, int find_by, int type); void *FindItem(const char *name, int id, int find_by, int type);
void AddItem(void *item, char *name, int id, int type); void AddItem(void *item, const char *name, int id, int type);
void *RemoveItem(char *name, int id, int find_by, int type); void *RemoveItem(char *name, int id, int find_by, int type);
void **ListItemType(int *num, int type); void **ListItemType(int *num, int type);
char **ListItems(int *num, int type); char **ListItems(int *num, int type);
@ -116,7 +116,7 @@ void SetupX(void);
void CommsSetup(void); void CommsSetup(void);
void CommsFindCommsWindow(void); void CommsFindCommsWindow(void);
void CommsSend(Client * c, char *s); void CommsSend(Client * c, const char *s);
char *CommsGet(Client ** c, XEvent * ev); char *CommsGet(Client ** c, XEvent * ev);
Client *MakeClient(Window win); Client *MakeClient(Window win);
void ListFreeClient(void *ptr); void ListFreeClient(void *ptr);
@ -219,7 +219,7 @@ extern int debug_level;
} }
#endif #endif
void Alert(char *fmt, ...); void Alert(const char *fmt, ...);
void EDisplayMemUse(void); void EDisplayMemUse(void);

View File

@ -84,7 +84,7 @@ CommsFindCommsWindow()
} }
void void
CommsSend(Client * c, char *s) CommsSend(Client * c, const char *s)
{ {
char ss[21]; char ss[21];
int i, j, k, len; int i, j, k, len;

View File

@ -25,7 +25,7 @@
#include "E.h" #include "E.h"
void * void *
FindItem(char *name, int id, int find_by, int type) FindItem(const char *name, int id, int find_by, int type)
{ {
List *ptr; List *ptr;
@ -72,7 +72,7 @@ FindItem(char *name, int id, int find_by, int type)
} }
void void
AddItem(void *item, char *name, int id, int type) AddItem(void *item, const char *name, int id, int type)
{ {
List *ptr; List *ptr;

View File

@ -182,7 +182,7 @@ main(int argc, char **argv)
} }
void void
Alert(char *fmt, ...) Alert(const char *fmt, ...)
{ {
va_list ap; va_list ap;

135
src/E.h
View File

@ -1552,7 +1552,7 @@ RectBox;
void RefreshScreen(void); void RefreshScreen(void);
void GrabButtonGrabs(EWin * ewin); void GrabButtonGrabs(EWin * ewin);
void UnGrabButtonGrabs(EWin * ewin); void UnGrabButtonGrabs(EWin * ewin);
ActionClass *CreateAclass(char *name); ActionClass *CreateAclass(const char *name);
Action *CreateAction(char event, char anymod, int mod, int anybut, Action *CreateAction(char event, char anymod, int mod, int anybut,
int but, char anykey, char *key, int but, char anykey, char *key,
char *tooltipstring); char *tooltipstring);
@ -1561,14 +1561,15 @@ void AddToAction(Action * act, int id, void *params);
void AddAction(ActionClass * a, Action * act); void AddAction(ActionClass * a, Action * act);
int EventAclass(XEvent * ev, EWin * ewin, ActionClass * a); int EventAclass(XEvent * ev, EWin * ewin, ActionClass * a);
int ActionsCall(unsigned int type, EWin * ewin, void *params); int ActionsCall(unsigned int type, EWin * ewin,
const void *params);
int ActionsSuspend(void); int ActionsSuspend(void);
int ActionsResume(void); int ActionsResume(void);
void ActionsHandleMotion(void); void ActionsHandleMotion(void);
int ActionsEnd(EWin * ewin); int ActionsEnd(EWin * ewin);
int execApplication(void *params); int execApplication(const void *params);
int doDragButtonEnd(void *params); int doDragButtonEnd(const void *params);
/* alert.c */ /* alert.c */
void AlertInit(void); void AlertInit(void);
@ -1577,12 +1578,12 @@ void AlertX(const char *title, const char *ignore,
const char *restart, const char *quit, const char *restart, const char *quit,
const char *fmt, ...); const char *fmt, ...);
void InitStringList(void); void InitStringList(void);
void AssignIgnoreFunction(int (*FunctionToAssign) (void *), void AssignIgnoreFunction(int (*func) (const void *),
void *params); const void *params);
void AssignRestartFunction(int (*FunctionToAssign) (void *), void AssignRestartFunction(int (*func) (const void *),
void *params); const void *params);
void AssignExitFunction(int (*FunctionToAssign) (void *), void AssignExitFunction(int (*func) (const void *),
void *params); const void *params);
void AssignTitleText(const char *text); void AssignTitleText(const char *text);
void AssignIgnoreText(const char *text); void AssignIgnoreText(const char *text);
void AssignRestartText(const char *text); void AssignRestartText(const char *text);
@ -1651,7 +1652,7 @@ void LowerEwin(EWin * ewin);
void ShowEwin(EWin * ewin); void ShowEwin(EWin * ewin);
void HideEwin(EWin * ewin); void HideEwin(EWin * ewin);
void FreeBorder(Border * b); void FreeBorder(Border * b);
Border *CreateBorder(char *name); Border *CreateBorder(const char *name);
void AddBorderPart(Border * b, ImageClass * iclass, void AddBorderPart(Border * b, ImageClass * iclass,
ActionClass * aclass, TextClass * tclass, ActionClass * aclass, TextClass * tclass,
ECursor * ec, char ontop, int flags, ECursor * ec, char ontop, int flags,
@ -1679,7 +1680,7 @@ void SlideEwinTo(EWin * ewin, int fx, int fy, int tx, int ty,
void SlideEwinsTo(EWin ** ewin, int *fx, int *fy, int *tx, void SlideEwinsTo(EWin ** ewin, int *fx, int *fy, int *tx,
int *ty, int num_wins, int speed); int *ty, int num_wins, int speed);
void AddToFamily(Window win); void AddToFamily(Window win);
EWin *AddInternalToFamily(Window win, char *bname, int type, EWin *AddInternalToFamily(Window win, const char *bname, int type,
void *ptr, void *ptr,
void (*init) (EWin * ewin, void *ptr)); void (*init) (EWin * ewin, void *ptr));
void CalcEwinSizes(EWin * ewin); void CalcEwinSizes(EWin * ewin);
@ -1714,7 +1715,7 @@ int BordersEventMouseOut(XEvent * ev);
int BordersEventMouseOut2(XEvent * ev); int BordersEventMouseOut2(XEvent * ev);
/* buttons.c */ /* buttons.c */
Button *ButtonCreate(char *name, ImageClass * iclass, Button *ButtonCreate(const char *name, ImageClass * iclass,
ActionClass * aclass, TextClass * tclass, ActionClass * aclass, TextClass * tclass,
char *label, char ontop, int flags, int minw, char *label, char ontop, int flags, int minw,
int maxw, int minh, int maxh, int xo, int yo, int maxw, int minh, int maxh, int xo, int yo,
@ -1742,7 +1743,7 @@ ActionClass *ButtonGetAClass(Button * b);
int ButtonIsFixed(Button * b); int ButtonIsFixed(Button * b);
int ButtonEmbedWindow(Button * ButtonToUse, int ButtonEmbedWindow(Button * ButtonToUse,
Window WindowToEmbed); Window WindowToEmbed);
void ButtonFindEmptySpotFor(Button * bt, char *listname, void ButtonFindEmptySpotFor(Button * bt, const char *listname,
char dirtomove); char dirtomove);
int ButtonsEventExpose(XEvent * ev); int ButtonsEventExpose(XEvent * ev);
int ButtonsEventMouseDown(XEvent * ev); int ButtonsEventMouseDown(XEvent * ev);
@ -1772,10 +1773,10 @@ void ModifyCMClass(char *name, int rnum, unsigned char *rpx,
/* comms.c */ /* comms.c */
void CommsSetup(void); void CommsSetup(void);
void CommsFindCommsWindow(void); void CommsFindCommsWindow(void);
void CommsSend(Client * c, char *s); void CommsSend(Client * c, const char *s);
void CommsSendToMasterWM(char *s); void CommsSendToMasterWM(const char *s);
void CommsBroadcast(char *s); void CommsBroadcast(const char *s);
void CommsBroadcastToSlaveWMs(char *s); void CommsBroadcastToSlaveWMs(const char *s);
Client *MakeClient(Window win); Client *MakeClient(Window win);
void ListFreeClient(void *ptr); void ListFreeClient(void *ptr);
void DeleteClient(Client * c); void DeleteClient(Client * c);
@ -1811,11 +1812,12 @@ void SlideWindowTo(Window win, int fx, int fy, int tx, int ty,
void KeepBGimages(Background * bg, char onoff); void KeepBGimages(Background * bg, char onoff);
void RemoveImagesFromBG(Background * bg); void RemoveImagesFromBG(Background * bg);
void FreeDesktopBG(Background * bg); void FreeDesktopBG(Background * bg);
Background *CreateDesktopBG(char *name, XColor * solid, char *bg, Background *CreateDesktopBG(const char *name, XColor * solid,
char tile, char keep_aspect, int xjust, const char *bg, char tile, char keep_aspect,
int yjust, int xperc, int yperc, char *top, int xjust, int yjust, int xperc, int yperc,
char tkeep_aspect, int txjust, int tyjust, const char *top, char tkeep_aspect,
int txperc, int typerc); int txjust, int tyjust, int txperc,
int typerc);
void RefreshCurrentDesktop(void); void RefreshCurrentDesktop(void);
void RefreshDesktop(int num); void RefreshDesktop(int num);
void SetBackgroundTo(Window win, Background * dsk, char setbg); void SetBackgroundTo(Window win, Background * dsk, char setbg);
@ -1842,9 +1844,9 @@ void FloatEwinAboveDesktops(EWin * ewin);
void DesktopAccounting(void); void DesktopAccounting(void);
/* dialog.c */ /* dialog.c */
Dialog *DialogCreate(char *name); Dialog *DialogCreate(const char *name);
void DialogDestroy(Dialog * d); void DialogDestroy(Dialog * d);
void DialogBindKey(Dialog * d, char *key, void DialogBindKey(Dialog * d, const char *key,
void (*func) (int val, void *data), int val, void (*func) (int val, void *data), int val,
void *data); void *data);
void DialogSetText(Dialog * d, const char *text); void DialogSetText(Dialog * d, const char *text);
@ -1856,7 +1858,7 @@ void DialogRedraw(Dialog * d);
void ShowDialog(Dialog * d); void ShowDialog(Dialog * d);
void DialogClose(Dialog * d); void DialogClose(Dialog * d);
void DialogAddButton(Dialog * d, char *text, void DialogAddButton(Dialog * d, const char *text,
void (*func) (int val, void *data), void (*func) (int val, void *data),
char doclose); char doclose);
DItem *DialogInitItem(Dialog * d); DItem *DialogInitItem(Dialog * d);
@ -1874,9 +1876,9 @@ void DialogItemSetAlign(DItem * di, int align_h, int align_v);
void DialogItemCallCallback(DItem * di); void DialogItemCallCallback(DItem * di);
void DialogDrawItems(Dialog * d, DItem * di, int x, int y, int w, void DialogDrawItems(Dialog * d, DItem * di, int x, int y, int w,
int h); int h);
void DialogItemButtonSetText(DItem * di, char *text); void DialogItemButtonSetText(DItem * di, const char *text);
void DialogItemCheckButtonSetText(DItem * di, char *text); void DialogItemCheckButtonSetText(DItem * di, const char *text);
void DialogItemTextSetText(DItem * di, char *text); void DialogItemTextSetText(DItem * di, const char *text);
void DialogItemRadioButtonSetEventFunc(DItem * di, void DialogItemRadioButtonSetEventFunc(DItem * di,
void (*func) (int val, void (*func) (int val,
void void
@ -1888,11 +1890,11 @@ void DialogItemTableSetOptions(DItem * di, int num_columns,
char homogenous_v); char homogenous_v);
void DialogItemSeparatorSetOrientation(DItem * di, void DialogItemSeparatorSetOrientation(DItem * di,
char horizontal); char horizontal);
void DialogItemImageSetFile(DItem * di, char *image); void DialogItemImageSetFile(DItem * di, const char *image);
void DialogFreeItem(DItem * di); void DialogFreeItem(DItem * di);
void DialogItemSetRowSpan(DItem * di, int row_span); void DialogItemSetRowSpan(DItem * di, int row_span);
void DialogItemSetColSpan(DItem * di, int col_span); void DialogItemSetColSpan(DItem * di, int col_span);
void DialogItemRadioButtonSetText(DItem * di, char *text); void DialogItemRadioButtonSetText(DItem * di, const char *text);
void DialogItemRadioButtonSetFirst(DItem * di, DItem * first); void DialogItemRadioButtonSetFirst(DItem * di, DItem * first);
void DialogItemRadioButtonGroupSetValPtr(DItem * di, void DialogItemRadioButtonGroupSetValPtr(DItem * di,
int *val_ptr); int *val_ptr);
@ -2040,10 +2042,10 @@ int permissions(const char *s);
char *username(int uid); char *username(int uid);
char *homedir(int uid); char *homedir(int uid);
char *usershell(int uid); char *usershell(int uid);
char *atword(char *s, int num); const char *atword(const char *s, int num);
char *atchar(char *s, char c); const char *atchar(const char *s, char c);
char *getword(char *s, int num); char *getword(char *s, int num);
void word(char *s, int num, char *wd); void word(const char *s, int num, char *wd);
int canread(const char *s); int canread(const char *s);
int canwrite(const char *s); int canwrite(const char *s);
int canexec(const char *s); int canexec(const char *s);
@ -2051,7 +2053,7 @@ char *fileof(const char *s);
char *fullfileof(const char *s); char *fullfileof(const char *s);
char *pathtoexec(const char *file); char *pathtoexec(const char *file);
char *pathtofile(const char *file); char *pathtofile(const char *file);
char *FileExtension(char *file); const char *FileExtension(const char *file);
char *field(char *s, int fieldno); char *field(char *s, int fieldno);
int fillfield(char *s, int fieldno, char *buf); int fillfield(char *s, int fieldno, char *buf);
void fword(char *s, int num, char *wd); void fword(char *s, int num, char *wd);
@ -2114,7 +2116,7 @@ void FX_Op(const char *name, int fx_op);
void FX_DeskChange(void); void FX_DeskChange(void);
void FX_Pause(void); void FX_Pause(void);
char **FX_Active(int *num); char **FX_Active(int *num);
int FX_IsOn(char *effect); int FX_IsOn(const char *effect);
#if ENABLE_GNOME #if ENABLE_GNOME
/* gnome.c */ /* gnome.c */
@ -2264,7 +2266,7 @@ Iconbox *SelectIconboxForEwin(EWin * ewin);
void SetupFallbackClasses(void); void SetupFallbackClasses(void);
/* ipc.c */ /* ipc.c */
int HandleIPC(char *params, Client * c); int HandleIPC(const char *params, Client * c);
void ButtonIPC(int val, void *data); void ButtonIPC(int val, void *data);
/* lists.c */ /* lists.c */
@ -2276,7 +2278,7 @@ void *RemoveItemByPtr(void *ptritem, int type);
void **ListItemType(int *num, int type); void **ListItemType(int *num, int type);
char **ListItems(int *num, int type); char **ListItems(int *num, int type);
void **ListItemTypeID(int *num, int type, int id); void **ListItemTypeID(int *num, int type, int id);
void **ListItemTypeName(int *num, int type, char *name); void **ListItemTypeName(int *num, int type, const char *name);
void MoveItemToListTop(void *item, int type); void MoveItemToListTop(void *item, int type);
void ListChangeItemID(int type, void *ptr, int id); void ListChangeItemID(int type, void *ptr, int id);
void MoveItemToListBottom(void *item, int type); void MoveItemToListBottom(void *item, int type);
@ -2295,24 +2297,25 @@ void MenuShow(Menu * m, char noshow);
void MenuRepack(Menu * m); void MenuRepack(Menu * m);
void MenuEmpty(Menu * m); void MenuEmpty(Menu * m);
MenuItem *MenuItemCreate(const char *text, ImageClass * iclass, MenuItem *MenuItemCreate(const char *text, ImageClass * iclass,
int action_id, char *action_params, int action_id, const char *action_params,
Menu * child); Menu * child);
void MenuAddItem(Menu * menu, MenuItem * item); void MenuAddItem(Menu * menu, MenuItem * item);
void MenuAddName(Menu * menu, const char *name); void MenuAddName(Menu * menu, const char *name);
void MenuAddTitle(Menu * menu, const char *title); void MenuAddTitle(Menu * menu, const char *title);
void MenuAddStyle(Menu * menu, const char *style); void MenuAddStyle(Menu * menu, const char *style);
void MenuRealize(Menu * m); void MenuRealize(Menu * m);
Menu *MenuCreateFromDirectory(char *name, MenuStyle * ms, Menu *MenuCreateFromDirectory(const char *name, MenuStyle * ms,
char *dir); const char *dir);
Menu *MenuCreateFromFlatFile(char *name, MenuStyle * ms, Menu *MenuCreateFromFlatFile(const char *name, MenuStyle * ms,
char *file, Menu * parent); const char *file, Menu * parent);
Menu *MenuCreateFromGnome(char *name, MenuStyle * ms, char *dir); Menu *MenuCreateFromGnome(const char *name, MenuStyle * ms,
Menu *MenuCreateFromAllEWins(char *name, MenuStyle * ms); const char *dir);
Menu *MenuCreateFromDesktopEWins(char *name, MenuStyle * ms, Menu *MenuCreateFromAllEWins(const char *name, MenuStyle * ms);
Menu *MenuCreateFromDesktopEWins(const char *name, MenuStyle * ms,
int desk); int desk);
Menu *MenuCreateFromDesktops(char *name, MenuStyle * ms); Menu *MenuCreateFromDesktops(const char *name, MenuStyle * ms);
Menu *MenuCreateFromThemes(char *name, MenuStyle * ms); Menu *MenuCreateFromThemes(const char *name, MenuStyle * ms);
Menu *MenuCreateFromBorders(char *name, MenuStyle * ms); Menu *MenuCreateFromBorders(const char *name, MenuStyle * ms);
Window MenuWindow(Menu * menu); Window MenuWindow(Menu * menu);
void MenuShowMasker(Menu * m); void MenuShowMasker(Menu * m);
void MenuHideMasker(void); void MenuHideMasker(void);
@ -2353,13 +2356,13 @@ int Esetenv(const char *name, const char *value, int overwrite);
#endif #endif
/* moveresize.c */ /* moveresize.c */
int ActionMoveStart(EWin * ewin, void *params, char constrained, int ActionMoveStart(EWin * ewin, const void *params,
int nogroup); char constrained, int nogroup);
int ActionMoveEnd(EWin * ewin); int ActionMoveEnd(EWin * ewin);
int ActionMoveSuspend(void); int ActionMoveSuspend(void);
int ActionMoveResume(void); int ActionMoveResume(void);
void ActionMoveHandleMotion(void); void ActionMoveHandleMotion(void);
int ActionResizeStart(EWin * ewin, void *params, int hv); int ActionResizeStart(EWin * ewin, const void *params, int hv);
int ActionResizeEnd(EWin * ewin); int ActionResizeEnd(EWin * ewin);
void ActionResizeHandleMotion(void); void ActionResizeHandleMotion(void);
@ -2421,12 +2424,12 @@ int GetPointerScreenGeometry(int *px, int *py,
/* session.c */ /* session.c */
void SessionInit(void); void SessionInit(void);
void SessionSave(int shutdown); void SessionSave(int shutdown);
int SessionExit(void *params); int SessionExit(const void *params);
void ProcessICEMSGS(void); void ProcessICEMSGS(void);
int GetSMfd(void); int GetSMfd(void);
void SessionGetInfo(EWin * ewin, Atom atom_change); void SessionGetInfo(EWin * ewin, Atom atom_change);
void SetSMID(char *smid); void SetSMID(const char *smid);
void SetSMFile(char *path); void SetSMFile(const char *path);
void SetSMProgName(const char *name); void SetSMProgName(const char *name);
void SetSMUserThemePath(const char *path); void SetSMUserThemePath(const char *path);
char *GetSMFile(void); char *GetSMFile(void);
@ -2467,9 +2470,9 @@ Window MakeExtInitWin(void);
void SetupUserInitialization(void); void SetupUserInitialization(void);
/* size.c */ /* size.c */
void MaxSize(EWin * ewin, char *resize_type); void MaxSize(EWin * ewin, const char *resize_type);
void MaxWidth(EWin * ewin, char *resize_type); void MaxWidth(EWin * ewin, const char *resize_type);
void MaxHeight(EWin * ewin, char *resize_type); void MaxHeight(EWin * ewin, const char *resize_type);
/* slideouts.c */ /* slideouts.c */
void SlideWindowSizeTo(Window win, int fx, int fy, int tx, void SlideWindowSizeTo(Window win, int fx, int fy, int tx,
@ -2573,15 +2576,15 @@ char *FindTheme(const char *theme);
/* timers.c */ /* timers.c */
double GetTime(void); double GetTime(void);
void DoIn(char *name, double in_time, void DoIn(const char *name, double in_time,
void (*func) (int val, void *data), int runtime_val, void (*func) (int val, void *data), int runtime_val,
void *runtime_data); void *runtime_data);
Qentry *GetHeadTimerQueue(void); Qentry *GetHeadTimerQueue(void);
void HandleTimerEvent(void); void HandleTimerEvent(void);
void RemoveTimerEvent(char *name); void RemoveTimerEvent(const char *name);
/* tooltips.c */ /* tooltips.c */
ToolTip *CreateToolTip(char *name, ImageClass * ic0, ToolTip *CreateToolTip(const char *name, ImageClass * ic0,
ImageClass * ic1, ImageClass * ic2, ImageClass * ic1, ImageClass * ic2,
ImageClass * ic3, ImageClass * ic4, ImageClass * ic3, ImageClass * ic4,
TextClass * tclass, int dist, TextClass * tclass, int dist,
@ -2592,16 +2595,16 @@ void HideToolTip(ToolTip * tt);
void FreeToolTip(ToolTip * tt); void FreeToolTip(ToolTip * tt);
/* ttfont.c */ /* ttfont.c */
void Efont_extents(Efont * f, char *text, void Efont_extents(Efont * f, const char *text,
int *font_ascent_return, int *font_ascent_return,
int *font_descent_return, int *width_return, int *font_descent_return, int *width_return,
int *max_ascent_return, int *max_ascent_return,
int *max_descent_return, int *lbearing_return, int *max_descent_return, int *lbearing_return,
int *rbearing_return); int *rbearing_return);
Efont *Efont_load(char *file, int size); Efont *Efont_load(const char *file, int size);
void Efont_free(Efont * f); void Efont_free(Efont * f);
void EFont_draw_string(Display * disp, Drawable win, GC gc, void EFont_draw_string(Display * disp, Drawable win, GC gc,
int x, int y, char *text, Efont * f, int x, int y, const char *text, Efont * f,
Visual * vis, Colormap cm); Visual * vis, Colormap cm);
/* warp.c */ /* warp.c */
@ -2610,7 +2613,7 @@ void WarpFocus(int delta);
void WarpFocusFinish(void); void WarpFocusFinish(void);
/* windowmatch.c */ /* windowmatch.c */
WindowMatch *CreateWindowMatch(char *name); WindowMatch *CreateWindowMatch(const char *name);
char TestWindowMatch(EWin * ewin, WindowMatch * b); char TestWindowMatch(EWin * ewin, WindowMatch * b);
Border *MatchEwinBorder(EWin * ewin, WindowMatch * b); Border *MatchEwinBorder(EWin * ewin, WindowMatch * b);
ImageClass *MatchEwinIcon(EWin * ewin, WindowMatch * b); ImageClass *MatchEwinIcon(EWin * ewin, WindowMatch * b);
@ -2765,7 +2768,7 @@ extern int numlock_mask;
extern int scrollock_mask; extern int scrollock_mask;
extern int mask_mod_combos[8]; extern int mask_mod_combos[8];
extern Group *current_group; extern Group *current_group;
extern char *dstr; extern const char *dstr;
extern char *e_machine_name; extern char *e_machine_name;
#ifdef HAS_XINERAMA #ifdef HAS_XINERAMA

View File

@ -29,14 +29,14 @@ typedef struct
char ok_zoom; char ok_zoom;
char ok_movres; char ok_movres;
char hide_slideouts; char hide_slideouts;
int (*func) (EWin * ewin, void *params); int (*func) (EWin * ewin, const void *params);
} ActionFunction; } ActionFunction;
static ActionFunction ActionFunctions[ACTION_NUMBEROF]; static ActionFunction ActionFunctions[ACTION_NUMBEROF];
static char mode_action_destroy = 0; static char mode_action_destroy = 0;
ActionClass * ActionClass *
CreateAclass(char *name) CreateAclass(const char *name)
{ {
ActionClass *a; ActionClass *a;
@ -348,7 +348,7 @@ AddAction(ActionClass * a, Action * act)
} }
int int
ActionsCall(unsigned int id, EWin * ewin, void *params) ActionsCall(unsigned int id, EWin * ewin, const void *params)
{ {
ActionFunction *af; ActionFunction *af;
@ -560,7 +560,7 @@ EventAclass(XEvent * ev, EWin * ewin, ActionClass * a)
*/ */
static int static int
doNothing(EWin * ewin, void *params) doNothing(EWin * ewin, const void *params)
{ {
EDBUG(6, "doNothing"); EDBUG(6, "doNothing");
EDBUG_RETURN(0); EDBUG_RETURN(0);
@ -569,7 +569,7 @@ doNothing(EWin * ewin, void *params)
} }
static int static int
spawnMenu(EWin * ewin, void *params) spawnMenu(EWin * ewin, const void *params)
{ {
char s[1024]; char s[1024];
char s2[1024]; char s2[1024];
@ -651,7 +651,7 @@ spawnMenu(EWin * ewin, void *params)
} }
static int static int
hideMenu(EWin * ewin, void *params) hideMenu(EWin * ewin, const void *params)
{ {
EDBUG(6, "hideMenu"); EDBUG(6, "hideMenu");
EDBUG_RETURN(0); EDBUG_RETURN(0);
@ -660,7 +660,7 @@ hideMenu(EWin * ewin, void *params)
} }
static int static int
runApp(char *exe, char *params) runApp(const char *exe, const char *params)
{ {
char *sh; char *sh;
char *path; char *path;
@ -780,7 +780,7 @@ runApp(char *exe, char *params)
} }
int int
execApplication(void *params) execApplication(const void *params)
{ {
#if 0 /* Is there any reason to do this? */ #if 0 /* Is there any reason to do this? */
char exe[FILEPATH_LEN_MAX]; char exe[FILEPATH_LEN_MAX];
@ -831,7 +831,7 @@ execApplication(void *params)
EDBUG_RETURN(0); EDBUG_RETURN(0);
#else #else
char exe[FILEPATH_LEN_MAX]; char exe[FILEPATH_LEN_MAX];
char *s = params; const char *s = params;
sscanf(s, "%4000s", exe); sscanf(s, "%4000s", exe);
runApp(exe, s); runApp(exe, s);
@ -841,14 +841,14 @@ execApplication(void *params)
} }
static int static int
doExec(EWin * edummy, void *params) doExec(EWin * edummy, const void *params)
{ {
return execApplication(params); return execApplication(params);
edummy = NULL; edummy = NULL;
} }
static int static int
doAlert(EWin * edummy, void *params) doAlert(EWin * edummy, const void *params)
{ {
char *pp; char *pp;
int i; int i;
@ -879,7 +879,7 @@ doAlert(EWin * edummy, void *params)
} }
static int static int
doExit(EWin * ewin, void *params) doExit(EWin * ewin, const void *params)
{ {
EDBUG(6, "doExit"); EDBUG(6, "doExit");
@ -890,43 +890,43 @@ doExit(EWin * ewin, void *params)
} }
static int static int
doResize(EWin * ewin, void *params) doResize(EWin * ewin, const void *params)
{ {
return ActionResizeStart(ewin, params, MODE_RESIZE); return ActionResizeStart(ewin, params, MODE_RESIZE);
} }
static int static int
doResizeH(EWin * ewin, void *params) doResizeH(EWin * ewin, const void *params)
{ {
return ActionResizeStart(ewin, params, MODE_RESIZE_H); return ActionResizeStart(ewin, params, MODE_RESIZE_H);
} }
static int static int
doResizeV(EWin * ewin, void *params) doResizeV(EWin * ewin, const void *params)
{ {
return ActionResizeStart(ewin, params, MODE_RESIZE_V); return ActionResizeStart(ewin, params, MODE_RESIZE_V);
} }
static int static int
doMove(EWin * ewin, void *params) doMove(EWin * ewin, const void *params)
{ {
return ActionMoveStart(ewin, params, 0, 0); return ActionMoveStart(ewin, params, 0, 0);
} }
static int static int
doMoveConstrained(EWin * ewin, void *params) doMoveConstrained(EWin * ewin, const void *params)
{ {
return ActionMoveStart(ewin, params, 1, 0); return ActionMoveStart(ewin, params, 1, 0);
} }
static int static int
doMoveNoGroup(EWin * ewin, void *params) doMoveNoGroup(EWin * ewin, const void *params)
{ {
return ActionMoveStart(ewin, params, 0, 1); return ActionMoveStart(ewin, params, 0, 1);
} }
static int static int
doSwapMove(EWin * ewin, void *params) doSwapMove(EWin * ewin, const void *params)
{ {
Mode.swapmovemode = 1; Mode.swapmovemode = 1;
return ActionMoveStart(ewin, params, 0, 0); return ActionMoveStart(ewin, params, 0, 0);
@ -934,7 +934,7 @@ doSwapMove(EWin * ewin, void *params)
#if 0 /* Not used */ #if 0 /* Not used */
static int static int
doMoveConstrainedNoGroup(EWin * ewin, void *params) doMoveConstrainedNoGroup(EWin * ewin, const void *params)
{ {
return ActionMoveStart(ewin, params, 1, 1); return ActionMoveStart(ewin, params, 1, 1);
} }
@ -1097,7 +1097,7 @@ ActionsEnd(EWin * ewin)
} }
static int static int
DoRaise(EWin * ewin, void *params, int nogroup) DoRaise(EWin * ewin, const void *params, int nogroup)
{ {
EWin **gwins = NULL; EWin **gwins = NULL;
int i, num; int i, num;
@ -1113,7 +1113,7 @@ DoRaise(EWin * ewin, void *params, int nogroup)
} }
static int static int
DoLower(EWin * ewin, void *params, int nogroup) DoLower(EWin * ewin, const void *params, int nogroup)
{ {
EWin **gwins = NULL; EWin **gwins = NULL;
int i, num; int i, num;
@ -1129,25 +1129,25 @@ DoLower(EWin * ewin, void *params, int nogroup)
} }
static int static int
doRaise(EWin * ewin, void *params) doRaise(EWin * ewin, const void *params)
{ {
return DoRaise(ewin, params, 0); return DoRaise(ewin, params, 0);
} }
static int static int
doRaiseNoGroup(EWin * ewin, void *params) doRaiseNoGroup(EWin * ewin, const void *params)
{ {
return DoRaise(ewin, params, 1); return DoRaise(ewin, params, 1);
} }
static int static int
doLower(EWin * ewin, void *params) doLower(EWin * ewin, const void *params)
{ {
return DoLower(ewin, params, 0); return DoLower(ewin, params, 0);
} }
static int static int
doLowerNoGroup(EWin * ewin, void *params) doLowerNoGroup(EWin * ewin, const void *params)
{ {
return DoLower(ewin, params, 1); return DoLower(ewin, params, 1);
} }
@ -1169,7 +1169,7 @@ FindEwinInList(EWin * ewin, EWin ** gwins, int num)
} }
static int static int
DoRaiseLower(EWin * ewin, void *params, int nogroup) DoRaiseLower(EWin * ewin, const void *params, int nogroup)
{ {
EWin **gwins, **lst; EWin **gwins, **lst;
int gnum, j, raise = 0; int gnum, j, raise = 0;
@ -1217,19 +1217,19 @@ DoRaiseLower(EWin * ewin, void *params, int nogroup)
} }
static int static int
doRaiseLower(EWin * ewin, void *params) doRaiseLower(EWin * ewin, const void *params)
{ {
return DoRaiseLower(ewin, params, 0); return DoRaiseLower(ewin, params, 0);
} }
static int static int
doRaiseLowerNoGroup(EWin * ewin, void *params) doRaiseLowerNoGroup(EWin * ewin, const void *params)
{ {
return DoRaiseLower(ewin, params, 1); return DoRaiseLower(ewin, params, 1);
} }
static int static int
doCleanup(EWin * edummy, void *params) doCleanup(EWin * edummy, const void *params)
{ {
char *type; char *type;
int method; int method;
@ -1406,7 +1406,7 @@ doCleanup(EWin * edummy, void *params)
} }
static int static int
doKill(EWin * ewin, void *params) doKill(EWin * ewin, const void *params)
{ {
EDBUG(6, "doKill"); EDBUG(6, "doKill");
KillEwin(ewin, 0); KillEwin(ewin, 0);
@ -1415,7 +1415,7 @@ doKill(EWin * ewin, void *params)
} }
static int static int
doKillNoGroup(EWin * ewin, void *params) doKillNoGroup(EWin * ewin, const void *params)
{ {
EDBUG(6, "doKillNoGroup"); EDBUG(6, "doKillNoGroup");
KillEwin(ewin, 1); KillEwin(ewin, 1);
@ -1424,7 +1424,7 @@ doKillNoGroup(EWin * ewin, void *params)
} }
static int static int
doKillNasty(EWin * ewin, void *params) doKillNasty(EWin * ewin, const void *params)
{ {
EDBUG(6, "doKillNasty"); EDBUG(6, "doKillNasty");
@ -1437,7 +1437,7 @@ doKillNasty(EWin * ewin, void *params)
/* Desktop actions */ /* Desktop actions */
static int static int
DoGotoDesktop(EWin * edummy, void *params, int num) DoGotoDesktop(EWin * edummy, const void *params, int num)
{ {
int pd; int pd;
@ -1457,33 +1457,33 @@ DoGotoDesktop(EWin * edummy, void *params, int num)
} }
static int static int
doNextDesktop(EWin * edummy, void *params) doNextDesktop(EWin * edummy, const void *params)
{ {
return DoGotoDesktop(edummy, NULL, desks.current + 1); return DoGotoDesktop(edummy, NULL, desks.current + 1);
params = NULL; params = NULL;
} }
static int static int
doPrevDesktop(EWin * edummy, void *params) doPrevDesktop(EWin * edummy, const void *params)
{ {
return DoGotoDesktop(edummy, NULL, desks.current - 1); return DoGotoDesktop(edummy, NULL, desks.current - 1);
params = NULL; params = NULL;
} }
static int static int
doGotoDesktop(EWin * edummy, void *params) doGotoDesktop(EWin * edummy, const void *params)
{ {
return DoGotoDesktop(edummy, params, desks.current); return DoGotoDesktop(edummy, params, desks.current);
} }
static int static int
doInplaceDesktop(EWin * edummy, void *params) doInplaceDesktop(EWin * edummy, const void *params)
{ {
return DoGotoDesktop(edummy, params, desks.current); return DoGotoDesktop(edummy, params, desks.current);
} }
static int static int
doRaiseDesktop(EWin * edummy, void *params) doRaiseDesktop(EWin * edummy, const void *params)
{ {
int d = 0; int d = 0;
@ -1501,7 +1501,7 @@ doRaiseDesktop(EWin * edummy, void *params)
} }
static int static int
doLowerDesktop(EWin * edummy, void *params) doLowerDesktop(EWin * edummy, const void *params)
{ {
int d = 0; int d = 0;
@ -1519,7 +1519,7 @@ doLowerDesktop(EWin * edummy, void *params)
} }
static int static int
doDragDesktop(EWin * edummy, void *params) doDragDesktop(EWin * edummy, const void *params)
{ {
int d = 0; int d = 0;
@ -1543,7 +1543,7 @@ doDragDesktop(EWin * edummy, void *params)
/* Window ops */ /* Window ops */
static int static int
DoStick(EWin * ewin, void *params, int nogroup) DoStick(EWin * ewin, const void *params, int nogroup)
{ {
EWin **gwins = NULL; EWin **gwins = NULL;
Group *curr_group = NULL; Group *curr_group = NULL;
@ -1574,19 +1574,19 @@ DoStick(EWin * ewin, void *params, int nogroup)
} }
static int static int
doStick(EWin * ewin, void *params) doStick(EWin * ewin, const void *params)
{ {
return DoStick(ewin, params, 0); return DoStick(ewin, params, 0);
} }
static int static int
doStickNoGroup(EWin * ewin, void *params) doStickNoGroup(EWin * ewin, const void *params)
{ {
return DoStick(ewin, params, 1); return DoStick(ewin, params, 1);
} }
static int static int
doSkipLists(EWin * ewin, void *params) doSkipLists(EWin * ewin, const void *params)
{ {
char skip; char skip;
@ -1605,7 +1605,7 @@ doSkipLists(EWin * ewin, void *params)
} }
static int static int
doSkipTask(EWin * ewin, void *params) doSkipTask(EWin * ewin, const void *params)
{ {
EDBUG(6, "doSkipTask"); EDBUG(6, "doSkipTask");
@ -1619,7 +1619,7 @@ doSkipTask(EWin * ewin, void *params)
} }
static int static int
doSkipFocus(EWin * ewin, void *params) doSkipFocus(EWin * ewin, const void *params)
{ {
EDBUG(6, "doSkipFocus"); EDBUG(6, "doSkipFocus");
@ -1632,7 +1632,7 @@ doSkipFocus(EWin * ewin, void *params)
} }
static int static int
doSkipWinList(EWin * ewin, void *params) doSkipWinList(EWin * ewin, const void *params)
{ {
EDBUG(6, "doSkipWinList"); EDBUG(6, "doSkipWinList");
@ -1645,7 +1645,7 @@ doSkipWinList(EWin * ewin, void *params)
} }
static int static int
doNeverFocus(EWin * ewin, void *params) doNeverFocus(EWin * ewin, const void *params)
{ {
EDBUG(6, "doSkipWinList"); EDBUG(6, "doSkipWinList");
@ -1660,7 +1660,7 @@ doNeverFocus(EWin * ewin, void *params)
/* Button actions */ /* Button actions */
static int static int
doDragButtonStart(EWin * edummy, void *params) doDragButtonStart(EWin * edummy, const void *params)
{ {
Button *b; Button *b;
@ -1690,7 +1690,7 @@ doDragButtonStart(EWin * edummy, void *params)
} }
int int
doDragButtonEnd(void *params) doDragButtonEnd(const void *params)
{ {
Button *b; Button *b;
int d; int d;
@ -1722,7 +1722,7 @@ doDragButtonEnd(void *params)
/* Settings */ /* Settings */
static int static int
doFocusModeSet(EWin * edummy, void *params) doFocusModeSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doFocusModeSet"); EDBUG(6, "doFocusModeSet");
if (params) if (params)
@ -1750,7 +1750,7 @@ doFocusModeSet(EWin * edummy, void *params)
} }
static int static int
doMoveModeSet(EWin * edummy, void *params) doMoveModeSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doMoveModeSet"); EDBUG(6, "doMoveModeSet");
if (params) if (params)
@ -1773,7 +1773,7 @@ doMoveModeSet(EWin * edummy, void *params)
} }
static int static int
doResizeModeSet(EWin * edummy, void *params) doResizeModeSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doResizeModeSet"); EDBUG(6, "doResizeModeSet");
if (params) if (params)
@ -1794,7 +1794,7 @@ doResizeModeSet(EWin * edummy, void *params)
} }
static int static int
doSlideModeSet(EWin * edummy, void *params) doSlideModeSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doSlideModeSet"); EDBUG(6, "doSlideModeSet");
if (params) if (params)
@ -1813,7 +1813,7 @@ doSlideModeSet(EWin * edummy, void *params)
} }
static int static int
doCleanupSlideSet(EWin * edummy, void *params) doCleanupSlideSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doCleanupSlideSet"); EDBUG(6, "doCleanupSlideSet");
if (params) if (params)
@ -1833,7 +1833,7 @@ doCleanupSlideSet(EWin * edummy, void *params)
} }
static int static int
doMapSlideSet(EWin * edummy, void *params) doMapSlideSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doMapSlideSet"); EDBUG(6, "doMapSlideSet");
if (params) if (params)
@ -1851,7 +1851,7 @@ doMapSlideSet(EWin * edummy, void *params)
} }
static int static int
doSoundSet(EWin * edummy, void *params) doSoundSet(EWin * edummy, const void *params)
{ {
char snd; char snd;
@ -1879,7 +1879,7 @@ doSoundSet(EWin * edummy, void *params)
} }
static int static int
doButtonMoveResistSet(EWin * edummy, void *params) doButtonMoveResistSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doButtonMoveResistSet"); EDBUG(6, "doButtonMoveResistSet");
if (params) if (params)
@ -1890,7 +1890,7 @@ doButtonMoveResistSet(EWin * edummy, void *params)
} }
static int static int
doDesktopBgTimeoutSet(EWin * edummy, void *params) doDesktopBgTimeoutSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doDesktopBgTimeoutSet"); EDBUG(6, "doDesktopBgTimeoutSet");
if (params) if (params)
@ -1901,7 +1901,7 @@ doDesktopBgTimeoutSet(EWin * edummy, void *params)
} }
static int static int
doMapSlideSpeedSet(EWin * edummy, void *params) doMapSlideSpeedSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doMapSlideSpeedSet"); EDBUG(6, "doMapSlideSpeedSet");
if (params) if (params)
@ -1912,7 +1912,7 @@ doMapSlideSpeedSet(EWin * edummy, void *params)
} }
static int static int
doCleanupSlideSpeedSet(EWin * edummy, void *params) doCleanupSlideSpeedSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doCleanupSlideSpeedSet"); EDBUG(6, "doCleanupSlideSpeedSet");
if (params) if (params)
@ -1923,7 +1923,7 @@ doCleanupSlideSpeedSet(EWin * edummy, void *params)
} }
static int static int
doDragdirSet(EWin * edummy, void *params) doDragdirSet(EWin * edummy, const void *params)
{ {
char pd; char pd;
Button *b; Button *b;
@ -1959,7 +1959,7 @@ doDragdirSet(EWin * edummy, void *params)
} }
static int static int
doDragbarOrderSet(EWin * edummy, void *params) doDragbarOrderSet(EWin * edummy, const void *params)
{ {
char pd; char pd;
Button *b; Button *b;
@ -1988,7 +1988,7 @@ doDragbarOrderSet(EWin * edummy, void *params)
} }
static int static int
doDragbarWidthSet(EWin * edummy, void *params) doDragbarWidthSet(EWin * edummy, const void *params)
{ {
int pd; int pd;
Button *b; Button *b;
@ -2011,7 +2011,7 @@ doDragbarWidthSet(EWin * edummy, void *params)
} }
static int static int
doDragbarLengthSet(EWin * edummy, void *params) doDragbarLengthSet(EWin * edummy, const void *params)
{ {
int pd; int pd;
Button *b; Button *b;
@ -2034,7 +2034,7 @@ doDragbarLengthSet(EWin * edummy, void *params)
} }
static int static int
doDeskSlideSet(EWin * edummy, void *params) doDeskSlideSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doDeskSlideSet"); EDBUG(6, "doDeskSlideSet");
if (params) if (params)
@ -2052,7 +2052,7 @@ doDeskSlideSet(EWin * edummy, void *params)
} }
static int static int
doDeskSlideSpeedSet(EWin * edummy, void *params) doDeskSlideSpeedSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doDeskSlideSpeedSet"); EDBUG(6, "doDeskSlideSpeedSet");
if (params) if (params)
@ -2063,7 +2063,7 @@ doDeskSlideSpeedSet(EWin * edummy, void *params)
} }
static int static int
doHiQualityBgSet(EWin * edummy, void *params) doHiQualityBgSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doHiQualityBgSet"); EDBUG(6, "doHiQualityBgSet");
if (params) if (params)
@ -2081,7 +2081,7 @@ doHiQualityBgSet(EWin * edummy, void *params)
} }
static int static int
doAutosaveSet(EWin * edummy, void *params) doAutosaveSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doAutosaveSet"); EDBUG(6, "doAutosaveSet");
if (params) if (params)
@ -2098,7 +2098,7 @@ doAutosaveSet(EWin * edummy, void *params)
} }
static int static int
doToolTipSet(EWin * edummy, void *params) doToolTipSet(EWin * edummy, const void *params)
{ {
EDBUG(6, "doToolTipSet"); EDBUG(6, "doToolTipSet");
if (params) if (params)
@ -2113,7 +2113,7 @@ doToolTipSet(EWin * edummy, void *params)
/* Misc actions */ /* Misc actions */
static int static int
doPlaySoundClass(EWin * edummy, void *params) doPlaySoundClass(EWin * edummy, const void *params)
{ {
EDBUG(6, "doPlaySoundClass"); EDBUG(6, "doPlaySoundClass");
@ -2127,7 +2127,7 @@ doPlaySoundClass(EWin * edummy, void *params)
} }
static int static int
doDeskray(EWin * edummy, void *params) doDeskray(EWin * edummy, const void *params)
{ {
EDBUG(6, "doDeskray"); EDBUG(6, "doDeskray");
if (params) if (params)
@ -2161,10 +2161,11 @@ doDeskray(EWin * edummy, void *params)
} }
static int static int
doHideShowButton(EWin * edummy, void *params) doHideShowButton(EWin * edummy, const void *params)
{ {
Button **lst, *b; Button **lst, *b;
char s[1024], *ss; char s[1024];
const char *ss;
int num, i; int num, i;
EDBUG(6, "doHideShowButton"); EDBUG(6, "doHideShowButton");
@ -2253,7 +2254,7 @@ doHideShowButton(EWin * edummy, void *params)
} }
static int static int
doScrollContainer(EWin * edummy, void *params) doScrollContainer(EWin * edummy, const void *params)
{ {
EDBUG(6, "doScrollContainer"); EDBUG(6, "doScrollContainer");
EDBUG_RETURN(0); EDBUG_RETURN(0);
@ -2264,7 +2265,7 @@ doScrollContainer(EWin * edummy, void *params)
/* More winops */ /* More winops */
static int static int
DoIconifyWindow(EWin * ewin, void *params, int nogroup) DoIconifyWindow(EWin * ewin, const void *params, int nogroup)
{ {
Group *curr_group = NULL; Group *curr_group = NULL;
char iconified; char iconified;
@ -2315,13 +2316,13 @@ DoIconifyWindow(EWin * ewin, void *params, int nogroup)
} }
static int static int
doIconifyWindow(EWin * ewin, void *params) doIconifyWindow(EWin * ewin, const void *params)
{ {
return DoIconifyWindow(ewin, params, 0); return DoIconifyWindow(ewin, params, 0);
} }
static int static int
doIconifyWindowNoGroup(EWin * ewin, void *params) doIconifyWindowNoGroup(EWin * ewin, const void *params)
{ {
return DoIconifyWindow(ewin, params, 1); return DoIconifyWindow(ewin, params, 1);
} }
@ -2329,7 +2330,7 @@ doIconifyWindowNoGroup(EWin * ewin, void *params)
/* More misc */ /* More misc */
static int static int
doSlideout(EWin * ewin, void *params) doSlideout(EWin * ewin, const void *params)
{ {
Slideout *s; Slideout *s;
@ -2347,7 +2348,7 @@ doSlideout(EWin * ewin, void *params)
} }
static int static int
doScrollWindows(EWin * edummy, void *params) doScrollWindows(EWin * edummy, const void *params)
{ {
int x, y, num, i; int x, y, num, i;
EWin **lst; EWin **lst;
@ -2379,7 +2380,7 @@ doScrollWindows(EWin * edummy, void *params)
/* More winops */ /* More winops */
static int static int
DoShade(EWin * ewin, void *params, int nogroup) DoShade(EWin * ewin, const void *params, int nogroup)
{ {
EWin **gwins = NULL; EWin **gwins = NULL;
Group *curr_group = NULL; Group *curr_group = NULL;
@ -2413,19 +2414,19 @@ DoShade(EWin * ewin, void *params, int nogroup)
} }
static int static int
doShade(EWin * ewin, void *params) doShade(EWin * ewin, const void *params)
{ {
return DoShade(ewin, params, 0); return DoShade(ewin, params, 0);
} }
static int static int
doShadeNoGroup(EWin * ewin, void *params) doShadeNoGroup(EWin * ewin, const void *params)
{ {
return DoShade(ewin, params, 1); return DoShade(ewin, params, 1);
} }
static int static int
doMaxH(EWin * ewin, void *params) doMaxH(EWin * ewin, const void *params)
{ {
EDBUG(6, "doMaxH"); EDBUG(6, "doMaxH");
if (ewin->shaded) if (ewin->shaded)
@ -2436,7 +2437,7 @@ doMaxH(EWin * ewin, void *params)
} }
static int static int
doMaxW(EWin * ewin, void *params) doMaxW(EWin * ewin, const void *params)
{ {
EDBUG(6, "doMaxW"); EDBUG(6, "doMaxW");
if (ewin->shaded) if (ewin->shaded)
@ -2447,7 +2448,7 @@ doMaxW(EWin * ewin, void *params)
} }
static int static int
doMax(EWin * ewin, void *params) doMax(EWin * ewin, const void *params)
{ {
EDBUG(6, "doMax"); EDBUG(6, "doMax");
if (ewin->shaded) if (ewin->shaded)
@ -2458,7 +2459,7 @@ doMax(EWin * ewin, void *params)
} }
static int static int
doSendToNextDesk(EWin * ewin, void *params) doSendToNextDesk(EWin * ewin, const void *params)
{ {
EDBUG(6, "doSendToNextDesk"); EDBUG(6, "doSendToNextDesk");
MoveEwinToDesktop(ewin, ewin->desktop + 1); MoveEwinToDesktop(ewin, ewin->desktop + 1);
@ -2471,7 +2472,7 @@ doSendToNextDesk(EWin * ewin, void *params)
} }
static int static int
doSendToPrevDesk(EWin * ewin, void *params) doSendToPrevDesk(EWin * ewin, const void *params)
{ {
EDBUG(6, "doSendToPrevDesk"); EDBUG(6, "doSendToPrevDesk");
MoveEwinToDesktop(ewin, ewin->desktop - 1); MoveEwinToDesktop(ewin, ewin->desktop - 1);
@ -2484,7 +2485,7 @@ doSendToPrevDesk(EWin * ewin, void *params)
} }
static int static int
doSnapshot(EWin * ewin, void *params) doSnapshot(EWin * ewin, const void *params)
{ {
EDBUG(6, "doSnapshot"); EDBUG(6, "doSnapshot");
@ -2516,7 +2517,7 @@ doSnapshot(EWin * ewin, void *params)
} }
static int static int
doToggleFixedPos(EWin * ewin, void *params) doToggleFixedPos(EWin * ewin, const void *params)
{ {
EDBUG(6, "doToggleFixedPos"); EDBUG(6, "doToggleFixedPos");
@ -2530,7 +2531,7 @@ doToggleFixedPos(EWin * ewin, void *params)
} }
static int static int
doSetLayer(EWin * ewin, void *params) doSetLayer(EWin * ewin, const void *params)
{ {
int l; int l;
@ -2558,7 +2559,7 @@ doSetLayer(EWin * ewin, void *params)
/* Focus actions */ /* Focus actions */
static int static int
doFocusNext(EWin * edummy, void *params) doFocusNext(EWin * edummy, const void *params)
{ {
EDBUG(6, "doFocusNext"); EDBUG(6, "doFocusNext");
if (Conf.warplist.enable && Mode.current_event->type == KeyPress) if (Conf.warplist.enable && Mode.current_event->type == KeyPress)
@ -2571,7 +2572,7 @@ doFocusNext(EWin * edummy, void *params)
} }
static int static int
doFocusPrev(EWin * edummy, void *params) doFocusPrev(EWin * edummy, const void *params)
{ {
EDBUG(6, "doFocusPrev"); EDBUG(6, "doFocusPrev");
FocusGetPrevEwin(); FocusGetPrevEwin();
@ -2581,7 +2582,7 @@ doFocusPrev(EWin * edummy, void *params)
} }
static int static int
doFocusSet(EWin * ewin, void *params) doFocusSet(EWin * ewin, const void *params)
{ {
EDBUG(6, "doFocusSet"); EDBUG(6, "doFocusSet");
@ -2598,7 +2599,7 @@ doFocusSet(EWin * ewin, void *params)
} }
static int static int
doBackgroundSet(EWin * edummy, void *params) doBackgroundSet(EWin * edummy, const void *params)
{ {
int desk; int desk;
Background *bg; Background *bg;
@ -2644,7 +2645,7 @@ doBackgroundSet(EWin * edummy, void *params)
/* Area actions */ /* Area actions */
static int static int
doAreaSet(EWin * edummy, void *params) doAreaSet(EWin * edummy, const void *params)
{ {
int a, b; int a, b;
@ -2659,7 +2660,7 @@ doAreaSet(EWin * edummy, void *params)
} }
static int static int
doAreaMoveBy(EWin * edummy, void *params) doAreaMoveBy(EWin * edummy, const void *params)
{ {
int a, b; int a, b;
@ -2675,7 +2676,7 @@ doAreaMoveBy(EWin * edummy, void *params)
} }
static int static int
doLinearAreaSet(EWin * edummy, void *params) doLinearAreaSet(EWin * edummy, const void *params)
{ {
int da; int da;
@ -2690,7 +2691,7 @@ doLinearAreaSet(EWin * edummy, void *params)
} }
static int static int
doLinearAreaMoveBy(EWin * edummy, void *params) doLinearAreaMoveBy(EWin * edummy, const void *params)
{ {
int da; int da;
@ -2705,7 +2706,7 @@ doLinearAreaMoveBy(EWin * edummy, void *params)
} }
static int static int
doWarpPointer(EWin * edummy, void *params) doWarpPointer(EWin * edummy, const void *params)
{ {
int dx, dy; int dx, dy;
@ -2722,7 +2723,7 @@ doWarpPointer(EWin * edummy, void *params)
} }
static int static int
doMoveWinToArea(EWin * ewin, void *params) doMoveWinToArea(EWin * ewin, const void *params)
{ {
int dx, dy; int dx, dy;
@ -2737,7 +2738,7 @@ doMoveWinToArea(EWin * ewin, void *params)
} }
static int static int
doMoveWinByArea(EWin * ewin, void *params) doMoveWinByArea(EWin * ewin, const void *params)
{ {
int dx, dy; int dx, dy;
@ -2754,7 +2755,7 @@ doMoveWinByArea(EWin * ewin, void *params)
} }
static int static int
doMoveWinToLinearArea(EWin * ewin, void *params) doMoveWinToLinearArea(EWin * ewin, const void *params)
{ {
int da; int da;
@ -2770,7 +2771,7 @@ doMoveWinToLinearArea(EWin * ewin, void *params)
#if 0 /* Not used */ #if 0 /* Not used */
static int static int
doMoveWinByLinearArea(EWin * ewin, void *params) doMoveWinByLinearArea(EWin * ewin, const void *params)
{ {
EWin *ewin; EWin *ewin;
int da; int da;
@ -2787,7 +2788,7 @@ doMoveWinByLinearArea(EWin * ewin, void *params)
#endif #endif
static int static int
DoSetWinBorder(EWin * ewin, void *params, int nogroup) DoSetWinBorder(EWin * ewin, const void *params, int nogroup)
{ {
EWin **gwins = NULL; EWin **gwins = NULL;
int i, num; int i, num;
@ -2845,19 +2846,19 @@ DoSetWinBorder(EWin * ewin, void *params, int nogroup)
} }
static int static int
doSetWinBorder(EWin * ewin, void *params) doSetWinBorder(EWin * ewin, const void *params)
{ {
return DoSetWinBorder(ewin, params, 0); return DoSetWinBorder(ewin, params, 0);
} }
static int static int
doSetWinBorderNoGroup(EWin * ewin, void *params) doSetWinBorderNoGroup(EWin * ewin, const void *params)
{ {
return DoSetWinBorder(ewin, params, 1); return DoSetWinBorder(ewin, params, 1);
} }
static int static int
doAbout(EWin * edummy, void *params) doAbout(EWin * edummy, const void *params)
{ {
Dialog *d; Dialog *d;
DItem *table, *di; DItem *table, *di;
@ -2913,7 +2914,7 @@ doAbout(EWin * edummy, void *params)
} }
static int static int
doFX(EWin * edummy, void *params) doFX(EWin * edummy, const void *params)
{ {
EDBUG(6, "doFX"); EDBUG(6, "doFX");
if (params) if (params)
@ -2924,7 +2925,7 @@ doFX(EWin * edummy, void *params)
} }
static int static int
doSetPagerHiq(EWin * edummy, void *params) doSetPagerHiq(EWin * edummy, const void *params)
{ {
EDBUG(6, "doSetPagerHiq"); EDBUG(6, "doSetPagerHiq");
if (params) if (params)
@ -2940,7 +2941,7 @@ doSetPagerHiq(EWin * edummy, void *params)
} }
static int static int
doSetPagerSnap(EWin * edummy, void *params) doSetPagerSnap(EWin * edummy, const void *params)
{ {
EDBUG(6, "doSetPagerSnap"); EDBUG(6, "doSetPagerSnap");
if (params) if (params)
@ -2956,7 +2957,7 @@ doSetPagerSnap(EWin * edummy, void *params)
} }
static int static int
doConfigure(EWin * edummy, void *params) doConfigure(EWin * edummy, const void *params)
{ {
char s[1024]; char s[1024];
@ -3036,15 +3037,15 @@ doConfigure(EWin * edummy, void *params)
struct _keyset struct _keyset
{ {
char *sym; const char *sym;
int state; int state;
char *ch; const char *ch;
}; };
static int static int
doInsertKeys(EWin * edummy, void *params) doInsertKeys(EWin * edummy, const void *params)
{ {
const struct _keyset ks[] = { static const struct _keyset ks[] = {
{"a", 0, "a"}, {"a", 0, "a"},
{"b", 0, "b"}, {"b", 0, "b"},
{"c", 0, "c"}, {"c", 0, "c"},
@ -3191,7 +3192,7 @@ doInsertKeys(EWin * edummy, void *params)
} }
static int static int
doCreateIconbox(EWin * edummy, void *params) doCreateIconbox(EWin * edummy, const void *params)
{ {
Iconbox *ib, **ibl; Iconbox *ib, **ibl;
int num = 0; int num = 0;
@ -3215,7 +3216,7 @@ doCreateIconbox(EWin * edummy, void *params)
} }
static int static int
doShowHideGroup(EWin * ewin, void *params) doShowHideGroup(EWin * ewin, const void *params)
{ {
EDBUG(6, "doShowGroup"); EDBUG(6, "doShowGroup");
ShowHideWinGroups(ewin, NULL, SET_TOGGLE); ShowHideWinGroups(ewin, NULL, SET_TOGGLE);
@ -3224,7 +3225,7 @@ doShowHideGroup(EWin * ewin, void *params)
} }
static int static int
doStartGroup(EWin * ewin, void *params) doStartGroup(EWin * ewin, const void *params)
{ {
EDBUG(6, "doStartGroup"); EDBUG(6, "doStartGroup");
BuildWindowGroup(&ewin, 1); BuildWindowGroup(&ewin, 1);
@ -3234,7 +3235,7 @@ doStartGroup(EWin * ewin, void *params)
} }
static int static int
doAddToGroup(EWin * ewin, void *params) doAddToGroup(EWin * ewin, const void *params)
{ {
EDBUG(6, "doAddToGroup"); EDBUG(6, "doAddToGroup");
if (!current_group) if (!current_group)
@ -3256,7 +3257,7 @@ doAddToGroup(EWin * ewin, void *params)
} }
static int static int
doRemoveFromGroup(EWin * ewin, void *params) doRemoveFromGroup(EWin * ewin, const void *params)
{ {
EDBUG(6, "doRemoveFromGroup"); EDBUG(6, "doRemoveFromGroup");
ChooseGroupDialog(ewin, ChooseGroupDialog(ewin,
@ -3269,7 +3270,7 @@ doRemoveFromGroup(EWin * ewin, void *params)
} }
static int static int
doBreakGroup(EWin * ewin, void *params) doBreakGroup(EWin * ewin, const void *params)
{ {
EDBUG(6, "doBreakGroup"); EDBUG(6, "doBreakGroup");
ChooseGroupDialog(ewin, _(" Select the group to break "), ChooseGroupDialog(ewin, _(" Select the group to break "),
@ -3280,7 +3281,7 @@ doBreakGroup(EWin * ewin, void *params)
} }
static int static int
doZoom(EWin * ewin, void *params) doZoom(EWin * ewin, const void *params)
{ {
char s[1024]; char s[1024];

View File

@ -26,14 +26,14 @@
static void ShowAlert(char *text); static void ShowAlert(char *text);
static void AlertHandleClick(int button); static void AlertHandleClick(int button);
static int (*IgnoreFunction) (void *) = NULL; static int (*IgnoreFunction) (const void *) = NULL;
static void *IgnoreParams = NULL; static const void *IgnoreParams = NULL;
static char *IgnoreText = NULL; static char *IgnoreText = NULL;
static int (*RestartFunction) (void *) = NULL; static int (*RestartFunction) (const void *) = NULL;
static void *RestartParams = NULL; static const void *RestartParams = NULL;
static char *RestartText = NULL; static char *RestartText = NULL;
static int (*ExitFunction) (void *) = NULL; static int (*ExitFunction) (const void *) = NULL;
static void *ExitParams = NULL; static const void *ExitParams = NULL;
static char *ExitText = NULL; static char *ExitText = NULL;
static char *TitleText = NULL; static char *TitleText = NULL;
@ -149,7 +149,7 @@ AssignExitText(const char *text)
} }
void void
AssignIgnoreFunction(int (*FunctionToAssign) (void *), void *params) AssignIgnoreFunction(int (*FunctionToAssign) (const void *), const void *params)
{ {
EDBUG(7, "AssignIgnoreFunction"); EDBUG(7, "AssignIgnoreFunction");
IgnoreFunction = FunctionToAssign; IgnoreFunction = FunctionToAssign;
@ -158,7 +158,8 @@ AssignIgnoreFunction(int (*FunctionToAssign) (void *), void *params)
} }
void void
AssignRestartFunction(int (*FunctionToAssign) (void *), void *params) AssignRestartFunction(int (*FunctionToAssign) (const void *),
const void *params)
{ {
EDBUG(7, "AssignRestartFunction"); EDBUG(7, "AssignRestartFunction");
RestartFunction = FunctionToAssign; RestartFunction = FunctionToAssign;
@ -167,7 +168,7 @@ AssignRestartFunction(int (*FunctionToAssign) (void *), void *params)
} }
void void
AssignExitFunction(int (*FunctionToAssign) (void *), void *params) AssignExitFunction(int (*FunctionToAssign) (const void *), const void *params)
{ {
EDBUG(7, "AssignExitFunction"); EDBUG(7, "AssignExitFunction");
ExitFunction = FunctionToAssign; ExitFunction = FunctionToAssign;

View File

@ -679,7 +679,7 @@ AddToFamily(Window win)
} }
EWin * EWin *
AddInternalToFamily(Window win, char *bname, int type, void *ptr, AddInternalToFamily(Window win, const char *bname, int type, void *ptr,
void (*init) (EWin * ewin, void *ptr)) void (*init) (EWin * ewin, void *ptr))
{ {
EWin *ewin; EWin *ewin;
@ -2072,7 +2072,7 @@ FreeBorder(Border * b)
} }
Border * Border *
CreateBorder(char *name) CreateBorder(const char *name)
{ {
Border *b; Border *b;

View File

@ -24,7 +24,7 @@
#include "E.h" #include "E.h"
Button * Button *
ButtonCreate(char *name, ImageClass * iclass, ActionClass * aclass, ButtonCreate(const char *name, ImageClass * iclass, ActionClass * aclass,
TextClass * tclass, char *label, char ontop, int flags, TextClass * tclass, char *label, char ontop, int flags,
int minw, int maxw, int minh, int maxh, int xo, int yo, int minw, int maxw, int minh, int maxh, int xo, int yo,
int xa, int xr, int ya, int yr, int xsr, int xsa, int ysr, int xa, int xr, int ya, int yr, int xsr, int xsa, int ysr,
@ -484,7 +484,7 @@ ButtonEmbedWindow(Button * ButtonToUse, Window WindowToEmbed)
} }
void void
ButtonFindEmptySpotFor(Button * bt, char *listname, char dirtomove) ButtonFindEmptySpotFor(Button * bt, const char *listname, char dirtomove)
{ {
Button **blst; Button **blst;

View File

@ -99,7 +99,7 @@ CommsFindCommsWindow(void)
} }
static void static void
CommsDoSend(Window win, char *s) CommsDoSend(Window win, const char *s)
{ {
char ss[21]; char ss[21];
int i, j, k, len; int i, j, k, len;
@ -135,7 +135,7 @@ CommsDoSend(Window win, char *s)
} }
void void
CommsSend(Client * c, char *s) CommsSend(Client * c, const char *s)
{ {
EDBUG(5, "CommsSend"); EDBUG(5, "CommsSend");
@ -152,7 +152,7 @@ CommsSend(Client * c, char *s)
* and send the message * and send the message
*/ */
void void
CommsSendToMasterWM(char *s) CommsSendToMasterWM(const char *s)
{ {
EDBUG(5, "CommsSendToMasterWM"); EDBUG(5, "CommsSendToMasterWM");
@ -169,7 +169,7 @@ CommsSendToMasterWM(char *s)
* and broadcast the message * and broadcast the message
*/ */
void void
CommsBroadcastToSlaveWMs(char *s) CommsBroadcastToSlaveWMs(const char *s)
{ {
int screen; int screen;
@ -247,7 +247,7 @@ CommsGet(Client ** c, XClientMessageEvent * ev)
} }
void void
CommsBroadcast(char *s) CommsBroadcast(const char *s)
{ {
char **l; char **l;
int num, i; int num, i;
@ -720,7 +720,8 @@ HandleComms(XClientMessageEvent * ev)
ActionClass *ac; ActionClass *ac;
Action *a; Action *a;
int i, l; int i, l;
char buf[FILEPATH_LEN_MAX], *sp, *ss; char buf[FILEPATH_LEN_MAX];
const char *sp, *ss;
Mode.keybinds_changed = 1; Mode.keybinds_changed = 1;
ac = (ActionClass *) RemoveItem("KEYBINDINGS", 0, LIST_FINDBY_NAME, ac = (ActionClass *) RemoveItem("KEYBINDINGS", 0, LIST_FINDBY_NAME,
@ -1546,7 +1547,7 @@ HandleComms(XClientMessageEvent * ev)
} }
else if (!strcmp(w, "call_raw")) else if (!strcmp(w, "call_raw"))
{ {
char *par; const char *par;
int aid; int aid;
word(s, 2, w); word(s, 2, w);

View File

@ -1073,7 +1073,8 @@ Config_Menu(FILE * ConfigFile)
char s3[FILEPATH_LEN_MAX]; char s3[FILEPATH_LEN_MAX];
char s4[FILEPATH_LEN_MAX]; char s4[FILEPATH_LEN_MAX];
char s5[FILEPATH_LEN_MAX]; char s5[FILEPATH_LEN_MAX];
char *txt = NULL, *params = NULL; char *txt = NULL;
const char *params = NULL;
int i1; int i1;
Menu *m = NULL, *mm = NULL; Menu *m = NULL, *mm = NULL;
MenuItem *mi = NULL; MenuItem *mi = NULL;
@ -2634,15 +2635,15 @@ Config_ColorModifier(FILE * ConfigFile)
char s[FILEPATH_LEN_MAX]; char s[FILEPATH_LEN_MAX];
char s2[FILEPATH_LEN_MAX]; char s2[FILEPATH_LEN_MAX];
int i1; int i1;
char *name = 0; char *name = NULL;
char *params = 0; const char *params = NULL;
char *current_param = 0; const char *current_param = NULL;
unsigned char *rx = 0; unsigned char *rx = NULL;
unsigned char *ry = 0; unsigned char *ry = NULL;
unsigned char *gx = 0; unsigned char *gx = NULL;
unsigned char *gy = 0; unsigned char *gy = NULL;
unsigned char *bx = 0; unsigned char *bx = NULL;
unsigned char *by = 0; unsigned char *by = NULL;
int i = 0, tx, ty; int i = 0, tx, ty;
int rnum = 0, gnum = 0, bnum = 0; int rnum = 0, gnum = 0, bnum = 0;
ColorModifierClass *cm; ColorModifierClass *cm;
@ -3285,14 +3286,14 @@ Config_WindowMatch(FILE * ConfigFile)
static char *cfg_tmpfile = NULL; static char *cfg_tmpfile = NULL;
static FILE * static FILE *
OpenConfigFileForReading(char *path, char preprocess) OpenConfigFileForReading(const char *path, char preprocess)
{ {
/* This function will open a file at location path for */ /* This function will open a file at location path for */
/* reading. */ /* reading. */
/* All output is passed through epp for preprocessing however. */ /* All output is passed through epp for preprocessing however. */
FILE *fpin /*, *fpout */ ; FILE *fpin /*, *fpout */ ;
char execline[FILEPATH_LEN_MAX]; char execline[FILEPATH_LEN_MAX];
char *epp_path = ENLIGHTENMENT_BIN "/epp"; const char *epp_path = ENLIGHTENMENT_BIN "/epp";
EDBUG(5, "OpenConfigFileForReading"); EDBUG(5, "OpenConfigFileForReading");

View File

@ -386,9 +386,9 @@ FreeDesktopBG(Background * bg)
} }
Background * Background *
CreateDesktopBG(char *name, XColor * solid, char *bg, char tile, CreateDesktopBG(const char *name, XColor * solid, const char *bg, char tile,
char keep_aspect, int xjust, int yjust, int xperc, char keep_aspect, int xjust, int yjust, int xperc,
int yperc, char *top, char tkeep_aspect, int txjust, int yperc, const char *top, char tkeep_aspect, int txjust,
int tyjust, int txperc, int typerc) int tyjust, int txperc, int typerc)
{ {
Background *d; Background *d;

View File

@ -282,7 +282,7 @@ DialogRealizeIClassDefault(void)
} }
void void
DialogBindKey(Dialog * d, char *key, void (*func) (int val, void *data), DialogBindKey(Dialog * d, const char *key, void (*func) (int val, void *data),
int val, void *data) int val, void *data)
{ {
d->num_bindings++; d->num_bindings++;
@ -299,7 +299,7 @@ DialogBindKey(Dialog * d, char *key, void (*func) (int val, void *data),
} }
Dialog * Dialog *
DialogCreate(char *name) DialogCreate(const char *name)
{ {
Dialog *d; Dialog *d;
@ -412,8 +412,8 @@ DialogSetExitFunction(Dialog * d, void (*func) (int val, void *data), int val,
} }
void void
DialogAddButton(Dialog * d, char *text, void (*func) (int val, void *data), DialogAddButton(Dialog * d, const char *text,
char doclose) void (*func) (int val, void *data), char doclose)
{ {
DButton *db; DButton *db;
int w, h; int w, h;
@ -612,7 +612,7 @@ ShowDialog(Dialog * d)
XSetWMName(disp, d->win, &xtp); XSetWMName(disp, d->win, &xtp);
xch = XAllocClassHint(); xch = XAllocClassHint();
xch->res_name = d->name; xch->res_name = d->name;
xch->res_class = "Enlightenment_Dialog"; xch->res_class = (char *)"Enlightenment_Dialog";
XSetClassHint(disp, d->win, xch); XSetClassHint(disp, d->win, xch);
XFree(xch); XFree(xch);
} }
@ -980,7 +980,7 @@ DialogItemCallCallback(DItem * di)
static void static void
DialogRealizeItem(Dialog * d, DItem * di) DialogRealizeItem(Dialog * d, DItem * di)
{ {
char *def = NULL; const char *def = NULL;
int iw = 0, ih = 0; int iw = 0, ih = 0;
if (di->type == DITEM_BUTTON) if (di->type == DITEM_BUTTON)
@ -1822,7 +1822,7 @@ DialogItemsRealize(Dialog * d)
} }
void void
DialogItemButtonSetText(DItem * di, char *text) DialogItemButtonSetText(DItem * di, const char *text)
{ {
if (di->item.button.text) if (di->item.button.text)
Efree(di->item.button.text); Efree(di->item.button.text);
@ -1830,7 +1830,7 @@ DialogItemButtonSetText(DItem * di, char *text)
} }
void void
DialogItemCheckButtonSetText(DItem * di, char *text) DialogItemCheckButtonSetText(DItem * di, const char *text)
{ {
if (di->item.check_button.text) if (di->item.check_button.text)
Efree(di->item.check_button.text); Efree(di->item.check_button.text);
@ -1838,7 +1838,7 @@ DialogItemCheckButtonSetText(DItem * di, char *text)
} }
void void
DialogItemTextSetText(DItem * di, char *text) DialogItemTextSetText(DItem * di, const char *text)
{ {
if (di->item.text.text) if (di->item.text.text)
Efree(di->item.text.text); Efree(di->item.text.text);
@ -1853,7 +1853,7 @@ DialogItemRadioButtonSetEventFunc(DItem * di,
} }
void void
DialogItemRadioButtonSetText(DItem * di, char *text) DialogItemRadioButtonSetText(DItem * di, const char *text)
{ {
if (di->item.radio_button.text) if (di->item.radio_button.text)
Efree(di->item.radio_button.text); Efree(di->item.radio_button.text);
@ -1918,7 +1918,7 @@ DialogItemSeparatorSetOrientation(DItem * di, char horizontal)
} }
void void
DialogItemImageSetFile(DItem * di, char *image) DialogItemImageSetFile(DItem * di, const char *image)
{ {
if (di->item.image.image) if (di->item.image.image)
Efree(di->item.image.image); Efree(di->item.image.image);

View File

@ -808,7 +808,7 @@ EWMH_ProcessClientMessage(XClientMessageEvent * event)
else if (atom == _NET_WM_STATE_MAXIMIZED_VERT || else if (atom == _NET_WM_STATE_MAXIMIZED_VERT ||
atom == _NET_WM_STATE_MAXIMIZED_HORZ) atom == _NET_WM_STATE_MAXIMIZED_HORZ)
{ {
void (*func) (EWin *, char *); void (*func) (EWin *, const char *);
int maskbits; int maskbits;
if (atom2 == _NET_WM_STATE_MAXIMIZED_VERT || atom2 == _NET_WM_STATE_MAXIMIZED_HORZ) /* (ok - ok) */ if (atom2 == _NET_WM_STATE_MAXIMIZED_VERT || atom2 == _NET_WM_STATE_MAXIMIZED_HORZ) /* (ok - ok) */

View File

@ -27,8 +27,8 @@
#include <pwd.h> #include <pwd.h>
#include <time.h> #include <time.h>
char * const char *
FileExtension(char *file) FileExtension(const char *file)
{ {
char *p; char *p;
@ -465,8 +465,8 @@ usershell(int uid)
EDBUG_RETURN(Estrdup("/bin/sh")); EDBUG_RETURN(Estrdup("/bin/sh"));
} }
char * const char *
atword(char *s, int num) atword(const char *s, int num)
{ {
int cnt, i; int cnt, i;
@ -492,8 +492,8 @@ atword(char *s, int num)
EDBUG_RETURN(NULL); EDBUG_RETURN(NULL);
} }
char * const char *
atchar(char *s, char c) atchar(const char *s, char c)
{ {
int i; int i;
@ -581,10 +581,11 @@ getword(char *s, int num)
} }
void void
word(char *s, int num, char *wd) word(const char *s, int num, char *wd)
{ {
int cnt, i; int cnt, i;
char *start, *finish, *ss, *w; char *w;
const char *start, *finish, *ss;
EDBUG(9, "word"); EDBUG(9, "word");
if (!s) if (!s)

View File

@ -216,7 +216,7 @@ FX_Active(int *num)
} }
int int
FX_IsOn(char *effect) FX_IsOn(const char *effect)
{ {
unsigned int i; unsigned int i;
@ -228,7 +228,6 @@ FX_IsOn(char *effect)
} }
} }
return 0; return 0;
} }
/****************************** RIPPLES *************************************/ /****************************** RIPPLES *************************************/

View File

@ -64,7 +64,7 @@ int numlock_mask = 0;
int scrollock_mask = 0; int scrollock_mask = 0;
int mask_mod_combos[8]; int mask_mod_combos[8];
Group *current_group; Group *current_group;
char *dstr = NULL; const char *dstr = NULL;
char *e_machine_name = NULL; char *e_machine_name = NULL;
#ifdef DEBUG #ifdef DEBUG

View File

@ -588,7 +588,7 @@ IconboxShow(Iconbox * ib)
XSetWMName(disp, ib->win, &xtp); XSetWMName(disp, ib->win, &xtp);
xch = XAllocClassHint(); xch = XAllocClassHint();
xch->res_name = ib->name; xch->res_name = ib->name;
xch->res_class = "Enlightenment_IconBox"; xch->res_class = (char *)"Enlightenment_IconBox";
XSetClassHint(disp, ib->win, xch); XSetClassHint(disp, ib->win, xch);
XFree(xch); XFree(xch);
MatchToSnapInfoIconbox(ib); MatchToSnapInfoIconbox(ib);

248
src/ipc.c
View File

@ -26,11 +26,11 @@
typedef struct _IPCstruct typedef struct _IPCstruct
{ {
void (*func) (char *params, Client * c); void (*func) (const char *params, Client * c);
char *commandname; const char *commandname;
char *nick; const char *nick;
char *help_text; const char *help_text;
char *extended_help_text; const char *extended_help_text;
} }
IPCStruct; IPCStruct;
@ -43,68 +43,68 @@ IPCStruct;
* --Mandrake * --Mandrake
*/ */
static void IPC_Help(char *params, Client * c); static void IPC_Help(const char *params, Client * c);
static void IPC_Version(char *params, Client * c); static void IPC_Version(const char *params, Client * c);
static void IPC_Copyright(char *params, Client * c); static void IPC_Copyright(const char *params, Client * c);
static void IPC_AutoSave(char *params, Client * c); static void IPC_AutoSave(const char *params, Client * c);
static void IPC_DefaultTheme(char *params, Client * c); static void IPC_DefaultTheme(const char *params, Client * c);
static void IPC_Restart(char *params, Client * c); static void IPC_Restart(const char *params, Client * c);
static void IPC_RestartWM(char *params, Client * c); static void IPC_RestartWM(const char *params, Client * c);
static void IPC_RestartTheme(char *params, Client * c); static void IPC_RestartTheme(const char *params, Client * c);
static void IPC_Exit(char *params, Client * c); static void IPC_Exit(const char *params, Client * c);
static void IPC_ForceSave(char *params, Client * c); static void IPC_ForceSave(const char *params, Client * c);
static void IPC_SMFile(char *params, Client * c); static void IPC_SMFile(const char *params, Client * c);
static void IPC_ListThemes(char *params, Client * c); static void IPC_ListThemes(const char *params, Client * c);
static void IPC_GotoDesktop(char *params, Client * c); static void IPC_GotoDesktop(const char *params, Client * c);
static void IPC_ShowIcons(char *params, Client * c); static void IPC_ShowIcons(const char *params, Client * c);
static void IPC_FocusMode(char *params, Client * c); static void IPC_FocusMode(const char *params, Client * c);
static void IPC_AdvancedFocus(char *params, Client * c); static void IPC_AdvancedFocus(const char *params, Client * c);
static void IPC_NumDesks(char *params, Client * c); static void IPC_NumDesks(const char *params, Client * c);
static void IPC_NumAreas(char *params, Client * c); static void IPC_NumAreas(const char *params, Client * c);
static void IPC_WinOps(char *params, Client * c); static void IPC_WinOps(const char *params, Client * c);
static void IPC_WinList(char *params, Client * c); static void IPC_WinList(const char *params, Client * c);
static void IPC_GotoArea(char *params, Client * c); static void IPC_GotoArea(const char *params, Client * c);
static void IPC_ButtonShow(char *params, Client * c); static void IPC_ButtonShow(const char *params, Client * c);
static void IPC_FX(char *params, Client * c); static void IPC_FX(const char *params, Client * c);
static void IPC_MoveMode(char *params, Client * c); static void IPC_MoveMode(const char *params, Client * c);
static void IPC_ResizeMode(char *params, Client * c); static void IPC_ResizeMode(const char *params, Client * c);
static void IPC_GeomInfoMode(char *params, Client * c); static void IPC_GeomInfoMode(const char *params, Client * c);
static void IPC_Pager(char *params, Client * c); static void IPC_Pager(const char *params, Client * c);
static void IPC_InternalList(char *params, Client * c); static void IPC_InternalList(const char *params, Client * c);
static void IPC_SetFocus(char *params, Client * c); static void IPC_SetFocus(const char *params, Client * c);
static void IPC_DialogOK(char *params, Client * c); static void IPC_DialogOK(const char *params, Client * c);
static void IPC_SoundClass(char *params, Client * c); static void IPC_SoundClass(const char *params, Client * c);
static void IPC_ImageClass(char *params, Client * c); static void IPC_ImageClass(const char *params, Client * c);
static void IPC_TextClass(char *params, Client * c); static void IPC_TextClass(const char *params, Client * c);
static void IPC_ActionClass(char *params, Client * c); static void IPC_ActionClass(const char *params, Client * c);
static void IPC_ColorModifierClass(char *params, Client * c); static void IPC_ColorModifierClass(const char *params, Client * c);
static void IPC_Border(char *params, Client * c); static void IPC_Border(const char *params, Client * c);
static void IPC_Button(char *params, Client * c); static void IPC_Button(const char *params, Client * c);
static void IPC_Background(char *params, Client * c); static void IPC_Background(const char *params, Client * c);
static void IPC_Cursor(char *params, Client * c); static void IPC_Cursor(const char *params, Client * c);
static void IPC_PlaySoundClass(char *params, Client * c); static void IPC_PlaySoundClass(const char *params, Client * c);
static void IPC_ListClassMembers(char *params, Client * c); static void IPC_ListClassMembers(const char *params, Client * c);
static void IPC_GeneralInfo(char *params, Client * c); static void IPC_GeneralInfo(const char *params, Client * c);
static void IPC_DockConfig(char *params, Client * c); static void IPC_DockConfig(const char *params, Client * c);
static void IPC_MemDebug(char *params, Client * c); static void IPC_MemDebug(const char *params, Client * c);
static void IPC_Remember(char *params, Client * c); static void IPC_Remember(const char *params, Client * c);
static void IPC_CurrentTheme(char *params, Client * c); static void IPC_CurrentTheme(const char *params, Client * c);
static void IPC_Nop(char *params, Client * c); static void IPC_Nop(const char *params, Client * c);
static void IPC_Xinerama(char *params, Client * c); static void IPC_Xinerama(const char *params, Client * c);
static void IPC_ConfigPanel(char *params, Client * c); static void IPC_ConfigPanel(const char *params, Client * c);
static void IPC_RememberList(char *params, Client * c); static void IPC_RememberList(const char *params, Client * c);
/* Changes By Asmodean_ <naru@caltech.edu> / #E@Efnet /* Changes By Asmodean_ <naru@caltech.edu> / #E@Efnet
* *
* IPC_ReloadMenus(...) / reload_menus - Reloads menus from menus.cfg */ * IPC_ReloadMenus(...) / reload_menus - Reloads menus from menus.cfg */
static void IPC_ReloadMenus(char *params, Client * c); static void IPC_ReloadMenus(const char *params, Client * c);
static void IPC_GroupInfo(char *params, Client * c); static void IPC_GroupInfo(const char *params, Client * c);
static void IPC_GroupOps(char *params, Client * c); static void IPC_GroupOps(const char *params, Client * c);
static void IPC_Group(char *params, Client * c); static void IPC_Group(const char *params, Client * c);
static void IPC_Hints(char *params, Client * c); static void IPC_Hints(const char *params, Client * c);
static void IPC_Debug(char *params, Client * c); static void IPC_Debug(const char *params, Client * c);
/* the IPC Array */ /* the IPC Array */
@ -606,12 +606,12 @@ SetEwinBoolean(char *buf, int len, const char *txt, char *item,
*/ */
static void static void
IPC_ConfigPanel(char *params, Client * c) IPC_ConfigPanel(const char *params, Client * c)
{ {
int i = 0; int i = 0;
char param[256], buf[FILEPATH_LEN_MAX], char param[256], buf[FILEPATH_LEN_MAX],
buf2[FILEPATH_LEN_MAX]; buf2[FILEPATH_LEN_MAX];
static char *cfg_panels[] = { static const char *cfg_panels[] = {
/* I just hardcoded this list form actions.c:doConfigure() -- perhaps /* I just hardcoded this list form actions.c:doConfigure() -- perhaps
* this should be tad more dynamic?? - pabs */ * this should be tad more dynamic?? - pabs */
"pager", "pager settings dialog", "pager", "pager settings dialog",
@ -663,7 +663,7 @@ IPC_ConfigPanel(char *params, Client * c)
} }
static void static void
IPC_Xinerama(char *params, Client * c) IPC_Xinerama(const char *params, Client * c)
{ {
params = NULL; params = NULL;
#ifdef HAS_XINERAMA #ifdef HAS_XINERAMA
@ -700,14 +700,14 @@ IPC_Xinerama(char *params, Client * c)
} }
static void static void
IPC_Nop(char *params, Client * c) IPC_Nop(const char *params, Client * c)
{ {
CommsSend(c, "nop"); CommsSend(c, "nop");
params = NULL; params = NULL;
} }
static void static void
IPC_Remember(char *params, Client * c) IPC_Remember(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char param[FILEPATH_LEN_MAX]; char param[FILEPATH_LEN_MAX];
@ -773,7 +773,7 @@ IPC_Remember(char *params, Client * c)
} }
static void static void
IPC_DockConfig(char *params, Client * c) IPC_DockConfig(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -921,7 +921,7 @@ IPC_DockConfig(char *params, Client * c)
} }
static void static void
IPC_GeneralInfo(char *params, Client * c) IPC_GeneralInfo(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -948,7 +948,7 @@ IPC_GeneralInfo(char *params, Client * c)
} }
static void static void
IPC_Button(char *params, Client * c) IPC_Button(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1014,7 +1014,7 @@ IPC_Button(char *params, Client * c)
} }
static void static void
IPC_Background(char *params, Client * c) IPC_Background(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char name[FILEPATH_LEN_MAX]; char name[FILEPATH_LEN_MAX];
@ -1229,7 +1229,7 @@ IPC_Background(char *params, Client * c)
} }
static void static void
IPC_Border(char *params, Client * c) IPC_Border(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1294,7 +1294,7 @@ IPC_Border(char *params, Client * c)
} }
static void static void
IPC_Cursor(char *params, Client * c) IPC_Cursor(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1359,7 +1359,7 @@ IPC_Cursor(char *params, Client * c)
} }
static void static void
IPC_TextClass(char *params, Client * c) IPC_TextClass(const char *params, Client * c)
{ {
char pq; char pq;
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1405,7 +1405,7 @@ IPC_TextClass(char *params, Client * c)
{ {
int state; int state;
int x, y; int x, y;
char *txt; const char *txt;
Window win; Window win;
word(params, 3, param3); word(params, 3, param3);
@ -1442,7 +1442,7 @@ IPC_TextClass(char *params, Client * c)
if (t) if (t)
{ {
int w, h; int w, h;
char *txt; const char *txt;
txt = atword(params, 3); txt = atword(params, 3);
if (txt) if (txt)
@ -1500,7 +1500,7 @@ IPC_TextClass(char *params, Client * c)
} }
static void static void
IPC_ColorModifierClass(char *params, Client * c) IPC_ColorModifierClass(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1568,7 +1568,7 @@ IPC_ColorModifierClass(char *params, Client * c)
} }
static void static void
IPC_ActionClass(char *params, Client * c) IPC_ActionClass(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1634,7 +1634,7 @@ IPC_ActionClass(char *params, Client * c)
} }
static void static void
IPC_ImageClass(char *params, Client * c) IPC_ImageClass(const char *params, Client * c)
{ {
char pq; char pq;
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1743,7 +1743,8 @@ IPC_ImageClass(char *params, Client * c)
if (iclass) if (iclass)
{ {
Window win; Window win;
char *winptr, *hptr, state[20]; char state[20];
const char *winptr, *hptr;
int st, w = -1, h = -1; int st, w = -1, h = -1;
winptr = atword(params, 3); winptr = atword(params, 3);
@ -1779,7 +1780,8 @@ IPC_ImageClass(char *params, Client * c)
if (iclass) if (iclass)
{ {
Window win; Window win;
char *winptr, *hptr, state[20]; char state[20];
const char *winptr, *hptr;
int st, w = -1, h = -1; int st, w = -1, h = -1;
winptr = atword(params, 3); winptr = atword(params, 3);
@ -1858,7 +1860,7 @@ IPC_ImageClass(char *params, Client * c)
} }
static void static void
IPC_SoundClass(char *params, Client * c) IPC_SoundClass(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1916,7 +1918,7 @@ IPC_SoundClass(char *params, Client * c)
} }
static void static void
IPC_PlaySoundClass(char *params, Client * c) IPC_PlaySoundClass(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -1937,7 +1939,7 @@ IPC_PlaySoundClass(char *params, Client * c)
} }
static void static void
IPC_ListClassMembers(char *params, Client * c) IPC_ListClassMembers(const char *params, Client * c)
{ {
char *buf = NULL; char *buf = NULL;
char buf2[FILEPATH_LEN_MAX]; char buf2[FILEPATH_LEN_MAX];
@ -2128,7 +2130,7 @@ IPC_ListClassMembers(char *params, Client * c)
} }
static void static void
IPC_DialogOK(char *params, Client * c) IPC_DialogOK(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -2144,7 +2146,7 @@ IPC_DialogOK(char *params, Client * c)
} }
static void static void
IPC_SetFocus(char *params, Client * c) IPC_SetFocus(const char *params, Client * c)
{ {
EWin *ewin; EWin *ewin;
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -2186,7 +2188,7 @@ IPC_SetFocus(char *params, Client * c)
} }
static void static void
IPC_AdvancedFocus(char *params, Client * c) IPC_AdvancedFocus(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -2572,7 +2574,7 @@ IPC_AdvancedFocus(char *params, Client * c)
} }
static void static void
IPC_InternalList(char *params, Client * c) IPC_InternalList(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char buf2[FILEPATH_LEN_MAX]; char buf2[FILEPATH_LEN_MAX];
@ -2650,7 +2652,7 @@ IPC_InternalList(char *params, Client * c)
} }
static void static void
IPC_Pager(char *params, Client * c) IPC_Pager(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char param1[FILEPATH_LEN_MAX]; char param1[FILEPATH_LEN_MAX];
@ -2878,7 +2880,7 @@ IPC_Pager(char *params, Client * c)
} }
static void static void
IPC_MoveMode(char *params, Client * c) IPC_MoveMode(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -2945,7 +2947,7 @@ IPC_MoveMode(char *params, Client * c)
} }
static void static void
IPC_ResizeMode(char *params, Client * c) IPC_ResizeMode(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -3006,7 +3008,7 @@ IPC_ResizeMode(char *params, Client * c)
} }
static void static void
IPC_GeomInfoMode(char *params, Client * c) IPC_GeomInfoMode(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -3055,7 +3057,7 @@ IPC_GeomInfoMode(char *params, Client * c)
} }
static void static void
IPC_FX(char *params, Client * c) IPC_FX(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -3455,7 +3457,7 @@ IPC_FX(char *params, Client * c)
} }
static void static void
IPC_ButtonShow(char *params, Client * c) IPC_ButtonShow(const char *params, Client * c)
{ {
ActionsCall(ACTION_HIDESHOW_BUTTON, NULL, params); ActionsCall(ACTION_HIDESHOW_BUTTON, NULL, params);
return; return;
@ -3463,7 +3465,7 @@ IPC_ButtonShow(char *params, Client * c)
} }
static void static void
IPC_WinList(char *params, Client * c) IPC_WinList(const char *params, Client * c)
{ {
char *ret = NULL; char *ret = NULL;
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -3519,7 +3521,7 @@ IPC_WinList(char *params, Client * c)
} }
static void static void
IPC_GotoArea(char *params, Client * c) IPC_GotoArea(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char param1[FILEPATH_LEN_MAX]; char param1[FILEPATH_LEN_MAX];
@ -3593,7 +3595,7 @@ IPC_GotoArea(char *params, Client * c)
} }
static void static void
IPC_WinOps(char *params, Client * c) IPC_WinOps(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
EWin *ewin; EWin *ewin;
@ -3978,7 +3980,7 @@ IPC_WinOps(char *params, Client * c)
} }
static void static void
IPC_NumAreas(char *params, Client * c) IPC_NumAreas(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4011,7 +4013,7 @@ IPC_NumAreas(char *params, Client * c)
} }
static void static void
IPC_NumDesks(char *params, Client * c) IPC_NumDesks(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4037,7 +4039,7 @@ IPC_NumDesks(char *params, Client * c)
} }
static void static void
IPC_FocusMode(char *params, Client * c) IPC_FocusMode(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4104,7 +4106,7 @@ IPC_FocusMode(char *params, Client * c)
} }
static void static void
IPC_ShowIcons(char *params, Client * c) IPC_ShowIcons(const char *params, Client * c)
{ {
/* Doesn't look like this function is doing anything, but it used to /* Doesn't look like this function is doing anything, but it used to
* if I recall correctly --Mandrake * if I recall correctly --Mandrake
@ -4115,7 +4117,7 @@ IPC_ShowIcons(char *params, Client * c)
} }
static void static void
IPC_GotoDesktop(char *params, Client * c) IPC_GotoDesktop(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4149,7 +4151,7 @@ IPC_GotoDesktop(char *params, Client * c)
} }
static void static void
IPC_ListThemes(char *params, Client * c) IPC_ListThemes(const char *params, Client * c)
{ {
char **list, *buf = NULL; char **list, *buf = NULL;
int i, num; int i, num;
@ -4186,7 +4188,7 @@ IPC_ListThemes(char *params, Client * c)
} }
static void static void
IPC_SMFile(char *params, Client * c) IPC_SMFile(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4213,7 +4215,7 @@ IPC_SMFile(char *params, Client * c)
} }
static void static void
IPC_ForceSave(char *params, Client * c) IPC_ForceSave(const char *params, Client * c)
{ {
c = NULL; c = NULL;
params = NULL; params = NULL;
@ -4228,7 +4230,7 @@ IPC_ForceSave(char *params, Client * c)
} }
static void static void
IPC_Restart(char *params, Client * c) IPC_Restart(const char *params, Client * c)
{ {
c = NULL; c = NULL;
params = NULL; params = NULL;
@ -4238,7 +4240,7 @@ IPC_Restart(char *params, Client * c)
} }
static void static void
IPC_RestartWM(char *params, Client * c) IPC_RestartWM(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4256,7 +4258,7 @@ IPC_RestartWM(char *params, Client * c)
} }
static void static void
IPC_RestartTheme(char *params, Client * c) IPC_RestartTheme(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4274,7 +4276,7 @@ IPC_RestartTheme(char *params, Client * c)
} }
static void static void
IPC_Exit(char *params, Client * c) IPC_Exit(const char *params, Client * c)
{ {
c = NULL; c = NULL;
@ -4285,7 +4287,7 @@ IPC_Exit(char *params, Client * c)
} }
static void static void
IPC_DefaultTheme(char *params, Client * c) IPC_DefaultTheme(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4321,7 +4323,7 @@ IPC_DefaultTheme(char *params, Client * c)
} }
static void static void
IPC_CurrentTheme(char *params, Client * c) IPC_CurrentTheme(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4336,7 +4338,7 @@ IPC_CurrentTheme(char *params, Client * c)
} }
static void static void
IPC_AutoSave(char *params, Client * c) IPC_AutoSave(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4377,7 +4379,7 @@ ipccmp(void *p1, void *p2)
} }
static void static void
IPC_Help(char *params, Client * c) IPC_Help(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char buf2[FILEPATH_LEN_MAX]; char buf2[FILEPATH_LEN_MAX];
@ -4471,7 +4473,7 @@ IPC_Help(char *params, Client * c)
} }
static void static void
IPC_Copyright(char *params, Client * c) IPC_Copyright(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4523,7 +4525,7 @@ IPC_Copyright(char *params, Client * c)
} }
static void static void
IPC_Version(char *params, Client * c) IPC_Version(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4547,7 +4549,7 @@ IPC_Version(char *params, Client * c)
*/ */
int int
HandleIPC(char *params, Client * c) HandleIPC(const char *params, Client * c)
{ {
int i; int i;
int numIPC; int numIPC;
@ -4595,7 +4597,7 @@ ButtonIPC(int val, void *data)
*/ */
static void static void
IPC_ReloadMenus(char *params, Client * c) IPC_ReloadMenus(const char *params, Client * c)
{ {
/* /*
* Do nothing here but call doExit, following the pattern * Do nothing here but call doExit, following the pattern
@ -4616,7 +4618,7 @@ IPC_ReloadMenus(char *params, Client * c)
} }
static void static void
IPC_GroupInfo(char *params, Client * c) IPC_GroupInfo(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char buf2[FILEPATH_LEN_MAX]; char buf2[FILEPATH_LEN_MAX];
@ -4694,7 +4696,7 @@ IPC_GroupInfo(char *params, Client * c)
} }
static void static void
IPC_GroupOps(char *params, Client * c) IPC_GroupOps(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
Group *group = current_group; Group *group = current_group;
@ -4803,7 +4805,7 @@ IPC_GroupOps(char *params, Client * c)
} }
static void static void
IPC_Group(char *params, Client * c) IPC_Group(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
@ -4945,7 +4947,7 @@ IPC_Group(char *params, Client * c)
} }
static void static void
IPC_MemDebug(char *params, Client * c) IPC_MemDebug(const char *params, Client * c)
{ {
EDisplayMemUse(); EDisplayMemUse();
@ -4954,7 +4956,7 @@ IPC_MemDebug(char *params, Client * c)
} }
static void static void
IPC_RememberList(char *params, Client * c) IPC_RememberList(const char *params, Client * c)
{ {
Snapshot **lst; Snapshot **lst;
int i, j, num, f; int i, j, num, f;
@ -5064,7 +5066,7 @@ IPC_RememberList(char *params, Client * c)
} }
static void static void
IPC_Hints(char *params, Client * c) IPC_Hints(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char param1[FILEPATH_LEN_MAX]; char param1[FILEPATH_LEN_MAX];
@ -5092,7 +5094,7 @@ IPC_Hints(char *params, Client * c)
} }
static void static void
IPC_Debug(char *params, Client * c) IPC_Debug(const char *params, Client * c)
{ {
char buf[FILEPATH_LEN_MAX]; char buf[FILEPATH_LEN_MAX];
char param1[FILEPATH_LEN_MAX]; char param1[FILEPATH_LEN_MAX];

View File

@ -470,7 +470,7 @@ ListItemTypeID(int *num, int type, int id)
} }
void ** void **
ListItemTypeName(int *num, int type, char *name) ListItemTypeName(int *num, int type, const char *name)
{ {
List *ptr; List *ptr;
int i, len; int i, len;

View File

@ -394,7 +394,7 @@ MenuStyleCreate(void)
MenuItem * MenuItem *
MenuItemCreate(const char *text, ImageClass * iclass, int action_id, MenuItemCreate(const char *text, ImageClass * iclass, int action_id,
char *action_params, Menu * child) const char *action_params, Menu * child)
{ {
MenuItem *mi; MenuItem *mi;
@ -968,12 +968,13 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape)
} }
Menu * Menu *
MenuCreateFromDirectory(char *name, MenuStyle * ms, char *dir) MenuCreateFromDirectory(const char *name, MenuStyle * ms, const char *dir)
{ {
Progressbar *p = NULL; Progressbar *p = NULL;
Menu *m, *mm; Menu *m, *mm;
int i, num; int i, num;
char **list, s[4096], ss[4096], *ext, cs[4096]; char **list, s[4096], ss[4096], cs[4096];
const char *ext;
MenuItem *mi; MenuItem *mi;
struct stat st; struct stat st;
const char *chmap = const char *chmap =
@ -1372,7 +1373,8 @@ MenuCreateFromDirectory(char *name, MenuStyle * ms, char *dir)
} }
Menu * Menu *
MenuCreateFromFlatFile(char *name, MenuStyle * ms, char *file, Menu * parent) MenuCreateFromFlatFile(const char *name, MenuStyle * ms, const char *file,
Menu * parent)
{ {
Menu *m; Menu *m;
char s[4096], *ff = NULL; char s[4096], *ff = NULL;
@ -1567,7 +1569,7 @@ FileMenuUpdate(int val, void *data)
} }
Menu * Menu *
MenuCreateFromGnome(char *name, MenuStyle * ms, char *dir) MenuCreateFromGnome(const char *name, MenuStyle * ms, const char *dir)
{ {
Menu *m, *mm; Menu *m, *mm;
int i, num; int i, num;
@ -1685,7 +1687,7 @@ MenuCreateFromGnome(char *name, MenuStyle * ms, char *dir)
} }
Menu * Menu *
MenuCreateFromThemes(char *name, MenuStyle * ms) MenuCreateFromThemes(const char *name, MenuStyle * ms)
{ {
Menu *m; Menu *m;
char **lst; char **lst;
@ -1726,7 +1728,7 @@ BorderNameCompare(void *b1, void *b2)
} }
Menu * Menu *
MenuCreateFromBorders(char *name, MenuStyle * ms) MenuCreateFromBorders(const char *name, MenuStyle * ms)
{ {
Menu *m; Menu *m;
Border **lst; Border **lst;
@ -1757,7 +1759,7 @@ MenuCreateFromBorders(char *name, MenuStyle * ms)
} }
Menu * Menu *
MenuCreateFromAllEWins(char *name, MenuStyle * ms) MenuCreateFromAllEWins(const char *name, MenuStyle * ms)
{ {
Menu *m; Menu *m;
EWin **lst; EWin **lst;
@ -1828,7 +1830,7 @@ MenuCreateFromDesktopEWins(char *name, MenuStyle * ms, int desk)
#endif #endif
Menu * Menu *
MenuCreateFromDesktops(char *name, MenuStyle * ms) MenuCreateFromDesktops(const char *name, MenuStyle * ms)
{ {
Menu *m, *mm; Menu *m, *mm;
EWin **lst; EWin **lst;
@ -1896,7 +1898,7 @@ MenuCreateMoveToDesktop(char *name, MenuStyle * ms)
#endif #endif
static Menu * static Menu *
MenuCreateFromGroups(char *name, MenuStyle * ms) MenuCreateFromGroups(const char *name, MenuStyle * ms)
{ {
Menu *m, *mm; Menu *m, *mm;
Group **lst; Group **lst;
@ -2080,7 +2082,7 @@ MenusInit(void)
static Menu * static Menu *
RefreshInternalMenu(Menu * m, MenuStyle * ms, RefreshInternalMenu(Menu * m, MenuStyle * ms,
Menu * (mcf) (char *xxx, MenuStyle * ms)) Menu * (mcf) (const char *xxx, MenuStyle * ms))
{ {
char was = 0; char was = 0;
int lx = 0, ly = 0; int lx = 0, ly = 0;
@ -2124,8 +2126,8 @@ RefreshInternalMenu(Menu * m, MenuStyle * ms,
} }
static void static void
ShowInternalMenu(Menu ** pm, MenuStyle ** pms, char *style, ShowInternalMenu(Menu ** pm, MenuStyle ** pms, const char *style,
Menu * (mcf) (char *name, MenuStyle * ms)) Menu * (mcf) (const char *name, MenuStyle * ms))
{ {
Menu *m = *pm; Menu *m = *pm;
MenuStyle *ms = *pms; MenuStyle *ms = *pms;

View File

@ -30,7 +30,7 @@ static int start_move_y = 0;
static int real_move_mode = 0; static int real_move_mode = 0;
int int
ActionMoveStart(EWin * ewin, void *params, char constrained, int nogroup) ActionMoveStart(EWin * ewin, const void *params, char constrained, int nogroup)
{ {
EWin **gwins; EWin **gwins;
int i, num; int i, num;
@ -254,7 +254,7 @@ ActionMoveResume(void)
} }
int int
ActionResizeStart(EWin * ewin, void *params, int hv) ActionResizeStart(EWin * ewin, const void *params, int hv)
{ {
int x, y, w, h; int x, y, w, h;

View File

@ -323,7 +323,7 @@ PagerShow(Pager * p)
Esnprintf(s, sizeof(s), "%i", p->desktop); Esnprintf(s, sizeof(s), "%i", p->desktop);
xch = XAllocClassHint(); xch = XAllocClassHint();
xch->res_name = s; xch->res_name = s;
xch->res_class = "Enlightenment_Pager"; xch->res_class = (char *)"Enlightenment_Pager";
XSetClassHint(disp, p->win, xch); XSetClassHint(disp, p->win, xch);
XFree(xch); XFree(xch);
pq = queue_up; pq = queue_up;

View File

@ -181,7 +181,7 @@ SetSMUserThemePath(const char *path)
static int stale_sm_file = 0; static int stale_sm_file = 0;
void void
SetSMFile(char *path) SetSMFile(const char *path)
{ {
if (sm_file) if (sm_file)
Efree(sm_file); Efree(sm_file);
@ -481,15 +481,15 @@ set_save_props(SmcConn smc_conn, int master_flag)
{ {
char *user = NULL; char *user = NULL;
char *program = NULL; char *program = NULL;
char *pristr = "_GSM_Priority"; const char *pristr = "_GSM_Priority";
char *smid = "-smid"; const char *smid = "-smid";
char *single = "-single"; const char *single = "-single";
char *smfile = "-smfile"; const char *smfile = "-smfile";
char *econfdir = "-econfdir"; const char *econfdir = "-econfdir";
char *e_conf_dir; char *e_conf_dir;
char *ecachedir = "-ecachedir"; const char *ecachedir = "-ecachedir";
char *e_cache_dir; char *e_cache_dir;
char *extinitwin = "-ext_init_win"; const char *extinitwin = "-ext_init_win";
char buf[512]; char buf[512];
char priority = 10; char priority = 10;
char style; char style;
@ -604,31 +604,31 @@ set_save_props(SmcConn smc_conn, int master_flag)
if (single_screen_mode) if (single_screen_mode)
{ {
restartVal[n].length = strlen(single); restartVal[n].length = strlen(single);
restartVal[n++].value = single; restartVal[n++].value = (char *)single;
} }
if (restarting) if (restarting)
{ {
Esnprintf(buf, sizeof(buf), "%li", init_win_ext); Esnprintf(buf, sizeof(buf), "%li", init_win_ext);
restartVal[n].length = strlen(extinitwin); restartVal[n].length = strlen(extinitwin);
restartVal[n++].value = extinitwin; restartVal[n++].value = (char *)extinitwin;
restartVal[n].length = strlen(buf); restartVal[n].length = strlen(buf);
restartVal[n++].value = buf; restartVal[n++].value = buf;
} }
restartVal[n].length = strlen(smfile); restartVal[n].length = strlen(smfile);
restartVal[n++].value = smfile; restartVal[n++].value = (char *)smfile;
restartVal[n].length = strlen(sm_file); restartVal[n].length = strlen(sm_file);
restartVal[n++].value = sm_file; restartVal[n++].value = sm_file;
restartVal[n].length = strlen(smid); restartVal[n].length = strlen(smid);
restartVal[n++].value = smid; restartVal[n++].value = (char *)smid;
restartVal[n].length = strlen(sm_client_id); restartVal[n].length = strlen(sm_client_id);
restartVal[n++].value = sm_client_id; restartVal[n++].value = sm_client_id;
restartVal[n].length = strlen(econfdir); restartVal[n].length = strlen(econfdir);
restartVal[n++].value = econfdir; restartVal[n++].value = (char *)econfdir;
restartVal[n].length = strlen(e_conf_dir); restartVal[n].length = strlen(e_conf_dir);
restartVal[n++].value = e_conf_dir; restartVal[n++].value = e_conf_dir;
restartVal[n].length = strlen(ecachedir); restartVal[n].length = strlen(ecachedir);
restartVal[n++].value = ecachedir; restartVal[n++].value = (char *)ecachedir;
restartVal[n].length = strlen(e_cache_dir); restartVal[n].length = strlen(e_cache_dir);
restartVal[n++].value = e_cache_dir; restartVal[n++].value = e_cache_dir;
@ -822,8 +822,8 @@ SessionInit(void)
styleVal.length = 1; styleVal.length = 1;
styleVal.value = style; styleVal.value = style;
styleProp.name = SmRestartStyleHint; styleProp.name = (char *)SmRestartStyleHint;
styleProp.type = SmCARD8; styleProp.type = (char *)SmCARD8;
styleProp.num_vals = 1; styleProp.num_vals = 1;
styleProp.vals = &styleVal; styleProp.vals = &styleVal;
@ -910,14 +910,14 @@ SessionGetInfo(EWin * ewin, Atom atom_change)
} }
void void
SetSMID(char *smid) SetSMID(const char *smid)
{ {
#ifdef HAVE_X11_SM_SMLIB_H #ifdef HAVE_X11_SM_SMLIB_H
sm_client_id = smid; sm_client_id = smid;
#endif /* HAVE_X11_SM_SMLIB_H */ #endif /* HAVE_X11_SM_SMLIB_H */
} }
static void doSMExit(void *params); static void doSMExit(const void *params);
static void static void
LogoutCB(int val, void *data) LogoutCB(int val, void *data)
{ {
@ -971,7 +971,7 @@ CB_SettingsEscape(int val, void *data)
* so the our clients remain frozen while we are down. * so the our clients remain frozen while we are down.
*/ */
static void static void
doSMExit(void *params) doSMExit(const void *params)
{ {
char s[1024]; char s[1024];
char master_flag, do_master_kill; char master_flag, do_master_kill;
@ -1122,7 +1122,7 @@ doSMExit(void *params)
/* This is the original code from actions.c(doExit). */ /* This is the original code from actions.c(doExit). */
static void static void
doSMExit(void *params) doSMExit(const void *params)
{ {
char s[1024]; char s[1024];
char *real_exec; char *real_exec;
@ -1236,7 +1236,7 @@ doSMExit(void *params)
#endif /* HAVE_X11_SM_SMLIB_H */ #endif /* HAVE_X11_SM_SMLIB_H */
int int
SessionExit(void *param) SessionExit(const void *param)
{ {
doSMExit(param); doSMExit(param);
return 0; return 0;

View File

@ -32,7 +32,7 @@
#define MAX_XINERAMA 3 /* Fill Xinerama screen */ #define MAX_XINERAMA 3 /* Fill Xinerama screen */
static void static void
MaxSizeHV(EWin * ewin, char *resize_type, int direction) MaxSizeHV(EWin * ewin, const char *resize_type, int direction)
{ {
int x, y, w, h, x1, x2, y1, y2, type; int x, y, w, h, x1, x2, y1, y2, type;
EWin **lst, *pe; EWin **lst, *pe;
@ -171,19 +171,19 @@ MaxSizeHV(EWin * ewin, char *resize_type, int direction)
} }
void void
MaxWidth(EWin * ewin, char *resize_type) MaxWidth(EWin * ewin, const char *resize_type)
{ {
MaxSizeHV(ewin, resize_type, MAX_HOR); MaxSizeHV(ewin, resize_type, MAX_HOR);
} }
void void
MaxHeight(EWin * ewin, char *resize_type) MaxHeight(EWin * ewin, const char *resize_type)
{ {
MaxSizeHV(ewin, resize_type, MAX_VER); MaxSizeHV(ewin, resize_type, MAX_VER);
} }
void void
MaxSize(EWin * ewin, char *resize_type) MaxSize(EWin * ewin, const char *resize_type)
{ {
MaxSizeHV(ewin, resize_type, MAX_HOR | MAX_VER); MaxSizeHV(ewin, resize_type, MAX_HOR | MAX_VER);
} }

View File

@ -22,7 +22,7 @@
*/ */
#include "E.h" #include "E.h"
static Snapshot *NewSnapshot(char *name); static Snapshot *NewSnapshot(const char *name);
/* Format the window identifier string */ /* Format the window identifier string */
static int static int
@ -104,7 +104,7 @@ GetSnapshot(EWin * ewin)
/* create a new snapshot */ /* create a new snapshot */
static Snapshot * static Snapshot *
NewSnapshot(char *name) NewSnapshot(const char *name)
{ {
Snapshot *sn; Snapshot *sn;

View File

@ -32,7 +32,7 @@ AddEToFile(char *file)
char *s1, *s2; char *s1, *s2;
char hase = 0; char hase = 0;
char foundwm = 0; char foundwm = 0;
char *wms[] = { const char *wms[] = {
"wmaker", "afterstep", "fvwm", "fvwm2", "twm", "mwm", "vtwm", "ctwm", "wmaker", "afterstep", "fvwm", "fvwm2", "twm", "mwm", "vtwm", "ctwm",
"gwm", "gwm",
"mlvwm", "kwm", "olwm", "wm2", "wmx", "olvwm", "9wm", "blackbox", "awm", "mlvwm", "kwm", "olwm", "wm2", "wmx", "olvwm", "9wm", "blackbox", "awm",

View File

@ -35,7 +35,7 @@ GetTime(void)
static Qentry *q_first = NULL; static Qentry *q_first = NULL;
void void
DoIn(char *name, double in_time, void (*func) (int val, void *data), DoIn(const char *name, double in_time, void (*func) (int val, void *data),
int runtime_val, void *runtime_data) int runtime_val, void *runtime_data)
{ {
Qentry *qe, *ptr, *pptr; Qentry *qe, *ptr, *pptr;
@ -141,7 +141,7 @@ HandleTimerEvent(void)
} }
void void
RemoveTimerEvent(char *name) RemoveTimerEvent(const char *name)
{ {
Qentry *qe, *ptr, *pptr; Qentry *qe, *ptr, *pptr;

View File

@ -23,7 +23,7 @@
#include "E.h" #include "E.h"
ToolTip * ToolTip *
CreateToolTip(char *name, ImageClass * ic0, ImageClass * ic1, CreateToolTip(const char *name, ImageClass * ic0, ImageClass * ic1,
ImageClass * ic2, ImageClass * ic3, ImageClass * ic4, ImageClass * ic2, ImageClass * ic3, ImageClass * ic4,
TextClass * tclass, int dist, ImageClass * tooltippic) TextClass * tclass, int dist, ImageClass * tooltippic)
{ {

View File

@ -44,8 +44,8 @@ ImlibSetFgColorFromGC(Display * dpy, GC gc, Colormap cm)
} }
void void
EFont_draw_string(Display * dpy, Drawable win, GC gc, int x, int y, char *text, EFont_draw_string(Display * dpy, Drawable win, GC gc, int x, int y,
Efont * f, Visual * vis, Colormap cm) const char *text, Efont * f, Visual * vis, Colormap cm)
{ {
Imlib_Image im; Imlib_Image im;
int w, h, ascent, descent; int w, h, ascent, descent;
@ -79,7 +79,7 @@ Efont_free(Efont * f)
} }
Efont * Efont *
Efont_load(char *file, int size) Efont_load(const char *file, int size)
{ {
char s[4096]; char s[4096];
Efont *f; Efont *f;
@ -97,7 +97,7 @@ Efont_load(char *file, int size)
} }
void void
Efont_extents(Efont * f, char *text, int *font_ascent_return, Efont_extents(Efont * f, const char *text, int *font_ascent_return,
int *font_descent_return, int *width_return, int *font_descent_return, int *width_return,
int *max_ascent_return, int *max_descent_return, int *max_ascent_return, int *max_descent_return,
int *lbearing_return, int *rbearing_return) int *lbearing_return, int *rbearing_return)
@ -745,8 +745,8 @@ handle_x_error(Display * d, XErrorEvent * ev)
} }
void void
EFont_draw_string(Display * disp, Drawable win, GC gc, int x, int y, char *text, EFont_draw_string(Display * disp, Drawable win, GC gc, int x, int y,
Efont * f, Visual * vis, Colormap cm) const char *text, Efont * f, Visual * vis, Colormap cm)
{ {
XImage *xim; XImage *xim;
XShmSegmentInfo shminfo; XShmSegmentInfo shminfo;
@ -1029,7 +1029,7 @@ Efont_free(Efont * f)
} }
Efont * Efont *
Efont_load(char *file, int size) Efont_load(const char *file, int size)
{ {
TT_Error error; TT_Error error;
TT_Glyph_Metrics metrics; TT_Glyph_Metrics metrics;
@ -1143,7 +1143,7 @@ Efont_load(char *file, int size)
} }
void void
Efont_extents(Efont * f, char *text, int *font_ascent_return, Efont_extents(Efont * f, const char *text, int *font_ascent_return,
int *font_descent_return, int *width_return, int *font_descent_return, int *width_return,
int *max_ascent_return, int *max_descent_return, int *max_ascent_return, int *max_descent_return,
int *lbearing_return, int *rbearing_return) int *lbearing_return, int *rbearing_return)

View File

@ -23,7 +23,7 @@
#include "E.h" #include "E.h"
WindowMatch * WindowMatch *
CreateWindowMatch(char *name) CreateWindowMatch(const char *name)
{ {
WindowMatch *b; WindowMatch *b;