X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=zephyr%2Fzwgc%2Fxshow.c;h=666701336082d94d94c8db976ea12b32e71c5375;hb=fa8b83c652676291f5c37ea66b0e5c18b20577bf;hp=05bfab8bb1a0019030103c9b9568cd1200b7e0ce;hpb=4bb526e13f3b6add0810bbebab64bbb9a87869cc;p=1ts-debian.git diff --git a/zephyr/zwgc/xshow.c b/zephyr/zwgc/xshow.c index 05bfab8..6667013 100644 --- a/zephyr/zwgc/xshow.c +++ b/zephyr/zwgc/xshow.c @@ -4,7 +4,7 @@ * * Created by: Marc Horowitz * - * $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 #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 @@ -26,9 +26,11 @@ static const char rcsid_xshow_c[] = "$Id: xshow.c,v 1.15 1999/08/13 00:19:52 dan #include #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;