diff options
| author | Neil <nyamatongwe@gmail.com> | 2013-07-21 14:30:14 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2013-07-21 14:30:14 +1000 | 
| commit | 7ab4b5ab14232d2a00246a8e6c77c73c5c8b78b7 (patch) | |
| tree | d9fa23b4d42123a37e709630255b39336c295802 | |
| parent | 68e4223dfcf19afec969e06727ff2fb22cf48420 (diff) | |
| download | scintilla-mirror-7ab4b5ab14232d2a00246a8e6c77c73c5c8b78b7.tar.gz | |
Standardising header guards and namespaces.
| -rw-r--r-- | gtk/Converter.h | 13 | ||||
| -rw-r--r-- | lexlib/LexerNoExceptions.h | 4 | ||||
| -rw-r--r-- | src/FontQuality.h | 13 | ||||
| -rw-r--r-- | src/KeyMap.h | 4 | ||||
| -rw-r--r-- | src/Partitioning.h | 9 | ||||
| -rw-r--r-- | src/SplitVector.h | 8 | ||||
| -rw-r--r-- | src/UniConversion.cxx | 12 | ||||
| -rw-r--r-- | src/UniConversion.h | 13 | ||||
| -rw-r--r-- | src/UnicodeFromUTF8.h | 13 | ||||
| -rw-r--r-- | win32/PlatWin.h | 13 | 
10 files changed, 98 insertions, 4 deletions
diff --git a/gtk/Converter.h b/gtk/Converter.h index 8e7e3e9ef..fe9e23199 100644 --- a/gtk/Converter.h +++ b/gtk/Converter.h @@ -3,6 +3,13 @@  // Copyright 2004 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. +#ifndef CONVERTER_H +#define CONVERTER_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  typedef GIConv ConverterHandle;  const ConverterHandle iconvhBad = (ConverterHandle)(-1);  // Since various versions of iconv can not agree on whether the src argument @@ -68,3 +75,9 @@ public:  		}  	}  }; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/lexlib/LexerNoExceptions.h b/lexlib/LexerNoExceptions.h index caac61a83..70ff3c138 100644 --- a/lexlib/LexerNoExceptions.h +++ b/lexlib/LexerNoExceptions.h @@ -5,8 +5,8 @@  // Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#ifndef LexerNoExceptions_H -#define LexerNoExceptions_H +#ifndef LEXERNOEXCEPTIONS_H +#define LEXERNOEXCEPTIONS_H  #ifdef SCI_NAMESPACE  namespace Scintilla { diff --git a/src/FontQuality.h b/src/FontQuality.h index 45600c35e..ee9426171 100644 --- a/src/FontQuality.h +++ b/src/FontQuality.h @@ -5,6 +5,13 @@  // Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. +#ifndef FONTQUALITY_H +#define FONTQUALITY_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  #define SC_EFF_QUALITY_MASK            0xF  #define SC_EFF_QUALITY_DEFAULT           0  #define SC_EFF_QUALITY_NON_ANTIALIASED   1 @@ -13,3 +20,9 @@  #define SCWIN_TECH_GDI 0  #define SCWIN_TECH_DIRECTWRITE 1 + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/src/KeyMap.h b/src/KeyMap.h index 3fbbeab69..2f14e2488 100644 --- a/src/KeyMap.h +++ b/src/KeyMap.h @@ -5,8 +5,8 @@  // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#ifndef KEYTOCOMMAND_H -#define KEYTOCOMMAND_H +#ifndef KEYMAP_H +#define KEYMAP_H  #ifdef SCI_NAMESPACE  namespace Scintilla { diff --git a/src/Partitioning.h b/src/Partitioning.h index 07f3c5d7b..18bcbc004 100644 --- a/src/Partitioning.h +++ b/src/Partitioning.h @@ -8,6 +8,10 @@  #ifndef PARTITIONING_H  #define PARTITIONING_H +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  /// A split vector of integers with a method for adding a value to all elements  /// in a range.  /// Used by the Partitioning class. @@ -186,4 +190,9 @@ public:  	}  }; + +#ifdef SCI_NAMESPACE +} +#endif +  #endif diff --git a/src/SplitVector.h b/src/SplitVector.h index 502101b6c..0c6e350cb 100644 --- a/src/SplitVector.h +++ b/src/SplitVector.h @@ -9,6 +9,10 @@  #ifndef SPLITVECTOR_H  #define SPLITVECTOR_H +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  template <typename T>  class SplitVector {  protected: @@ -280,4 +284,8 @@ public:  	}  }; +#ifdef SCI_NAMESPACE +} +#endif +  #endif diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx index ffe67f75c..1973dc7f2 100644 --- a/src/UniConversion.cxx +++ b/src/UniConversion.cxx @@ -9,6 +9,14 @@  #include "UniConversion.h" +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  enum { SURROGATE_LEAD_FIRST = 0xD800 };  enum { SURROGATE_TRAIL_FIRST = 0xDC00 };  enum { SURROGATE_TRAIL_LAST = 0xDFFF }; @@ -246,3 +254,7 @@ int UTF8Classify(const unsigned char *us, int len) {  		return UTF8MaskInvalid | 1;  	}  } + +#ifdef SCI_NAMESPACE +} +#endif diff --git a/src/UniConversion.h b/src/UniConversion.h index 70e8a9517..1c54506dd 100644 --- a/src/UniConversion.h +++ b/src/UniConversion.h @@ -5,6 +5,13 @@  // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. +#ifndef UNICONVERSION_H +#define UNICONVERSION_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  const int UTF8MaxBytes = 4;  unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen); @@ -39,3 +46,9 @@ const int UTF8NELLength = 2;  inline bool UTF8IsNEL(const unsigned char *us) {  	return (us[0] == 0xc2) && (us[1] == 0x85);  } + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/src/UnicodeFromUTF8.h b/src/UnicodeFromUTF8.h index 24517e8a2..ae66cb0a9 100644 --- a/src/UnicodeFromUTF8.h +++ b/src/UnicodeFromUTF8.h @@ -5,6 +5,13 @@  // Copyright 2013 by Neil Hodgson <neilh@scintilla.org>  // This file is in the public domain. +#ifndef UNICODEFROMUTF8_H +#define UNICODEFROMUTF8_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  inline int UnicodeFromUTF8(const unsigned char *us) {  	if (us[0] < 0xC2) {  		return us[0]; @@ -17,3 +24,9 @@ inline int UnicodeFromUTF8(const unsigned char *us) {  	}  	return us[0];  } + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/win32/PlatWin.h b/win32/PlatWin.h index b417ac138..93e1d7253 100644 --- a/win32/PlatWin.h +++ b/win32/PlatWin.h @@ -5,6 +5,13 @@  // Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. +#ifndef PLATWIN_H +#define PLATWIN_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif +  extern bool IsNT();  extern void Platform_Initialise(void *hInstance);  extern void Platform_Finalise(); @@ -14,3 +21,9 @@ extern bool LoadD2D();  extern ID2D1Factory *pD2DFactory;  extern IDWriteFactory *pIDWriteFactory;  #endif + +#ifdef SCI_NAMESPACE +} +#endif + +#endif  | 
