Skip to content

Commit

Permalink
Add license annotation to external functions
Browse files Browse the repository at this point in the history
Make license texts explicit.
  • Loading branch information
beutlich committed Dec 28, 2024
1 parent 0af4944 commit 75f68ed
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 74 deletions.
50 changes: 25 additions & 25 deletions Modelica/Blocks/Tables.mo

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Modelica/Blocks/Types.mo
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ package Types
timeEvents,
verboseRead,
delimiter,
nHeaderLines) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
nHeaderLines) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"}, License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaStandardTables.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaIO.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaMatIO.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_zlib.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_portable-snippets.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_c99-snprintf.txt"});
end constructor;

function destructor "Terminate 1-dim. table where first column is time"
extends Modelica.Icons.Function;
input ExternalCombiTimeTable externalCombiTimeTable;
external "C" ModelicaStandardTables_CombiTimeTable_close(
externalCombiTimeTable) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
externalCombiTimeTable) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"}, License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaStandardTables.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaIO.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaMatIO.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_zlib.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_portable-snippets.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_c99-snprintf.txt"});
end destructor;

end ExternalCombiTimeTable;
Expand Down Expand Up @@ -172,14 +172,14 @@ package Types
extrapolation,
verboseRead,
delimiter,
nHeaderLines) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
nHeaderLines) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"}, License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaStandardTables.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaIO.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaMatIO.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_zlib.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_portable-snippets.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_c99-snprintf.txt"});
end constructor;

function destructor "Terminate 1-dim. table defined by matrix"
extends Modelica.Icons.Function;
input ExternalCombiTable1D externalCombiTable1D;
external "C" ModelicaStandardTables_CombiTable1D_close(externalCombiTable1D)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"}, License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaStandardTables.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaIO.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaMatIO.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_zlib.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_portable-snippets.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_c99-snprintf.txt"});
end destructor;

end ExternalCombiTable1D;
Expand Down Expand Up @@ -209,14 +209,14 @@ package Types
extrapolation,
verboseRead,
delimiter,
nHeaderLines) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
nHeaderLines) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"}, License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaStandardTables.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaIO.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaMatIO.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_zlib.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_portable-snippets.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_c99-snprintf.txt"});
end constructor;

function destructor "Terminate 2-dim. table defined by matrix"
extends Modelica.Icons.Function;
input ExternalCombiTable2D externalCombiTable2D;
external "C" ModelicaStandardTables_CombiTable2D_close(externalCombiTable2D)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"}, License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaStandardTables.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaIO.txt", "modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaMatIO.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_zlib.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_portable-snippets.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_c99-snprintf.txt"});
end destructor;

end ExternalCombiTable2D;
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Math/FastFourierTransform.mo
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ See detailed example model:
protected
Real work[3*size(u,1) + 2*(div(size(u,1),2)+1)];
external "C" info = ModelicaFFT_kiss_fftr(u, size(u,1), work, size(work,1), amplitudes, phases)
annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaFFT.h\"", Library="ModelicaExternalC");
annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaFFT.h\"", Library="ModelicaExternalC", License="modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaKissFFT.txt");
annotation (Documentation(revisions="<html>
<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">
<tr><th>Date</th> <th align=\"left\">Description</th></tr>
Expand Down
12 changes: 6 additions & 6 deletions Modelica/Math/Random.mo
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ and the returned state is the one from the last iteration.
output Integer stateOut[nState]
"The new internal states of the random number generator";
external "C" ModelicaRandom_xorshift64star(stateIn, stateOut, result)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC");
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaKissFFT.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt"});
annotation(Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down Expand Up @@ -395,7 +395,7 @@ random number generator is used to fill the internal state vector with 64 bit ra
output Integer stateOut[nState]
"The new internal states of the random number generator";
external "C" ModelicaRandom_xorshift128plus(stateIn, stateOut, result)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC");
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaKissFFT.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt"});
annotation (Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down Expand Up @@ -572,7 +572,7 @@ random number generator is used to fill the internal state vector with 64 bit ra
output Integer stateOut[nState]
"The new internal states of the random number generator";
external "C" ModelicaRandom_xorshift1024star(stateIn, stateOut, result)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC");
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaKissFFT.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt"});
annotation (Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down Expand Up @@ -935,7 +935,7 @@ If the same localSeed, globalSeed, nState is given, the same state vector is ret
extends Modelica.Icons.Function;
output Integer seed "Automatically generated seed";

external "C" seed = ModelicaRandom_automaticGlobalSeed(0.0) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC");
external "C" seed = ModelicaRandom_automaticGlobalSeed(0.0) annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaKissFFT.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt"});
annotation (Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down Expand Up @@ -1073,7 +1073,7 @@ path is provided.
input Integer[33] rngState "The initial state";
input Integer id;
external "C" ModelicaRandom_setInternalState_xorshift1024star(rngState, size(rngState,1), id)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC");
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaKissFFT.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt"});
end setInternalState;

algorithm
Expand Down Expand Up @@ -1153,7 +1153,7 @@ random number generator to fill the internal state vector with 64 bit random num
output Real y
"A random number with a uniform distribution on the interval (0,1]";
external "C" y = ModelicaRandom_impureRandom_xorshift1024star(id)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC");
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaRandom.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaKissFFT.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt"});
annotation(Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down
4 changes: 2 additions & 2 deletions Modelica/Utilities/Files.mo
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ impure function fullPathName "Get full path name of file or directory name"
extends Modelica.Icons.Function;
input String name "Absolute or relative file or directory name";
output String fullName "Full path of 'name'";
external "C" fullName = ModelicaInternal_fullPathName(name) annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaInternal.h\"", Library="ModelicaExternalC");
external "C" fullName = ModelicaInternal_fullPathName(name) annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaInternal.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaInternal.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_win32_dirent.txt"});
annotation (Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down Expand Up @@ -658,7 +658,7 @@ impure function temporaryFileName
"Return arbitrary name of a file that does not exist and is in a directory where access rights allow to write to this file (useful for temporary output of files)"
extends Modelica.Icons.Function;
output String fileName "Full path name of temporary file";
external "C" fileName=ModelicaInternal_temporaryFileName() annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaInternal.h\"", Library="ModelicaExternalC");
external "C" fileName=ModelicaInternal_temporaryFileName() annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaInternal.h\"", Library="ModelicaExternalC", License={"modelica:/Modelica/Resources/Licenses/LICENSE_ModelicaInternal.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_uthash.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_stdint_msvc.txt", "modelica:/Modelica/Resources/Licenses/Third-party/LICENSE_win32_dirent.txt"});
annotation (Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down
Loading

0 comments on commit 75f68ed

Please sign in to comment.