mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
wmaker: Added 'const' attribute to function 'ShrinkString'
The function contained an internal statement that would have discarded the const attribute, but as this statement is actually useless it have been simply removed. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
a61f6c2484
commit
f429055b4f
@@ -256,7 +256,7 @@ void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int t
|
|||||||
eatExpose();
|
eatExpose();
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ShrinkString(WMFont * font, char *string, int width)
|
char *ShrinkString(WMFont *font, const char *string, int width)
|
||||||
{
|
{
|
||||||
int w, w1 = 0;
|
int w, w1 = 0;
|
||||||
int p;
|
int p;
|
||||||
@@ -296,7 +296,7 @@ char *ShrinkString(WMFont * font, char *string, int width)
|
|||||||
}
|
}
|
||||||
strcat(text, "...");
|
strcat(text, "...");
|
||||||
width -= WMWidthOfString(font, "...", 3);
|
width -= WMWidthOfString(font, "...", 3);
|
||||||
pos = string;
|
|
||||||
p1 = 0;
|
p1 = 0;
|
||||||
p2 = p;
|
p2 = p;
|
||||||
t = (p2 - p1) / 2;
|
t = (p2 - p1) / 2;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int t
|
|||||||
void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char *where);
|
void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char *where);
|
||||||
void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg);
|
void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg);
|
||||||
|
|
||||||
char *ShrinkString(WMFont * font, char *string, int width);
|
char *ShrinkString(WMFont *font, const char *string, int width);
|
||||||
char *FindImage(char *paths, char *file);
|
char *FindImage(char *paths, char *file);
|
||||||
char *ExpandOptions(WScreen * scr, char *cmdline);
|
char *ExpandOptions(WScreen * scr, char *cmdline);
|
||||||
char *GetShortcutString(char *text);
|
char *GetShortcutString(char *text);
|
||||||
|
|||||||
Reference in New Issue
Block a user