OSDN Git Service

Update Email Subject at sendmaildlg
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Patch.cpp
1 #include "StdAfx.h"\r
2 #include "Patch.h"\r
3 \r
4 CPatch::CPatch()\r
5 {\r
6         \r
7 }\r
8 \r
9 CPatch::~CPatch()\r
10 {\r
11         \r
12 \r
13 }\r
14 \r
15 int CPatch::Parser(CString &pathfile)\r
16 {\r
17         CString str;\r
18 \r
19         CStdioFile PatchFile;\r
20 \r
21         m_PathFile=pathfile;\r
22         if( ! PatchFile.Open(pathfile,CFile::modeRead) )\r
23                 return -1;\r
24         \r
25         int i=0;\r
26         while(PatchFile.ReadString(str))\r
27         {\r
28                 if(i==1)\r
29                         this->m_Author=str.Right( str.GetLength() - 6 );\r
30                 if(i==2)\r
31                         this->m_Date = str.Right( str.GetLength() - 6 );\r
32                 if(i==3)\r
33                         this->m_Subject = str.Right( str.GetLength() - 8 );\r
34                 if(i==4)\r
35                         break;\r
36                 i++;            \r
37         }\r
38 \r
39 \r
40         PatchFile.Close();\r
41 \r
42 }