-
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
1 parent
b3e2254
commit 2a97ee2
Showing
49 changed files
with
964 additions
and
1,288 deletions.
There are no files selected for viewing
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 @@ | ||
(ssh://[email protected]/llvm/llvm-project.git f366c1b339fcef61a79a15dac779e79b1e636e7a based on LLVM 35b10acf201ab873fab4423a37ae6dbe52591f6d revision) |
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
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
Binary file modified
BIN
+24.3 KB
(230%)
...odeproj/project.xcworkspace/xcuserdata/tgspock.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
...roj/project.xcworkspace/xcuserdata/tgspock.xcuserdatad/xcschemes/xcschememanagement.plist
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict /> | ||
</plist> |
33 changes: 33 additions & 0 deletions
33
10_plus_2/10_plus_2.xcodeproj/xcuserdata/tgspock.xcuserdatad/xcschemes/10_plus_2.xcscheme
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,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
version = "1.3"> | ||
<BuildAction> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForRunning = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "7A4DCA392B370C0A00B98E89" | ||
BuildableName = "10_plus_2" | ||
BlueprintName = "10_plus_2" | ||
ReferencedContainer = "container:10_plus_2.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<LaunchAction | ||
useCustomWorkingDirectory = "YES" | ||
buildConfiguration = "Debug" | ||
allowLocationSimulation = "YES" | ||
customWorkingDirectory = "/Users/tgspock/Documents/GitHub/learn_c_primer.github.io/10_plus_2"> | ||
<BuildableProductRunnable> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "7A4DCA392B370C0A00B98E89" | ||
BuildableName = "10_plus_2" | ||
BlueprintName = "10_plus_2" | ||
ReferencedContainer = "container:10_plus_2.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</LaunchAction> | ||
</Scheme> |
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
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,40 @@ | ||
#include <stdio.h> | ||
#include "10.25_29.h" | ||
int main (void) | ||
{ | ||
int n, m; | ||
double source_1[5] = {1.1, 2.2, 3.3, 4.4, 5.5}; | ||
double source_2[2][7] = {{2.1, 3.4, 1.5, 4.9, 9.3, 5.2, 6.8}, {6.8, 5.2, 9.3, 4.9, 1.5, 3.4, 2.1}}; | ||
double target_1_1 [5]; | ||
double target_1_2[5]; | ||
double target_1_3[5]; | ||
double target_2_1[2][7]; | ||
double target_2_2[3]; | ||
|
||
copy_arr (target_1_1, source_1, 5); | ||
copy_ptr (target_1_2, source_1, 5); | ||
copy_ptrs (target_1_3, source_1, source_1 + 5); | ||
for (n = 0; n < 5; n ++) | ||
{ | ||
printf ("source[%d] = %g, target[%d] = %g, target2[%d] = %g, target3[%d] = %g\n", n, source_1[n], n, | ||
target_1_1[n], n, target_1_2[n], n, target_1_3[n]); | ||
} | ||
for (n = 0; n < 2; n ++) | ||
{ | ||
copy_arr(target_2_1[n], source_2[n], 7); | ||
} | ||
for (n = 0; n < 2; n ++) | ||
{ | ||
for (m = 0; m < 7; m ++) | ||
{ | ||
printf ("target_2_1[%d][%d] = %g \n", n, m, target_2_1[n][m]); | ||
} | ||
} | ||
copy_arr(target_2_2, &source_2[0][2], 3); | ||
for (n = 0; n < 3; n ++) | ||
{ | ||
printf ("target_2_2[%d] = %g \n", n, target_2_2[n]); | ||
} | ||
|
||
return 0; | ||
} |
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,14 @@ | ||
// | ||
// 10.25_29.h | ||
// 10_plus_2 | ||
// | ||
// Created by T G Spock on 2023/12/23. | ||
// | ||
|
||
#ifndef _0_25_29_h | ||
#define _0_25_29_h | ||
void copy_arr (double ar[], const double m[], int n); | ||
void copy_ptr (double * str, const double * q, int n); | ||
void copy_ptrs (double ar[], const double * m, const double * p); | ||
|
||
#endif /* _0_25_29_h */ |
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
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
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
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,32 @@ | ||
// | ||
// 10.29.c | ||
// 10_plus_2 | ||
// | ||
// Created by T G Spock on 2023/12/23. | ||
// | ||
|
||
#include <stdio.h> | ||
#include "10.25_29.h" | ||
void copy_arr (double ar[], const double m[], int n) | ||
{ | ||
for (int i = 0; i < n; i ++) | ||
{ | ||
ar[i] = m[i]; | ||
} | ||
} | ||
void copy_ptr (double * str, const double * q, int n) | ||
{ | ||
for (int i = 0; i < n; i ++) | ||
{ | ||
*str = *q; | ||
str ++; | ||
q ++; | ||
} | ||
} | ||
void copy_ptrs (double ar[], const double * m, const double * p) | ||
{ | ||
for (; m < p; m ++, ar ++) | ||
{ | ||
*ar = *m; | ||
} | ||
} |
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,28 @@ | ||
// | ||
// 10.30.c | ||
// 10_plus_2 | ||
// | ||
// Created by T G Spock on 2023/12/24. | ||
// | ||
|
||
#include <stdio.h> | ||
#include "10.30_31.h" | ||
int main (void) | ||
{ | ||
int q = 3, p = 5; | ||
double qwer[3][5] = { | ||
{1.1, 2.2, 3.3, 4.4, 5.5}, {6.6, 7.7, 8.8, 9.9, 10.01}, {11.12, 12.13, 13.14, 14.15, 15.16} | ||
}; | ||
double tyui[q][p]; | ||
double opas[q][p]; | ||
|
||
ons (4, "qwer", 3, 5, qwer); | ||
cpy (3, 5, tyui, qwer); | ||
ons (4, "tyui", 3, 5, tyui); | ||
pluz (3, 5, tyui, qwer, opas); | ||
ons (4, "opas", 3, 5, opas); | ||
tims (3, 5, qwer); | ||
ons (8, "now qwer", 3, 5, qwer); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.