5 * Plain output style for remote builds
10 /*----- Licensing notice --------------------------------------------------*
12 * This file is part of sw-tools.
14 * sw-tools is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * sw-tools is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with sw-tools; if not, write to the Free Software Foundation,
26 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 /*----- Header files ------------------------------------------------------*/
36 #include <mLib/alloc.h>
37 #include <mLib/lbuf.h>
41 #include "pres_plain.h"
43 /*----- Main code ---------------------------------------------------------*/
47 static void line(char *s, size_t len, void *p)
51 printf("%s: %s\n", e->arch, s);
54 /* --- @plain_init@ --- */
56 int plain_init(archcons *a)
58 for (; a; a = a->cdr) {
63 b = xmalloc(sizeof(lbuf));
65 lbuf_init(b, line, e);
70 /* --- @plain_output@ --- */
72 void plain_output(archent *e, const char *p, size_t sz)
74 lbuf_snarf(e->pres, p, sz);
77 /* --- @plain_close@ --- */
79 void plain_close(archent *e, int ok, const char *summ)
82 lbuf_destroy(e->pres);
84 printf("%s: %s\n", e->arch, summ);
87 /* --- @plain_done@ --- */
89 void plain_done(archcons *a)
91 for (; a; a = a->cdr) {
96 if (opt_flags & optFlag_beep)
100 /*----- That's all, folks -------------------------------------------------*/