diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-10 11:56:41 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-10 11:56:41 -0700 |
commit | 866ceb3a671a9ab93b3ecbdf3231902ab2251ce3 (patch) | |
tree | d6c4702242d739a9fb9287af09a0d37d3551ab87 | |
parent | 5424a5c064d96b33a4acdf951734cd3a493a7ea3 (diff) |
ANSIfy function declarations in dsimple.c
-rw-r--r-- | dsimple.c | 38 | ||||
-rw-r--r-- | dsimple.h | 6 |
2 files changed, 20 insertions, 24 deletions
@@ -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; @@ -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 |