9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Spaces in values in plan9.ini?
@ 2001-04-16 18:45 rob pike
  2001-04-16 20:01 ` Boyd Roberts
  2001-04-17  0:34 ` Dan Cross
  0 siblings, 2 replies; 4+ messages in thread
From: rob pike @ 2001-04-16 18:45 UTC (permalink / raw)
  To: 9fans

That sort of thing was precisely the reason for the change
to tokenize.  Please try it, see if it works, and tell us the
result. Thanks.

-rob



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [9fans] Spaces in values in plan9.ini?
@ 2001-04-16 18:43 Dan Cross
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Cross @ 2001-04-16 18:43 UTC (permalink / raw)
  To: 9fans

It appears as though bozo's who set up our office Wavelan
(ne ``Orinoco Enterprise'') network put a space into the
wavelan network name....  Boo....  The Plan 9 Wavelan driver
uses the parsecmd() routine in /sys/src/9/port/parse.c to
parse option strings writen to the driver's ctl file, but
parsecmd() calls getfields() which can't deal with quoted
strings that contain spaces.  So, if our wavelan name is
`Dumb IT People', the driver thinks that it's 'Dumb.  (Note
the quote....).

My question is: is it safe to change the call to getfields(2)
in /sys/src/9/port/parse.c to a call to tokenize(2) instead?
This would allow one to quote strings with embedded spaces.
It would also deal with tabs (getfields in parsecmd() is called
with a space only as the field delimiter).

	- Dan C.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-17  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-16 18:45 [9fans] Spaces in values in plan9.ini? rob pike
2001-04-16 20:01 ` Boyd Roberts
2001-04-17  0:34 ` Dan Cross
  -- strict thread matches above, loose matches on Subject: below --
2001-04-16 18:43 Dan Cross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).