mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN: Use #pragma once rather than include guards in all c/C++ header files
This commit is contained in:
parent
64f0769b08
commit
45b377040f
@ -4,9 +4,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef CALIBRE_REFLOW_FONTS
|
||||
#define CALIBRE_REFLOW_FONTS
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
@ -102,4 +100,3 @@ class Fonts : public vector<XMLFont*> {
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef _CALIBRE_REFLOW_IMAGES
|
||||
#define _CALIBRE_REFLOW_IMAGES
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <GfxState.h>
|
||||
@ -127,4 +126,3 @@ namespace calibre_reflow {
|
||||
};
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
@ -5,9 +5,7 @@
|
||||
|
||||
|
||||
|
||||
#ifndef _CALIBRE_XML_LINKS
|
||||
#define _CALIBRE_XML_LINKS
|
||||
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
|
||||
@ -65,5 +63,4 @@ class XMLLinks : public vector<XMLLink*> {
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4,8 +4,7 @@
|
||||
* Based on pdftohtml from the poppler project.
|
||||
*/
|
||||
|
||||
#ifndef CALIBRE_REFLOW
|
||||
#define CALIBRE_REFLOW
|
||||
#pragma once
|
||||
#define UNICODE
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -248,4 +247,3 @@ class XMLOutputDev : public OutputDev {
|
||||
void process_link(Link* link);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
@ -4,9 +4,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _CALIBRE_REFLOW_UTILS
|
||||
#define _CALIBRE_REFLOW_UTILS
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
@ -45,4 +43,3 @@ inline string encode_for_xml(const string &sSrc )
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -55,8 +55,7 @@
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef PICTUREFLOW_H
|
||||
#define PICTUREFLOW_H
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -202,4 +201,3 @@ private:
|
||||
PictureFlowPrivate* d;
|
||||
};
|
||||
|
||||
#endif // PICTUREFLOW_H
|
||||
|
@ -15,6 +15,9 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef struct lz_info lz_info;
|
||||
typedef int (*get_chars_t)(lz_info *lzi, int n, unsigned char *buf);
|
||||
typedef int (*output_match_t)(lz_info *lzi, int match_pos, int match_len);
|
||||
|
@ -16,6 +16,8 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "msstdint.h"
|
||||
#endif
|
||||
|
@ -10,10 +10,10 @@
|
||||
* For further details, see the file COPYING.LIB distributed with libmspack
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef MSPACK_LZX_H
|
||||
#define MSPACK_LZX_H 1
|
||||
|
||||
/* LZX compression / decompression definitions */
|
||||
|
||||
@ -166,4 +166,3 @@ extern int lzxd_decompress(struct lzxd_stream *lzx, off_t out_bytes);
|
||||
*/
|
||||
void lzxd_free(struct lzxd_stream *lzx);
|
||||
|
||||
#endif
|
||||
|
@ -3,13 +3,10 @@
|
||||
*
|
||||
* Common declarations for Python module C glue code.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#ifndef LZXMODULE_H
|
||||
#define LZXMODULE_H
|
||||
|
||||
extern PyObject *LZXError;
|
||||
extern PyTypeObject CompressorType;
|
||||
|
||||
#endif /* LZXMODULE_H */
|
||||
|
@ -115,8 +115,7 @@
|
||||
* - #MSPACK_ERR_DECRUNCH indicates an error occured during decompression.
|
||||
*/
|
||||
|
||||
#ifndef LIB_MSPACK_H
|
||||
#define LIB_MSPACK_H 1
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -1479,4 +1478,3 @@ struct mskwaj_decompressor {
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -29,17 +29,12 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
#define _MSC_STDINT_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
// For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}'
|
||||
@ -228,5 +223,3 @@ typedef uint64_t uintmax_t;
|
||||
|
||||
#endif // __STDC_CONSTANT_MACROS ]
|
||||
|
||||
|
||||
#endif // _MSC_STDINT_H_ ]
|
||||
|
@ -7,8 +7,7 @@
|
||||
* For further details, see the file COPYING.LIB distributed with libmspack
|
||||
*/
|
||||
|
||||
#ifndef MSPACK_SYSTEM_H
|
||||
#define MSPACK_SYSTEM_H 1
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define inline
|
||||
@ -62,5 +61,3 @@ static inline size_t strlen(const char *s) {
|
||||
return e - s;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -10,6 +10,8 @@
|
||||
* (GEnie : OUTER; CIS : [71755,204])
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#undef D2_DES
|
||||
#undef D3_DES
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
| URL: http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
static unsigned long SP1[64] = {
|
||||
0x02080800L, 0x00080000L, 0x02000002L, 0x02080802L,
|
||||
0x02000000L, 0x00080802L, 0x00080002L, 0x02000002L,
|
||||
|
Loading…
x
Reference in New Issue
Block a user