summaryrefslogtreecommitdiff
path: root/zwgc/xshow.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-11-17 04:58:26 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-11-17 04:58:26 +0000
commite5ebb19fd49647d2c804ee3399b928b877865c7d (patch)
tree4cc9464380739a473697b92f5b195c614f19c9fe /zwgc/xshow.c
parent8f584233fe214b869276652c50018c5f408e9c2d (diff)
prevent use of uninitialized variables (problems with centering z-grams)
Diffstat (limited to 'zwgc/xshow.c')
-rw-r--r--zwgc/xshow.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/zwgc/xshow.c b/zwgc/xshow.c
index 87a0266..291c75f 100644
--- a/zwgc/xshow.c
+++ b/zwgc/xshow.c
@@ -328,16 +328,18 @@ void fixup_and_draw(dpy, style, auxblocks, blocks, num, lines, numlines,
sscanf(geometry, "%c%[0123456789c]%c%[0123456789c]", &xfrom, xpos,
&yfrom, ypos);
- if (xpos[0]=='c')
+ if (xpos[0]=='c') {
gram_xalign = 0;
- else
+ gram_xpos = 0;
+ } else
gram_xpos = atoi(xpos);
if (xfrom=='-')
gram_xalign *= -1;
- if (ypos[0]=='c')
+ if (ypos[0]=='c') {
gram_yalign = 0;
- else
+ gram_ypos = 0;
+ } else
gram_ypos = atoi(ypos);
if (yfrom=='-')
gram_yalign *= -1;