aboutsummaryrefslogtreecommitdiffstats
path: root/mergecap.c
diff options
context:
space:
mode:
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2004-03-03 22:14:10 +0000
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2004-03-03 22:14:10 +0000
commit04ed748d387bf26969bfc3204af1a2b445590be4 (patch)
tree74d3769106d3b5d2ddb8671d27ecd9c6d87033e4 /mergecap.c
parent464a332b34873f97c8adb6ad077bc70ba19b0fc3 (diff)
Bill Guyton: mergecap can write to stdout by using the special filename -
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10289 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'mergecap.c')
-rw-r--r--mergecap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mergecap.c b/mergecap.c
index d5e9534cd5..bc790659b6 100644
--- a/mergecap.c
+++ b/mergecap.c
@@ -1,6 +1,6 @@
/* Combine two dump files, either by appending or by merging by timestamp
*
- * $Id: mergecap.c,v 1.18 2004/02/20 20:36:13 gerald Exp $
+ * $Id: mergecap.c,v 1.19 2004/03/03 22:14:10 jmayer Exp $
*
* Written by Scott Renfro <scott@renfro.org> based on
* editcap by Richard Sharpe and Guy Harris
@@ -265,6 +265,11 @@ open_outfile(out_file_t *out_file, int snapshot_len)
exit(1);
}
+ /* Allow output to stdout by using - */
+ if ((strncmp(out_file->filename, "-", 2) == 0) && (strlen(out_file->filename) == 1))
+ out_file->filename = "";
+
+
out_file->pdh = wtap_dump_open(out_file->filename, out_file->file_type,
out_file->frame_type, snapshot_len, &err);
if (!out_file->pdh) {