Commit f0307891048688780525c1f43a4a04ccf788ffb3

Authored by Jay Berkenbilt
1 parent 17c0e38c

Rename bits_include.cc to qpdf/bits_functions.hh

It's better to just make it a .hh file to reduce confusion.
libqpdf/BitStream.cc
... ... @@ -2,9 +2,9 @@
2 2  
3 3 #include <qpdf/QIntC.hh>
4 4  
5   -// See comments in bits_include.cc
  5 +// See comments in bits_functions.hh
6 6 #define BITS_READ 1
7   -#include "bits_include.cc"
  7 +#include <qpdf/bits_functions.hh>
8 8  
9 9 BitStream::BitStream(unsigned char const* p, size_t nbytes) :
10 10 start(p),
... ...
libqpdf/BitWriter.cc
1 1 #include <qpdf/BitWriter.hh>
2 2  
3   -// See comments in bits_include.cc
  3 +// See comments in bits_functions.hh
4 4 #define BITS_WRITE 1
5   -#include "bits_include.cc"
  5 +#include <qpdf/bits_functions.hh>
6 6  
7 7 BitWriter::BitWriter(Pipeline* pl) :
8 8 pl(pl),
... ...
libqpdf/bits_include.cc renamed to libqpdf/qpdf/bits_functions.hh
1   -// This file is #included in other source files.
2   -
3   -#ifndef __BITS_CC__
4   -#define __BITS_CC__
  1 +#ifndef __BITS_FUNCTIONS_HH__
  2 +#define __BITS_FUNCTIONS_HH__
5 3  
6 4 #include <algorithm>
7 5 #include <stdexcept>
... ... @@ -9,12 +7,13 @@
9 7 #include <qpdf/Pipeline.hh>
10 8 #include <qpdf/QUtil.hh>
11 9  
12   -// These functions may be run at places where the function call
13   -// overhead from test coverage testing would be too high. Therefore,
14   -// we make the test coverage cases conditional upon a preprocessor
15   -// symbol. BitStream.cc includes this file without defining the
16   -// symbol, and the specially designed test code that fully exercises
17   -// this code includes with the symbol defined.
  10 +// This file is #included by specific source files, which must define
  11 +// certain preprocessor symbols. These functions may be run at places
  12 +// where the function call overhead from test coverage testing would
  13 +// be too high. Therefore, we make the test coverage cases conditional
  14 +// upon a preprocessor symbol. Library code includes this file without
  15 +// BITS_TESTING, and the specially designed test code that fully
  16 +// exercises this code includes with the symbol defined.
18 17  
19 18 #ifdef BITS_READ
20 19 static unsigned long long
... ... @@ -151,5 +150,4 @@ write_bits(unsigned char&amp; ch, size_t&amp; bit_offset,
151 150 }
152 151 #endif
153 152  
154   -
155   -#endif // __BITS_CC__
  153 +#endif // __BITS_FUNCTIONS_HH__
... ...
libtests/bits.cc
... ... @@ -7,11 +7,11 @@
7 7 #include <stdio.h>
8 8 #include <stdlib.h>
9 9  
10   -// See comments in bits_include.cc
  10 +// See comments in bits_functions.hh
11 11 #define BITS_TESTING 1
12 12 #define BITS_READ 1
13 13 #define BITS_WRITE 1
14   -#include "../libqpdf/bits_include.cc"
  14 +#include <qpdf/bits_functions.hh>
15 15  
16 16 static void
17 17 print_values(long long byte_offset, size_t bit_offset,
... ...
libtests/build.mk
... ... @@ -38,7 +38,7 @@ $(TARGETS_libtests): $(TARGETS_libqpdf) $(TARGETS_qpdf)
38 38  
39 39 INCLUDES_libtests = include libqpdf
40 40  
41   -TC_SRCS_libtests = $(wildcard libqpdf/*.cc) $(wildcard libtests/*.cc)
  41 +TC_SRCS_libtests = $(wildcard libqpdf/*.cc) $(wildcard libtests/*.cc) libqpdf/qpdf/bits_functions.hh
42 42  
43 43 # -----
44 44  
... ...