Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeus64 committed Jan 20, 2018
1 parent 0428042 commit 9753401
Show file tree
Hide file tree
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.
42 changes: 42 additions & 0 deletions references/jcl/.git_filters/rcs-keywords.clean
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 {
print
}
80 changes: 80 additions & 0 deletions references/jcl/.git_filters/rcs-keywords.smudge
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;
}
}
}
2 changes: 2 additions & 0 deletions references/jcl/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.pas filter=rcs-keywords
3 changes: 3 additions & 0 deletions references/jcl/.gitconfig
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
51 changes: 51 additions & 0 deletions references/jcl/.gitignore
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
4 changes: 4 additions & 0 deletions references/jcl/.gitmodules
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 added references/jcl/donations/FileMapping.zip
Binary file not shown.
Binary file added references/jcl/donations/JclWin32Ex.zip
Binary file not shown.
Binary file added references/jcl/donations/SharedMMFMem.zip
Binary file not shown.
Binary file added references/jcl/donations/StackTrackExample.zip
Binary file not shown.
Binary file added references/jcl/donations/TimeZones.zip
Binary file not shown.
26 changes: 26 additions & 0 deletions references/jcl/donations/dcl/Install.txt
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.


127 changes: 127 additions & 0 deletions references/jcl/donations/dcl/JclAbstractContainer.pas
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.

Loading

0 comments on commit 9753401

Please sign in to comment.