*NIXコンソール用Google ToDo(Tasks) クライアント
Révision | 74b38441d3649ea4da5e7f5694e6d96fd3577341 (tree) |
---|---|
l'heure | 2021-03-08 20:55:30 |
Auteur | Koine Yuusuke(koinec) <koinec@user...> |
Commiter | Koine Yuusuke(koinec) |
Check exist default TaskList before Add/Move/Delete/Complete/Undo operation.
@@ -49,6 +49,12 @@ int | ||
49 | 49 | |
50 | 50 | if( NULL == pstr_id ) { return 0x03; } |
51 | 51 | |
52 | + if( NO_TODODATA == LibToDo_GetTopDataID() ) { | |
53 | + fputs(" Error!: Do not exist default TaskList in the cache.\n\n", stderr); | |
54 | + fputs(" Please load default TaskList from Google Cloud by executing the \"todocmd list -r\" command.\n\n", stderr ); | |
55 | + return 0x03; | |
56 | + } | |
57 | + | |
52 | 58 | i_confirm = Common_GetToDoID_fromIndicateStr( &i_taskid, pstr_id ); |
53 | 59 | if( 0x00 > i_confirm ) { |
54 | 60 | puts(" Error!: Invalid TaskID."); |
@@ -110,6 +116,12 @@ int | ||
110 | 116 | |
111 | 117 | if( NULL == pstr_id ) { return 0x03; } |
112 | 118 | |
119 | + if( NO_TODODATA == LibToDo_GetTopDataID() ) { | |
120 | + fputs(" Error!: Do not exist default TaskList in the cache.\n\n", stderr); | |
121 | + fputs(" Please load default TaskList from Google Cloud by executing the \"todocmd list -r\" command.\n\n", stderr ); | |
122 | + return 0x03; | |
123 | + } | |
124 | + | |
113 | 125 | i_confirm = Common_GetToDoID_fromIndicateStr( &i_taskid, pstr_id ); |
114 | 126 | if( 0x00 > i_confirm ) { |
115 | 127 | puts(" Error!: Invalid TaskID."); |
@@ -208,7 +220,13 @@ int | ||
208 | 220 | LibToDo_Data *p_tprev; |
209 | 221 | LibToDo_Data *p_tparent; |
210 | 222 | |
211 | - if( NULL == pstr_title ) { return 0x03; } | |
223 | + if( NULL == pstr_title ) { return 0x02; } | |
224 | + | |
225 | + if( NO_TODODATA == LibToDo_GetTopDataID() ) { | |
226 | + fputs(" Error!: Do not exist default TaskList in the cache.\n\n", stderr); | |
227 | + fputs(" Please load default TaskList from Google Cloud by executing the \"todocmd list -r\" command.\n\n", stderr ); | |
228 | + return 0x03; | |
229 | + } | |
212 | 230 | |
213 | 231 | // Alloc ToDoData Buffer --- |
214 | 232 | p_tdata = (LibToDo_Data *)malloc( 3 * sizeof( LibToDo_Data ) ); |
@@ -354,6 +372,12 @@ int | ||
354 | 372 | if( ! strncmp( pstr_taskid, pstr_previd, 64) ) |
355 | 373 | { return 0x03; } |
356 | 374 | |
375 | + if( NO_TODODATA == LibToDo_GetTopDataID() ) { | |
376 | + fputs(" Error!: Do not exist default TaskList in the cache.\n\n", stderr); | |
377 | + fputs(" Please load default TaskList from Google Cloud by executing the \"todocmd list -r\" command.\n\n", stderr ); | |
378 | + return 0x03; | |
379 | + } | |
380 | + | |
357 | 381 | // Alloc ToDoData Buffer --- |
358 | 382 | p_tdata = (LibToDo_Data *)malloc( 5 * sizeof( LibToDo_Data ) ); |
359 | 383 | if( NULL == p_tdata ) { return 0x04; } |
@@ -484,6 +508,12 @@ int | ||
484 | 508 | |
485 | 509 | if( NULL == pstr_id ) { return 0x03; } |
486 | 510 | |
511 | + if( NO_TODODATA == LibToDo_GetTopDataID() ) { | |
512 | + fputs(" Error!: Do not exist default TaskList in the cache.\n\n", stderr); | |
513 | + fputs(" Please load default TaskList from Google Cloud by executing the \"todocmd list -r\" command.\n\n", stderr ); | |
514 | + return 0x03; | |
515 | + } | |
516 | + | |
487 | 517 | i_confirm = Common_GetToDoID_fromIndicateStr( &i_taskid, pstr_id ); |
488 | 518 | if( 0x00 > i_confirm ) { |
489 | 519 | puts(" Error!: Invalid TaskID."); |