1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

util: Added a few missing 'static' attributes for functions

This commit is contained in:
Christophe CURIS
2013-05-12 00:24:53 +02:00
committed by Carlos R. Mafra
parent d517d5cac0
commit 549cefc47b
12 changed files with 34 additions and 34 deletions

View File

@@ -54,7 +54,7 @@ char *FontOptions[] = {
extern char *__progname; extern char *__progname;
void print_help(int print_usage, int exitval) static void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [-h] [-v] [--keep-xlfd] <style_file>\n", __progname); printf("Usage: %s [-h] [-v] [--keep-xlfd] <style_file>\n", __progname);
if (print_usage) { if (print_usage) {

View File

@@ -135,7 +135,7 @@ static char *mapSlantToName(str * slant)
} }
} }
char *xlfdToFc(const char *xlfd, const char *useFamily, Bool keepXLFD) static char *xlfdToFc(const char *xlfd, const char *useFamily, Bool keepXLFD)
{ {
str *tokens, *family, *weight, *slant; str *tokens, *family, *weight, *slant;
char *name, buf[64]; char *name, buf[64];

View File

@@ -34,7 +34,7 @@
extern char *__progname; extern char *__progname;
void print_help(int print_usage, int exitval) static void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [-h] [-v] [file]\n", __progname); printf("Usage: %s [-h] [-v] [file]\n", __progname);
if (print_usage) { if (print_usage) {

View File

@@ -138,7 +138,7 @@ WMPropList *PixmapPath = NULL;
char *ThemePath = NULL; char *ThemePath = NULL;
void print_help(int print_usage, int exitval) static void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [-t] [-p] [-h] [-v] [file]\n", __progname); printf("Usage: %s [-t] [-p] [-h] [-v] [file]\n", __progname);
if (print_usage) { if (print_usage) {
@@ -165,7 +165,7 @@ static Bool isFontOption(const char *option)
return False; return False;
} }
void findCopyFile(const char *dir, const char *file) static void findCopyFile(const char *dir, const char *file)
{ {
char *fullPath; char *fullPath;
@@ -179,7 +179,7 @@ void findCopyFile(const char *dir, const char *file)
free(fullPath); free(fullPath);
} }
void makeThemePack(WMPropList * style, const char *themeName) static void makeThemePack(WMPropList * style, const char *themeName)
{ {
WMPropList *keys; WMPropList *keys;
WMPropList *key; WMPropList *key;

View File

@@ -34,7 +34,7 @@
extern char *__progname; extern char *__progname;
void print_help(int print_usage, int exitval) static void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [-h] [-v] [file]\n", __progname); printf("Usage: %s [-h] [-v] [file]\n", __progname);
if (print_usage) { if (print_usage) {

View File

@@ -110,7 +110,7 @@ static Bool isFontOption(const char *option)
* that qualifies the external references to be absolute, possibly * that qualifies the external references to be absolute, possibly
* pending further expansion * pending further expansion
*/ */
void hackPathInTexture(WMPropList * texture, const char *prefix) static void hackPathInTexture(WMPropList * texture, const char *prefix)
{ {
WMPropList *type; WMPropList *type;
char *t; char *t;
@@ -158,7 +158,7 @@ void hackPathInTexture(WMPropList * texture, const char *prefix)
} }
} }
void hackPaths(WMPropList * style, const char *prefix) static void hackPaths(WMPropList * style, const char *prefix)
{ {
WMPropList *keys; WMPropList *keys;
WMPropList *key; WMPropList *key;
@@ -263,7 +263,7 @@ static WMPropList *getColor(WMPropList * texture)
* IconTitleColor * IconTitleColor
* IconTitleBack * IconTitleBack
*/ */
void hackStyle(WMPropList * style) static void hackStyle(WMPropList * style)
{ {
WMPropList *keys, *tmp; WMPropList *keys, *tmp;
int foundIconTitle = 0, foundResizebarBack = 0; int foundIconTitle = 0, foundResizebarBack = 0;
@@ -350,7 +350,7 @@ void hackStyle(WMPropList * style)
} }
} }
void print_help(int print_usage, int exitval) static void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [OPTIONS] FILE\n", __progname); printf("Usage: %s [OPTIONS] FILE\n", __progname);
if (print_usage) { if (print_usage) {

View File

@@ -41,7 +41,7 @@
extern char *__progname; extern char *__progname;
void print_help(int print_usage, int exitval) static void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [OPTIONS] <domain> <key>\n", __progname); printf("Usage: %s [OPTIONS] <domain> <key>\n", __progname);
if (print_usage) { if (print_usage) {

View File

@@ -41,7 +41,7 @@
extern char *__progname; extern char *__progname;
void print_help(int print_usage, int exitval) static void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [OPTIONS] <domain> <key> <value>\n", __progname); printf("Usage: %s [OPTIONS] <domain> <key> <value>\n", __progname);
if (print_usage) { if (print_usage) {

View File

@@ -275,7 +275,7 @@ static void update(void *d)
data->tid = WMAddTimerHandler(data->refreshrate, update, data); data->tid = WMAddTimerHandler(data->refreshrate, update, data);
} }
void resizedWindow(void *d, WMNotification * notif) static void resizedWindow(void *d, WMNotification * notif)
{ {
BufferData *data = (BufferData *) d; BufferData *data = (BufferData *) d;
WMView *view = (WMView *) WMGetNotificationObject(notif); WMView *view = (WMView *) WMGetNotificationObject(notif);
@@ -286,7 +286,7 @@ void resizedWindow(void *d, WMNotification * notif)
resizeBufferData(data, size.width, size.height, data->magfactor); resizeBufferData(data, size.width, size.height, data->magfactor);
} }
void closeWindow(WMWidget * w, void *d) static void closeWindow(WMWidget * w, void *d)
{ {
BufferData *data = (BufferData *) d; BufferData *data = (BufferData *) d;

View File

@@ -96,7 +96,7 @@ typedef struct BackgroundTexture {
int height; int height;
} BackgroundTexture; } BackgroundTexture;
void initXinerama(void) static void initXinerama(void)
{ {
xineInfo.screens = NULL; xineInfo.screens = NULL;
xineInfo.count = 0; xineInfo.count = 0;
@@ -140,7 +140,7 @@ void initXinerama(void)
#endif /* XINERAMA */ #endif /* XINERAMA */
} }
RImage *loadImage(RContext * rc, const char *file) static RImage *loadImage(RContext * rc, const char *file)
{ {
char *path; char *path;
RImage *image; RImage *image;
@@ -257,7 +257,7 @@ applyImage(RContext * rc, BackgroundTexture * texture, RImage * image, char type
} }
} }
BackgroundTexture *parseTexture(RContext * rc, char *text) static BackgroundTexture *parseTexture(RContext * rc, char *text)
{ {
BackgroundTexture *texture = NULL; BackgroundTexture *texture = NULL;
WMPropList *texarray; WMPropList *texarray;
@@ -687,7 +687,7 @@ BackgroundTexture *parseTexture(RContext * rc, char *text)
return NULL; return NULL;
} }
void freeTexture(BackgroundTexture * texture) static void freeTexture(BackgroundTexture * texture)
{ {
if (texture->solid) { if (texture->solid) {
unsigned long pixel[1]; unsigned long pixel[1];
@@ -705,7 +705,7 @@ void freeTexture(BackgroundTexture * texture)
wfree(texture); wfree(texture);
} }
void setupTexture(RContext * rc, BackgroundTexture ** textures, int *maxTextures, int workspace, char *texture) static void setupTexture(RContext * rc, BackgroundTexture ** textures, int *maxTextures, int workspace, char *texture)
{ {
BackgroundTexture *newTexture = NULL; BackgroundTexture *newTexture = NULL;
int i; int i;
@@ -758,7 +758,7 @@ void setupTexture(RContext * rc, BackgroundTexture ** textures, int *maxTextures
*maxTextures = workspace; *maxTextures = workspace;
} }
Pixmap duplicatePixmap(Pixmap pixmap, int width, int height) static Pixmap duplicatePixmap(Pixmap pixmap, int width, int height)
{ {
Display *tmpDpy; Display *tmpDpy;
Pixmap copyP; Pixmap copyP;
@@ -789,7 +789,7 @@ static int dummyErrorHandler(Display * dpy, XErrorEvent * err)
return 0; return 0;
} }
void setPixmapProperty(Pixmap pixmap) static void setPixmapProperty(Pixmap pixmap)
{ {
static Atom prop = 0; static Atom prop = 0;
Atom type; Atom type;
@@ -826,7 +826,7 @@ void setPixmapProperty(Pixmap pixmap)
XFlush(dpy); XFlush(dpy);
} }
void changeTexture(BackgroundTexture * texture) static void changeTexture(BackgroundTexture * texture)
{ {
if (!texture) { if (!texture) {
return; return;
@@ -850,7 +850,7 @@ void changeTexture(BackgroundTexture * texture)
} }
} }
int readmsg(int fd, char *buffer, int size) static int readmsg(int fd, char *buffer, int size)
{ {
int count; int count;
@@ -876,7 +876,7 @@ int readmsg(int fd, char *buffer, int size)
* n is 4 bytes * n is 4 bytes
* size = 4 bytes for length of the message data * size = 4 bytes for length of the message data
*/ */
void helperLoop(RContext * rc) static void helperLoop(RContext * rc)
{ {
BackgroundTexture *textures[WORKSPACE_COUNT]; BackgroundTexture *textures[WORKSPACE_COUNT];
int maxTextures = 0; int maxTextures = 0;
@@ -974,7 +974,7 @@ void helperLoop(RContext * rc)
} }
} }
void updateDomain(const char *domain, const char *key, const char *texture) static void updateDomain(const char *domain, const char *key, const char *texture)
{ {
char *program = "wdwrite"; char *program = "wdwrite";
@@ -1043,7 +1043,7 @@ static WMPropList *getValueForKey(const char *domain, const char *keyName)
return val; return val;
} }
char *getPixmapPath(const char *domain) static char *getPixmapPath(const char *domain)
{ {
WMPropList *val; WMPropList *val;
char *ptr, *data; char *ptr, *data;
@@ -1094,7 +1094,7 @@ char *getPixmapPath(const char *domain)
return data; return data;
} }
char *getFullPixmapPath(const char *file) static char *getFullPixmapPath(const char *file)
{ {
char *tmp; char *tmp;
@@ -1127,7 +1127,7 @@ void wAbort(void)
exit(1); exit(1);
} }
void print_help(void) static void print_help(void)
{ {
printf("Usage: %s [options] [image]\n", __progname); printf("Usage: %s [options] [image]\n", __progname);
puts("Sets the workspace background to the specified image or a texture and"); puts("Sets the workspace background to the specified image or a texture and");
@@ -1155,7 +1155,7 @@ void print_help(void)
puts(" -h, --help show this help and exit"); puts(" -h, --help show this help and exit");
} }
void changeTextureForWorkspace(const char *domain, char *texture, int workspace) static void changeTextureForWorkspace(const char *domain, char *texture, int workspace)
{ {
WMPropList *array, *val; WMPropList *array, *val;
char *value; char *value;

View File

@@ -33,7 +33,7 @@
extern char *__progname; extern char *__progname;
void print_help(void) static void print_help(void)
{ {
printf("Usage: %s [OPTIONS] [FILE]\n", __progname); printf("Usage: %s [OPTIONS] [FILE]\n", __progname);
puts("Copies data from FILE or stdin into X cut buffer."); puts("Copies data from FILE or stdin into X cut buffer.");

View File

@@ -37,7 +37,7 @@
extern char *__progname; extern char *__progname;
void print_help(void) static void print_help(void)
{ {
printf("Usage: %s [OPTIONS] [FILE]\n", __progname); printf("Usage: %s [OPTIONS] [FILE]\n", __progname);
puts("Copies data from X selection or cutbuffer to FILE or stdout."); puts("Copies data from X selection or cutbuffer to FILE or stdout.");
@@ -49,7 +49,7 @@ void print_help(void)
puts(" -v, --version output version information and exit"); puts(" -v, --version output version information and exit");
} }
Time getTimestamp(Display * dpy, Window win) static Time getTimestamp(Display * dpy, Window win)
{ {
XEvent ev; XEvent ev;
@@ -81,7 +81,7 @@ Time getTimestamp(Display * dpy, Window win)
return ev.xproperty.time; return ev.xproperty.time;
} }
char *fetchSelection(Display * dpy, const char *selection, const char *progName) static char *fetchSelection(Display * dpy, const char *selection, const char *progName)
{ {
Atom selatom = XInternAtom(dpy, selection, False); Atom selatom = XInternAtom(dpy, selection, False);
Atom clipatom = XInternAtom(dpy, "CLIPBOARD", False); Atom clipatom = XInternAtom(dpy, "CLIPBOARD", False);