forked from MagicFoundation/Alcinoe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,372 changed files
with
963,932 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/perl | ||
|
||
# commun sub program to generate keyword content | ||
sub generate_keyword { | ||
# pattern as in the raw source file | ||
$pattern = $_[0]; | ||
|
||
# extract pattern start | ||
$start = substr($pattern,0,2); | ||
if ($start eq "::") { | ||
# if it start with "::", the pattern length must be preserved | ||
return "::" . (' ' x (length($pattern) - 2)); | ||
} else { | ||
# return default content without length concern | ||
return ""; | ||
} | ||
} | ||
|
||
# main processing loop | ||
|
||
while (<STDIN>) { | ||
# replace keyword "Date" | ||
s/\$([Dd][Aa][Tt][Ee])([^\$]*)\$/"\$" . $1 . generate_keyword($2) . "\$"/eg; | ||
|
||
# replace keyword "Author" | ||
s/\$([Aa][Uu][Tt][Hh][Oo][Rr])([^\$]*)\$/"\$" . $1 . generate_keyword($2) . "\$"/eg; | ||
|
||
# replace keyword "Id" | ||
s/\$([Ii][Dd])([^\$]*)\$/"\$" . $1 . generate_keyword($2) . "\$"/eg; | ||
|
||
# replace keyword "Url" | ||
s/\$([Uu][Rr][Ll])([^\$]*)\$/"\$" . $1 . generate_keyword($2) . "\$"/eg; | ||
|
||
# replace keyword "File" | ||
s/\$([Ff][Ii][Ll][Ee])([^\$]*)\$/"\$" . $1 . generate_keyword($2) . "\$"/eg; | ||
|
||
# replace keywords "Revision" and "Rev" | ||
s/\$([Rr][Ee][Vv][Ii][Ss][Ii][Oo][Nn])([^\$]*)\$/"\$" . $1 . generate_keyword($2) . "\$"/eg; | ||
s/\$([Rr][Ee][Vv])([^Ii][^\$]*|)\$/"\$" . $1 . generate_keyword($2) . "\$"/eg; | ||
} continue { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/perl | ||
|
||
# commun sub program to generate keyword content | ||
sub generate_keyword { | ||
# pattern as in the raw source file | ||
$pattern = $_[0]; | ||
# keyword value from git log | ||
$value = $_[1]; | ||
|
||
# extract pattern start | ||
$start = substr($pattern,0,2); | ||
if ($start eq "::") { | ||
# if it start with "::", the pattern length must be preserved | ||
return ":: " . $value . (' ' x (length($pattern) - length($value) - 3)); | ||
} else { | ||
# return default content without length concern | ||
return ": " . $value . " "; | ||
} | ||
} | ||
|
||
# get first argument (full path name) | ||
$path = shift; | ||
|
||
if (0 < length($path)) { | ||
# extract file name | ||
$path =~ /.*\/(.*)/; | ||
$filename = $1; | ||
|
||
# not a full path, return the entire path as file name | ||
if (0 == length($filename)) { | ||
$filename = $path; | ||
} | ||
|
||
# Need to grab filename and to use git log for this to be accurate. | ||
use IPC::Open3; | ||
$pid = open3(0,\*READ,\*ERROR,"git", "log", "-n", "1", "--format=%H%n%an%n%ai%n", "--", "$path"); | ||
waitpid( $pid, 0 ); | ||
|
||
# read error pipe | ||
chomp($error = <ERROR>); | ||
|
||
# if there is no error message | ||
if (0 == length($error)) { | ||
# read the 3 output lines of svn log | ||
chomp($revision = <READ>); # 1st line is revision hash | ||
chomp($author = <READ>); # 2nd line is author name | ||
chomp($date = <READ>); # 3rd line is date | ||
|
||
# some usefull debug stuff | ||
# print("$revision\n$author\n$date\n"); | ||
|
||
# main processing loop | ||
|
||
# read from stdin | ||
while (<STDIN>) { | ||
# replace keyword "Date" | ||
s/\$([Dd][Aa][Tt][Te])([^\$]*)\$/"\$" . $1 . generate_keyword($2,$date) . "\$"/eg; | ||
|
||
# replace keyword "Author" | ||
s/\$([Aa][Uu][Tt][Hh][Oo][Rr])([^\$]*)\$/"\$" . $1 . generate_keyword($2,$author) . "\$"/eg; | ||
|
||
# replace keyword "Id" | ||
s/\$([Ii][Dd])([^\$]*)\$(.*)/"\$" . $1 . generate_keyword($2,$path . " " . $author . " " . date) . "\$"/eg; | ||
|
||
# replace keyword "Url" | ||
s/\$([Uu][Rr][Ll])([^\$]*)\$/"\$" . $1 . generate_keyword($2,$path) . "\$"/eg; | ||
|
||
# replace keyword "File" | ||
s/\$([Ff][Ii][Ll][Ee])([^\$]*)\$/"\$" . $1 . generate_keyword($2,$filename) . "\$"/eg; | ||
|
||
# replace keywords "Revision" and "Rev" | ||
s/\$([Rr][Ee][Vv][Ii][Ss][Ii][Oo][Nn])([^\$]*)\$/"\$" . $1 . generate_keyword($2,$revision) . "\$"/eg; | ||
s/\$([Rr][Ee][Vv])([^Ii][^\$]*|)\$/"\$" . $1 . generate_keyword($2,$revision) . "\$"/eg; | ||
|
||
} continue { | ||
# output generated text to stdout | ||
print; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto | ||
*.pas filter=rcs-keywords |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[filter "rcs-keywords"] | ||
clean=.git_filters/rcs-keywords.clean | ||
smudge=.git_filters/rcs-keywords.smudge %f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# IDE files | ||
*.~*~ | ||
*.local | ||
*.identcache | ||
__history | ||
|
||
# Delphi Compiler output files | ||
*.drc | ||
*.map | ||
*.jdbg | ||
*.tds | ||
*.exe | ||
*.dll | ||
*.bpl | ||
*.dcu | ||
*.dcp | ||
|
||
# C++ Builder Compiler output files | ||
*.bpi | ||
*.obj | ||
*.lib | ||
*.hpp | ||
*.i | ||
*.il? | ||
*.#?? | ||
*.pbi | ||
|
||
# 64bit Delphi/C++Builder files | ||
*.[ao] | ||
|
||
# Lib directories | ||
jcl/lib/*/*.res | ||
jcl/lib/*/debug/*.res | ||
jcl/lib/*/win*/*.res | ||
jcl/lib/*/win*/debug/*.res | ||
|
||
# JCL files | ||
jcl/bin/* | ||
jcl/install/dcc32_command.cmd | ||
jcl/install/dcc32.cfg | ||
|
||
# Auto generated compiler version include files | ||
jcl/source/include/jcld*.inc | ||
jcl/source/include/jclc*.inc | ||
jcl/source/include/jclfpc.inc | ||
jcl/source/include/jclwin32.inc | ||
|
||
# InnoSetup installer | ||
thirdparty/InnoSetup/setupbuild/* | ||
thirdparty/InnoSetup/Settings.iss | ||
/thirdparty/makedist/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "jcl/source/include/jedi"] | ||
path = jcl/source/include/jedi | ||
url = ../jedi.git | ||
branch = master |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
The Delphi Container Library | ||
============================ | ||
|
||
Installation Note | ||
----------------- | ||
|
||
1. Decompress the archive in a directory of your choice. (Ex: D:\DCL) | ||
2. In Delphi, menu Tools | Environment Options, Library Tab, in Library Path, | ||
Add the path to access to the source of the DCL. (Ex: D:\DCL) | ||
3. in the file dcl.inc, you can active the switch THREADSAFE. | ||
4. You can build a runtime package with DCL_D7.dpk. | ||
5. Open a demo in the demos directory (Ex: D:\DCL\demos\Perf\Perf.dpr), compile it and test it. | ||
|
||
Documentation are available in the doc directory (Ex: D:\DCL\doc\index.html) | ||
|
||
The DCL is totally free to redistribute. | ||
|
||
for any comments, remarks or bugs, mail to: [email protected] | ||
|
||
http://sourceforge.net/projects/dclx | ||
|
||
|
||
|
||
Jean-Philippe BEMPEL aka RDM. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{**************************************************************************************************} | ||
{ } | ||
{ Project JEDI Code Library (JCL) } | ||
{ } | ||
{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); } | ||
{ you may not use this file except in compliance with the License. You may obtain a copy of the } | ||
{ License at http://www.mozilla.org/MPL/ } | ||
{ } | ||
{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF } | ||
{ ANY KIND, either express or implied. See the License for the specific language governing rights } | ||
{ and limitations under the License. } | ||
{ } | ||
{ The Original Code is AbstractContainer.pas. } | ||
{ } | ||
{ The Initial Developer of the Original Code is Jean-Philippe BEMPEL aka RDM. Portions created by } | ||
{ Jean-Philippe BEMPEL are Copyright (C) Jean-Philippe BEMPEL (rdm_30 att yahoo dott com) } | ||
{ All rights reserved. } | ||
{ } | ||
{**************************************************************************************************} | ||
{ } | ||
{ The Delphi Container Library } | ||
{ } | ||
{**************************************************************************************************} | ||
|
||
// Last modified: $Date$ | ||
// For history see end of file | ||
|
||
unit JclAbstractContainer; | ||
|
||
{$I jcl.inc} | ||
|
||
interface | ||
|
||
uses | ||
{$IFDEF MSWINDOWS} | ||
Windows, | ||
{$ENDIF MSWINDOWS} | ||
{$IFDEF UNIX} | ||
Libc, | ||
{$ENDIF UNIX} | ||
JclBase, JclDCL_Intf, JclDCLUtil; | ||
|
||
type | ||
TJclIntfCriticalSection = class(TObject, IInterface) | ||
private | ||
FCriticalSection: TRTLCriticalSection; | ||
protected | ||
function QueryInterface(const IID: TGUID; out Obj): HRESULT; stdcall; | ||
function _AddRef: Integer; stdcall; | ||
function _Release: Integer; stdcall; | ||
public | ||
constructor Create; | ||
destructor Destroy; override; | ||
end; | ||
|
||
TJclAbstractContainer = class(TInterfacedObject) | ||
{$IFDEF THREADSAFE} | ||
private | ||
FCriticalSection: TJclIntfCriticalSection; | ||
protected | ||
function EnterCriticalSection: IInterface; | ||
public | ||
constructor Create; | ||
destructor Destroy; override; | ||
{$ENDIF THREADSAFE} | ||
end; | ||
|
||
implementation | ||
|
||
//=== { TJclIntfCriticalSection } ============================================ | ||
|
||
constructor TJclIntfCriticalSection.Create; | ||
begin | ||
inherited Create; | ||
InitializeCriticalSection(FCriticalSection); | ||
end; | ||
|
||
destructor TJclIntfCriticalSection.Destroy; | ||
begin | ||
DeleteCriticalSection(FCriticalSection); | ||
inherited Destroy; | ||
end; | ||
|
||
function TJclIntfCriticalSection._AddRef: Integer; | ||
begin | ||
EnterCriticalSection(FCriticalSection); | ||
Result := 0; | ||
end; | ||
|
||
function TJclIntfCriticalSection._Release: Integer; | ||
begin | ||
LeaveCriticalSection(FCriticalSection); | ||
Result := 0; | ||
end; | ||
|
||
function TJclIntfCriticalSection.QueryInterface(const IID: TGUID; out Obj): HRESULT; | ||
begin | ||
if GetInterface(IID, Obj) then | ||
Result := S_OK | ||
else | ||
Result := E_NOINTERFACE; | ||
end; | ||
|
||
//=== { TJclAbstractContainer } ============================================== | ||
|
||
{$IFDEF THREADSAFE} | ||
|
||
constructor TJclAbstractContainer.Create; | ||
begin | ||
FCriticalSection := TJclIntfCriticalSection.Create; | ||
end; | ||
|
||
destructor TJclAbstractContainer.Destroy; | ||
begin | ||
FCriticalSection.Free; | ||
inherited Destroy; | ||
end; | ||
|
||
function TJclAbstractContainer.EnterCriticalSection: IInterface; | ||
begin | ||
Result := FCriticalSection as IInterface; | ||
end; | ||
|
||
{$ENDIF THREADSAFE} | ||
|
||
end. | ||
|
Oops, something went wrong.