2005-12-26 04:48:52 +00:00
|
|
|
#include <u.h>
|
|
|
|
|
#include <libc.h>
|
|
|
|
|
#include <ip.h>
|
|
|
|
|
#include <fcall.h>
|
|
|
|
|
#include "dat.h"
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
p_seprint(Msg *m)
|
|
|
|
|
{
|
|
|
|
|
Fcall f;
|
|
|
|
|
char *p;
|
|
|
|
|
|
|
|
|
|
memset(&f, 0, sizeof(f));
|
|
|
|
|
f.type = 0;
|
|
|
|
|
f.data = 0; /* protection for %F */
|
|
|
|
|
if(convM2S(m->ps, m->pe-m->ps, &f)){
|
|
|
|
|
p = m->p;
|
|
|
|
|
m->p = seprint(m->p, m->e, "%F", &f);
|
|
|
|
|
while(p < m->p){
|
|
|
|
|
p = strchr(p, '\n');
|
|
|
|
|
if(p == nil)
|
|
|
|
|
break;
|
|
|
|
|
*p = '\\';
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
dump.seprint(m);
|
|
|
|
|
m->pr = nil;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Proto ninep =
|
|
|
|
|
{
|
|
|
|
|
"ninep",
|
2006-02-14 19:42:28 +00:00
|
|
|
nil,
|
|
|
|
|
nil,
|
2005-12-26 04:48:52 +00:00
|
|
|
p_seprint,
|
|
|
|
|
nil,
|
|
|
|
|
nil,
|
2006-02-14 19:42:28 +00:00
|
|
|
nil,
|
2006-04-01 19:24:03 +00:00
|
|
|
defaultframer
|
2005-12-26 04:48:52 +00:00
|
|
|
};
|