Commits

Takashi Sawanaka committed f82b94e

Fix mixed EOL

Comments (0)

Files changed (5)

Src/Common/SplitterWndEx.h

 	void LockBar(BOOL bState=TRUE){m_bBarLocked=bState;};
 	void ResizablePanes(BOOL bState=TRUE){m_bResizePanes=bState;};
 	void AutoResizePanes(BOOL bState=TRUE){m_bAutoResizePanes=bState;};
-	void FlipSplit();
+	void FlipSplit();
 
 	int HitTest(CPoint pt) const;
 

Src/Common/Ucs2Utf8.cpp

 	// quick way 
 	UINT i=0;
 	for (i = 0 ; i < nUcs && nremains > 10; ++i)
-	{
-		if (psUcs[i] >= 0xd800 && psUcs[i] <= 0xdfff && i + 1 < nUcs)
-		{
-			UINT uchar = ((psUcs[i] & 0x3ff) << 10) | (psUcs[i + 1] & 0x3ff) | 0x10000;
-			nremains -= ucr::to_utf8_advance(uchar, pc);
-			i++;
-		}
-		else
-		{
+	{
+		if (psUcs[i] >= 0xd800 && psUcs[i] <= 0xdfff && i + 1 < nUcs)
+		{
+			UINT uchar = ((psUcs[i] & 0x3ff) << 10) | (psUcs[i + 1] & 0x3ff) | 0x10000;
+			nremains -= ucr::to_utf8_advance(uchar, pc);
+			i++;
+		}
+		else
+		{
 			nremains -= ucr::to_utf8_advance(psUcs[i], pc);
-		}
-	}
+		}
+	}
 
 	// be careful for the end of the buffer, risk of overflow because
 	// of the variable length of the UTF-8 character
 	int nremainsend = nremains;
 	unsigned char * pcTemp = (unsigned char *) smallTempBuffer;
 	for ( ; i < nUcs && nremainsend > 0; ++i)
-	{
-		if (psUcs[i] >= 0xd800 && psUcs[i] <= 0xdfff && i + 1 < nUcs)
-		{
-			UINT uchar = ((psUcs[i] & 0x3ff) << 10) | (psUcs[i + 1] & 0x3ff) | 0x10000;
-			nremainsend -= ucr::to_utf8_advance(uchar, pc);
-			i++;
-		}
-		else
-		{
+	{
+		if (psUcs[i] >= 0xd800 && psUcs[i] <= 0xdfff && i + 1 < nUcs)
+		{
+			UINT uchar = ((psUcs[i] & 0x3ff) << 10) | (psUcs[i + 1] & 0x3ff) | 0x10000;
+			nremainsend -= ucr::to_utf8_advance(uchar, pc);
+			i++;
+		}
+		else
+		{
 			nremainsend -= ucr::to_utf8_advance(psUcs[i], pcTemp);
-		}
-	}
+		}
+	}
 
 	int ncomplement = min(nremains, pcTemp-smallTempBuffer);
 	CopyMemory(pc, smallTempBuffer, ncomplement);

Src/CompareOptions.cpp

 {
 }
 
-/**
- * @brief Sets options from DiffutilsOptions structure.
- * @param [in] options Diffutils options.
- */
-DiffutilsOptions::DiffutilsOptions(const DiffutilsOptions& options)
-: CompareOptions(options)
-{
-	m_bIgnoreBlankLines = options.m_bIgnoreBlankLines;
-	m_bIgnoreCase = options.m_bIgnoreCase;
-	m_bIgnoreEOLDifference = options.m_bIgnoreEOLDifference;
-	m_contextLines = options.m_contextLines;
-	m_filterCommentsLines = options.m_filterCommentsLines;
-	m_ignoreWhitespace = options.m_ignoreWhitespace;
-	m_outputStyle = options.m_outputStyle;
-	m_bIgnoreEOLDifference = options.m_bIgnoreEOLDifference;
+/**
+ * @brief Sets options from DiffutilsOptions structure.
+ * @param [in] options Diffutils options.
+ */
+DiffutilsOptions::DiffutilsOptions(const DiffutilsOptions& options)
+: CompareOptions(options)
+{
+	m_bIgnoreBlankLines = options.m_bIgnoreBlankLines;
+	m_bIgnoreCase = options.m_bIgnoreCase;
+	m_bIgnoreEOLDifference = options.m_bIgnoreEOLDifference;
+	m_contextLines = options.m_contextLines;
+	m_filterCommentsLines = options.m_filterCommentsLines;
+	m_ignoreWhitespace = options.m_ignoreWhitespace;
+	m_outputStyle = options.m_outputStyle;
+	m_bIgnoreEOLDifference = options.m_bIgnoreEOLDifference;
 }
 
 /**

Src/CompareOptions.h

 public:
 	DiffutilsOptions();
 	DiffutilsOptions(const CompareOptions& options);
-	DiffutilsOptions(const DiffutilsOptions& options);
+	DiffutilsOptions(const DiffutilsOptions& options);
 	void SetToDiffUtils();
 	void GetAsDiffOptions(DIFFOPTIONS &options);
 	virtual void SetFromDiffOptions(const DIFFOPTIONS & options);

Src/DiffWrapper.h

 	void WritePatchFileTerminator(enum output_style output_style);
 	void SetFilterList(LPCTSTR filterStr);
 	void EnablePlugins(bool enable);
-	bool IsTrivialBytes(const char* Start, const char* End,
-		const FilterCommentsSet& filtercommentsset);
-	bool IsTrivialLine(const std::string &Line, const char * StartOfComment,
-	   const char * EndOfComment, const char * InLineComment,
-	   const FilterCommentsSet& filtercommentsset);
-	bool PostFilter(int StartPos, int EndPos, int Direction,
-		int QtyLinesInBlock, OP_TYPE &Op, int FileNo,
-		const FilterCommentsSet& filtercommentsset);
-	void PostFilter(int LineNumberLeft, int QtyLinesLeft, int LineNumberRight,
-		int QtyLinesRight, OP_TYPE &Op, const FilterCommentsManager &filtercommentsmanager,
-		const TCHAR *FileNameExt);
+	bool IsTrivialBytes(const char* Start, const char* End,
+		const FilterCommentsSet& filtercommentsset);
+	bool IsTrivialLine(const std::string &Line, const char * StartOfComment,
+	   const char * EndOfComment, const char * InLineComment,
+	   const FilterCommentsSet& filtercommentsset);
+	bool PostFilter(int StartPos, int EndPos, int Direction,
+		int QtyLinesInBlock, OP_TYPE &Op, int FileNo,
+		const FilterCommentsSet& filtercommentsset);
+	void PostFilter(int LineNumberLeft, int QtyLinesLeft, int LineNumberRight,
+		int QtyLinesRight, OP_TYPE &Op, const FilterCommentsManager &filtercommentsmanager,
+		const TCHAR *FileNameExt);
 
 protected:
 	String FormatSwitchString();