"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/builtin/io.c" between
mailfromd-8.10.tar.xz and mailfromd-8.11.tar.xz

About: Mailfromd is a general-purpose mail filtering daemon for Sendmail, Postfix and MeTA1 (interfaces with the MTA using Milter or PMilter protocols).

io.c  (mailfromd-8.10.tar.xz):io.c  (mailfromd-8.11.tar.xz)
skipping to change at line 23 skipping to change at line 23
#line 982 #line 982
#line 982 #line 982
#include "mailfromd.h" #include "mailfromd.h"
#line 982 #line 982
#include "prog.h" #include "prog.h"
#line 982 #line 982
#include "builtin.h" #include "builtin.h"
#line 982 #line 982
#line 180 "io.bi" #line 179 "io.bi"
static mu_debug_handle_t debug_handle; static mu_debug_handle_t debug_handle;
#line 982 "../../src/builtin/snarf.m4" #line 982 "../../src/builtin/snarf.m4"
#line 1022 "../../src/builtin/snarf.m4" #line 1022 "../../src/builtin/snarf.m4"
/* End of snarf.m4 */ /* End of snarf.m4 */
#line 1 "io.bi" #line 1 "io.bi"
/* This file is part of Mailfromd. -*- c -*- /* This file is part of Mailfromd. -*- c -*-
Copyright (C) 2006-2021 Sergey Poznyakoff Copyright (C) 2006-2021 Sergey Poznyakoff
skipping to change at line 64 skipping to change at line 64
static size_t nstreams = MAX_IOSTREAMS; static size_t nstreams = MAX_IOSTREAMS;
static struct mu_cfg_param io_cfg_param[] = { static struct mu_cfg_param io_cfg_param[] = {
{ "max-streams", mu_c_size, &nstreams, 0, NULL, { "max-streams", mu_c_size, &nstreams, 0, NULL,
N_("Maximum number of stream descriptors.") }, N_("Maximum number of stream descriptors.") },
{ NULL } { NULL }
}; };
struct io_stream { struct io_stream {
char *name; char *name;
mu_locker_t lock;
int fd[2]; int fd[2];
pid_t pid; pid_t pid;
char *buf; char *buf;
size_t bufsize; size_t bufsize;
int (*shutdown)(struct io_stream *, int what); int (*shutdown)(struct io_stream *, int what);
void (*cleanup)(void*); void (*cleanup)(void*);
void *cleanup_data; void *cleanup_data;
char *delim; char *delim;
}; };
skipping to change at line 209 skipping to change at line 208
} }
if (p && mu_string_to_syslog_priority(p, &pri)) { if (p && mu_string_to_syslog_priority(p, &pri)) {
mu_error(_("unknown syslog priority (%s), " mu_error(_("unknown syslog priority (%s), "
"redirecting stderr to %s"), "redirecting stderr to %s"),
arg, arg,
mu_syslog_priority_to_string(pri)); mu_syslog_priority_to_string(pri));
} }
} }
#line 180 "io.bi" #line 179 "io.bi"
#line 180 #line 179
mu_debug(debug_handle, MU_DEBUG_TRACE2,("redirecting stderr to syslog %s.%s", mu_debug(debug_handle, MU_DEBUG_TRACE2,("redirecting stderr to syslog %s.%s",
mu_syslog_facility_to_string(fac), mu_syslog_facility_to_string(fac),
mu_syslog_priority_to_string(pri))); mu_syslog_priority_to_string(pri)));
#line 184 #line 183
len = strcspn(cmd, " \t"); len = strcspn(cmd, " \t");
tag = malloc(LOG_TAG_PFX_LEN + len + 1); tag = malloc(LOG_TAG_PFX_LEN + len + 1);
if (!tag) if (!tag)
tag = (char*) cmd; tag = (char*) cmd;
else { else {
strcpy(tag, LOG_TAG_PFX); strcpy(tag, LOG_TAG_PFX);
memcpy(tag + LOG_TAG_PFX_LEN, cmd, len); memcpy(tag + LOG_TAG_PFX_LEN, cmd, len);
tag[LOG_TAG_PFX_LEN + len] = 0; tag[LOG_TAG_PFX_LEN + len] = 0;
} }
skipping to change at line 267 skipping to change at line 266
case STDERR_NULL: case STDERR_NULL:
arg = "/dev/null"; arg = "/dev/null";
case STDERR_FILE_APPEND: case STDERR_FILE_APPEND:
append = O_APPEND; append = O_APPEND;
case STDERR_FILE: case STDERR_FILE:
if (!arg || !*arg) { if (!arg || !*arg) {
close(2); close(2);
break; break;
} }
#line 234 #line 233
#line 234 #line 233
mu_debug(debug_handle, MU_DEBUG_TRACE2,("redirecting stderr to %s", arg)); mu_debug(debug_handle, MU_DEBUG_TRACE2,("redirecting stderr to %s", arg));
fd = open(arg, O_CREAT|O_WRONLY|append, 0644); fd = open(arg, O_CREAT|O_WRONLY|append, 0644);
if (fd < 0) { if (fd < 0) {
mu_error(_("cannot open file %s for appending: %s"), mu_error(_("cannot open file %s for appending: %s"),
arg, mu_strerror(errno)); arg, mu_strerror(errno));
close(2); close(2);
return; return;
} }
if (fd != 2) { if (fd != 2) {
dup2(fd, 2); dup2(fd, 2);
skipping to change at line 355 skipping to change at line 354
parse_stderr_redirect(&cmdline, &err, &arg); parse_stderr_redirect(&cmdline, &err, &arg);
while (*cmdline && (*cmdline == ' ' || *cmdline == '\t')) while (*cmdline && (*cmdline == ' ' || *cmdline == '\t'))
cmdline++; cmdline++;
if (REDIRECT_STDIN_P(flags)) { if (REDIRECT_STDIN_P(flags)) {
if (pipe(leftp)) { if (pipe(leftp)) {
mu_diag_funcall(MU_DIAG_ERROR, "pipe", "leftp", mu_diag_funcall(MU_DIAG_ERROR, "pipe", "leftp",
errno); errno);
free(arg); free(arg);
( (
#line 319 #line 318
env_throw_bi(env, mfe_failure, NULL, "pipe failed") env_throw_bi(env, mfe_failure, NULL, "pipe failed")
#line 319 #line 318
); );
} }
} }
if (REDIRECT_STDOUT_P(flags)) { if (REDIRECT_STDOUT_P(flags)) {
if (pipe(rightp)) { if (pipe(rightp)) {
mu_diag_funcall(MU_DIAG_ERROR, "pipe", "rightp", mu_diag_funcall(MU_DIAG_ERROR, "pipe", "rightp",
errno); errno);
free(arg); free(arg);
if (REDIRECT_STDIN_P(flags)) { if (REDIRECT_STDIN_P(flags)) {
skipping to change at line 403 skipping to change at line 402
} }
if (ioe && ioe[2] != -1 && ioe[2] != 2) if (ioe && ioe[2] != -1 && ioe[2] != 2)
dup2(ioe[2], 2); dup2(ioe[2], 2);
else else
stderr_handler(err, arg, cmdline); stderr_handler(err, arg, cmdline);
/* Close unneeded descriptors */ /* Close unneeded descriptors */
close_fds_above(2); close_fds_above(2);
#line 364 #line 363
#line 364 #line 363
mu_debug(debug_handle, MU_DEBUG_TRACE3,("running %s", cmdline)); mu_debug(debug_handle, MU_DEBUG_TRACE3,("running %s", cmdline));
if (mu_wordsplit(cmdline, &ws, if (mu_wordsplit(cmdline, &ws,
MU_WRDSF_DEFFLAGS & ~MU_WRDSF_CESCAPES)) { MU_WRDSF_DEFFLAGS & ~MU_WRDSF_CESCAPES)) {
mu_error(_("cannot parse command line %s: %s"), mu_error(_("cannot parse command line %s: %s"),
cmdline, mu_wordsplit_strerror(&ws)); cmdline, mu_wordsplit_strerror(&ws));
exit(127); exit(127);
} }
execvp(ws.ws_wordv[0], ws.ws_wordv); execvp(ws.ws_wordv[0], ws.ws_wordv);
mu_error(_("cannot run %s: %s"), mu_error(_("cannot run %s: %s"),
cmdline, mu_strerror(errno)); cmdline, mu_strerror(errno));
skipping to change at line 493 skipping to change at line 492
socklen_t socklen; socklen_t socklen;
int fd; int fd;
int rc; int rc;
if (!proto if (!proto
|| strcmp(proto, "unix") == 0 || strcmp(proto, "local") == 0) { || strcmp(proto, "unix") == 0 || strcmp(proto, "local") == 0) {
struct stat st; struct stat st;
if (!(port == NULL)) if (!(port == NULL))
#line 454 #line 453
( (
#line 454 #line 453
env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: %s; " env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: %s; "
"port is meaningless for UNIX sockets"),cstr) "port is meaningless for UNIX sockets"),cstr)
#line 454 #line 453
) )
#line 458 #line 457
; ;
if (!(strlen(path) <= sizeof addr.s_un.sun_path)) if (!(strlen(path) <= sizeof addr.s_un.sun_path))
#line 460 #line 459
( (
#line 460 #line 459
env_throw_bi(env, mfe_range, NULL, _("%s: UNIX socket name too long"),pat h) env_throw_bi(env, mfe_range, NULL, _("%s: UNIX socket name too long"),pat h)
#line 460 #line 459
) )
#line 463 #line 462
; ;
addr.sa.sa_family = PF_UNIX; addr.sa.sa_family = PF_UNIX;
socklen = sizeof(addr.s_un); socklen = sizeof(addr.s_un);
strcpy(addr.s_un.sun_path, path); strcpy(addr.s_un.sun_path, path);
if (stat(path, &st)) { if (stat(path, &st)) {
( (
#line 470 #line 469
env_throw_bi(env, mfe_failure, NULL, _("%s: cannot stat socket: %s"),path ,strerror(errno)) env_throw_bi(env, mfe_failure, NULL, _("%s: cannot stat socket: %s"),path ,strerror(errno))
#line 470 #line 469
); );
#line 473 #line 472
} else { } else {
/* FIXME: Check permissions? */ /* FIXME: Check permissions? */
if (!(S_ISSOCK(st.st_mode))) if (!(S_ISSOCK(st.st_mode)))
#line 475 #line 474
( (
#line 475 #line 474
env_throw_bi(env, mfe_failure, NULL, _("%s: not a socket"),path) env_throw_bi(env, mfe_failure, NULL, _("%s: not a socket"),path)
#line 475 #line 474
) )
#line 478 #line 477
; ;
} }
} else if (strcmp(proto, "inet") == 0) { } else if (strcmp(proto, "inet") == 0) {
short pnum; short pnum;
long num; long num;
char *p; char *p;
addr.sa.sa_family = PF_INET; addr.sa.sa_family = PF_INET;
socklen = sizeof(addr.s_in); socklen = sizeof(addr.s_in);
if (!(port != NULL)) if (!(port != NULL))
#line 489 #line 488
( (
#line 489 #line 488
env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: %s; " env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: %s; "
"missing port number"),cstr) "missing port number"),cstr)
#line 489 #line 488
) )
#line 493 #line 492
; ;
num = pnum = strtol(port, &p, 0); num = pnum = strtol(port, &p, 0);
if (*p == 0) { if (*p == 0) {
if (!(num == pnum)) if (!(num == pnum))
#line 497 #line 496
( (
#line 497 #line 496
env_throw_bi(env, mfe_range, NULL, _("invalid connection type: " env_throw_bi(env, mfe_range, NULL, _("invalid connection type: "
"%s; bad port number"),cstr) "%s; bad port number"),cstr)
#line 497 #line 496
) )
#line 501 #line 500
; ;
pnum = htons(pnum); pnum = htons(pnum);
} else { } else {
struct servent *sp = getservbyname(port, "tcp"); struct servent *sp = getservbyname(port, "tcp");
if (!(sp != NULL)) if (!(sp != NULL))
#line 506 #line 505
( (
#line 506 #line 505
env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: " env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: "
"%s; unknown port name"),cstr) "%s; unknown port name"),cstr)
#line 506 #line 505
) )
#line 510 #line 509
; ;
pnum = sp->s_port; pnum = sp->s_port;
} }
if (!path) if (!path)
addr.s_in.sin_addr.s_addr = INADDR_ANY; addr.s_in.sin_addr.s_addr = INADDR_ANY;
else { else {
struct hostent *hp = gethostbyname(path); struct hostent *hp = gethostbyname(path);
if (!(hp != NULL)) if (!(hp != NULL))
#line 518 #line 517
( (
#line 518 #line 517
env_throw_bi(env, mfe_failure, NULL, _("unknown host name %s"),path) env_throw_bi(env, mfe_failure, NULL, _("unknown host name %s"),path)
#line 518 #line 517
) )
#line 521 #line 520
; ;
addr.sa.sa_family = hp->h_addrtype; addr.sa.sa_family = hp->h_addrtype;
switch (hp->h_addrtype) { switch (hp->h_addrtype) {
case AF_INET: case AF_INET:
memmove(&addr.s_in.sin_addr, hp->h_addr, 4); memmove(&addr.s_in.sin_addr, hp->h_addr, 4);
addr.s_in.sin_port = pnum; addr.s_in.sin_port = pnum;
break; break;
default: default:
( (
#line 530 #line 529
env_throw_bi(env, mfe_range, NULL, _("invalid connection type: " env_throw_bi(env, mfe_range, NULL, _("invalid connection type: "
"%s; unsupported address family"),cstr ) "%s; unsupported address family"),cstr )
#line 530 #line 529
); );
#line 534 #line 533
} }
} }
#ifdef GACOPYZ_IPV6 #ifdef GACOPYZ_IPV6
} else if (strcmp(proto, "inet6") == 0) { } else if (strcmp(proto, "inet6") == 0) {
struct addrinfo hints; struct addrinfo hints;
struct addrinfo *res; struct addrinfo *res;
if (!(port != NULL)) if (!(port != NULL))
#line 541 #line 540
( (
#line 541 #line 540
env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: %s; " env_throw_bi(env, mfe_failure, NULL, _("invalid connection type: %s; "
"missing port number"),cstr) "missing port number"),cstr)
#line 541 #line 540
) )
#line 545 #line 544
; ;
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6; hints.ai_family = AF_INET6;
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
if (!path) if (!path)
hints.ai_flags |= AI_PASSIVE; hints.ai_flags |= AI_PASSIVE;
rc = getaddrinfo(path, port, &hints, &res); rc = getaddrinfo(path, port, &hints, &res);
switch (rc) { switch (rc) {
case 0: case 0:
break; break;
case EAI_SYSTEM: case EAI_SYSTEM:
( (
#line 560 #line 559
env_throw_bi(env, mfe_failure, NULL, _("%s:%s: cannot parse address: %s") ,path,port,strerror(errno)) env_throw_bi(env, mfe_failure, NULL, _("%s:%s: cannot parse address: %s") ,path,port,strerror(errno))
#line 560 #line 559
); );
#line 563 #line 562
case EAI_BADFLAGS: case EAI_BADFLAGS:
case EAI_SOCKTYPE: case EAI_SOCKTYPE:
( (
#line 566 #line 565
env_throw_bi(env, mfe_failure, NULL, _("%s:%d: internal error converting %s:%s"),__FILE__,__LINE__,path,port) env_throw_bi(env, mfe_failure, NULL, _("%s:%d: internal error converting %s:%s"),__FILE__,__LINE__,path,port)
#line 566 #line 565
); );
#line 569 #line 568
case EAI_MEMORY: case EAI_MEMORY:
mu_alloc_die(); mu_alloc_die();
default: default:
( (
#line 574 #line 573
env_throw_bi(env, mfe_failure, NULL, "%s:%s: %s",path,port,gai_strerror(r c)) env_throw_bi(env, mfe_failure, NULL, "%s:%s: %s",path,port,gai_strerror(r c))
#line 574 #line 573
); );
#line 577 #line 576
} }
socklen = res->ai_addrlen; socklen = res->ai_addrlen;
if (socklen > sizeof(addr)) { if (socklen > sizeof(addr)) {
freeaddrinfo(res); freeaddrinfo(res);
( (
#line 582 #line 581
env_throw_bi(env, mfe_failure, NULL, _("%s:%s: address length too big (%l u)"),path,port,(unsigned long) socklen) env_throw_bi(env, mfe_failure, NULL, _("%s:%s: address length too big (%l u)"),path,port,(unsigned long) socklen)
#line 582 #line 581
); );
#line 586 #line 585
} }
memcpy(&addr, res->ai_addr, res->ai_addrlen); memcpy(&addr, res->ai_addr, res->ai_addrlen);
freeaddrinfo(res); freeaddrinfo(res);
#endif #endif
} else { } else {
( (
#line 591 #line 590
env_throw_bi(env, mfe_range, NULL, _("unsupported protocol: %s"),proto) env_throw_bi(env, mfe_range, NULL, _("unsupported protocol: %s"),proto)
#line 591 #line 590
); );
#line 594 #line 593
} }
fd = socket(addr.sa.sa_family, SOCK_STREAM, 0); fd = socket(addr.sa.sa_family, SOCK_STREAM, 0);
if (!(fd != -1)) if (!(fd != -1))
#line 597 #line 596
( (
#line 597 #line 596
env_throw_bi(env, mfe_failure, NULL, _("unable to create new socket: %s") ,strerror(errno)) env_throw_bi(env, mfe_failure, NULL, _("unable to create new socket: %s") ,strerror(errno))
#line 597 #line 596
) )
#line 600 #line 599
; ;
/* FIXME: Bind to the source ? */ /* FIXME: Bind to the source ? */
rc = connect(fd, &addr.sa, socklen); rc = connect(fd, &addr.sa, socklen);
if (rc) { if (rc) {
close(fd); close(fd);
( (
#line 607 #line 606
env_throw_bi(env, mfe_failure, NULL, _("cannot connect to %s: %s"),cstr,s trerror(errno)) env_throw_bi(env, mfe_failure, NULL, _("cannot connect to %s: %s"),cstr,s trerror(errno))
#line 607 #line 606
); );
#line 610 #line 609
} }
str->fd[0] = fd; str->fd[0] = fd;
return 0; return 0;
} }
static int static int
shutdown_inet_stream(struct io_stream *str, int how) shutdown_inet_stream(struct io_stream *str, int how)
{ {
switch (how) { switch (how) {
skipping to change at line 788 skipping to change at line 787
{ {
struct io_stream *stab = data; struct io_stream *stab = data;
struct io_stream *p; struct io_stream *p;
for (p = stab; p < stab + nstreams; p++) { for (p = stab; p < stab + nstreams; p++) {
close_stream(p); close_stream(p);
free(p->buf); free(p->buf);
} }
free(stab); free(stab);
} }
#line 684 #line 683
#line 684 #line 683
static int IO_id; static int IO_id;
#line 684 "io.bi" #line 683 "io.bi"
int int
_bi_io_fd(eval_environ_t env, int fd, int what) _bi_io_fd(eval_environ_t env, int fd, int what)
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
int descr; int descr;
if (!(fd >= 0 && fd < nstreams && what>=0 && what<=1)) if (!(fd >= 0 && fd < nstreams && what>=0 && what<=1))
#line 692 #line 691
( (
#line 692 #line 691
env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor")) env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor"))
#line 692 #line 691
) )
#line 694 #line 693
; ;
descr = what == 0 ? IFD(iotab[fd]) : OFD(iotab[fd]); descr = what == 0 ? IFD(iotab[fd]) : OFD(iotab[fd]);
if (!(descr >= 0)) if (!(descr >= 0))
#line 696 #line 695
( (
#line 696 #line 695
env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor")) env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor"))
#line 696 #line 695
) )
#line 698 #line 697
; ;
return descr; return descr;
} }
void void
#line 703 #line 702
bi_open(eval_environ_t env) bi_open(eval_environ_t env)
#line 703 #line 702
#line 703 #line 702
#line 703 "io.bi" #line 702 "io.bi"
{ {
#line 703 #line 702
#line 703 #line 702
#line 703 #line 702
#line 703 #line 702
char * name; char * name;
#line 703 #line 702
#line 703 #line 702
get_string_arg(env, 0, &name); get_string_arg(env, 0, &name);
#line 703 #line 702
#line 703 #line 702
#line 703 #line 702
adjust_stack(env, 1); adjust_stack(env, 1);
#line 703 #line 702
#line 703 #line 702
#line 703 #line 702
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 703 #line 702
prog_trace(env, "open %s",name);; prog_trace(env, "open %s",name);;
#line 703 #line 702
{ {
int i, rc; int i, rc;
int flags = 0; int flags = 0;
int (*opf)(eval_environ_t env, int (*opf)(eval_environ_t env,
struct io_stream *, const char *, int) = open_file_stream; struct io_stream *, const char *, int) = open_file_stream;
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
for (i = 0; i < nstreams; i++) { for (i = 0; i < nstreams; i++) {
if (iotab[i].fd[0] == -1) if (iotab[i].fd[0] == -1)
break; break;
} }
if (!(i < nstreams)) if (!(i < nstreams))
#line 715 #line 714
( (
#line 715 #line 714
env_throw_bi(env, mfe_failure, "open", _("no more files available")) env_throw_bi(env, mfe_failure, "open", _("no more files available"))
#line 715 #line 714
) )
#line 717 #line 716
; ;
#line 719 #line 718
#line 719 #line 718
mu_debug(debug_handle, MU_DEBUG_TRACE1,("opening stream %s", name)); mu_debug(debug_handle, MU_DEBUG_TRACE1,("opening stream %s", name));
iotab[i].name = mu_strdup(name); iotab[i].name = mu_strdup(name);
iotab[i].delim = NULL; iotab[i].delim = NULL;
if (*name == '>') { if (*name == '>') {
flags |= O_RDWR|O_CREAT; flags |= O_RDWR|O_CREAT;
name++; name++;
if (*name == '>') { if (*name == '>') {
flags |= O_APPEND; flags |= O_APPEND;
name++; name++;
} else } else
skipping to change at line 917 skipping to change at line 916
flags = O_RDWR; flags = O_RDWR;
} else } else
flags = O_RDONLY; flags = O_RDONLY;
for (;*name && mu_isspace(*name); name++) for (;*name && mu_isspace(*name); name++)
; ;
rc = opf(env, &iotab[i], name, flags); rc = opf(env, &iotab[i], name, flags);
if (!(rc == 0)) if (!(rc == 0))
#line 753 #line 752
( (
#line 753 #line 752
env_throw_bi(env, mfe_failure, "open", _("cannot open stream %s: %s"),nam e,mu_strerror(rc)) env_throw_bi(env, mfe_failure, "open", _("cannot open stream %s: %s"),nam e,mu_strerror(rc))
#line 753 #line 752
) )
#line 756 #line 755
; ;
#line 757 #line 756
#line 757 #line 756
mu_debug(debug_handle, MU_DEBUG_TRACE1,("open(%s) = %d", name, i)); mu_debug(debug_handle, MU_DEBUG_TRACE1,("open(%s) = %d", name, i));
#line 758 #line 757
do { do {
#line 758 #line 757
push(env, (STKVAL)(mft_number)(i)); push(env, (STKVAL)(mft_number)(i));
#line 758 #line 757
goto endlab; goto endlab;
#line 758 #line 757
} while (0); } while (0);
} }
endlab: endlab:
#line 760 #line 759
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 760 #line 759
return; return;
#line 760 #line 759
} }
void void
#line 762 #line 761
bi_spawn(eval_environ_t env) bi_spawn(eval_environ_t env)
#line 762 #line 761
#line 762 #line 761
#line 762 "io.bi" #line 761 "io.bi"
{ {
#line 762 #line 761
#line 762 #line 761
#line 762 #line 761
long __bi_argcnt; long __bi_argcnt;
#line 762 #line 761
char * name; char * name;
#line 762 #line 761
long fin; long fin;
#line 762 #line 761
long fout; long fout;
#line 762 #line 761
long ferr; long ferr;
#line 762 #line 761
#line 762 #line 761
get_string_arg(env, 1, &name); get_string_arg(env, 1, &name);
#line 762 #line 761
get_numeric_arg(env, 2, &fin); get_numeric_arg(env, 2, &fin);
#line 762 #line 761
get_numeric_arg(env, 3, &fout); get_numeric_arg(env, 3, &fout);
#line 762 #line 761
get_numeric_arg(env, 4, &ferr); get_numeric_arg(env, 4, &ferr);
#line 762 #line 761
#line 762 #line 761
get_numeric_arg(env, 0, &__bi_argcnt); get_numeric_arg(env, 0, &__bi_argcnt);
#line 762 #line 761
adjust_stack(env, __bi_argcnt + 1); adjust_stack(env, __bi_argcnt + 1);
#line 762 #line 761
#line 762 #line 761
#line 762 #line 761
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 762 #line 761
prog_trace(env, "spawn %s %lu %lu %lu",name, ((__bi_argcnt > 1) ? fin : 0), ((__bi_argcnt > 2) ? fout : 0), ((__bi_argcnt > 3) ? ferr : 0));; prog_trace(env, "spawn %s %lu %lu %lu",name, ((__bi_argcnt > 1) ? fin : 0), ((__bi_argcnt > 2) ? fout : 0), ((__bi_argcnt > 3) ? ferr : 0));;
{ {
int i, rc; int i, rc;
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
int ioe[3]; int ioe[3];
int flags; int flags;
for (i = 0; i < nstreams; i++) { for (i = 0; i < nstreams; i++) {
if (iotab[i].fd[0] == -1) if (iotab[i].fd[0] == -1)
break; break;
} }
if (!(i < nstreams)) if (!(i < nstreams))
#line 774 #line 773
( (
#line 774 #line 773
env_throw_bi(env, mfe_failure, "spawn", _("no more files available")) env_throw_bi(env, mfe_failure, "spawn", _("no more files available"))
#line 774 #line 773
) )
#line 776 #line 775
; ;
#line 778 #line 777
#line 778 #line 777
mu_debug(debug_handle, MU_DEBUG_TRACE1,("spawning %s", name)); mu_debug(debug_handle, MU_DEBUG_TRACE1,("spawning %s", name));
iotab[i].name = mu_strdup(name); iotab[i].name = mu_strdup(name);
iotab[i].delim = NULL; iotab[i].delim = NULL;
flags = O_WRONLY; flags = O_WRONLY;
if (*name == '|') if (*name == '|')
name++; name++;
if (*name == '&') { if (*name == '&') {
flags = O_RDWR; flags = O_RDWR;
name++; name++;
skipping to change at line 1053 skipping to change at line 1052
else else
ioe[1] = -1; ioe[1] = -1;
if ((__bi_argcnt > 3)) if ((__bi_argcnt > 3))
ioe[2] = _bi_io_fd(env, ((__bi_argcnt > 2) ? fout : 0), 1); ioe[2] = _bi_io_fd(env, ((__bi_argcnt > 2) ? fout : 0), 1);
else else
ioe[2] = -1; ioe[2] = -1;
rc = open_program_stream_ioe(env, &iotab[i], name, flags, ioe); rc = open_program_stream_ioe(env, &iotab[i], name, flags, ioe);
if (!(rc == 0)) if (!(rc == 0))
#line 811 #line 810
( (
#line 811 #line 810
env_throw_bi(env, mfe_failure, "spawn", _("cannot open stream %s: %s"),na me,mu_strerror(rc)) env_throw_bi(env, mfe_failure, "spawn", _("cannot open stream %s: %s"),na me,mu_strerror(rc))
#line 811 #line 810
) )
#line 814 #line 813
; ;
#line 815 #line 814
#line 815 #line 814
mu_debug(debug_handle, MU_DEBUG_TRACE1,("spawn(%s) = %d", name, i)); mu_debug(debug_handle, MU_DEBUG_TRACE1,("spawn(%s) = %d", name, i));
#line 816 #line 815
do { do {
#line 816 #line 815
push(env, (STKVAL)(mft_number)(i)); push(env, (STKVAL)(mft_number)(i));
#line 816 #line 815
goto endlab; goto endlab;
#line 816 #line 815
} while (0); } while (0);
} }
endlab: endlab:
#line 819 #line 818
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 819 #line 818
return; return;
#line 819 #line 818
} }
void void
#line 822 #line 821
bi_tempfile(eval_environ_t env) bi_tempfile(eval_environ_t env)
#line 822 #line 821
#line 822 #line 821
#line 822 "io.bi" #line 821 "io.bi"
{ {
#line 822 #line 821
#line 822 #line 821
#line 822 #line 821
long __bi_argcnt; long __bi_argcnt;
#line 822 #line 821
char * MFL_DATASEG tempdir; char * MFL_DATASEG tempdir;
#line 822 #line 821
#line 822 #line 821
get_string_arg(env, 1, &tempdir); get_string_arg(env, 1, &tempdir);
#line 822 #line 821
#line 822 #line 821
get_numeric_arg(env, 0, &__bi_argcnt); get_numeric_arg(env, 0, &__bi_argcnt);
#line 822 #line 821
adjust_stack(env, __bi_argcnt + 1); adjust_stack(env, __bi_argcnt + 1);
#line 822 #line 821
#line 822 #line 821
#line 822 #line 821
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 822 #line 821
prog_trace(env, "tempfile %s",((__bi_argcnt > 0) ? tempdir : "")) ;; prog_trace(env, "tempfile %s",((__bi_argcnt > 0) ? tempdir : "")) ;;
#line 822 #line 821
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
int i; int i;
char *dir = ((__bi_argcnt > 0) ? tempdir : "/tmp"); char *dir = ((__bi_argcnt > 0) ? tempdir : "/tmp");
size_t dirlen = strlen(dir); size_t dirlen = strlen(dir);
mode_t u; mode_t u;
int fd; int fd;
char *template; char *template;
#define PATTERN "mfdXXXXXX" #define PATTERN "mfdXXXXXX"
for (i = 0; i < nstreams; i++) { for (i = 0; i < nstreams; i++) {
if (iotab[i].fd[0] == -1) if (iotab[i].fd[0] == -1)
break; break;
} }
if (!(i < nstreams)) if (!(i < nstreams))
#line 837 #line 836
( (
#line 837 #line 836
env_throw_bi(env, mfe_failure, "tempfile", _("no more files available")) env_throw_bi(env, mfe_failure, "tempfile", _("no more files available"))
#line 837 #line 836
) )
#line 839 #line 838
; ;
while (dirlen > 0 && dir[dirlen-1] == '/') while (dirlen > 0 && dir[dirlen-1] == '/')
dirlen--; dirlen--;
template = mf_c_val(heap_tempspace(env, (dirlen ? dirlen + 1 : 0) + template = mf_c_val(heap_tempspace(env, (dirlen ? dirlen + 1 : 0) +
#line 845 #line 844
sizeof(PATTERN)), ptr); sizeof(PATTERN)), ptr);
#line 847 #line 846
if (dirlen) { if (dirlen) {
memcpy(template, dir, dirlen); memcpy(template, dir, dirlen);
template[dirlen++] = '/'; template[dirlen++] = '/';
} }
strcpy(template + dirlen, PATTERN); strcpy(template + dirlen, PATTERN);
u = umask(077); u = umask(077);
fd = mkstemp(template); fd = mkstemp(template);
umask(u); umask(u);
if (!(fd >= 0)) if (!(fd >= 0))
#line 855 #line 854
( (
#line 855 #line 854
env_throw_bi(env, mfe_failure, "tempfile", "mkstemp failed: %s",mu_strerr or(errno)) env_throw_bi(env, mfe_failure, "tempfile", "mkstemp failed: %s",mu_strerr or(errno))
#line 855 #line 854
) )
#line 858 #line 857
; ;
unlink(template); unlink(template);
iotab[i].fd[0] = fd; iotab[i].fd[0] = fd;
#line 863 #line 862
do { do {
#line 863 #line 862
push(env, (STKVAL)(mft_number)(i)); push(env, (STKVAL)(mft_number)(i));
#line 863 #line 862
goto endlab; goto endlab;
#line 863 #line 862
} while (0); } while (0);
#undef PATTERN #undef PATTERN
} }
endlab: endlab:
#line 866 #line 865
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 866 #line 865
return; return;
#line 866 #line 865
} }
void void
#line 868 #line 867
bi_close(eval_environ_t env) bi_close(eval_environ_t env)
#line 868 #line 867
#line 868 #line 867
#line 868 "io.bi" #line 867 "io.bi"
{ {
#line 868 #line 867
#line 868 #line 867
#line 868 #line 867
#line 868 #line 867
long fd; long fd;
#line 868 #line 867
#line 868 #line 867
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 868 #line 867
#line 868 #line 867
#line 868 #line 867
adjust_stack(env, 1); adjust_stack(env, 1);
#line 868 #line 867
#line 868 #line 867
#line 868 #line 867
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 868 #line 867
prog_trace(env, "close %lu",fd);; prog_trace(env, "close %lu",fd);;
#line 868 #line 867
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
if (!(fd >= 0 && fd < nstreams)) if (!(fd >= 0 && fd < nstreams))
#line 872 #line 871
( (
#line 872 #line 871
env_throw_bi(env, mfe_range, "close", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "close", _("invalid file descriptor"))
#line 872 #line 871
) )
#line 874 #line 873
; ;
close_stream(&iotab[fd]); close_stream(&iotab[fd]);
} }
#line 877 #line 876
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 877 #line 876
return; return;
#line 877 #line 876
} }
static struct builtin_const_trans shutdown_modes[] = { static struct builtin_const_trans shutdown_modes[] = {
{ _MFL_SHUT_RD, SHUT_RD }, { _MFL_SHUT_RD, SHUT_RD },
{ _MFL_SHUT_WR, SHUT_WR }, { _MFL_SHUT_WR, SHUT_WR },
{ _MFL_SHUT_RDWR, SHUT_RDWR } { _MFL_SHUT_RDWR, SHUT_RDWR }
}; };
void void
#line 885 #line 884
bi_shutdown(eval_environ_t env) bi_shutdown(eval_environ_t env)
#line 885 #line 884
#line 885 #line 884
#line 885 "io.bi" #line 884 "io.bi"
{ {
#line 885 #line 884
#line 885 #line 884
#line 885 #line 884
#line 885 #line 884
long fd; long fd;
#line 885 #line 884
long how; long how;
#line 885 #line 884
#line 885 #line 884
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 885 #line 884
get_numeric_arg(env, 1, &how); get_numeric_arg(env, 1, &how);
#line 885 #line 884
#line 885 #line 884
#line 885 #line 884
adjust_stack(env, 2); adjust_stack(env, 2);
#line 885 #line 884
#line 885 #line 884
#line 885 #line 884
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 885 #line 884
prog_trace(env, "shutdown %lu %lu",fd, how);; prog_trace(env, "shutdown %lu %lu",fd, how);;
#line 885 #line 884
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
struct io_stream *ioptr; struct io_stream *ioptr;
int mode; int mode;
if (!(fd >= 0 && fd < nstreams)) if (!(fd >= 0 && fd < nstreams))
#line 891 #line 890
( (
#line 891 #line 890
env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor"))
#line 891 #line 890
) )
#line 893 #line 892
; ;
if (!(how >= 0 && how <= 2)) if (!(how >= 0 && how <= 2))
#line 894 #line 893
( (
#line 894 #line 893
env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor"))
#line 894 #line 893
) )
#line 896 #line 895
; ;
if (!(_builtin_const_to_c(shutdown_modes, if (!(_builtin_const_to_c(shutdown_modes,
#line 897 #line 896
MU_ARRAY_SIZE(shutdown_modes), MU_ARRAY_SIZE(shutdown_modes),
#line 897 #line 896
how, how,
#line 897 #line 896
&mode) == 0)) &mode) == 0))
#line 897 #line 896
( (
#line 897 #line 896
env_throw_bi(env, mfe_failure, "shutdown", "bad shutdown mode") env_throw_bi(env, mfe_failure, "shutdown", "bad shutdown mode")
#line 897 #line 896
) )
#line 902 #line 901
; ;
ioptr = &iotab[fd]; ioptr = &iotab[fd];
if (ioptr->shutdown) { if (ioptr->shutdown) {
int rc = ioptr->shutdown(ioptr, mode); int rc = ioptr->shutdown(ioptr, mode);
if (!(rc == 0)) if (!(rc == 0))
#line 907 #line 906
( (
#line 907 #line 906
env_throw_bi(env, mfe_io, "shutdown", "shutdown failed: %s",mu_strerror(r c)) env_throw_bi(env, mfe_io, "shutdown", "shutdown failed: %s",mu_strerror(r c))
#line 907 #line 906
) )
#line 910 #line 909
; ;
} else if (how == 2) } else if (how == 2)
close_stream(ioptr); close_stream(ioptr);
else if (ioptr->fd[how]) { else if (ioptr->fd[how]) {
close(ioptr->fd[how]); close(ioptr->fd[how]);
ioptr->fd[how] = -1; ioptr->fd[how] = -1;
} }
} }
#line 918 #line 917
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 918 #line 917
return; return;
#line 918 #line 917
} }
void void
#line 920 #line 919
bi_write(eval_environ_t env) bi_write(eval_environ_t env)
#line 920 #line 919
#line 920 #line 919
#line 920 "io.bi" #line 919 "io.bi"
{ {
#line 920 #line 919
#line 920 #line 919
#line 920 #line 919
long __bi_argcnt; long __bi_argcnt;
#line 920 #line 919
long fd; long fd;
#line 920 #line 919
char * str; char * str;
#line 920 #line 919
long n; long n;
#line 920 #line 919
#line 920 #line 919
get_numeric_arg(env, 1, &fd); get_numeric_arg(env, 1, &fd);
#line 920 #line 919
get_string_arg(env, 2, &str); get_string_arg(env, 2, &str);
#line 920 #line 919
get_numeric_arg(env, 3, &n); get_numeric_arg(env, 3, &n);
#line 920 #line 919
#line 920 #line 919
get_numeric_arg(env, 0, &__bi_argcnt); get_numeric_arg(env, 0, &__bi_argcnt);
#line 920 #line 919
adjust_stack(env, __bi_argcnt + 1); adjust_stack(env, __bi_argcnt + 1);
#line 920 #line 919
#line 920 #line 919
#line 920 #line 919
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 920 #line 919
prog_trace(env, "write %lu %s %lu",fd, str, ((__bi_argcnt > 2) ? n : 0));; prog_trace(env, "write %lu %s %lu",fd, str, ((__bi_argcnt > 2) ? n : 0));;
#line 920 #line 919
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
int rc; int rc;
#line 925 #line 924
#line 925 #line 924
mu_debug(debug_handle, MU_DEBUG_TRACE1,("writing %s to %lu", str, fd)); mu_debug(debug_handle, MU_DEBUG_TRACE1,("writing %s to %lu", str, fd));
if (!(fd >= 0 && fd < nstreams && OFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && OFD(iotab[fd]) != -1))
#line 926 #line 925
( (
#line 926 #line 925
env_throw_bi(env, mfe_range, "write", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "write", _("invalid file descriptor"))
#line 926 #line 925
) )
#line 928 #line 927
; ;
if (!(__bi_argcnt > 2)) if (!(__bi_argcnt > 2))
n = strlen (str); n = strlen (str);
rc = write(OFD(iotab[fd]), str, n); rc = write(OFD(iotab[fd]), str, n);
if (!(n == rc)) if (!(n == rc))
#line 932 #line 931
( (
#line 932 #line 931
env_throw_bi(env, mfe_io, "write", _("write error on %s: %s"),iotab[fd].n ame,mu_strerror(errno)) env_throw_bi(env, mfe_io, "write", _("write error on %s: %s"),iotab[fd].n ame,mu_strerror(errno))
#line 932 #line 931
) )
#line 935 #line 934
; ;
} }
#line 937 #line 936
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 937 #line 936
return; return;
#line 937 #line 936
} }
void void
#line 940 #line 939
bi_write_body(eval_environ_t env) bi_write_body(eval_environ_t env)
#line 940 #line 939
#line 940 #line 939
#line 940 "io.bi" #line 939 "io.bi"
{ {
#line 940 #line 939
#line 940 #line 939
#line 940 #line 939
#line 940 #line 939
long fd; long fd;
#line 940 #line 939
void * str; void * str;
#line 940 #line 939
long n; long n;
#line 940 #line 939
#line 940 #line 939
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 940 #line 939
get_pointer_arg(env, 1, &str); get_pointer_arg(env, 1, &str);
#line 940 #line 939
get_numeric_arg(env, 2, &n); get_numeric_arg(env, 2, &n);
#line 940 #line 939
#line 940 #line 939
#line 940 #line 939
adjust_stack(env, 3); adjust_stack(env, 3);
#line 940 #line 939
#line 940 #line 939
#line 940 #line 939
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 940 #line 939
prog_trace(env, "write_body %lu %p %lu",fd, str, n);; prog_trace(env, "write_body %lu %p %lu",fd, str, n);;
#line 940 #line 939
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
int rc; int rc;
if (!(fd >= 0 && fd < nstreams && OFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && OFD(iotab[fd]) != -1))
#line 945 #line 944
( (
#line 945 #line 944
env_throw_bi(env, mfe_range, "write_body", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "write_body", _("invalid file descriptor"))
#line 945 #line 944
) )
#line 947 #line 946
; ;
rc = write(OFD(iotab[fd]), str, n); rc = write(OFD(iotab[fd]), str, n);
if (!(n == rc)) if (!(n == rc))
#line 949 #line 948
( (
#line 949 #line 948
env_throw_bi(env, mfe_io, "write_body", _("write error on %s: %s"),iotab[ fd].name,mu_strerror(errno)) env_throw_bi(env, mfe_io, "write_body", _("write error on %s: %s"),iotab[ fd].name,mu_strerror(errno))
#line 949 #line 948
) )
#line 952 #line 951
; ;
} }
#line 954 #line 953
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 954 #line 953
return; return;
#line 954 #line 953
} }
void void
#line 956 #line 955
bi_read(eval_environ_t env) bi_read(eval_environ_t env)
#line 956 #line 955
#line 956 #line 955
#line 956 "io.bi" #line 955 "io.bi"
{ {
#line 956 #line 955
#line 956 #line 955
#line 956 #line 955
#line 956 #line 955
long fd; long fd;
#line 956 #line 955
long size; long size;
#line 956 #line 955
#line 956 #line 955
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 956 #line 955
get_numeric_arg(env, 1, &size); get_numeric_arg(env, 1, &size);
#line 956 #line 955
#line 956 #line 955
#line 956 #line 955
adjust_stack(env, 2); adjust_stack(env, 2);
#line 956 #line 955
#line 956 #line 955
#line 956 #line 955
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 956 #line 955
prog_trace(env, "read %lu %lu",fd, size);; prog_trace(env, "read %lu %lu",fd, size);;
#line 956 #line 955
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
int rc; int rc;
size_t off; size_t off;
char *s = (char*) env_data_ref(env, (off = heap_reserve(env, size + 1))); char *s = (char*) env_data_ref(env, (off = heap_reserve(env, size + 1)));
if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1))
#line 963 #line 962
( (
#line 963 #line 962
env_throw_bi(env, mfe_range, "read", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "read", _("invalid file descriptor"))
#line 963 #line 962
) )
#line 965 #line 964
; ;
rc = read(IFD(iotab[fd]), s, size); rc = read(IFD(iotab[fd]), s, size);
if (rc == 0) if (rc == 0)
( (
#line 969 #line 968
env_throw_bi(env, mfe_eof, "read", _("EOF on %s"),iotab[fd].name) env_throw_bi(env, mfe_eof, "read", _("EOF on %s"),iotab[fd].name)
#line 969 #line 968
); );
#line 971 #line 970
if (!(rc == size)) if (!(rc == size))
#line 971 #line 970
( (
#line 971 #line 970
env_throw_bi(env, mfe_io, "read", _("read error on %s: %s"),iotab[fd].nam e,mu_strerror(errno)) env_throw_bi(env, mfe_io, "read", _("read error on %s: %s"),iotab[fd].nam e,mu_strerror(errno))
#line 971 #line 970
) )
#line 974 #line 973
; ;
s[size] = 0; s[size] = 0;
#line 976 #line 975
do { do {
#line 976 #line 975
push(env, (STKVAL) (mft_size) (off)); push(env, (STKVAL) (mft_size) (off));
#line 976 #line 975
goto endlab; goto endlab;
#line 976 #line 975
} while (0); } while (0);
} }
endlab: endlab:
#line 978 #line 977
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 978 #line 977
return; return;
#line 978 #line 977
} }
void void
#line 980 #line 979
bi_rewind(eval_environ_t env) bi_rewind(eval_environ_t env)
#line 980 #line 979
#line 980 #line 979
#line 980 "io.bi" #line 979 "io.bi"
{ {
#line 980 #line 979
#line 980 #line 979
#line 980 #line 979
#line 980 #line 979
long fd; long fd;
#line 980 #line 979
#line 980 #line 979
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 980 #line 979
#line 980 #line 979
#line 980 #line 979
adjust_stack(env, 1); adjust_stack(env, 1);
#line 980 #line 979
#line 980 #line 979
#line 980 #line 979
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 980 #line 979
prog_trace(env, "rewind %lu",fd);; prog_trace(env, "rewind %lu",fd);;
#line 980 #line 979
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1))
#line 984 #line 983
( (
#line 984 #line 983
env_throw_bi(env, mfe_range, "rewind", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "rewind", _("invalid file descriptor"))
#line 984 #line 983
) )
#line 986 #line 985
; ;
if (lseek(IFD(iotab[fd]), 0, SEEK_SET) == -1) if (lseek(IFD(iotab[fd]), 0, SEEK_SET) == -1)
( (
#line 988 #line 987
env_throw_bi(env, mfe_io, "rewind", "seek failed: %s",mu_strerror(errno)) env_throw_bi(env, mfe_io, "rewind", "seek failed: %s",mu_strerror(errno))
#line 988 #line 987
); );
#line 991 #line 990
} }
#line 992 #line 991
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 992 #line 991
return; return;
#line 992 #line 991
} }
#define MINBUFSIZE 128 #define MINBUFSIZE 128
#define MAXBUFSIZE 65535 #define MAXBUFSIZE 65535
void void
#line 998 #line 997
bi_copy(eval_environ_t env) bi_copy(eval_environ_t env)
#line 998 #line 997
#line 998 #line 997
#line 998 "io.bi" #line 997 "io.bi"
{ {
#line 998 #line 997
#line 998 #line 997
#line 998 #line 997
#line 998 #line 997
long dst; long dst;
#line 998 #line 997
long src; long src;
#line 998 #line 997
#line 998 #line 997
get_numeric_arg(env, 0, &dst); get_numeric_arg(env, 0, &dst);
#line 998 #line 997
get_numeric_arg(env, 1, &src); get_numeric_arg(env, 1, &src);
#line 998 #line 997
#line 998 #line 997
#line 998 #line 997
adjust_stack(env, 2); adjust_stack(env, 2);
#line 998 #line 997
#line 998 #line 997
#line 998 #line 997
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 998 #line 997
prog_trace(env, "copy %lu %lu",dst, src);; prog_trace(env, "copy %lu %lu",dst, src);;
#line 998 #line 997
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
int ifd, ofd; int ifd, ofd;
char *buffer; char *buffer;
size_t bufsize = MAXBUFSIZE; size_t bufsize = MAXBUFSIZE;
char bs[MINBUFSIZE]; char bs[MINBUFSIZE];
off_t cur, end; off_t cur, end;
size_t total = 0; size_t total = 0;
ssize_t rdbytes; ssize_t rdbytes;
if (!(src >= 0 && src < nstreams && (ifd = IFD(iotab[src])) != -1 )) if (!(src >= 0 && src < nstreams && (ifd = IFD(iotab[src])) != -1 ))
#line 1009 #line 1008
( (
#line 1009 #line 1008
env_throw_bi(env, mfe_range, "copy", _("invalid source file descriptor")) env_throw_bi(env, mfe_range, "copy", _("invalid source file descriptor"))
#line 1009 #line 1008
) )
#line 1011 #line 1010
; ;
if (!(dst >= 0 && dst < nstreams && (ofd = OFD(iotab[dst])) != -1 )) if (!(dst >= 0 && dst < nstreams && (ofd = OFD(iotab[dst])) != -1 ))
#line 1012 #line 1011
( (
#line 1012 #line 1011
env_throw_bi(env, mfe_range, "copy", _("invalid destination file descript or")) env_throw_bi(env, mfe_range, "copy", _("invalid destination file descript or"))
#line 1012 #line 1011
) )
#line 1014 #line 1013
; ;
cur = lseek (ifd, 0, SEEK_CUR); cur = lseek (ifd, 0, SEEK_CUR);
if (cur != -1) { if (cur != -1) {
end = lseek (ifd, 0, SEEK_END); end = lseek (ifd, 0, SEEK_END);
if (end != -1) { if (end != -1) {
if (end < MAXBUFSIZE) if (end < MAXBUFSIZE)
bufsize = end; bufsize = end;
lseek (ifd, cur, SEEK_SET); lseek (ifd, cur, SEEK_SET);
} }
skipping to change at line 1780 skipping to change at line 1779
} }
while ((rdbytes = read(ifd, buffer, bufsize)) > 0) { while ((rdbytes = read(ifd, buffer, bufsize)) > 0) {
char *p = buffer; char *p = buffer;
while (rdbytes) { while (rdbytes) {
ssize_t wrbytes = write(ofd, p, rdbytes); ssize_t wrbytes = write(ofd, p, rdbytes);
if (wrbytes == -1) { if (wrbytes == -1) {
if (buffer != bs) if (buffer != bs)
free(buffer); free(buffer);
( (
#line 1040 #line 1039
env_throw_bi(env, mfe_io, "copy", "write error: %s",mu_strerror(errno)) env_throw_bi(env, mfe_io, "copy", "write error: %s",mu_strerror(errno))
#line 1040 #line 1039
); );
#line 1043 #line 1042
} else if (wrbytes == 0) { } else if (wrbytes == 0) {
if (buffer != bs) if (buffer != bs)
free(buffer); free(buffer);
( (
#line 1046 #line 1045
env_throw_bi(env, mfe_io, "copy", "short write") env_throw_bi(env, mfe_io, "copy", "short write")
#line 1046 #line 1045
); );
#line 1048 #line 1047
} }
p += wrbytes; p += wrbytes;
rdbytes -= wrbytes; rdbytes -= wrbytes;
total += wrbytes; total += wrbytes;
} }
} }
if (buffer != bs) if (buffer != bs)
free(buffer); free(buffer);
#line 1056 #line 1055
do { do {
#line 1056 #line 1055
push(env, (STKVAL)(mft_number)(total)); push(env, (STKVAL)(mft_number)(total));
#line 1056 #line 1055
goto endlab; goto endlab;
#line 1056 #line 1055
} while (0); } while (0);
} }
endlab: endlab:
#line 1058 #line 1057
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1058 #line 1057
return; return;
#line 1058 #line 1057
} }
void void
#line 1060 #line 1059
bi_getdelim(eval_environ_t env) bi_getdelim(eval_environ_t env)
#line 1060 #line 1059
#line 1060 #line 1059
#line 1060 "io.bi" #line 1059 "io.bi"
{ {
#line 1060 #line 1059
#line 1060 #line 1059
#line 1060 #line 1059
#line 1060 #line 1059
long fd; long fd;
#line 1060 #line 1059
char * MFL_DATASEG delim; char * MFL_DATASEG delim;
#line 1060 #line 1059
#line 1060 #line 1059
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1060 #line 1059
get_string_arg(env, 1, &delim); get_string_arg(env, 1, &delim);
#line 1060 #line 1059
#line 1060 #line 1059
#line 1060 #line 1059
adjust_stack(env, 2); adjust_stack(env, 2);
#line 1060 #line 1059
#line 1060 #line 1059
#line 1060 #line 1059
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1060 #line 1059
prog_trace(env, "getdelim %lu %s",fd, delim);; prog_trace(env, "getdelim %lu %s",fd, delim);;
#line 1060 #line 1059
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
struct io_stream *ioptr; struct io_stream *ioptr;
int rc; int rc;
if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1))
#line 1066 #line 1065
( (
#line 1066 #line 1065
env_throw_bi(env, mfe_range, "getdelim", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "getdelim", _("invalid file descriptor"))
#line 1066 #line 1065
) )
#line 1068 #line 1067
; ;
ioptr = &iotab[fd]; ioptr = &iotab[fd];
rc = read_stream_delim(ioptr, delim); rc = read_stream_delim(ioptr, delim);
if (rc == 0) if (rc == 0)
( (
#line 1072 #line 1071
env_throw_bi(env, mfe_eof, "getdelim", _("EOF on %s"),ioptr->name) env_throw_bi(env, mfe_eof, "getdelim", _("EOF on %s"),ioptr->name)
#line 1072 #line 1071
); );
if (!(rc > 0)) if (!(rc > 0))
#line 1073 #line 1072
( (
#line 1073 #line 1072
env_throw_bi(env, mfe_io, "getdelim", _("read error on %s: %s"),ioptr->na me,mu_strerror(errno)) env_throw_bi(env, mfe_io, "getdelim", _("read error on %s: %s"),ioptr->na me,mu_strerror(errno))
#line 1073 #line 1072
) )
#line 1076 #line 1075
; ;
#line 1077 #line 1076
do { do {
#line 1077 #line 1076
pushs(env, ioptr->buf); pushs(env, ioptr->buf);
#line 1077 #line 1076
goto endlab; goto endlab;
#line 1077 #line 1076
} while (0); } while (0);
} }
endlab: endlab:
#line 1079 #line 1078
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1079 #line 1078
return; return;
#line 1079 #line 1078
} }
void void
#line 1081 #line 1080
bi_getline(eval_environ_t env) bi_getline(eval_environ_t env)
#line 1081 #line 1080
#line 1081 #line 1080
#line 1081 "io.bi" #line 1080 "io.bi"
{ {
#line 1081 #line 1080
#line 1081 #line 1080
#line 1081 #line 1080
#line 1081 #line 1080
long fd; long fd;
#line 1081 #line 1080
#line 1081 #line 1080
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1081 #line 1080
#line 1081 #line 1080
#line 1081 #line 1080
adjust_stack(env, 1); adjust_stack(env, 1);
#line 1081 #line 1080
#line 1081 #line 1080
#line 1081 #line 1080
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1081 #line 1080
prog_trace(env, "getline %lu",fd);; prog_trace(env, "getline %lu",fd);;
#line 1081 #line 1080
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
struct io_stream *ioptr; struct io_stream *ioptr;
int rc; int rc;
if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1))
#line 1087 #line 1086
( (
#line 1087 #line 1086
env_throw_bi(env, mfe_range, "getline", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "getline", _("invalid file descriptor"))
#line 1087 #line 1086
) )
#line 1089 #line 1088
; ;
ioptr = &iotab[fd]; ioptr = &iotab[fd];
rc = read_stream_delim(ioptr, ioptr->delim ? ioptr->delim : "\n"); rc = read_stream_delim(ioptr, ioptr->delim ? ioptr->delim : "\n");
if (rc == 0) if (rc == 0)
( (
#line 1093 #line 1092
env_throw_bi(env, mfe_eof, "getline", _("EOF on %s"),ioptr->name) env_throw_bi(env, mfe_eof, "getline", _("EOF on %s"),ioptr->name)
#line 1093 #line 1092
); );
#line 1095 #line 1094
if (!(rc > 0)) if (!(rc > 0))
#line 1095 #line 1094
( (
#line 1095 #line 1094
env_throw_bi(env, mfe_io, "getline", _("read error on %s: %s"),ioptr->nam e,mu_strerror(errno)) env_throw_bi(env, mfe_io, "getline", _("read error on %s: %s"),ioptr->nam e,mu_strerror(errno))
#line 1095 #line 1094
) )
#line 1098 #line 1097
; ;
#line 1099 #line 1098
do { do {
#line 1099 #line 1098
pushs(env, ioptr->buf); pushs(env, ioptr->buf);
#line 1099 #line 1098
goto endlab; goto endlab;
#line 1099 #line 1098
} while (0); } while (0);
} }
endlab: endlab:
#line 1101 #line 1100
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1101 #line 1100
return; return;
#line 1101 #line 1100
} }
void void
#line 1103 #line 1102
bi_fd_set_delimiter(eval_environ_t env) bi_fd_set_delimiter(eval_environ_t env)
#line 1103 #line 1102
#line 1103 #line 1102
#line 1103 "io.bi" #line 1102 "io.bi"
{ {
#line 1103 #line 1102
#line 1103 #line 1102
#line 1103 #line 1102
#line 1103 #line 1102
long fd; long fd;
#line 1103 #line 1102
char * delim; char * delim;
#line 1103 #line 1102
#line 1103 #line 1102
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1103 #line 1102
get_string_arg(env, 1, &delim); get_string_arg(env, 1, &delim);
#line 1103 #line 1102
#line 1103 #line 1102
#line 1103 #line 1102
adjust_stack(env, 2); adjust_stack(env, 2);
#line 1103 #line 1102
#line 1103 #line 1102
#line 1103 #line 1102
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1103 #line 1102
prog_trace(env, "fd_set_delimiter %lu %s",fd, delim);; prog_trace(env, "fd_set_delimiter %lu %s",fd, delim);;
#line 1103 #line 1102
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
struct io_stream *ioptr; struct io_stream *ioptr;
if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1))
#line 1108 #line 1107
( (
#line 1108 #line 1107
env_throw_bi(env, mfe_range, "fd_set_delimiter", _("invalid file descript or")) env_throw_bi(env, mfe_range, "fd_set_delimiter", _("invalid file descript or"))
#line 1108 #line 1107
) )
#line 1110 #line 1109
; ;
ioptr = &iotab[fd]; ioptr = &iotab[fd];
free(ioptr->delim); free(ioptr->delim);
ioptr->delim = mu_strdup(delim); ioptr->delim = mu_strdup(delim);
} }
#line 1115 #line 1114
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1115 #line 1114
return; return;
#line 1115 #line 1114
} }
void void
#line 1117 #line 1116
bi_fd_delimiter(eval_environ_t env) bi_fd_delimiter(eval_environ_t env)
#line 1117 #line 1116
#line 1117 #line 1116
#line 1117 "io.bi" #line 1116 "io.bi"
{ {
#line 1117 #line 1116
#line 1117 #line 1116
#line 1117 #line 1116
#line 1117 #line 1116
long fd; long fd;
#line 1117 #line 1116
char * MFL_DATASEG delim; char * MFL_DATASEG delim;
#line 1117 #line 1116
#line 1117 #line 1116
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1117 #line 1116
get_string_arg(env, 1, &delim); get_string_arg(env, 1, &delim);
#line 1117 #line 1116
#line 1117 #line 1116
#line 1117 #line 1116
adjust_stack(env, 2); adjust_stack(env, 2);
#line 1117 #line 1116
#line 1117 #line 1116
#line 1117 #line 1116
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1117 #line 1116
prog_trace(env, "fd_delimiter %lu %s",fd, delim);; prog_trace(env, "fd_delimiter %lu %s",fd, delim);;
#line 1117 #line 1116
{ {
struct io_stream *iotab = env_get_builtin_priv(env,IO_id); struct io_stream *iotab = env_get_builtin_priv(env,IO_id);
struct io_stream *ioptr; struct io_stream *ioptr;
if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1)) if (!(fd >= 0 && fd < nstreams && IFD(iotab[fd]) != -1))
#line 1122 #line 1121
( (
#line 1122 #line 1121
env_throw_bi(env, mfe_range, "fd_delimiter", _("invalid file descriptor") ) env_throw_bi(env, mfe_range, "fd_delimiter", _("invalid file descriptor") )
#line 1122 #line 1121
) )
#line 1124 #line 1123
; ;
ioptr = &iotab[fd]; ioptr = &iotab[fd];
#line 1126 #line 1125
do { do {
#line 1126 #line 1125
pushs(env, ioptr->delim ? ioptr->delim : "\n"); pushs(env, ioptr->delim ? ioptr->delim : "\n");
#line 1126 #line 1125
goto endlab; goto endlab;
#line 1126 #line 1125
} while (0); } while (0);
} }
endlab: endlab:
#line 1128 #line 1127
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1128 #line 1127
return; return;
#line 1128 #line 1127
} }
#line 982 "../../src/builtin/snarf.m4" #line 982 "../../src/builtin/snarf.m4"
#line 982 #line 982
#line 982 #line 982
#line 982 #line 982
void void
#line 982 #line 982
io_init_builtin(void) io_init_builtin(void)
#line 982 #line 982
{ {
#line 982 #line 982
debug_handle = mu_debug_register_category("bi_io"); debug_handle = mu_debug_register_category("bi_io");
#line 982 #line 982
#line 982 #line 982
#line 684 "io.bi" #line 683 "io.bi"
IO_id = builtin_priv_register(alloc_streams, destroy_streams, IO_id = builtin_priv_register(alloc_streams, destroy_streams,
#line 684 #line 683
NULL); NULL);
#line 703 "io.bi" #line 702 "io.bi"
va_builtin_install_ex("open", bi_open, 0, dtype_number, 1, 0, 0|0, dtype_string) ; va_builtin_install_ex("open", bi_open, 0, dtype_number, 1, 0, 0|0, dtype_string) ;
#line 762 "io.bi" #line 761 "io.bi"
va_builtin_install_ex("spawn", bi_spawn, 0, dtype_number, 4, 3, 0|0, dtype_strin g, dtype_number, dtype_number, dtype_number); va_builtin_install_ex("spawn", bi_spawn, 0, dtype_number, 4, 3, 0|0, dtype_strin g, dtype_number, dtype_number, dtype_number);
#line 822 "io.bi" #line 821 "io.bi"
va_builtin_install_ex("tempfile", bi_tempfile, 0, dtype_number, 1, 1, 0|0, dtype _string); va_builtin_install_ex("tempfile", bi_tempfile, 0, dtype_number, 1, 1, 0|0, dtype _string);
#line 868 "io.bi" #line 867 "io.bi"
va_builtin_install_ex("close", bi_close, 0, dtype_unspecified, 1, 0, 0|0, dtype_ number); va_builtin_install_ex("close", bi_close, 0, dtype_unspecified, 1, 0, 0|0, dtype_ number);
#line 885 "io.bi" #line 884 "io.bi"
va_builtin_install_ex("shutdown", bi_shutdown, 0, dtype_unspecified, 2, 0, 0|0, dtype_number, dtype_number); va_builtin_install_ex("shutdown", bi_shutdown, 0, dtype_unspecified, 2, 0, 0|0, dtype_number, dtype_number);
#line 920 "io.bi" #line 919 "io.bi"
va_builtin_install_ex("write", bi_write, 0, dtype_unspecified, 3, 1, 0|0, dtype_ number, dtype_string, dtype_number); va_builtin_install_ex("write", bi_write, 0, dtype_unspecified, 3, 1, 0|0, dtype_ number, dtype_string, dtype_number);
#line 940 "io.bi" #line 939 "io.bi"
va_builtin_install_ex("write_body", bi_write_body, STATMASK(smtp_state_body), dt ype_unspecified, 3, 0, 0|0, dtype_number, dtype_pointer, dtype_number); va_builtin_install_ex("write_body", bi_write_body, STATMASK(smtp_state_body), dt ype_unspecified, 3, 0, 0|0, dtype_number, dtype_pointer, dtype_number);
#line 956 "io.bi" #line 955 "io.bi"
va_builtin_install_ex("read", bi_read, 0, dtype_string, 2, 0, 0|0, dtype_number, dtype_number); va_builtin_install_ex("read", bi_read, 0, dtype_string, 2, 0, 0|0, dtype_number, dtype_number);
#line 980 "io.bi" #line 979 "io.bi"
va_builtin_install_ex("rewind", bi_rewind, 0, dtype_unspecified, 1, 0, 0|0, dtyp e_number); va_builtin_install_ex("rewind", bi_rewind, 0, dtype_unspecified, 1, 0, 0|0, dtyp e_number);
#line 998 "io.bi" #line 997 "io.bi"
va_builtin_install_ex("copy", bi_copy, 0, dtype_number, 2, 0, 0|0, dtype_number, dtype_number); va_builtin_install_ex("copy", bi_copy, 0, dtype_number, 2, 0, 0|0, dtype_number, dtype_number);
#line 1060 "io.bi" #line 1059 "io.bi"
va_builtin_install_ex("getdelim", bi_getdelim, 0, dtype_string, 2, 0, 0|0, dtype _number, dtype_string); va_builtin_install_ex("getdelim", bi_getdelim, 0, dtype_string, 2, 0, 0|0, dtype _number, dtype_string);
#line 1081 "io.bi" #line 1080 "io.bi"
va_builtin_install_ex("getline", bi_getline, 0, dtype_string, 1, 0, 0|0, dtype_n umber); va_builtin_install_ex("getline", bi_getline, 0, dtype_string, 1, 0, 0|0, dtype_n umber);
#line 1103 "io.bi" #line 1102 "io.bi"
va_builtin_install_ex("fd_set_delimiter", bi_fd_set_delimiter, 0, dtype_unspecif ied, 2, 0, 0|0, dtype_number, dtype_string); va_builtin_install_ex("fd_set_delimiter", bi_fd_set_delimiter, 0, dtype_unspecif ied, 2, 0, 0|0, dtype_number, dtype_string);
#line 1117 "io.bi" #line 1116 "io.bi"
va_builtin_install_ex("fd_delimiter", bi_fd_delimiter, 0, dtype_string, 2, 0, 0| 0, dtype_number, dtype_string); va_builtin_install_ex("fd_delimiter", bi_fd_delimiter, 0, dtype_string, 2, 0, 0| 0, dtype_number, dtype_string);
#line 982 "../../src/builtin/snarf.m4" #line 982 "../../src/builtin/snarf.m4"
#line 982 #line 982
mf_add_runtime_params(io_cfg_param); mf_add_runtime_params(io_cfg_param);
#line 982 #line 982
#line 982 #line 982
} }
 End of changes. 585 change blocks. 
585 lines changed or deleted 584 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)