• R/O
  • SSH
  • HTTPS

ttssh2: コミット


コミットメタ情報

リビジョン9036 (tree)
日時2020-11-22 00:12:40
作者zmatsuo

ログメッセージ

Releaseビルド時にデバグ出力が出ないようにした

変更サマリ

差分

--- trunk/teraterm/teraterm/winjump.c (revision 9035)
+++ trunk/teraterm/teraterm/winjump.c (revision 9036)
@@ -19,7 +19,7 @@
1919 */
2020
2121 /*
22- * Copyright (C) 2011-2017 TeraTerm Project
22+ * Copyright (C) 2011-2020 TeraTerm Project
2323 * All rights reserved.
2424 *
2525 * Redistribution and use in source and binary forms, with or without
@@ -451,7 +451,6 @@
451451 //void *psettings_tmp;
452452 IPropertyStore *pPS;
453453 PROPVARIANT pv;
454- int len;
455454 HRESULT result;
456455
457456 /* Retrieve path to executable. */
@@ -459,6 +458,7 @@
459458 GetModuleFileName(NULL, tt_path, sizeof(tt_path) - 1);
460459
461460 if (appname) {
461+ size_t len;
462462 tmp_ptr = strrchr(tt_path, '\\');
463463 len = (tmp_ptr - tt_path) + strlen(appname) + 2;
464464 app_path = malloc(len);
@@ -477,24 +477,32 @@
477477
478478 /* Set path, parameters, icon and description. */
479479 result = ret->lpVtbl->SetPath(ret, app_path);
480+#if _DEBUG
480481 if (result != S_OK)
481482 OutputDebugPrintf("SetPath failed. (%ld)\n", result);
483+#endif
482484
483485 param_string = _strdup(sessionname);
484486 result = ret->lpVtbl->SetArguments(ret, param_string);
487+#if _DEBUG
485488 if (result != S_OK)
486489 OutputDebugPrintf("SetArguments failed. (%ld)\n", result);
490+#endif
487491 free(param_string);
488492
489493 desc_string = _strdup("Connect to Tera Term session");
490494 result = ret->lpVtbl->SetDescription(ret, desc_string);
495+#if _DEBUG
491496 if (result != S_OK)
492497 OutputDebugPrintf("SetDescription failed. (%ld)\n", result);
498+#endif
493499 free(desc_string);
494500
495501 result = ret->lpVtbl->SetIconLocation(ret, app_path, 0);
502+#if _DEBUG
496503 if (result != S_OK)
497504 OutputDebugPrintf("SetIconLocation failed. (%ld)\n", result);
505+#endif
498506
499507 /* To set the link title, we require the property store of the link. */
500508 if (SUCCEEDED(ret->lpVtbl->QueryInterface(ret, COMPTR(IPropertyStore, &pPS)))) {
@@ -502,15 +510,21 @@
502510 pv.vt = VT_LPSTR;
503511 pv.pszVal = _strdup(sessionname);
504512 result = pPS->lpVtbl->SetValue(pPS, &PKEY_Title, &pv);
513+#if _DEBUG
505514 if (result != S_OK)
506515 OutputDebugPrintf("SetValue failed. (%ld)\n", result);
516+#endif
507517 free(pv.pszVal);
508518 result = pPS->lpVtbl->Commit(pPS);
519+#if _DEBUG
509520 if (result != S_OK)
510521 OutputDebugPrintf("Commit failed. (%ld)\n", result);
522+#endif
511523 result = pPS->lpVtbl->Release(pPS);
524+#if _DEBUG
512525 if (result != S_OK)
513526 OutputDebugPrintf("Release shell link failed. (%ld)\n", result);
527+#endif
514528 }
515529
516530 free(app_path);
@@ -583,7 +597,9 @@
583597 break;
584598 }
585599
600+#if _DEBUG
586601 OutputDebugPrintf("%s\n", piterator);
602+#endif
587603 link = make_shell_link(NULL, piterator);
588604 if (link) {
589605 UINT j;
@@ -605,20 +621,26 @@
605621 found = TRUE;
606622 }
607623 result = rlink->lpVtbl->Release(rlink);
624+#if _DEBUG
608625 if (result != S_OK)
609626 OutputDebugPrintf("Release rlink failed. (%ld)\n", result);
627+#endif
610628 }
611629 }
612630
613631 if (!found) {
614632 result = collection->lpVtbl->AddObject(collection, (IUnknown *)link);
633+#if _DEBUG
615634 if (result != S_OK)
616635 OutputDebugPrintf("AddObject link failed. (%ld)\n", result);
636+#endif
617637 }
618638
619639 result = link->lpVtbl->Release(link);
640+#if _DEBUG
620641 if (result != S_OK)
621642 OutputDebugPrintf("Release link failed. (%ld)\n", result);
643+#endif
622644 link = NULL;
623645 }
624646 }
@@ -632,8 +654,10 @@
632654 goto cleanup;
633655
634656 result = pCDL->lpVtbl->AppendCategory(pCDL, L"Recent Sessions", array);
657+#if _DEBUG
635658 if (result != S_OK)
636659 OutputDebugPrintf("AppendCategory array failed. (%ld)\n", result);
660+#endif
637661
638662 /*
639663 * Create an object collection to form the 'Tasks' category on the
@@ -653,8 +677,10 @@
653677 goto cleanup;
654678
655679 result = pCDL->lpVtbl->AddUserTasks(pCDL, array);
680+#if _DEBUG
656681 if (result != S_OK)
657682 OutputDebugPrintf("AddUserTasks array failed. (0x%x)\n", result);
683+#endif
658684
659685 /*
660686 * Now we can clean up the array and collection variables, so as
@@ -661,12 +687,16 @@
661687 * to be able to reuse them.
662688 */
663689 result = array->lpVtbl->Release(array);
690+#if _DEBUG
664691 if (result != S_OK)
665692 OutputDebugPrintf("Release array failed. (%ld)\n", result);
693+#endif
666694 array = NULL;
667695 result = collection->lpVtbl->Release(collection);
696+#if _DEBUG
668697 if (result != S_OK)
669698 OutputDebugPrintf("Release collection failed. (%ld)\n", result);
699+#endif
670700 collection = NULL;
671701
672702 /*
@@ -687,8 +717,10 @@
687717 goto cleanup;
688718
689719 result = pCDL->lpVtbl->AddUserTasks(pCDL, array);
720+#if _DEBUG
690721 if (result != S_OK)
691722 OutputDebugPrintf("AddUserTasks array2 failed. (0x%x)\n", result);
723+#endif
692724
693725 /*
694726 * Now we can clean up the array and collection variables, so as
@@ -695,12 +727,16 @@
695727 * to be able to reuse them.
696728 */
697729 result = array->lpVtbl->Release(array);
730+#if _DEBUG
698731 if (result != S_OK)
699732 OutputDebugPrintf("Release array2 failed. (%ld)\n", result);
733+#endif
700734 array = NULL;
701735 result = collection->lpVtbl->Release(collection);
736+#if _DEBUG
702737 if (result != S_OK)
703738 OutputDebugPrintf("Release collection2 failed. (%ld)\n", result);
739+#endif
704740 collection = NULL;
705741
706742 /*
@@ -707,8 +743,10 @@
707743 * Commit the jump list.
708744 */
709745 result = pCDL->lpVtbl->CommitList(pCDL);
746+#if _DEBUG
710747 if (result != S_OK)
711748 OutputDebugPrintf("CommitList failed. (%ld)\n", result);
749+#endif
712750 need_abort = FALSE;
713751
714752 /*
旧リポジトリブラウザで表示