File tree Expand file tree Collapse file tree 3 files changed +5
-21
lines changed
Expand file tree Collapse file tree 3 files changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -175,29 +175,21 @@ bool PackChk::CheckPackage()
175175int PackChk::Check (int argc, const char * argv[], const char * envp[])
176176{
177177 const string header = m_packOptions.GetHeader ();
178- LogMsg ( " M001 " , TXT ( header)) ;
178+ cout << header << endl ;
179179
180180 ParseOptions parseOptions (m_packOptions);
181181 ParseOptions::Result result = parseOptions.Parse (argc, argv);
182182
183- // Add date and time to log file
184- if (!m_packOptions.GetLogPath ().empty ()) {
185- string dateTime = m_packOptions.GetCurrentDateTime ();
186- LogMsg (" M002" , TXT (" Log created on " ), TXT2 (dateTime));
187- }
188-
189183 switch (result) {
190184 case ParseOptions::Result::Ok:
191185 break ;
192186 case ParseOptions::Result::ExitNoError:
193187 return 0 ;
194188 case ParseOptions::Result::Error:
195- if (!ErrLog::Get ()->GetErrCnt ()) {
196- LogMsg (" M105" );
197- }
198189 return 1 ;
199190 }
200191
192+ LogMsg (" M001" , TXT (header));
201193 bool bOk = CheckPackage ();
202194
203195 if (ErrLog::Get ()->GetErrCnt () || !bOk) {
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ bool CPackOptions::SetDisableValidation(bool bDisable)
340340*/
341341const string CPackOptions::GetVersionInfo ()
342342{
343- return ORIGINAL_FILENAME + string ( " " ) + VERSION_STRING + " " + COPYRIGHT_NOTICE ;
343+ return VERSION_STRING;
344344}
345345
346346/* *
@@ -360,14 +360,7 @@ const string CPackOptions::GetVersion()
360360*/
361361const string CPackOptions::GetHeader ()
362362{
363- string header = string (PRODUCT_NAME);
364- header += " " ;
365- header += GetVersion ();
366- header += " " ;
367- header += string (COPYRIGHT_NOTICE);
368- header += " \n " ;
369-
370- return header;
363+ return ORIGINAL_FILENAME + string (" " ) + VERSION_STRING + " " + COPYRIGHT_NOTICE;
371364}
372365
373366/* *
Original file line number Diff line number Diff line change @@ -193,13 +193,12 @@ bool ParseOptions::SetDisableValidation(bool bDisable)
193193 */
194194ParseOptions::Result ParseOptions::Parse (int argc, const char * argv[])
195195{
196- const string header = m_packOptions.GetHeader ();
197196 const string fileName = m_packOptions.GetProgramName ();
198197 bool bOk = true ;
199198 cxxopts::ParseResult parseResult;
200199
201200 try {
202- cxxopts::Options options (fileName, header );
201+ cxxopts::Options options (fileName);
203202
204203 options
205204 .set_width (80 )
You can’t perform that action at this time.
0 commit comments