Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Commit

Permalink
unify format of include guards
Browse files Browse the repository at this point in the history
related to #1
  • Loading branch information
jeongukjae committed Jan 1, 2020
1 parent f2679da commit ce43d6d
Show file tree
Hide file tree
Showing 26 changed files with 92 additions and 79 deletions.
7 changes: 4 additions & 3 deletions Includes/mecab.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Copyright(C) 2001-2011 Taku Kudo <taku@chasen.org>
Copyright(C) 2004-2006 Nippon Telegraph and Telephone Corporation
*/
#ifndef MECAB_MECAB_H_
#define MECAB_MECAB_H_
#ifndef _MECAB_MECAB_H_
#define _MECAB_MECAB_H_

/* C/C++ common data structures */

Expand Down Expand Up @@ -1491,4 +1491,5 @@ MECAB_DLL_EXTERN const char* getTaggerError();
#endif
} // namespace MeCab
#endif
#endif /* MECAB_MECAB_H_ */

#endif /* _MECAB_MECAB_H_ */
7 changes: 4 additions & 3 deletions Includes/mecab/char_property.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_CHARACTER_CATEGORY_H_
#define MECAB_CHARACTER_CATEGORY_H_
#ifndef _MECAB_CHARACTER_CATEGORY_H_
#define _MECAB_CHARACTER_CATEGORY_H_

#include "mecab/mmap.h"
#include "mecab/scoped_ptr.h"
Expand Down Expand Up @@ -83,4 +83,5 @@ class CharProperty {
whatlog what_;
};
} // namespace MeCab
#endif // MECAB_CHARACTER_CATEGORY_H_

#endif // _MECAB_CHARACTER_CATEGORY_H_
6 changes: 3 additions & 3 deletions Includes/mecab/common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_COMMON_H_
#define MECAB_COMMON_H_
#ifndef _MECAB_COMMON_H_
#define _MECAB_COMMON_H_

#include <algorithm>
#include <cmath>
Expand Down Expand Up @@ -101,4 +101,4 @@ class wlog {
#define CHECK_DIE(condition) \
(condition) ? 0 : die() & std::cerr << __FILE__ << "(" << __LINE__ << ") [" << #condition << "] "

#endif // MECAB_COMMON_H_
#endif // _MECAB_COMMON_H_
7 changes: 4 additions & 3 deletions Includes/mecab/connector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_CONNECTOR_H_
#define MECAB_CONNECTOR_H_
#ifndef _MECAB_CONNECTOR_H_
#define _MECAB_CONNECTOR_H_

#include "mecab.h"
#include "mecab/common.h"
Expand Down Expand Up @@ -54,4 +54,5 @@ class Connector {
virtual ~Connector() { this->close(); }
};
} // namespace MeCab
#endif // MECAB_CONNECTOR_H_

#endif // _MECAB_CONNECTOR_H_
7 changes: 4 additions & 3 deletions Includes/mecab/context_id.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_CONTEXT_ID_H
#define MECAB_CONTEXT_ID_H
#ifndef _MECAB_CONTEXT_ID_H_
#define _MECAB_CONTEXT_ID_H_

#include <map>
#include <string>
Expand Down Expand Up @@ -36,4 +36,5 @@ class ContextID {
bool is_valid(size_t lid, size_t rid) { return (lid >= 0 && lid < left_size() && rid >= 0 && rid < right_size()); }
};
} // namespace MeCab
#endif

#endif // _MECAB_CONTEXT_ID_H_
7 changes: 4 additions & 3 deletions Includes/mecab/darts.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Copyright(C) 2001-2007 Taku Kudo <taku@chasen.org>
*/
#ifndef DARTS_H_
#define DARTS_H_
#ifndef _DARTS_H_
#define _DARTS_H_

#define DARTS_VERSION "0.31"
#include <cstdio>
Expand Down Expand Up @@ -514,4 +514,5 @@ typedef Darts::DoubleArrayImpl<char, unsigned char, long long, unsigned long lon
#endif
} // namespace Darts
} // namespace MeCab
#endif

#endif // _DARTS_H_
6 changes: 3 additions & 3 deletions Includes/mecab/dictionary.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_DICTIONARY_H_
#define MECAB_DICTIONARY_H_
#ifndef _MECAB_DICTIONARY_H_
#define _MECAB_DICTIONARY_H_

#include "mecab.h"
#include "mecab/char_property.h"
Expand Down Expand Up @@ -80,4 +80,4 @@ class Dictionary {
Darts::DoubleArray da_;
};
} // namespace MeCab
#endif // MECAB_DICTIONARY_H_
#endif // _MECAB_DICTIONARY_H_
9 changes: 5 additions & 4 deletions Includes/mecab/dictionary_rewriter.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef MECAB_DICTIONARY_REWRITER_H
#define MECAB_DICTIONARY_REWRITER_H
#ifndef _MECAB_DICTIONARY_REWRITER_H_
#define _MECAB_DICTIONARY_REWRITER_H_

#include <map>
#include <string>
#include <vector>

#include "mecab.h"
#include "mecab/common.h"
#include "mecab/freelist.h"
#include "mecab.h"

namespace MeCab {

Expand Down Expand Up @@ -59,4 +59,5 @@ class POSIDGenerator {
int id(const char* key) const;
};
} // namespace MeCab
#endif

#endif // _MECAB_DICTIONARY_REWRITER_H_
7 changes: 4 additions & 3 deletions Includes/mecab/feature_index.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_FEATUREINDEX_H_
#define MECAB_FEATUREINDEX_H_
#ifndef _MECAB_FEATUREINDEX_H_
#define _MECAB_FEATUREINDEX_H_

#include <map>
#include <vector>
Expand Down Expand Up @@ -98,4 +98,5 @@ class DecoderFeatureIndex : public FeatureIndex {
const char* charset_;
};
} // namespace MeCab
#endif

#endif // _MECAB_FEATUREINDEX_H_
7 changes: 4 additions & 3 deletions Includes/mecab/freelist.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_FREELIST_H
#define MECAB_FREELIST_H
#ifndef _MECAB_FREELIST_H
#define _MECAB_FREELIST_H

#include <algorithm>
#include <vector>
Expand Down Expand Up @@ -80,4 +80,5 @@ class ChunkFreeList {
}
};
} // namespace MeCab
#endif

#endif // _MECAB_FREELIST_H
6 changes: 3 additions & 3 deletions Includes/mecab/iconv_utils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_ICONV_H
#define MECAB_ICONV_H
#ifndef _MECAB_ICONV_H_
#define _MECAB_ICONV_H_

#include <iconv.h>

Expand All @@ -17,4 +17,4 @@ class Iconv {
};
} // namespace MeCab

#endif
#endif // _MECAB_ICONV_H_
6 changes: 3 additions & 3 deletions Includes/mecab/lbfgs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_LBFGS_H_
#define MECAB_LBFGS_H_
#ifndef _MECAB_LBFGS_H_
#define _MECAB_LBFGS_H_

#include <iostream>
#include <vector>
Expand Down Expand Up @@ -75,4 +75,4 @@ class LBFGS {
};
} // namespace MeCab

#endif
#endif // _MECAB_LBFGS_H_
6 changes: 3 additions & 3 deletions Includes/mecab/learner_node.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_LEARNER_NODE_H_
#define MECAB_LEARNER_NODE_H_
#ifndef _MECAB_LEARNER_NODE_H_
#define _MECAB_LEARNER_NODE_H_

#include <cstring>

Expand Down Expand Up @@ -119,4 +119,4 @@ inline void calc_beta(LearnerNode* n) {
}
} // namespace MeCab

#endif // MECAB_LEARNER_NODE_H_
#endif // _MECAB_LEARNER_NODE_H_
6 changes: 3 additions & 3 deletions Includes/mecab/learner_tagger.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_TAGGER_H
#define MECAB_TAGGER_H
#ifndef _MECAB_TAGGER_H
#define _MECAB_TAGGER_H

#include <vector>

Expand Down Expand Up @@ -73,4 +73,4 @@ class DecoderLearnerTagger : public LearnerTagger {
};
} // namespace MeCab

#endif
#endif // _MECAB_TAGGER_H
7 changes: 4 additions & 3 deletions Includes/mecab/mmap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_MMAP_H
#define MECAB_MMAP_H
#ifndef _MECAB_MMAP_H_
#define _MECAB_MMAP_H_

#include <errno.h>
#include <sys/stat.h>
Expand Down Expand Up @@ -87,4 +87,5 @@ class Mmap {
virtual ~Mmap() { this->close(); }
};
} // namespace MeCab
#endif

#endif // _MECAB_MMAP_H_
6 changes: 3 additions & 3 deletions Includes/mecab/nbest_generator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_NBEST_GENERATOR_H_
#define MECAB_NBEST_GENERATOR_H_
#ifndef _MECAB_NBEST_GENERATOR_H_
#define _MECAB_NBEST_GENERATOR_H_

#include <queue>

Expand Down Expand Up @@ -33,4 +33,4 @@ class NBestGenerator {
};
} // namespace MeCab

#endif // MECAB_NBEST_GENERATOR_H_
#endif // _MECAB_NBEST_GENERATOR_H_
6 changes: 3 additions & 3 deletions Includes/mecab/param.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_PARAM_H
#define MECAB_PARAM_H
#ifndef _MECAB_PARAM_H_
#define _MECAB_PARAM_H_

#include <map>
#include <sstream>
Expand Down Expand Up @@ -82,4 +82,4 @@ class Param {
};
} // namespace MeCab

#endif
#endif // _MECAB_PARAM_H_
7 changes: 4 additions & 3 deletions Includes/mecab/scoped_ptr.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_SCOPED_PTR_H
#define MECAB_SCOPED_PTR_H
#ifndef _MECAB_SCOPED_PTR_H_
#define _MECAB_SCOPED_PTR_H_

#include <cstring>
#include <string>
Expand Down Expand Up @@ -87,4 +87,5 @@ class scoped_string : public scoped_array<char> {
}
};
} // namespace MeCab
#endif

#endif // _MECAB_SCOPED_PTR_H_
6 changes: 3 additions & 3 deletions Includes/mecab/stream_wrapper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_STREAM_WRAPPER_H_
#define MECAB_STREAM_WRAPPER_H_
#ifndef _MECAB_STREAM_WRAPPER_H_
#define _MECAB_STREAM_WRAPPER_H_

#include <cstring>
#include <fstream>
Expand Down Expand Up @@ -52,4 +52,4 @@ class ostream_wrapper {
};
} // namespace MeCab

#endif // MECAB_STREAM_WRAPPER_H_
#endif // _MECAB_STREAM_WRAPPER_H_
6 changes: 3 additions & 3 deletions Includes/mecab/string_buffer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_STRINGBUFFER_H
#define MECAB_STRINGBUFFER_H
#ifndef _MECAB_STRINGBUFFER_H
#define _MECAB_STRINGBUFFER_H

#include <string>

Expand Down Expand Up @@ -69,4 +69,4 @@ class StringBuffer {
};
} // namespace MeCab

#endif
#endif // _MECAB_STRINGBUFFER_H
7 changes: 4 additions & 3 deletions Includes/mecab/thread.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_THREAD_H
#define MECAB_THREAD_H
#ifndef _MECAB_THREAD_H_
#define _MECAB_THREAD_H_

#include <pthread.h>

Expand All @@ -25,4 +25,5 @@ class thread {
virtual ~thread() {}
};
} // namespace MeCab
#endif

#endif // _MECAB_THREAD_H_
6 changes: 3 additions & 3 deletions Includes/mecab/tokenizer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_TOKENIZER_H_
#define MECAB_TOKENIZER_H_
#ifndef _MECAB_TOKENIZER_H_
#define _MECAB_TOKENIZER_H_

#include "mecab.h"
#include "mecab/char_property.h"
Expand Down Expand Up @@ -121,4 +121,4 @@ class Tokenizer {
virtual ~Tokenizer() { this->close(); }
};
} // namespace MeCab
#endif // MECAB_TOKENIZER_H_
#endif // _MECAB_TOKENIZER_H_
6 changes: 3 additions & 3 deletions Includes/mecab/ucs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_UCS_H
#define MECAB_UCS_H
#ifndef _MECAB_UCS_H_
#define _MECAB_UCS_H_

namespace MeCab {

Expand Down Expand Up @@ -84,4 +84,4 @@ inline unsigned short utf16_to_ucs2(const char* begin, const char* end, size_t*
}
} // namespace MeCab

#endif
#endif // _MECAB_UCS_H_
7 changes: 4 additions & 3 deletions Includes/mecab/utils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_UTILS_H
#define MECAB_UTILS_H
#ifndef _MECAB_UTILS_H_
#define _MECAB_UTILS_H_

#include <stdint.h>

Expand Down Expand Up @@ -235,4 +235,5 @@ inline char getEscapedChar(const char p) {
uint64_t fingerprint(const char* str, size_t size);
uint64_t fingerprint(const std::string& str);
} // namespace MeCab
#endif

#endif // _MECAB_UTILS_H_
7 changes: 4 additions & 3 deletions Includes/mecab/viterbi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_VITERBI_H_
#define MECAB_VITERBI_H_
#ifndef _MECAB_VITERBI_H_
#define _MECAB_VITERBI_H_

#include <vector>

Expand Down Expand Up @@ -50,4 +50,5 @@ class Viterbi {
whatlog what_;
};
} // namespace MeCab
#endif // MECAB_VITERBI_H_

#endif // _MECAB_VITERBI_H_
6 changes: 3 additions & 3 deletions Includes/mecab/writer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MECAB_WRITER_H_
#define MECAB_WRITER_H_
#ifndef _MECAB_WRITER_H_
#define _MECAB_WRITER_H_

#include <string>

Expand Down Expand Up @@ -46,4 +46,4 @@ class Writer {
};
} // namespace MeCab

#endif // WRITER_H_
#endif // _MECAB_WRITER_H_

0 comments on commit ce43d6d

Please sign in to comment.