concat.c (333B)
1 /* see LICENSE file for copyright and license details */ 2 #include <unistd.h> 3 4 #include "../util.h" 5 6 int 7 concat(int f1, const char *s1, int f2, const char *s2) 8 { 9 switch (copyall(f1, f2)) { 10 case -1: 11 weprintf("read %s:", s1); 12 return -1; 13 case -2: 14 weprintf("write %s:", s2); 15 return -2; 16 } 17 return 0; 18 }