mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
echo $arq;
indent -linux -l115 $arq;
done
The different line break at 115 columns is because
I use a widescreen monitor :-)
This commit is contained in:
@@ -36,30 +36,25 @@
|
||||
#include "screen.h"
|
||||
#include "pixmap.h"
|
||||
|
||||
|
||||
int
|
||||
wGetColor(WScreen *scr, char *color_name, XColor *color)
|
||||
int wGetColor(WScreen * scr, char *color_name, XColor * color)
|
||||
{
|
||||
if (!XParseColor(dpy, scr->w_colormap, color_name, color)) {
|
||||
wwarning(_("could not parse color \"%s\""), color_name);
|
||||
return False;
|
||||
}
|
||||
if (!XAllocColor(dpy, scr->w_colormap, color)) {
|
||||
wwarning(_("could not allocate color \"%s\""), color_name);
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
if (!XParseColor(dpy, scr->w_colormap, color_name, color)) {
|
||||
wwarning(_("could not parse color \"%s\""), color_name);
|
||||
return False;
|
||||
}
|
||||
if (!XAllocColor(dpy, scr->w_colormap, color)) {
|
||||
wwarning(_("could not allocate color \"%s\""), color_name);
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
wFreeColor(WScreen *scr, unsigned long pixel)
|
||||
void wFreeColor(WScreen * scr, unsigned long pixel)
|
||||
{
|
||||
if (pixel!=scr->white_pixel && pixel!=scr->black_pixel) {
|
||||
unsigned long colors[1];
|
||||
if (pixel != scr->white_pixel && pixel != scr->black_pixel) {
|
||||
unsigned long colors[1];
|
||||
|
||||
colors[0] = pixel;
|
||||
XFreeColors(dpy, scr->w_colormap, colors, 1, 0);
|
||||
}
|
||||
colors[0] = pixel;
|
||||
XFreeColors(dpy, scr->w_colormap, colors, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user