awk arguments
william E Davidsen
davidsen at antarctica.crd.GE.COM
Wed Jul 25 05:17:14 AEST 1990
To:
Cc:
Subject:
In article <78 at cdss.UUCP>, lyons at cdss.UUCP (Don R. Lyons x4811) writes:
|> Can anyone tell me why the form widget does not size to fit
|> button1, button2, button3 under SCO-ODT? When this application is
|> displayed only button1 and button2 are visible. All three are visible
|> if don't set XmNbottomAttachment for wbutton[2]. Please email me, I
|> have a product deadline I am trying to meet.
|>
|> thanx
|> -don
|>
|>
|> #include <X11/Intrinsic.h>
|> #include <Xm/Xm.h>
|> #include <Xm/Form.h>
|> #include <Xm/PushB.h>
|>
|> char *buttons[] = { "button1", "button2", "button3" };
|>
|> void main( argc, argv)
|> int argc;
|> char **argv;
|> {
|> Widget toplevel, form, wbutton[5];
|> int i, n;
|> Arg wargs[10];
|>
|> toplevel = XtInitialize( argv[0], "Formtest", NULL, 0, &argc, argv);
|>
|> form = XtCreateManagedWidget( "form", xmFormWidgetClass, toplevel,
|> NULL, 0);
|>
|> for ( i = 0; i < XtNumber(buttons); i++)
|> wbutton[i] = XtCreateWidget( buttons[i],
|> xmPushButtonWidgetClass, form, NULL, 0);
|> XtManageChildren( wbutton, XtNumber(buttons));
|>
|> n = 0;
|> XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_FORM); n++;
|> XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++;
|> XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
|> XtSetValues(wbutton[0], wargs, n);
|> n = 0;
|> XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_WIDGET);n++;
|> XtSetArg(wargs[n], XmNtopWidget, wbutton[0]); n++;
|> XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++;
|> XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
|> XtSetValues(wbutton[1], wargs, n);
|> n = 0;
|> XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_WIDGET);n++;
|> XtSetArg(wargs[n], XmNtopWidget, wbutton[1]); n++;
|> XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++;
|> XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
|> XtSetArg(wargs[n], XmNbottomAttachment,XmATTACH_FORM); n++;
|> XtSetValues(wbutton[2], wargs, n);
|>
|> XtRealizeWidget(toplevel);
|> XtMainLoop();
|> }
|> --
|> Don R Lyons Any opinions expressed are my own.
|> Arinc Research Inc uucp : uunet!cdss!lyons
|> CDSS, Mail Stop 1249 voice: 301 266 4811
|> 2551 Riva Road Annapolis , MD 21401 fax : 301 266 2047
Bill Davidsen (davidsen at crdos1.crd.ge.com, uunet!crdgw1!crdos1!davidsen)
GE Corp R&D Center, Schenectady NY
Moderator of comp.binaries.ibm.pc and 386users mailing list
"Stupidity, like virtue, is it's own reward" -me
Path: antarctica!davidsen
Newsgroups:
comp.periphs.scsi,ba.market.computers,comp.sys.ibm.pc.hardware,comp.sys.
.mac.hardware
Distribution: world
Followup-To:
References: <5278 at darkstar.ucsc.edu> <31926 at cup.portal.com>
From: davidsen at antarctica.crd.GE.COM (william E Davidsen)
Reply-To: davidsen at crdos1.crd.ge.com (bill davidsen)
Organization: GE Corporate R&D Center, Schenectady NY
Subject: Re: New 320Meg SCSIs < $1000 (quantity purchase?)
Keywords:
These might be "not previously sold" as opposed to "new" at that
price. I just got a couple of Maxtor 320MB ESDI drives like that. No
problem with them, they have a warantee, but they say something like
RECERTIFIED on the cases.
To: 386users at crdos1
Cc:
Subject:
Our department had an Equity 386/20 donated to it a few weeks ago.
It currently is configured with the requisite minimum 1 Mbyte of RAM.
I have called a local Epson dealer, who tells me:
1) the Epson SIMM's are proprietary, and
2) it will cost about $400 / Mbyte to purchase new RAM.
Is this guy just jerking me around or what? Has anyone else heard this,
or better yet, does anyone have any contradictory evidence? Any suggested
suppliers?
Thanks in advance,
dB
To: mayne at VSSERV.SCRI.FSU.EDU (William (Bill) Mayne)
Cc:
Subject: Re: awk arguments
Reply-To: davidsen at crdos1.crd.ge.com (bill davidsen)
In article <290 at sun13.scri.fsu.edu>, mayne at VSSERV.SCRI.FSU.EDU
(William (Bill) Mayne) writes:
|> I have never been able to get the command line assignment of
|> awk variables to work. I have sometimes resorted to ugly kludges
|> like using sed to modify an awk program to hard code argument
|> values. Surely I have missed something obvious. There must be a
|> better way. I would be most grateful if someone would suggest one.
In hopes that this will help others, I'll post instead of mailing...
When you use a filename with =, all the rules are implementation
dependent. The BSD version of awk seems to take anything with an = as a
variable assign, and allows them in line:
awk -f cmds a=1 file1 a=2 file2
which also works with most other variants. nawk and later SysV versions
allow interspersing of filenames and variable settings, which are
evaluated left to right, but if an arg has a / in it, it is always
treated as a filename. BSD awk (at least on Sun) doesn't seem to do
this, not does gawk, at least the version I have.
Hope this helps, the bproblem is a bit tricky, and I just happened to
have access to most of the common versions of awk here.
--
Bill Davidsen (davidsen at crdos1.crd.ge.com, uunet!crdgw1!crdos1!davidsen)
GE Corp R&D Center, Schenectady NY
Moderator of comp.binaries.ibm.pc and 386users mailing list
"Stupidity, like virtue, is it's own reward" -me
More information about the Comp.unix.wizards
mailing list