2 #include "Task/TaskFile.hpp"
7 main(int argc
, char **argv
)
9 Args
args(argc
, argv
, "FILE.tsk|cup|igc");
10 tstring path
= args
.ExpectNextT();
13 std::unique_ptr
<TaskFile
> file(TaskFile::Create(path
.c_str()));
15 fprintf(stderr
, "TaskFile::Create() failed\n");
19 unsigned count
= file
->Count();
20 printf("Number of tasks: %u\n---\n", count
);
22 for (unsigned i
= 0; i
< count
; ++i
) {
23 const TCHAR
*saved_name
= file
->GetName(i
);
24 _tprintf(_T("%u: %s\n"), i
, saved_name
!= NULL
? saved_name
: _T(""));