-
Notifications
You must be signed in to change notification settings - Fork 46
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
4f902b5
commit 300197b
Showing
3 changed files
with
48 additions
and
1 deletion.
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,21 @@ | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
#- uses: msys2/setup-msys2@v2 | ||
# with: | ||
# msystem: msys | ||
# install: gcc make diffutils | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" | ||
$vctools = $vswhere -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | ||
Get-ChildItem -Recurse $vctools | ||
#mount | ||
#./configure --host=x86_64-windows-msvc CC=cl | ||
#gcc line.c | ||
#./a.exe | od -t ax1 | ||
#od -t ax1 b | ||
#od -t ax1 c | ||
#od -t ax1 test/basic.c |
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,22 @@ | ||
#include <string.h> | ||
#include <stdio.h> | ||
int main(void) { | ||
extern int getmode(int); | ||
char line[256]; | ||
fprintf(stderr, "mode 0=%d\n", getmode(0)); | ||
fprintf(stderr, "mode 1=%d\n", getmode(1)); | ||
fprintf(stderr, "mode 2=%d\n", getmode(2)); | ||
puts("hello"); | ||
FILE *f = fopen("b", "w"); | ||
fprintf(stderr, "mode b=%d\n", getmode(fileno(f))); | ||
fputs("hello\n", f); | ||
fclose(f); | ||
f = fopen("c", "wt"); | ||
fprintf(stderr, "mode c=%d\n", getmode(fileno(f))); | ||
fputs("hello\n", f); | ||
fclose(f); | ||
f = fopen("test/basic.c", "r"); | ||
fgets(line, sizeof line, f); | ||
fprintf(stderr, "c=%d %d\n", line[strlen(line) - 2], line[strlen(line) - 1]); | ||
fclose(f); | ||
} |