projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
log: disable the non-buffered logging YAZ-780
[yaz-moved-to-github.git]
/
zoom
/
zoomsh.c
diff --git
a/zoom/zoomsh.c
b/zoom/zoomsh.c
index
2416cfd
..
fa4c0f8
100644
(file)
--- a/
zoom/zoomsh.c
+++ b/
zoom/zoomsh.c
@@
-920,7
+920,10
@@
static int shell(struct zoom_sh *sh, int exit_on_error)
#endif
if (!line_in) /* no line buffer via readline or not enabled at all */
{
#endif
if (!line_in) /* no line buffer via readline or not enabled at all */
{
- printf("ZOOM>"); fflush(stdout);
+ if (isatty(0))
+ {
+ printf("ZOOM>"); fflush(stdout);
+ }
if (!fgets(buf, sizeof(buf)-1, stdin))
{
res = -1;
if (!fgets(buf, sizeof(buf)-1, stdin))
{
res = -1;
@@
-954,7
+957,7
@@
static int zoomsh(int argc, char **argv)
{
int mask;
char *arg = 0;
{
int mask;
char *arg = 0;
- int option_ret = options("ev:", argv, argc, &arg);
+ int option_ret = options("a:ev:", argv, argc, &arg);
const char *bp = arg;
switch (option_ret)
{
const char *bp = arg;
switch (option_ret)
{
@@
-967,6
+970,9
@@
static int zoomsh(int argc, char **argv)
case YAZ_OPTIONS_EOF:
res = shell(&sh, exit_on_error);
break;
case YAZ_OPTIONS_EOF:
res = shell(&sh, exit_on_error);
break;
+ case 'a':
+ ZOOM_options_set(sh.options, "apdufile", arg);
+ break;
case 'e':
exit_on_error = 1;
break;
case 'e':
exit_on_error = 1;
break;
@@
-975,7
+981,7
@@
static int zoomsh(int argc, char **argv)
yaz_log_init_level(mask);
break;
default:
yaz_log_init_level(mask);
break;
default:
- fprintf(stderr, "zoomsh: [-e] [-v] [commands]\n");
+ fprintf(stderr, "zoomsh: [-a apdulog] [-e] [-v level] [commands]\n");
res = 1;
}
}
res = 1;
}
}