[Ttssh2-commit] [3948] INIに値があるかないか判定するロジックを追加

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 7月 25日 (日) 23:55:15 JST


Revision: 3948
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3948
Author:   maya
Date:     2010-07-25 23:55:15 +0900 (Sun, 25 Jul 2010)

Log Message:
-----------
INIに値があるかないか判定するロジックを追加
  INIに書かれた値が""だった場合には区別が付かない
  作ったものの今のところ使わないのでコメントアウト

Modified Paths:
--------------
    trunk/installer/teraterm.iss


-------------- next part --------------
Modified: trunk/installer/teraterm.iss
===================================================================
--- trunk/installer/teraterm.iss	2010-07-22 08:36:34 UTC (rev 3947)
+++ trunk/installer/teraterm.iss	2010-07-25 14:55:15 UTC (rev 3948)
@@ -333,6 +333,29 @@
   end;
 end;
 
+{
+// If value is not found in INI, returns ""
+function GetIniString2(Section:String; Key:String; Filename:String) : String;
+var
+  Default1: String;
+  Default2: String;
+  Value1:   String;
+  Value2:   String;
+begin
+  Default1 := 'on';
+  Default2 := 'off';
+  Value1 := GetIniString(Section, Key, Default1, Filename);
+  Value2 := GetIniString(Section, Key, Default2, Filename);
+
+  if Value1 <> Value2 then
+    // no value in INI
+    Result := ''
+  else
+    // value in INI
+    Result := Value1
+end;
+}
+
 function GetDefaultIniFilename : String;
 begin
   Result := ExpandConstant('{app}') + '\TERATERM.INI';



Ttssh2-commit メーリングリストの案内
Back to archive index