Changeset 7
- Timestamp:
- May 2, 2014, 10:29:24 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.pas
r6 r7 71 71 procedure TFormMain.FormShow(Sender: TObject); 72 72 begin 73 Config.LoadFromDir('/home/ chronos/Stažené/linux-3.14.1', 'x86');73 Config.LoadFromDir('/home/jha/Projekty/fpc/kernel_options/linux-3.0', 'x86'); 74 74 Reload; 75 75 end; … … 141 141 Config2 := TConfigMenu.Create; 142 142 Config.TopNode.SaveToList(List1); 143 Config2.LoadFromDir('/ home/chronos/Stažené/linux-3.12.18', 'x86');143 Config2.LoadFromDir('/opt/elinos-D6.0/linux/linux-p4-3.0/', 'p4'); 144 144 Config2.TopNode.SaveToList(List2); 145 145 Config.CompareStringLists(List1, List2, Missing1, Missing2); 146 Config2.OptionListNames(Missing1); 147 Config.OptionListNames(Missing2); 146 148 FormCompare.Memo1.Lines.Assign(Missing1); 147 149 FormCompare.Memo2.Lines.Assign(Missing2); -
trunk/UKConfig.pas
r6 r7 1 1 unit UKConfig; 2 3 // Kconfig format specification: 4 // https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt 2 5 3 6 {$mode Delphi}{$H+} … … 73 76 BaseDir: string; 74 77 Version: string; 78 procedure OptionListNames(List: TStringList); 75 79 procedure PrepareMoveList(var List: TObjectMoves); 76 80 procedure CompareStringLists(List1, List2: TStringList; Missing1, … … 121 125 function TMenuNode.GetAbsoluteName: string; 122 126 begin 123 if Assigned(Parent) then Result := Parent.GetAbsoluteName + ' - ';124 if Assigned(Parent) thenResult := Result + GetName;127 if Assigned(Parent) and Assigned(Parent.Parent) then Result := Parent.GetAbsoluteName + ' - '; 128 Result := Result + GetName; 125 129 end; 126 130 … … 347 351 State := stNormal; 348 352 349 if Copy(Trim(Line), 1, 1) = '#'then begin353 if (Copy(Trim(Line), 1, 1) = '#') or (Copy(Trim(Line), 1, 2) = '\#') then begin 350 354 // Skip comments 351 355 Continue; … … 439 443 NewItem.Selects.Add(Parameter); 440 444 end else 445 if Command = '---' then begin 446 Command := GetNextToken(Line); 447 if Command = 'help' then begin 448 Parameter := GetNextToken(Line); 449 State := stHelp; 450 HelpIndent := LineIndent; 451 end; 452 end else 441 453 if (Command = 'help') or (Command = '---help---') then begin 442 454 Parameter := GetNextToken(Line); … … 577 589 finally 578 590 Content.Free; 591 end; 592 end; 593 594 procedure TConfigMenu.OptionListNames(List: TStringList); 595 var 596 I: Integer; 597 Node: TMenuNode; 598 begin 599 for I := 0 to List.Count - 1 do begin 600 Node := TopNode.FindNode(List[I]); 601 if Assigned(Node) then 602 List[I] := List[I] + ' ' + Node.GetAbsoluteName; 579 603 end; 580 604 end;
Note:
See TracChangeset
for help on using the changeset viewer.