From: Justin Viiret Date: Thu, 29 Jun 2017 03:06:26 +0000 (+1000) Subject: mcclellandump: use StdioFile X-Git-Tag: v4.6.0^2~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74f6e41296d430790612937a0aadf2faf405a1cd;p=thirdparty%2Fvectorscan.git mcclellandump: use StdioFile --- diff --git a/src/nfa/mcclellandump.cpp b/src/nfa/mcclellandump.cpp index 9e04ad63..a13795fd 100644 --- a/src/nfa/mcclellandump.cpp +++ b/src/nfa/mcclellandump.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, Intel Corporation + * Copyright (c) 2015-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -442,22 +442,14 @@ void nfaExecMcClellan8_dumpText(const NFA *nfa, FILE *f) { void nfaExecMcClellan16_dump(const NFA *nfa, const string &base) { assert(nfa->type == MCCLELLAN_NFA_16); - FILE *f = fopen_or_throw((base + ".txt").c_str(), "w"); - nfaExecMcClellan16_dumpText(nfa, f); - fclose(f); - f = fopen_or_throw((base + ".dot").c_str(), "w"); - nfaExecMcClellan16_dumpDot(nfa, f); - fclose(f); + nfaExecMcClellan16_dumpText(nfa, StdioFile(base + ".txt", "w")); + nfaExecMcClellan16_dumpDot(nfa, StdioFile(base + ".dot", "w")); } void nfaExecMcClellan8_dump(const NFA *nfa, const string &base) { assert(nfa->type == MCCLELLAN_NFA_8); - FILE *f = fopen_or_throw((base + ".txt").c_str(), "w"); - nfaExecMcClellan8_dumpText(nfa, f); - fclose(f); - f = fopen_or_throw((base + ".dot").c_str(), "w"); - nfaExecMcClellan8_dumpDot(nfa, f); - fclose(f); + nfaExecMcClellan8_dumpText(nfa, StdioFile(base + ".txt", "w")); + nfaExecMcClellan8_dumpDot(nfa, StdioFile(base + ".dot", "w")); } } // namespace ue2