> On about the third page, some code begins, but at the print()
> statement at the end there is some strangeness. If you look inside
> the .ms file, there are some .eo and .ec requests. .eo turns off \x
> and .ec turns it back on. But why is it ignored after that first
> page, which works correctly?
assuming that /n/sourcesdump/2007/1122/contrib/pietro/plan9prog.ms
is the file in question, the first page isn't "working" correctly either,
since your
print("hello, world\n");
turns into
print("hello, world0);
because the \n" interpolates the " register.
the reason that .eo doesn't manage to turn this off is that
the text between .P1 and .P2 gets copied into a troff
diversion for later processing, and that later processing
happens during the execution of .P2, by which time your idiom
.P1
.eo
text
.ec
.P2
has restored \ as the escape character.
you can get your desired effect by doing
.P1
.eo
text
.P2
.ec
instead.
russ