Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!jarthur!elroy.jpl.nasa.gov!decwrl!aurora!geof From: geof@aurora.com (Geoffrey H. Cooper) Newsgroups: comp.windows.x Subject: Fix to bug in Xpostit Message-ID: <1990Feb20.185909.12114@aurora.com> Date: 20 Feb 90 18:59:09 GMT Organization: The Aurora Group Lines: 25 Xpostit was dying for me when I create a note. Found a "dangerous macro" bug: In note.c, MakeNoteWidget: > if (app_res.scroll_bar) > { > SetArg(XtNscrollVertical, XawtextScrollAlways); > } > else > SetArg(XtNscrollVertical, XawtextScrollWhenNeeded); However, in xpostit.h: #define SetArg(which, val) XtSetArg(args[nargs], (which),\ (XtArgVal) (val)); nargs++ ^^^^^^^ This is clearly a buggy macro. You can fix it by putting the entire macro in parentheses and changing the ; to a ,. Alternately, fix the immediate problem by putting braces around the ELSE clause. - Geof -- geof@aurora.com / aurora!geof@decwrl.dec.com / geof%aurora.com@decwrl.dec.com