summaryrefslogtreecommitdiff
path: root/extcap/randpktdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'extcap/randpktdump.c')
-rw-r--r--extcap/randpktdump.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/extcap/randpktdump.c b/extcap/randpktdump.c
index c808fbaf74..7651b6635c 100644
--- a/extcap/randpktdump.c
+++ b/extcap/randpktdump.c
@@ -34,7 +34,6 @@
#define RANDPKTDUMP_VERSION_RELEASE 0
#define verbose_print(...) { if (verbose) printf(__VA_ARGS__); }
-#define errmsg_print(...) { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); }
static gboolean verbose = TRUE;
@@ -63,48 +62,6 @@ static struct option longopts[] = {
{ 0, 0, 0, 0 }
};
-#ifdef _WIN32
-BOOLEAN IsHandleRedirected(DWORD handle)
-{
- HANDLE h = GetStdHandle(handle);
- if (h) {
- BY_HANDLE_FILE_INFORMATION fi;
- if (GetFileInformationByHandle(h, &fi)) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static void attach_parent_console()
-{
- BOOL outRedirected, errRedirected;
-
- outRedirected = IsHandleRedirected(STD_OUTPUT_HANDLE);
- errRedirected = IsHandleRedirected(STD_ERROR_HANDLE);
-
- if (outRedirected && errRedirected) {
- /* Both standard output and error handles are redirected.
- * There is no point in attaching to parent process console.
- */
- return;
- }
-
- if (AttachConsole(ATTACH_PARENT_PROCESS) == 0) {
- /* Console attach failed. */
- return;
- }
-
- /* Console attach succeeded */
- if (outRedirected == FALSE) {
- freopen("CONOUT$", "w", stdout);
- }
-
- if (errRedirected == FALSE) {
- freopen("CONOUT$", "w", stderr);
- }
-}
-#endif
static void help(const char* binname)
{