diff --git a/src/fdr/fdr.h b/src/fdr/fdr.h index c70f9488..e0aa594f 100644 --- a/src/fdr/fdr.h +++ b/src/fdr/fdr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2016, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -43,9 +43,6 @@ extern "C" { struct FDR; -/** \brief Returns size in bytes of the given FDR engine. */ -size_t fdrSize(const struct FDR *fdr); - /** \brief Returns non-zero if the contents of the stream state indicate that * there is active FDR history beyond the regularly used history. */ u32 fdrStreamStateActive(const struct FDR *fdr, const u8 *stream_state); diff --git a/src/fdr/fdr_compile.cpp b/src/fdr/fdr_compile.cpp index ccf17626..2ffeb984 100644 --- a/src/fdr/fdr_compile.cpp +++ b/src/fdr/fdr_compile.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2016, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -571,10 +571,9 @@ fdrBuildTableHinted(const vector &lits, bool make_small, u32 hint, #endif -} // namespace ue2 - -// FIXME: should be compile-time only size_t fdrSize(const FDR *fdr) { assert(fdr); return fdr->size; } + +} // namespace ue2 diff --git a/src/fdr/fdr_compile.h b/src/fdr/fdr_compile.h index 73418568..c12e0071 100644 --- a/src/fdr/fdr_compile.h +++ b/src/fdr/fdr_compile.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2016, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -61,6 +61,9 @@ fdrBuildTableHinted(const std::vector &lits, bool make_small, #endif +/** \brief Returns size in bytes of the given FDR engine. */ +size_t fdrSize(const struct FDR *fdr); + } // namespace ue2 #endif diff --git a/src/fdr/fdr_dump.cpp b/src/fdr/fdr_dump.cpp index 158170c2..a141f388 100644 --- a/src/fdr/fdr_dump.cpp +++ b/src/fdr/fdr_dump.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2016, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -28,11 +28,11 @@ #include "config.h" -#include "fdr.h" -#include "fdr_internal.h" +#include "fdr_compile.h" #include "fdr_compile_internal.h" #include "fdr_dump.h" #include "fdr_engine_description.h" +#include "fdr_internal.h" #include "teddy_engine_description.h" #include "ue2common.h" diff --git a/src/hwlm/hwlm_build.cpp b/src/hwlm/hwlm_build.cpp index f86a70d2..b3978017 100644 --- a/src/hwlm/hwlm_build.cpp +++ b/src/hwlm/hwlm_build.cpp @@ -37,7 +37,6 @@ #include "noodle_build.h" #include "ue2common.h" #include "fdr/fdr_compile.h" -#include "fdr/fdr.h" #include "nfa/shufticompile.h" #include "util/alloc.h" #include "util/bitutils.h"