[PD-dev] post/verbose code

IOhannes m zmoelnig zmoelnig at iem.at
Tue Mar 16 10:20:50 CET 2010


On 2010-01-22 22:04, Miller Puckette wrote:
> Hi all,
> 
> As I understand it... post() puts out an entire line, and startpost(),
> any number of "poststring", etc, and then an endpost() also puts out
> one line.  The only ugly thing is that some old code uses "poststring"
> (etc) to APPEND text to a post().
> 
> I think it would be compatible with existing code to make "post" supply
> a newline at the end of teh message, to have "startpost()" be a post()
> but without the newline, and endpost() only put out the newline.  The
> only trick would be (for compatibility) that if a post() is followed
> by one or more poststring() calls, one should insert the poststring()
> text before the newline that was written by post(), e.g.:
> 
> post("foo")
> 
> --> foo\n
> 
> poststring("bar")
> 
> ---> foo bar\n

hmm, as a matter of fact, i just tried this, and it doesn't seem to be
true anyhow:

<code>
  endpost();
  post("foo");
  poststring("bar");
  endpost();
  post("bla");
</code>

results in
<output>
foo
 bar
bla
</output>
that is "foo\n bar\nbla"

i also did a not-so-quick grep over all the externals in the puredata
svn, and found that poststring() is only used 3 times in total, twice in
cyclone (where it is only used in startpost()->poststring()->endpost()
constructs), and once in zexy (where i have put plenty of manual "\n" in
the strings to be printed).

i don't hink that compatibility in printout is _very_ important, and
since it doesn't seem to work anyhow as expected, i guess it is a good
chance to remove cruft.

mfasrd
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3636 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20100316/c29e2a48/attachment.bin>


More information about the Pd-dev mailing list