mirror of
https://github.com/qpdf/qpdf.git
synced 2024-05-29 16:30:53 +00:00
Rename bits_include.cc to qpdf/bits_functions.hh
It's better to just make it a .hh file to reduce confusion.
This commit is contained in:
parent
17c0e38c8e
commit
f030789104
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
#include <qpdf/QIntC.hh>
|
#include <qpdf/QIntC.hh>
|
||||||
|
|
||||||
// See comments in bits_include.cc
|
// See comments in bits_functions.hh
|
||||||
#define BITS_READ 1
|
#define BITS_READ 1
|
||||||
#include "bits_include.cc"
|
#include <qpdf/bits_functions.hh>
|
||||||
|
|
||||||
BitStream::BitStream(unsigned char const* p, size_t nbytes) :
|
BitStream::BitStream(unsigned char const* p, size_t nbytes) :
|
||||||
start(p),
|
start(p),
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#include <qpdf/BitWriter.hh>
|
#include <qpdf/BitWriter.hh>
|
||||||
|
|
||||||
// See comments in bits_include.cc
|
// See comments in bits_functions.hh
|
||||||
#define BITS_WRITE 1
|
#define BITS_WRITE 1
|
||||||
#include "bits_include.cc"
|
#include <qpdf/bits_functions.hh>
|
||||||
|
|
||||||
BitWriter::BitWriter(Pipeline* pl) :
|
BitWriter::BitWriter(Pipeline* pl) :
|
||||||
pl(pl),
|
pl(pl),
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// This file is #included in other source files.
|
#ifndef __BITS_FUNCTIONS_HH__
|
||||||
|
#define __BITS_FUNCTIONS_HH__
|
||||||
#ifndef __BITS_CC__
|
|
||||||
#define __BITS_CC__
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
@ -9,12 +7,13 @@
|
||||||
#include <qpdf/Pipeline.hh>
|
#include <qpdf/Pipeline.hh>
|
||||||
#include <qpdf/QUtil.hh>
|
#include <qpdf/QUtil.hh>
|
||||||
|
|
||||||
// These functions may be run at places where the function call
|
// This file is #included by specific source files, which must define
|
||||||
// overhead from test coverage testing would be too high. Therefore,
|
// certain preprocessor symbols. These functions may be run at places
|
||||||
// we make the test coverage cases conditional upon a preprocessor
|
// where the function call overhead from test coverage testing would
|
||||||
// symbol. BitStream.cc includes this file without defining the
|
// be too high. Therefore, we make the test coverage cases conditional
|
||||||
// symbol, and the specially designed test code that fully exercises
|
// upon a preprocessor symbol. Library code includes this file without
|
||||||
// this code includes with the symbol defined.
|
// BITS_TESTING, and the specially designed test code that fully
|
||||||
|
// exercises this code includes with the symbol defined.
|
||||||
|
|
||||||
#ifdef BITS_READ
|
#ifdef BITS_READ
|
||||||
static unsigned long long
|
static unsigned long long
|
||||||
|
@ -151,5 +150,4 @@ write_bits(unsigned char& ch, size_t& bit_offset,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // __BITS_FUNCTIONS_HH__
|
||||||
#endif // __BITS_CC__
|
|
|
@ -7,11 +7,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
// See comments in bits_include.cc
|
// See comments in bits_functions.hh
|
||||||
#define BITS_TESTING 1
|
#define BITS_TESTING 1
|
||||||
#define BITS_READ 1
|
#define BITS_READ 1
|
||||||
#define BITS_WRITE 1
|
#define BITS_WRITE 1
|
||||||
#include "../libqpdf/bits_include.cc"
|
#include <qpdf/bits_functions.hh>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_values(long long byte_offset, size_t bit_offset,
|
print_values(long long byte_offset, size_t bit_offset,
|
||||||
|
|
|
@ -38,7 +38,7 @@ $(TARGETS_libtests): $(TARGETS_libqpdf) $(TARGETS_qpdf)
|
||||||
|
|
||||||
INCLUDES_libtests = include libqpdf
|
INCLUDES_libtests = include libqpdf
|
||||||
|
|
||||||
TC_SRCS_libtests = $(wildcard libqpdf/*.cc) $(wildcard libtests/*.cc)
|
TC_SRCS_libtests = $(wildcard libqpdf/*.cc) $(wildcard libtests/*.cc) libqpdf/qpdf/bits_functions.hh
|
||||||
|
|
||||||
# -----
|
# -----
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user