"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/builtin/io.c" between
mailfromd-8.11.tar.xz and mailfromd-8.12.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.11.tar.xz):io.c  (mailfromd-8.12.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 179 "io.bi" #line 182 "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 133 skipping to change at line 133
for (;;) { for (;;) {
if (str->bufsize == i) { if (str->bufsize == i) {
if (str->bufsize == 0) if (str->bufsize == 0)
str->bufsize = 16; str->bufsize = 16;
str->buf = mu_2nrealloc(str->buf, &str->bufsize, str->buf = mu_2nrealloc(str->buf, &str->bufsize,
sizeof str->buf[1]); sizeof str->buf[1]);
} }
rc = read(fd, str->buf + i, 1); rc = read(fd, str->buf + i, 1);
if (rc == -1) if (rc == -1)
return -1; return -1;
else if (rc == 0) else if (rc == 0) {
return 0; if (i > 0)
str->buf[i] = 0;
break;
}
i++; i++;
if (i >= delim_len && if (i >= delim_len &&
memcmp(str->buf + i - delim_len, delim, delim_len) == 0) { memcmp(str->buf + i - delim_len, delim, delim_len) == 0) {
str->buf[i - delim_len] = 0; str->buf[i - delim_len] = 0;
break; break;
} }
} }
return i; return i;
} }
skipping to change at line 208 skipping to change at line 211
} }
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 179 "io.bi" #line 182 "io.bi"
#line 179 #line 182
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 183 #line 186
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 266 skipping to change at line 269
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 233 #line 236
#line 233 #line 236
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 354 skipping to change at line 357
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 318 #line 321
env_throw_bi(env, mfe_failure, NULL, "pipe failed") env_throw_bi(env, mfe_failure, NULL, "pipe failed")
#line 318 #line 321
); );
} }
} }
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 402 skipping to change at line 405
} }
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 363 #line 366
#line 363 #line 366
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 492 skipping to change at line 495
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 453 #line 456
( (
#line 453 #line 456
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 453 #line 456
) )
#line 457 #line 460
; ;
if (!(strlen(path) <= sizeof addr.s_un.sun_path)) if (!(strlen(path) <= sizeof addr.s_un.sun_path))
#line 459 #line 462
( (
#line 459 #line 462
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 459
)
#line 462 #line 462
)
#line 465
; ;
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 469 #line 472
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 469
);
#line 472 #line 472
);
#line 475
} else { } else {
/* FIXME: Check permissions? */ /* FIXME: Check permissions? */
if (!(S_ISSOCK(st.st_mode))) if (!(S_ISSOCK(st.st_mode)))
#line 474 #line 477
( (
#line 474 #line 477
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 474
)
#line 477 #line 477
)
#line 480
; ;
} }
} 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 488 #line 491
( (
#line 488 #line 491
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 488 #line 491
) )
#line 492 #line 495
; ;
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 496 #line 499
( (
#line 496 #line 499
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 496 #line 499
) )
#line 500 #line 503
; ;
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 505 #line 508
( (
#line 505 #line 508
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 505 #line 508
) )
#line 509 #line 512
; ;
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 517 #line 520
( (
#line 517 #line 520
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 517
)
#line 520 #line 520
)
#line 523
; ;
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 529 #line 532
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 529 #line 532
); );
#line 533 #line 536
} }
} }
#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 540 #line 543
( (
#line 540 #line 543
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 540 #line 543
) )
#line 544 #line 547
; ;
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 559 #line 562
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 559
);
#line 562 #line 562
);
#line 565
case EAI_BADFLAGS: case EAI_BADFLAGS:
case EAI_SOCKTYPE: case EAI_SOCKTYPE:
( (
#line 565 #line 568
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 565
);
#line 568 #line 568
);
#line 571
case EAI_MEMORY: case EAI_MEMORY:
mu_alloc_die(); mu_alloc_die();
default: default:
( (
#line 573 #line 576
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 573
);
#line 576 #line 576
);
#line 579
} }
socklen = res->ai_addrlen; socklen = res->ai_addrlen;
if (socklen > sizeof(addr)) { if (socklen > sizeof(addr)) {
freeaddrinfo(res); freeaddrinfo(res);
( (
#line 581 #line 584
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 581 #line 584
); );
#line 585 #line 588
} }
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 590 #line 593
env_throw_bi(env, mfe_range, NULL, _("unsupported protocol: %s"),proto) env_throw_bi(env, mfe_range, NULL, _("unsupported protocol: %s"),proto)
#line 590
);
#line 593 #line 593
);
#line 596
} }
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 596 #line 599
( (
#line 596 #line 599
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 596
)
#line 599 #line 599
)
#line 602
; ;
/* 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 606 #line 609
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 606
);
#line 609 #line 609
);
#line 612
} }
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 787 skipping to change at line 790
{ {
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 683 #line 686
#line 683 #line 686
static int IO_id; static int IO_id;
#line 683 "io.bi" #line 686 "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 691 #line 694
( (
#line 691 #line 694
env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor")) env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor"))
#line 691 #line 694
) )
#line 693 #line 696
; ;
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 695 #line 698
( (
#line 695 #line 698
env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor")) env_throw_bi(env, mfe_range, NULL, _("invalid file descriptor"))
#line 695 #line 698
) )
#line 697 #line 700
; ;
return descr; return descr;
} }
void void
#line 702 #line 705
bi_open(eval_environ_t env) bi_open(eval_environ_t env)
#line 702 #line 705
#line 702 #line 705
#line 702 "io.bi" #line 705 "io.bi"
{ {
#line 702 #line 705
#line 702 #line 705
#line 702 #line 705
#line 702 #line 705
char * name; char * name;
#line 702 #line 705
#line 702 #line 705
get_string_arg(env, 0, &name); get_string_arg(env, 0, &name);
#line 702 #line 705
#line 702 #line 705
#line 702 #line 705
adjust_stack(env, 1); adjust_stack(env, 1);
#line 702 #line 705
#line 702 #line 705
#line 702 #line 705
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 702 #line 705
prog_trace(env, "open %s",name);; prog_trace(env, "open %s",name);;
#line 702 #line 705
{ {
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 714 #line 717
( (
#line 714 #line 717
env_throw_bi(env, mfe_failure, "open", _("no more files available")) env_throw_bi(env, mfe_failure, "open", _("no more files available"))
#line 714 #line 717
) )
#line 716 #line 719
; ;
#line 718 #line 721
#line 718 #line 721
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 916 skipping to change at line 919
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 752 #line 755
( (
#line 752 #line 755
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 752
)
#line 755 #line 755
)
#line 758
; ;
#line 756 #line 759
#line 756 #line 759
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 757 #line 760
do { do {
#line 757 #line 760
push(env, (STKVAL)(mft_number)(i)); push(env, (STKVAL)(mft_number)(i));
#line 757 #line 760
goto endlab; goto endlab;
#line 757 #line 760
} while (0); } while (0);
} }
endlab: endlab:
#line 759 #line 762
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 759 #line 762
return; return;
#line 759 #line 762
} }
void void
#line 761 #line 764
bi_spawn(eval_environ_t env) bi_spawn(eval_environ_t env)
#line 761 #line 764
#line 761 #line 764
#line 761 "io.bi" #line 764 "io.bi"
{ {
#line 761 #line 764
#line 761 #line 764
#line 761 #line 764
long __bi_argcnt; long __bi_argcnt;
#line 761 #line 764
char * name; char * name;
#line 761 #line 764
long fin; long fin;
#line 761 #line 764
long fout; long fout;
#line 761 #line 764
long ferr; long ferr;
#line 761 #line 764
#line 761 #line 764
get_string_arg(env, 1, &name); get_string_arg(env, 1, &name);
#line 761 #line 764
get_numeric_arg(env, 2, &fin); get_numeric_arg(env, 2, &fin);
#line 761 #line 764
get_numeric_arg(env, 3, &fout); get_numeric_arg(env, 3, &fout);
#line 761 #line 764
get_numeric_arg(env, 4, &ferr); get_numeric_arg(env, 4, &ferr);
#line 761 #line 764
#line 761 #line 764
get_numeric_arg(env, 0, &__bi_argcnt); get_numeric_arg(env, 0, &__bi_argcnt);
#line 761 #line 764
adjust_stack(env, __bi_argcnt + 1); adjust_stack(env, __bi_argcnt + 1);
#line 761 #line 764
#line 761 #line 764
#line 761 #line 764
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 761 #line 764
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 773 #line 776
( (
#line 773 #line 776
env_throw_bi(env, mfe_failure, "spawn", _("no more files available")) env_throw_bi(env, mfe_failure, "spawn", _("no more files available"))
#line 773 #line 776
) )
#line 775 #line 778
; ;
#line 777 #line 780
#line 777 #line 780
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 1052 skipping to change at line 1055
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 810 #line 813
( (
#line 810 #line 813
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 810
)
#line 813 #line 813
)
#line 816
; ;
#line 814 #line 817
#line 814 #line 817
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 815 #line 818
do { do {
#line 815 #line 818
push(env, (STKVAL)(mft_number)(i)); push(env, (STKVAL)(mft_number)(i));
#line 815 #line 818
goto endlab; goto endlab;
#line 815 #line 818
} while (0); } while (0);
} }
endlab: endlab:
#line 818 #line 821
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 818 #line 821
return; return;
#line 818 #line 821
} }
void void
#line 821 #line 824
bi_tempfile(eval_environ_t env) bi_tempfile(eval_environ_t env)
#line 821 #line 824
#line 821 #line 824
#line 821 "io.bi" #line 824 "io.bi"
{ {
#line 821 #line 824
#line 821 #line 824
#line 821 #line 824
long __bi_argcnt; long __bi_argcnt;
#line 821 #line 824
char * MFL_DATASEG tempdir; char * MFL_DATASEG tempdir;
#line 821 #line 824
#line 821 #line 824
get_string_arg(env, 1, &tempdir); get_string_arg(env, 1, &tempdir);
#line 821 #line 824
#line 821 #line 824
get_numeric_arg(env, 0, &__bi_argcnt); get_numeric_arg(env, 0, &__bi_argcnt);
#line 821 #line 824
adjust_stack(env, __bi_argcnt + 1); adjust_stack(env, __bi_argcnt + 1);
#line 821 #line 824
#line 821 #line 824
#line 821 #line 824
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 821 #line 824
prog_trace(env, "tempfile %s",((__bi_argcnt > 0) ? tempdir : "")) ;; prog_trace(env, "tempfile %s",((__bi_argcnt > 0) ? tempdir : "")) ;;
#line 821 #line 824
{ {
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 836 #line 839
( (
#line 836 #line 839
env_throw_bi(env, mfe_failure, "tempfile", _("no more files available")) env_throw_bi(env, mfe_failure, "tempfile", _("no more files available"))
#line 836 #line 839
) )
#line 838 #line 841
; ;
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 844 #line 847
sizeof(PATTERN)), ptr); sizeof(PATTERN)), ptr);
#line 846 #line 849
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 854 #line 857
( (
#line 854 #line 857
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 854
)
#line 857 #line 857
)
#line 860
; ;
unlink(template); unlink(template);
iotab[i].fd[0] = fd; iotab[i].fd[0] = fd;
#line 862 #line 865
do { do {
#line 862 #line 865
push(env, (STKVAL)(mft_number)(i)); push(env, (STKVAL)(mft_number)(i));
#line 862 #line 865
goto endlab; goto endlab;
#line 862 #line 865
} while (0); } while (0);
#undef PATTERN #undef PATTERN
} }
endlab: endlab:
#line 865 #line 868
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 865 #line 868
return; return;
#line 865 #line 868
} }
void void
#line 867 #line 870
bi_close(eval_environ_t env) bi_close(eval_environ_t env)
#line 867 #line 870
#line 867 #line 870
#line 867 "io.bi" #line 870 "io.bi"
{ {
#line 867 #line 870
#line 867 #line 870
#line 867 #line 870
#line 867 #line 870
long fd; long fd;
#line 867 #line 870
#line 867 #line 870
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 867 #line 870
#line 867 #line 870
#line 867 #line 870
adjust_stack(env, 1); adjust_stack(env, 1);
#line 867 #line 870
#line 867 #line 870
#line 867 #line 870
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 867 #line 870
prog_trace(env, "close %lu",fd);; prog_trace(env, "close %lu",fd);;
#line 867 #line 870
{ {
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 871 #line 874
( (
#line 871 #line 874
env_throw_bi(env, mfe_range, "close", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "close", _("invalid file descriptor"))
#line 871 #line 874
) )
#line 873 #line 876
; ;
close_stream(&iotab[fd]); close_stream(&iotab[fd]);
} }
#line 876 #line 879
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 876 #line 879
return; return;
#line 876 #line 879
} }
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 884 #line 887
bi_shutdown(eval_environ_t env) bi_shutdown(eval_environ_t env)
#line 884 #line 887
#line 884 #line 887
#line 884 "io.bi" #line 887 "io.bi"
{ {
#line 884 #line 887
#line 884 #line 887
#line 884 #line 887
#line 884 #line 887
long fd; long fd;
#line 884 #line 887
long how; long how;
#line 884 #line 887
#line 884 #line 887
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 884 #line 887
get_numeric_arg(env, 1, &how); get_numeric_arg(env, 1, &how);
#line 884 #line 887
#line 884 #line 887
#line 884 #line 887
adjust_stack(env, 2); adjust_stack(env, 2);
#line 884 #line 887
#line 884 #line 887
#line 884 #line 887
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 884 #line 887
prog_trace(env, "shutdown %lu %lu",fd, how);; prog_trace(env, "shutdown %lu %lu",fd, how);;
#line 884 #line 887
{ {
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 890 #line 893
( (
#line 890 #line 893
env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor"))
#line 890 #line 893
) )
#line 892 #line 895
; ;
if (!(how >= 0 && how <= 2)) if (!(how >= 0 && how <= 2))
#line 893 #line 896
( (
#line 893 #line 896
env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "shutdown", _("invalid file descriptor"))
#line 893 #line 896
) )
#line 895 #line 898
; ;
if (!(_builtin_const_to_c(shutdown_modes, if (!(_builtin_const_to_c(shutdown_modes,
#line 896 #line 899
MU_ARRAY_SIZE(shutdown_modes), MU_ARRAY_SIZE(shutdown_modes),
#line 896 #line 899
how, how,
#line 896 #line 899
&mode) == 0)) &mode) == 0))
#line 896 #line 899
( (
#line 896 #line 899
env_throw_bi(env, mfe_failure, "shutdown", "bad shutdown mode") env_throw_bi(env, mfe_failure, "shutdown", "bad shutdown mode")
#line 896 #line 899
) )
#line 901 #line 904
; ;
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 906 #line 909
( (
#line 906 #line 909
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 906
)
#line 909 #line 909
)
#line 912
; ;
} 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 917 #line 920
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 917 #line 920
return; return;
#line 917 #line 920
} }
void void
#line 919 #line 922
bi_write(eval_environ_t env) bi_write(eval_environ_t env)
#line 919 #line 922
#line 919 #line 922
#line 919 "io.bi" #line 922 "io.bi"
{ {
#line 919 #line 922
#line 919 #line 922
#line 919 #line 922
long __bi_argcnt; long __bi_argcnt;
#line 919 #line 922
long fd; long fd;
#line 919 #line 922
char * str; char * str;
#line 919 #line 922
long n; long n;
#line 919 #line 922
#line 919 #line 922
get_numeric_arg(env, 1, &fd); get_numeric_arg(env, 1, &fd);
#line 919 #line 922
get_string_arg(env, 2, &str); get_string_arg(env, 2, &str);
#line 919 #line 922
get_numeric_arg(env, 3, &n); get_numeric_arg(env, 3, &n);
#line 919 #line 922
#line 919 #line 922
get_numeric_arg(env, 0, &__bi_argcnt); get_numeric_arg(env, 0, &__bi_argcnt);
#line 919 #line 922
adjust_stack(env, __bi_argcnt + 1); adjust_stack(env, __bi_argcnt + 1);
#line 919 #line 922
#line 919 #line 922
#line 919 #line 922
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 919 #line 922
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 919 #line 922
{ {
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 924 #line 927
#line 924 #line 927
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 925 #line 928
( (
#line 925 #line 928
env_throw_bi(env, mfe_range, "write", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "write", _("invalid file descriptor"))
#line 925 #line 928
) )
#line 927 #line 930
; ;
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 931 #line 934
( (
#line 931 #line 934
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 931
)
#line 934 #line 934
)
#line 937
; ;
} }
#line 936 #line 939
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 936 #line 939
return; return;
#line 936 #line 939
} }
void void
#line 939 #line 942
bi_write_body(eval_environ_t env) bi_write_body(eval_environ_t env)
#line 939 #line 942
#line 939 #line 942
#line 939 "io.bi" #line 942 "io.bi"
{ {
#line 939 #line 942
#line 939 #line 942
#line 939 #line 942
#line 939 #line 942
long fd; long fd;
#line 939 #line 942
void * str; void * str;
#line 939 #line 942
long n; long n;
#line 939 #line 942
#line 939 #line 942
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 939 #line 942
get_pointer_arg(env, 1, &str); get_pointer_arg(env, 1, &str);
#line 939 #line 942
get_numeric_arg(env, 2, &n); get_numeric_arg(env, 2, &n);
#line 939 #line 942
#line 939 #line 942
#line 939 #line 942
adjust_stack(env, 3); adjust_stack(env, 3);
#line 939 #line 942
#line 939 #line 942
#line 939 #line 942
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 939 #line 942
prog_trace(env, "write_body %lu %p %lu",fd, str, n);; prog_trace(env, "write_body %lu %p %lu",fd, str, n);;
#line 939 #line 942
{ {
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 944 #line 947
( (
#line 944 #line 947
env_throw_bi(env, mfe_range, "write_body", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "write_body", _("invalid file descriptor"))
#line 944 #line 947
) )
#line 946 #line 949
; ;
rc = write(OFD(iotab[fd]), str, n); rc = write(OFD(iotab[fd]), str, n);
if (!(n == rc)) if (!(n == rc))
#line 948 #line 951
( (
#line 948 #line 951
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 948
)
#line 951 #line 951
)
#line 954
; ;
} }
#line 953 #line 956
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 953 #line 956
return; return;
#line 953 #line 956
} }
void void
#line 955 #line 958
bi_read(eval_environ_t env) bi_read(eval_environ_t env)
#line 955 #line 958
#line 955 #line 958
#line 955 "io.bi" #line 958 "io.bi"
{ {
#line 955 #line 958
#line 955 #line 958
#line 955 #line 958
#line 955 #line 958
long fd; long fd;
#line 955 #line 958
long size; long size;
#line 955 #line 958
#line 955 #line 958
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 955 #line 958
get_numeric_arg(env, 1, &size); get_numeric_arg(env, 1, &size);
#line 955 #line 958
#line 955 #line 958
#line 955 #line 958
adjust_stack(env, 2); adjust_stack(env, 2);
#line 955 #line 958
#line 955 #line 958
#line 955 #line 958
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 955 #line 958
prog_trace(env, "read %lu %lu",fd, size);; prog_trace(env, "read %lu %lu",fd, size);;
#line 955 #line 958
{ {
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 962 #line 965
( (
#line 962 #line 965
env_throw_bi(env, mfe_range, "read", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "read", _("invalid file descriptor"))
#line 962 #line 965
) )
#line 964 #line 967
; ;
rc = read(IFD(iotab[fd]), s, size); rc = read(IFD(iotab[fd]), s, size);
if (rc == 0) if (rc == 0)
( (
#line 968 #line 971
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 968 #line 971
); );
#line 970 #line 973
if (!(rc == size)) if (!(rc == size))
#line 970 #line 973
( (
#line 970 #line 973
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 970
)
#line 973 #line 973
)
#line 976
; ;
s[size] = 0; s[size] = 0;
#line 975 #line 978
do { do {
#line 975 #line 978
push(env, (STKVAL) (mft_size) (off)); push(env, (STKVAL) (mft_size) (off));
#line 975 #line 978
goto endlab; goto endlab;
#line 975 #line 978
} while (0); } while (0);
} }
endlab: endlab:
#line 977 #line 980
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 977 #line 980
return; return;
#line 977 #line 980
} }
void void
#line 979 #line 982
bi_rewind(eval_environ_t env) bi_rewind(eval_environ_t env)
#line 979 #line 982
#line 979 #line 982
#line 979 "io.bi" #line 982 "io.bi"
{ {
#line 979 #line 982
#line 979 #line 982
#line 979 #line 982
#line 979 #line 982
long fd; long fd;
#line 979 #line 982
#line 979 #line 982
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 979 #line 982
#line 979 #line 982
#line 979 #line 982
adjust_stack(env, 1); adjust_stack(env, 1);
#line 979 #line 982
#line 979 #line 982
#line 979 #line 982
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 979 #line 982
prog_trace(env, "rewind %lu",fd);; prog_trace(env, "rewind %lu",fd);;
#line 979 #line 982
{ {
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 983 #line 986
( (
#line 983 #line 986
env_throw_bi(env, mfe_range, "rewind", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "rewind", _("invalid file descriptor"))
#line 983 #line 986
) )
#line 985 #line 988
; ;
if (lseek(IFD(iotab[fd]), 0, SEEK_SET) == -1) if (lseek(IFD(iotab[fd]), 0, SEEK_SET) == -1)
( (
#line 987 #line 990
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 987
);
#line 990 #line 990
);
#line 993
} }
#line 991 #line 994
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 991 #line 994
return; return;
#line 991 #line 994
} }
#define MINBUFSIZE 128 #define MINBUFSIZE 128
#define MAXBUFSIZE 65535 #define MAXBUFSIZE 65535
void void
#line 997 #line 1000
bi_copy(eval_environ_t env) bi_copy(eval_environ_t env)
#line 997 #line 1000
#line 997 #line 1000
#line 997 "io.bi" #line 1000 "io.bi"
{ {
#line 997 #line 1000
#line 997 #line 1000
#line 997 #line 1000
#line 997 #line 1000
long dst; long dst;
#line 997 #line 1000
long src; long src;
#line 997 #line 1000
#line 997 #line 1000
get_numeric_arg(env, 0, &dst); get_numeric_arg(env, 0, &dst);
#line 997 #line 1000
get_numeric_arg(env, 1, &src); get_numeric_arg(env, 1, &src);
#line 997 #line 1000
#line 997 #line 1000
#line 997 #line 1000
adjust_stack(env, 2); adjust_stack(env, 2);
#line 997 #line 1000
#line 997 #line 1000
#line 997 #line 1000
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 997 #line 1000
prog_trace(env, "copy %lu %lu",dst, src);; prog_trace(env, "copy %lu %lu",dst, src);;
#line 997 #line 1000
{ {
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 1008 #line 1011
( (
#line 1008 #line 1011
env_throw_bi(env, mfe_range, "copy", _("invalid source file descriptor")) env_throw_bi(env, mfe_range, "copy", _("invalid source file descriptor"))
#line 1008 #line 1011
) )
#line 1010 #line 1013
; ;
if (!(dst >= 0 && dst < nstreams && (ofd = OFD(iotab[dst])) != -1 )) if (!(dst >= 0 && dst < nstreams && (ofd = OFD(iotab[dst])) != -1 ))
#line 1011 #line 1014
( (
#line 1011 #line 1014
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 1011 #line 1014
) )
#line 1013 #line 1016
; ;
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 1779 skipping to change at line 1782
} }
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 1039 #line 1042
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 1039
);
#line 1042 #line 1042
);
#line 1045
} else if (wrbytes == 0) { } else if (wrbytes == 0) {
if (buffer != bs) if (buffer != bs)
free(buffer); free(buffer);
( (
#line 1045 #line 1048
env_throw_bi(env, mfe_io, "copy", "short write") env_throw_bi(env, mfe_io, "copy", "short write")
#line 1045 #line 1048
); );
#line 1047 #line 1050
} }
p += wrbytes; p += wrbytes;
rdbytes -= wrbytes; rdbytes -= wrbytes;
total += wrbytes; total += wrbytes;
} }
} }
if (buffer != bs) if (buffer != bs)
free(buffer); free(buffer);
#line 1055 #line 1058
do { do {
#line 1055 #line 1058
push(env, (STKVAL)(mft_number)(total)); push(env, (STKVAL)(mft_number)(total));
#line 1055 #line 1058
goto endlab; goto endlab;
#line 1055 #line 1058
} while (0); } while (0);
} }
endlab: endlab:
#line 1057 #line 1060
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1057 #line 1060
return; return;
#line 1057 #line 1060
} }
void void
#line 1059 #line 1062
bi_getdelim(eval_environ_t env) bi_getdelim(eval_environ_t env)
#line 1059 #line 1062
#line 1059 #line 1062
#line 1059 "io.bi" #line 1062 "io.bi"
{ {
#line 1059 #line 1062
#line 1059 #line 1062
#line 1059 #line 1062
#line 1059 #line 1062
long fd; long fd;
#line 1059 #line 1062
char * MFL_DATASEG delim; char * MFL_DATASEG delim;
#line 1059 #line 1062
#line 1059 #line 1062
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1059 #line 1062
get_string_arg(env, 1, &delim); get_string_arg(env, 1, &delim);
#line 1059 #line 1062
#line 1059 #line 1062
#line 1059 #line 1062
adjust_stack(env, 2); adjust_stack(env, 2);
#line 1059 #line 1062
#line 1059 #line 1062
#line 1059 #line 1062
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1059 #line 1062
prog_trace(env, "getdelim %lu %s",fd, delim);; prog_trace(env, "getdelim %lu %s",fd, delim);;
#line 1059 #line 1062
{ {
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 1065 #line 1068
( (
#line 1065 #line 1068
env_throw_bi(env, mfe_range, "getdelim", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "getdelim", _("invalid file descriptor"))
#line 1065 #line 1068
) )
#line 1067 #line 1070
; ;
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 1071 #line 1074
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 1071 #line 1074
); );
if (!(rc > 0)) if (!(rc > 0))
#line 1072 #line 1075
( (
#line 1072 #line 1075
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 1072
)
#line 1075 #line 1075
)
#line 1078
; ;
#line 1076 #line 1079
do { do {
#line 1076 #line 1079
pushs(env, ioptr->buf); pushs(env, ioptr->buf);
#line 1076 #line 1079
goto endlab; goto endlab;
#line 1076 #line 1079
} while (0); } while (0);
} }
endlab: endlab:
#line 1078 #line 1081
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1078 #line 1081
return; return;
#line 1078 #line 1081
} }
void void
#line 1080 #line 1083
bi_getline(eval_environ_t env) bi_getline(eval_environ_t env)
#line 1080 #line 1083
#line 1080 #line 1083
#line 1080 "io.bi" #line 1083 "io.bi"
{ {
#line 1080 #line 1083
#line 1080 #line 1083
#line 1080 #line 1083
#line 1080 #line 1083
long fd; long fd;
#line 1080 #line 1083
#line 1080 #line 1083
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1080 #line 1083
#line 1080 #line 1083
#line 1080 #line 1083
adjust_stack(env, 1); adjust_stack(env, 1);
#line 1080 #line 1083
#line 1080 #line 1083
#line 1080 #line 1083
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1080 #line 1083
prog_trace(env, "getline %lu",fd);; prog_trace(env, "getline %lu",fd);;
#line 1080 #line 1083
{ {
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 1086 #line 1089
( (
#line 1086 #line 1089
env_throw_bi(env, mfe_range, "getline", _("invalid file descriptor")) env_throw_bi(env, mfe_range, "getline", _("invalid file descriptor"))
#line 1086 #line 1089
) )
#line 1088 #line 1091
; ;
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 1092 #line 1095
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 1092 #line 1095
); );
#line 1094 #line 1097
if (!(rc > 0)) if (!(rc > 0))
#line 1094 #line 1097
( (
#line 1094 #line 1097
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 1094
)
#line 1097 #line 1097
)
#line 1100
; ;
#line 1098 #line 1101
do { do {
#line 1098 #line 1101
pushs(env, ioptr->buf); pushs(env, ioptr->buf);
#line 1098 #line 1101
goto endlab; goto endlab;
#line 1098 #line 1101
} while (0); } while (0);
} }
endlab: endlab:
#line 1100 #line 1103
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1100 #line 1103
return; return;
#line 1100 #line 1103
} }
void void
#line 1102 #line 1105
bi_fd_set_delimiter(eval_environ_t env) bi_fd_set_delimiter(eval_environ_t env)
#line 1102 #line 1105
#line 1102 #line 1105
#line 1102 "io.bi" #line 1105 "io.bi"
{ {
#line 1102 #line 1105
#line 1102 #line 1105
#line 1102 #line 1105
#line 1102 #line 1105
long fd; long fd;
#line 1102 #line 1105
char * delim; char * delim;
#line 1102 #line 1105
#line 1102 #line 1105
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1102 #line 1105
get_string_arg(env, 1, &delim); get_string_arg(env, 1, &delim);
#line 1102 #line 1105
#line 1102 #line 1105
#line 1102 #line 1105
adjust_stack(env, 2); adjust_stack(env, 2);
#line 1102 #line 1105
#line 1102 #line 1105
#line 1102 #line 1105
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1102 #line 1105
prog_trace(env, "fd_set_delimiter %lu %s",fd, delim);; prog_trace(env, "fd_set_delimiter %lu %s",fd, delim);;
#line 1102 #line 1105
{ {
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 1107 #line 1110
( (
#line 1107 #line 1110
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 1107 #line 1110
) )
#line 1109 #line 1112
; ;
ioptr = &iotab[fd]; ioptr = &iotab[fd];
free(ioptr->delim); free(ioptr->delim);
ioptr->delim = mu_strdup(delim); ioptr->delim = mu_strdup(delim);
} }
#line 1114 #line 1117
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1114 #line 1117
return; return;
#line 1114 #line 1117
} }
void void
#line 1116 #line 1119
bi_fd_delimiter(eval_environ_t env) bi_fd_delimiter(eval_environ_t env)
#line 1116 #line 1119
#line 1116 #line 1119
#line 1116 "io.bi" #line 1119 "io.bi"
{ {
#line 1116 #line 1119
#line 1116 #line 1119
#line 1116 #line 1119
#line 1116 #line 1119
long fd; long fd;
#line 1116 #line 1119
char * MFL_DATASEG delim; char * MFL_DATASEG delim;
#line 1116 #line 1119
#line 1116 #line 1119
get_numeric_arg(env, 0, &fd); get_numeric_arg(env, 0, &fd);
#line 1116 #line 1119
get_string_arg(env, 1, &delim); get_string_arg(env, 1, &delim);
#line 1116 #line 1119
#line 1116 #line 1119
#line 1116 #line 1119
adjust_stack(env, 2); adjust_stack(env, 2);
#line 1116 #line 1119
#line 1116 #line 1119
#line 1116 #line 1119
if (builtin_module_trace(BUILTIN_IDX_io)) if (builtin_module_trace(BUILTIN_IDX_io))
#line 1116 #line 1119
prog_trace(env, "fd_delimiter %lu %s",fd, delim);; prog_trace(env, "fd_delimiter %lu %s",fd, delim);;
#line 1116 #line 1119
{ {
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 1121 #line 1124
( (
#line 1121 #line 1124
env_throw_bi(env, mfe_range, "fd_delimiter", _("invalid file descriptor") ) env_throw_bi(env, mfe_range, "fd_delimiter", _("invalid file descriptor") )
#line 1121 #line 1124
) )
#line 1123 #line 1126
; ;
ioptr = &iotab[fd]; ioptr = &iotab[fd];
#line 1125 #line 1128
do { do {
#line 1125 #line 1128
pushs(env, ioptr->delim ? ioptr->delim : "\n"); pushs(env, ioptr->delim ? ioptr->delim : "\n");
#line 1125 #line 1128
goto endlab; goto endlab;
#line 1125 #line 1128
} while (0); } while (0);
} }
endlab: endlab:
#line 1127 #line 1130
env_function_cleanup_flush(env, NULL); env_function_cleanup_flush(env, NULL);
#line 1127 #line 1130
return; return;
#line 1127 #line 1130
} }
#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 683 "io.bi" #line 686 "io.bi"
IO_id = builtin_priv_register(alloc_streams, destroy_streams, IO_id = builtin_priv_register(alloc_streams, destroy_streams,
#line 683 #line 686
NULL); NULL);
#line 702 "io.bi" #line 705 "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 761 "io.bi" #line 764 "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 821 "io.bi" #line 824 "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 867 "io.bi" #line 870 "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 884 "io.bi" #line 887 "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 919 "io.bi" #line 922 "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 939 "io.bi" #line 942 "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 955 "io.bi" #line 958 "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 979 "io.bi" #line 982 "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 997 "io.bi" #line 1000 "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 1059 "io.bi" #line 1062 "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 1080 "io.bi" #line 1083 "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 1102 "io.bi" #line 1105 "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 1116 "io.bi" #line 1119 "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. 
586 lines changed or deleted 589 lines changed or added

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