132 unsigned int pos, nextpos;
135 if ((
fd = open_read(
fn)) == -1)
141 buffer_init(&bt,buffer_unixread,
fd,textbuf,
sizeof(textbuf));
144 if (getln(&bt,&line,&
match,
'\n') == -1)
148 if (line.len == 1 && q ==
'H')
continue;
149 if (line.s[0] ==
'!') {
150 if (line.s[1] ==
'R') {
156 if (line.s[1] ==
'A') {
174 while ((pos += byte_chr(line.s+pos,line.len-pos,
'<')) != line.len) {
175 if (pos + 4 < line.len &&
176 line.s[pos+1] ==
'#' &&
177 line.s[pos+3] ==
'#' &&
178 line.s[pos+4] ==
'>') {
180 if (!stralloc_catb(&outline,line.s+nextpos,pos-nextpos))
182 switch(line.s[pos+2]) {
185 if (!stralloc_cats(&outline,target))
die_nomem();
188 if (!stralloc_cats(&outline,confirm))
die_nomem();
191 if (!stralloc_catb(&outline,confirm,confirmlocal))
die_nomem();
194 if (!stralloc_cat(&outline,&outlocal))
die_nomem();
197 if (!stralloc_cat(&outline,&outhost))
die_nomem();
201 if (!stralloc_cats(&outline,verptarget))
die_nomem();
204 if (!stralloc_cats(&outline,szmsgnum))
die_nomem();
215 codeput(line.s,line.len,q);
217 if (!stralloc_catb(&outline,line.s+nextpos,line.len-nextpos))
219 codeput(outline.s,outline.len,q);
const char * logmsg(const char *dir, unsigned long num, unsigned long listno, unsigned long subs, int done)