summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-08-10 11:56:41 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-08-10 11:56:41 -0700
commit866ceb3a671a9ab93b3ecbdf3231902ab2251ce3 (patch)
treed6c4702242d739a9fb9287af09a0d37d3551ab87
parent5424a5c064d96b33a4acdf951734cd3a493a7ea3 (diff)
ANSIfy function declarations in dsimple.c
-rw-r--r--dsimple.c38
-rw-r--r--dsimple.h6
2 files changed, 20 insertions, 24 deletions
diff --git a/dsimple.c b/dsimple.c
index 0751bfa..0c9fce8 100644
--- a/dsimple.c
+++ b/dsimple.c
@@ -62,8 +62,7 @@ int screen = 0;
/*
* Malloc: like malloc but handles out of memory using Fatal_Error.
*/
-char *Malloc(size)
- unsigned size;
+char *Malloc(unsigned size)
{
char *data;
@@ -78,9 +77,9 @@ char *Malloc(size)
* Get_Display_Name (argc, argv) Look for -display, -d, or host:dpy (obselete)
* If found, remove it from command line. Don't go past a lone -.
*/
-char *Get_Display_Name(pargc, argv)
- int *pargc; /* MODIFIED */
- char **argv; /* MODIFIED */
+char *Get_Display_Name(
+ int *pargc, /* MODIFIED */
+ char **argv) /* MODIFIED */
{
int argc = *pargc;
char **pargv = argv+1;
@@ -115,8 +114,7 @@ char *Get_Display_Name(pargc, argv)
* Open_Display: Routine to open a display with correct error handling.
* Does not require dpy or screen defined on entry.
*/
-Display *Open_Display(display_name)
-char *display_name;
+Display *Open_Display(const char *display_name)
{
Display *d;
@@ -139,9 +137,9 @@ char *display_name;
* for this display is then stored in screen.
* Does not require dpy or screen defined.
*/
-void Setup_Display_And_Screen(argc, argv)
-int *argc; /* MODIFIED */
-char **argv; /* MODIFIED */
+void Setup_Display_And_Screen(
+ int *argc, /* MODIFIED */
+ char **argv) /* MODIFIED */
{
char *displayname = NULL;
@@ -166,8 +164,7 @@ void Close_Display(void)
/*
* Open_Font: This routine opens a font with error handling.
*/
-XFontStruct *Open_Font(name)
-char *name;
+XFontStruct *Open_Font(const char *name)
{
XFontStruct *font;
@@ -202,9 +199,9 @@ char *name;
* all command line arguments, and other setup is done.
* For examples of usage, see xwininfo, xwd, or xprop.
*/
-Window Select_Window_Args(rargc, argv)
- int *rargc;
- char **argv;
+Window Select_Window_Args(
+ int *rargc,
+ char **argv)
#define ARGC (*rargc)
{
int nargc=1;
@@ -266,8 +263,7 @@ Window Select_Window_Args(rargc, argv)
* Routine to let user select a window using the mouse
*/
-Window Select_Window(dpy)
- Display *dpy;
+Window Select_Window(Display *dpy)
{
int status;
Cursor cursor;
@@ -317,10 +313,10 @@ Window Select_Window(dpy)
* one found will be returned. Only top and its subwindows
* are looked at. Normally, top should be the RootWindow.
*/
-Window Window_With_Name(dpy, top, name)
- Display *dpy;
- Window top;
- char *name;
+Window Window_With_Name(
+ Display *dpy,
+ Window top,
+ const char *name)
{
Window *children, dummy;
unsigned int nchildren;
diff --git a/dsimple.h b/dsimple.h
index d86dba9..7b53c3c 100644
--- a/dsimple.h
+++ b/dsimple.h
@@ -60,10 +60,10 @@ extern int screen; /* The current screen */
char *Malloc(unsigned);
char *Get_Display_Name(int *, char **);
-Display *Open_Display(char *);
+Display *Open_Display(const char *);
void Setup_Display_And_Screen(int *, char **);
void Close_Display(void);
-XFontStruct *Open_Font(char *);
+XFontStruct *Open_Font(const char *);
Window Select_Window_Args(int *, char **);
void usage(void);
@@ -79,7 +79,7 @@ void usage(void);
*/
Window Select_Window(Display *);
-Window Window_With_Name(Display *, Window, char *);
+Window Window_With_Name(Display *, Window, const char *);
#ifdef __GNUC__
void Fatal_Error(char *, ...) __attribute__((__noreturn__));
#else