adb experts?

Doug Toppin toppin at melpar.UUCP
Thu Jul 6 00:59:45 AEST 1989


I have a file with the following header data:
struct
{
	long a;
	int b;
	char c[20];
}
It is then followed by a unknown number of records of this type:
struct
{
	int a;
	char b[5];
}
To display the file with adb I use the following script:
<start>
=n"msgid"16t"cmd"16t"string"
0?nDtut20c

=nn"a"8t"b"
.,-1?nu6c
<end>
This works fine except that the newline in the middle (which forces '.'
to be permanently set to the current location)
causes the first print to be executed again on the first of the
record data which is not of the same format. This is not extremely
bad but is confusing to someone not familiar with it.
My questions:
* is it possible to make the temporary change to '.' permanent
  without using newline? I don't want to hardcode the starting
  address of the record data.
* is there something that can be put before the newline that
  will cause the newline to not echo anything and that will not
  change '.'?
* the '-1' being used for the end of file test does not appear to
  work on either SCO 386 or IBM 286 Xenix systems. Has anyone
  else seen this and is it possible to correctly test for EOF?
thanks
Doug Toppin
uunet!melpar!toppin



More information about the Comp.unix.xenix mailing list