From 3cc92f7af0b7e7e85dc12b4424b0ff73593b3dbb Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 27 Dec 2007 18:16:50 +0000 Subject: [PATCH] LCL: added comments to URL functions git-svn-id: trunk@13485 - --- lcl/lazhelpintf.pas | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lcl/lazhelpintf.pas b/lcl/lazhelpintf.pas index 7bf7ba7cf0..c2f38bff5f 100644 --- a/lcl/lazhelpintf.pas +++ b/lcl/lazhelpintf.pas @@ -540,12 +540,17 @@ procedure FreeLCLHelpSystem; procedure FreeUnusedLCLHelpSystem; // URL functions +// used names: +// URL: Type + Path + Params e.g. http://www.freepascal.org?param +// URLType: e.g. file or http +// URLPath: URL without type and without parameters (always / as path delimiter) +// URLParams: parameters appended by ? or # function FilenameToURL(const Filename: string): string; function FilenameToURLPath(const Filename: string): string; function URLPathToFilename(const URLPath: string): string; procedure SplitURL(const URL: string; var URLType, URLPath, URLParams: string); function CombineURL(const URLType, URLPath, URLParams: string): string; -function URLFilenameIsAbsolute(const Filename: string): boolean; +function URLFilenameIsAbsolute(const URLPath: string): boolean; function FindURLPathStart(const URL: string): integer; function FindURLPathEnd(const URL: string): integer; function ChompURLParams(const URL: string): string; @@ -659,9 +664,9 @@ begin Result:=Result+URLParams; end; -function URLFilenameIsAbsolute(const Filename: string): boolean; +function URLFilenameIsAbsolute(const URLPath: string): boolean; begin - Result:=FilenameIsAbsolute(SetDirSeparators(Filename)); + Result:=FilenameIsAbsolute(URLPathToFilename(URLPath)); end; function FindURLPathStart(const URL: string): integer;