]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blobdiff - zephyr/zwgc/xshow.c
r4275@bucket (orig r265): kcr | 2008-01-21 02:57:32 -0500
[1ts-debian.git] / zephyr / zwgc / xshow.c
index 05bfab8bb1a0019030103c9b9568cd1200b7e0ce..666701336082d94d94c8db976ea12b32e71c5375 100644 (file)
@@ -4,7 +4,7 @@
  *
  *      Created by:     Marc Horowitz <marc@athena.mit.edu>
  *
- *      $Id: xshow.c,v 1.15 1999/08/13 00:19:52 danw Exp $
+ *      $Id$
  *
  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
  *      For copying and distribution information, see the file
@@ -14,7 +14,7 @@
 #include <sysdep.h>
 
 #if (!defined(lint) && !defined(SABER))
-static const char rcsid_xshow_c[] = "$Id: xshow.c,v 1.15 1999/08/13 00:19:52 danw Exp $";
+static const char rcsid_xshow_c[] = "$Id$";
 #endif
 
 #include <zephyr/mit-copyright.h>
@@ -26,9 +26,11 @@ static const char rcsid_xshow_c[] = "$Id: xshow.c,v 1.15 1999/08/13 00:19:52 dan
 #include <X11/Xresource.h>
 #include "pointer_dictionary.h"
 #include "new_memory.h"
+#include "new_string.h"
 #include "formatter.h"
 #include "variables.h"
 #include "zwgc.h"
+#include "X_driver.h"
 #include "X_fonts.h"
 #include "X_gram.h"
 #include "xmode_stack.h"
@@ -36,15 +38,13 @@ static const char rcsid_xshow_c[] = "$Id: xshow.c,v 1.15 1999/08/13 00:19:52 dan
 #define max(a,b)   ((a)>(b)?(a):(b))
 
 XContext desc_context;
-static pointer_dictionary colorname_dict = NULL;
 
 extern int internal_border_width;
 extern unsigned long default_bgcolor;
 extern unsigned long default_fgcolor;
-extern unsigned long x_string_to_color();
 
 void
-xshowinit()
+xshowinit(void)
 {
     desc_context = XUniqueContext();
 }
@@ -55,9 +55,9 @@ struct res_dict_type {
     char *             resclass;
 };
 
-static char *xres_get_resource (restype, style)
-    struct res_dict_type *restype;
-    char *style;
+static char *
+xres_get_resource(struct res_dict_type *restype,
+                 char *style)
 {
    char *desc;
    pointer_dictionary_binding *binding;
@@ -102,10 +102,10 @@ static struct res_dict_type fgcolor_resources = {
 };
 
 /*ARGSUSED*/
-char *mode_to_colorname (dpy, style, mode)
-    Display *dpy;
-    char *style;
-    xmode *mode;
+char *
+mode_to_colorname (Display *dpy,
+                  char *style,
+                  xmode *mode)
 {
     char *desc, *result;
 
@@ -116,16 +116,15 @@ char *mode_to_colorname (dpy, style, mode)
     return result;
 }
 
-void fixup_and_draw(dpy, style, auxblocks, blocks, num, lines, numlines,
-                   beepcount)
-     Display *dpy;
-     char *style;
-     xblock *blocks;
-     xauxblock *auxblocks;
-     int num;
-     xlinedesc *lines;
-     int numlines;
-     int beepcount;
+void
+fixup_and_draw(Display *dpy,
+              char *style,
+              xauxblock *auxblocks,
+              xblock *blocks,
+              int num,
+              xlinedesc *lines,
+              int numlines,
+              int beepcount)
 {
     int gram_xalign = 1;
     int gram_yalign = 1;
@@ -338,8 +337,8 @@ void fixup_and_draw(dpy, style, auxblocks, blocks, num, lines, numlines,
 }
 
 /* Silly almost-but-not-quite-useless helper function */
-char *no_dots_downcase_var(str)
-     char *str;
+char *
+no_dots_downcase_var(char *str)
 {
    register char *var, *var2;
 
@@ -354,11 +353,11 @@ char *no_dots_downcase_var(str)
 #define MODE_TO_FONT(dpy,style,mode) \
   get_font((dpy),(style),(mode)->font?(mode)->font:(mode)->substyle, \
           (mode)->size, (mode)->bold+(mode)->italic*2)
-void xshow(dpy, desc, numstr, numnl)
-     Display *dpy;
-     desctype *desc;
-     int numstr;
-     int numnl;
+void
+xshow(Display *dpy,
+      desctype *desc,
+      int numstr,
+      int numnl)
 {
     XFontStruct *font;
     xmode_stack modes = xmode_stack_create();
@@ -535,10 +534,10 @@ void xshow(dpy, desc, numstr, numnl)
       free(style);
 }
 
-static void xhandleevent(dpy, w, event)
-     Display *dpy;
-     Window w;
-     XEvent *event;
+static void
+xhandleevent(Display *dpy,
+            Window w,
+            XEvent *event)
 {
     x_gram *gram;
     
@@ -553,8 +552,8 @@ static void xhandleevent(dpy, w, event)
     XFlush(dpy);
 }
 
-void x_get_input(dpy)
-     Display *dpy;
+void
+x_get_input(Display *dpy)
 {
     XEvent event;