summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/util.c b/src/util.c
index 83f3257..7a15745 100644
--- a/src/util.c
+++ b/src/util.c
@@ -68,20 +68,20 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xmu/Drawing.h>
#include <X11/Xmu/CharSet.h>
-static Pixmap CreateXLogoPixmap ( unsigned int *widthp,
+static Pixmap CreateXLogoPixmap ( unsigned int *widthp,
unsigned int *heightp );
-static Pixmap CreateResizePixmap ( unsigned int *widthp,
+static Pixmap CreateResizePixmap ( unsigned int *widthp,
unsigned int *heightp );
-static Pixmap CreateDotPixmap ( unsigned int *widthp,
+static Pixmap CreateDotPixmap ( unsigned int *widthp,
unsigned int *heightp );
-static Pixmap CreateQuestionPixmap ( unsigned int *widthp,
+static Pixmap CreateQuestionPixmap ( unsigned int *widthp,
unsigned int *heightp );
-static Pixmap CreateMenuPixmap ( unsigned int *widthp,
+static Pixmap CreateMenuPixmap ( unsigned int *widthp,
unsigned int *heightp );
int HotX, HotY;
-/**
+/**
* move a window outline
*
* \param root window we are outlining
@@ -106,7 +106,7 @@ void MoveOutline(Window root, int x, int y, int width, int height, int bw, int t
if (x == lastx && y == lasty && width == lastWidth && height == lastHeight
&& lastBW == bw && th == lastTH)
return;
-
+
r = outline;
#define DRAWIT() \
@@ -239,7 +239,7 @@ Zoom(Window wf, Window wt)
int y = fy + (int) ((dy * i) / z);
unsigned width = (unsigned) (((long) fw) + (dw * i) / z);
unsigned height = (unsigned) (((long) fh) + (dh * i) / z);
-
+
XDrawRectangle (dpy, Scr->Root, Scr->DrawGC,
x, y, width, height);
}
@@ -248,7 +248,7 @@ Zoom(Window wf, Window wt)
}
/**
- * expand the tilde character to HOME if it is the first
+ * expand the tilde character to HOME if it is the first
* character of the filename
*
* \return a pointer to the new name
@@ -264,7 +264,7 @@ ExpandFilename(char *name)
newname = (char *) malloc (HomeLen + strlen(name) + 2);
if (!newname) {
- fprintf (stderr,
+ fprintf (stderr,
"%s: unable to allocate %ld bytes to expand filename %s/%s\n",
ProgramName, HomeLen + (unsigned long)strlen(name) + 2,
Home, &name[1]);
@@ -299,7 +299,7 @@ GetUnknownIcon(char *name)
* \param[out] widthp pointer to width of bitmap
* \param[out] heightp pointer to height of bitmap
*/
-Pixmap
+Pixmap
FindBitmap (char *name, unsigned *widthp, unsigned *heightp)
{
char *bigname;
@@ -326,7 +326,7 @@ FindBitmap (char *name, unsigned *widthp, unsigned *heightp)
{ TBPM_MENU, CreateMenuPixmap },
{ TBPM_QUESTION, CreateQuestionPixmap },
};
-
+
for (i = 0; i < (sizeof pmtab)/(sizeof pmtab[0]); i++) {
if (XmuCompareISOLatin1 (pmtab[i].name, name) == 0)
return (*pmtab[i].proc) (widthp, heightp);
@@ -370,14 +370,14 @@ FindBitmap (char *name, unsigned *widthp, unsigned *heightp)
}
if (bigname != name) free (bigname);
if (pm == None) {
- fprintf (stderr, "%s: unable to find bitmap \"%s\"\n",
+ fprintf (stderr, "%s: unable to find bitmap \"%s\"\n",
ProgramName, name);
}
return pm;
}
-Pixmap
+Pixmap
GetBitmap (char *name)
{
return FindBitmap (name, &JunkWidth, &JunkHeight);
@@ -428,7 +428,7 @@ RemoveRGBColormap (Atom a)
StdCmap *sc, *prev;
prev = NULL;
- for (sc = Scr->StdCmapInfo.head; sc; sc = sc->next) {
+ for (sc = Scr->StdCmapInfo.head; sc; sc = sc->next) {
if (sc->atom == a) break;
prev = sc;
}
@@ -490,7 +490,7 @@ GetColor(int kind, Pixel *what, char *name)
stat = XParseColor (dpy, cmap, name, &color);
if (!stat)
{
- fprintf (stderr, "%s: invalid color name \"%s\"\n",
+ fprintf (stderr, "%s: invalid color name \"%s\"\n",
ProgramName, name);
return;
}
@@ -532,7 +532,7 @@ GetColor(int kind, Pixel *what, char *name)
stdcmap->blue_max + 0.5) *
stdcmap->blue_mult));
} else {
- fprintf (stderr, "%s: unable to allocate color \"%s\"\n",
+ fprintf (stderr, "%s: unable to allocate color \"%s\"\n",
ProgramName, name);
return;
}
@@ -557,7 +557,7 @@ GetColorValue(int kind, XColor *what, char *name)
if (!XLookupColor (dpy, cmap, name, what, &junkcolor))
{
- fprintf (stderr, "%s: invalid color name \"%s\"\n",
+ fprintf (stderr, "%s: invalid color name \"%s\"\n",
ProgramName, name);
}
else
@@ -566,7 +566,7 @@ GetColorValue(int kind, XColor *what, char *name)
}
}
-/*
+/*
* The following functions are sensible to 'use_fontset'.
* When 'use_fontset' is True,
* - XFontSet-related internationalized functions are used
@@ -665,7 +665,7 @@ MyFont_TextWidth(MyFont *font, char *string, int len)
}
void
-MyFont_DrawImageString(Display *dpy, Drawable d, MyFont *font, GC gc,
+MyFont_DrawImageString(Display *dpy, Drawable d, MyFont *font, GC gc,
int x, int y, char *string, int len)
{
if (use_fontset) {
@@ -676,7 +676,7 @@ MyFont_DrawImageString(Display *dpy, Drawable d, MyFont *font, GC gc,
}
void
-MyFont_DrawString(Display *dpy, Drawable d, MyFont *font, GC gc,
+MyFont_DrawString(Display *dpy, Drawable d, MyFont *font, GC gc,
int x, int y, char *string, int len)
{
if (use_fontset) {
@@ -687,7 +687,7 @@ MyFont_DrawString(Display *dpy, Drawable d, MyFont *font, GC gc,
}
void
-MyFont_ChangeGC(unsigned long fix_fore, unsigned long fix_back,
+MyFont_ChangeGC(unsigned long fix_fore, unsigned long fix_back,
MyFont *fix_font)
{
Gcv.foreground = fix_fore;
@@ -703,9 +703,9 @@ MyFont_ChangeGC(unsigned long fix_fore, unsigned long fix_back,
/*
* The following functions are internationalized substitutions
* for XFetchName and XGetIconName using XGetWMName and
- * XGetWMIconName.
+ * XGetWMIconName.
*
- * Please note that the third arguments have to be freed using free(),
+ * Please note that the third arguments have to be freed using free(),
* not XFree().
*/
Status
@@ -715,7 +715,7 @@ I18N_FetchName(Display *dpy, Window w, char **winname)
XTextProperty text_prop;
char **list;
int num;
-
+
status = XGetWMName(dpy, w, &text_prop);
if (!status || !text_prop.value || !text_prop.nitems) {
*winname = NULL;
@@ -723,7 +723,7 @@ I18N_FetchName(Display *dpy, Window w, char **winname)
}
status = XmbTextPropertyToTextList(dpy, &text_prop, &list, &num);
if (status < Success || !num || !*list) {
- *winname = NULL;
+ *winname = NULL;
return 0;
}
XFree(text_prop.value);
@@ -739,7 +739,7 @@ I18N_GetIconName(Display *dpy, Window w, char **iconname)
XTextProperty text_prop;
char **list;
int num;
-
+
status = XGetWMIconName(dpy, w, &text_prop);
if (!status || !text_prop.value || !text_prop.nitems) return 0;
status = XmbTextPropertyToTextList(dpy, &text_prop, &list, &num);
@@ -771,7 +771,7 @@ SetFocus (TwmWindow *tmp_win, Time time)
XSetInputFocus (dpy, w, RevertToPointerRoot, time);
}
-static Pixmap
+static Pixmap
CreateXLogoPixmap (unsigned *widthp, unsigned *heightp)
{
int h = Scr->TBInfo.width - Scr->TBInfo.border * 2;
@@ -806,7 +806,7 @@ CreateXLogoPixmap (unsigned *widthp, unsigned *heightp)
}
-static Pixmap
+static Pixmap
CreateResizePixmap (unsigned *widthp, unsigned *heightp)
{
int h = Scr->TBInfo.width - Scr->TBInfo.border * 2;
@@ -833,7 +833,7 @@ CreateResizePixmap (unsigned *widthp, unsigned *heightp)
XSetLineAttributes (dpy, gc, lw, LineSolid, CapButt, JoinMiter);
/*
- * draw the resize button,
+ * draw the resize button,
*/
w = (h * 2) / 3;
points[0].x = w;
@@ -861,7 +861,7 @@ CreateResizePixmap (unsigned *widthp, unsigned *heightp)
}
-static Pixmap
+static Pixmap
CreateDotPixmap (unsigned *widthp, unsigned *heightp)
{
int h = Scr->TBInfo.width - Scr->TBInfo.border * 2;
@@ -892,7 +892,7 @@ CreateDotPixmap (unsigned *widthp, unsigned *heightp)
static char questionmark_bits[] = {
0x38, 0x7c, 0x64, 0x30, 0x18, 0x00, 0x18, 0x18};
-static Pixmap
+static Pixmap
CreateQuestionPixmap (unsigned *widthp, unsigned *heightp)
{
*widthp = questionmark_width;
@@ -910,14 +910,14 @@ CreateQuestionPixmap (unsigned *widthp, unsigned *heightp)
}
-static Pixmap
+static Pixmap
CreateMenuPixmap (unsigned *widthp, unsigned *heightp)
{
return CreateMenuIcon (Scr->TBInfo.width - Scr->TBInfo.border * 2,
widthp,heightp);
}
-Pixmap
+Pixmap
CreateMenuIcon (int height, unsigned *widthp, unsigned *heightp)
{
int h, w;