forked from nervosnetwork/ckb
-
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.
* format code * Use libc from ckb-c-stdlib Add test case: check_spawn_strcat
- Loading branch information
1 parent
962620c
commit b577e4c
Showing
59 changed files
with
514 additions
and
363 deletions.
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
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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
const SCRIPT_VERSION: crate::ScriptVersion = crate::ScriptVersion::latest(); | ||
|
||
mod features_since_v2019; | ||
mod features_since_v2021; | ||
// TODO: enable it again | ||
// mod features_since_v2019; | ||
// mod features_since_v2021; | ||
mod features_since_v2023; |
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,5 @@ | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
TabWidth: 4 | ||
ColumnLimit: 120 | ||
SortIncludes: false |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#include <stdint.h> | ||
|
||
__attribute__((visibility("default"))) uint64_t apply (uint64_t num) { | ||
return num + 1; | ||
} | ||
__attribute__((visibility("default"))) uint64_t apply(uint64_t num) { return num + 1; } |
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
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 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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#include "ckb_syscalls.h" | ||
#include <stdio.h> | ||
|
||
int main() { | ||
char message[2048]; | ||
sprintf(message, "debugger print utf-8 string"); | ||
ckb_debug(message); | ||
#include "ckb_syscalls.h" | ||
|
||
int main() { | ||
printf("debugger print utf-8 string"); | ||
return CKB_SUCCESS; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#include <stdint.h> | ||
|
||
__attribute__((visibility("default"))) uint64_t apply (uint64_t num) { | ||
return num / 2; | ||
} | ||
__attribute__((visibility("default"))) uint64_t apply(uint64_t num) { return num / 2; } |
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
#include <stdlib.h> | ||
|
||
int main(int argc, char* argv[]) { | ||
if (argc != 3) { | ||
return 1; | ||
} | ||
if (argv[0][0] != 'a') { | ||
return 2; | ||
} | ||
if (argv[1][0] != 'b') { | ||
return 3; | ||
} | ||
if (argv[2][0] != 'c') { | ||
return 4; | ||
} | ||
return 0; | ||
if (argc != 3) { | ||
return 1; | ||
} | ||
if (argv[0][0] != 'a') { | ||
return 2; | ||
} | ||
if (argv[1][0] != 'b') { | ||
return 3; | ||
} | ||
if (argv[2][0] != 'c') { | ||
return 4; | ||
} | ||
return 0; | ||
} |
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.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.