1
0
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:
Christophe CURIS
2013-06-16 17:57:42 +02:00
committed by Carlos R. Mafra
parent a61f6c2484
commit f429055b4f
2 changed files with 3 additions and 3 deletions

View File

@@ -256,7 +256,7 @@ void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int t
eatExpose();
}
char *ShrinkString(WMFont * font, char *string, int width)
char *ShrinkString(WMFont *font, const char *string, int width)
{
int w, w1 = 0;
int p;
@@ -296,7 +296,7 @@ char *ShrinkString(WMFont * font, char *string, int width)
}
strcat(text, "...");
width -= WMWidthOfString(font, "...", 3);
pos = string;
p1 = 0;
p2 = p;
t = (p2 - p1) / 2;

View File

@@ -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 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 *ExpandOptions(WScreen * scr, char *cmdline);
char *GetShortcutString(char *text);