regular delta
This commit is contained in:
parent
6e21387ad5
commit
8e3e5477e3
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,6 +3,8 @@
|
|||||||
*.a
|
*.a
|
||||||
*.test
|
*.test
|
||||||
*.obj
|
*.obj
|
||||||
|
*.pdb
|
||||||
|
*.ilk
|
||||||
|
|
||||||
build/
|
build/
|
||||||
plugins_install/
|
plugins_install/
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
all: compiled\Twice.exe compiled\JustOpen.exe
|
CC = cl
|
||||||
|
CFLAGS = /Zi /Od /link /MACHINE:X64
|
||||||
|
|
||||||
|
all: compiled\Foo.exe compiled\Twice.exe compiled\JustOpen.exe
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
del /Q "compiled\*"
|
del /Q "compiled\*"
|
||||||
|
|
||||||
|
compiled\Foo.exe: source\Foo.c
|
||||||
|
$(CC) /Fe:$@ source\Foo.c comdlg32.lib $(CFLAGS)
|
||||||
|
|
||||||
compiled\Twice.exe: source\Twice.c
|
compiled\Twice.exe: source\Twice.c
|
||||||
cl /Fe:$@ source\Twice.c comdlg32.lib /link /MACHINE:X64
|
$(CC) /Fe:$@ source\Twice.c comdlg32.lib $(CFLAGS)
|
||||||
|
|
||||||
compiled\JustOpen.exe: source\JustOpen.c
|
compiled\JustOpen.exe: source\JustOpen.c
|
||||||
cl /Fe:$@ source\JustOpen.c comdlg32.lib /link /MACHINE:X64
|
$(CC) /Fe:$@ source\JustOpen.c comdlg32.lib $(CFLAGS)
|
BIN
programs/compiled/Foo.exe
Normal file
BIN
programs/compiled/Foo.exe
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
32
programs/source/Foo.c
Normal file
32
programs/source/Foo.c
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int test(int a, int b) {
|
||||||
|
if (a + b >= 1000) {
|
||||||
|
fprintf(stderr, "CRITICAL ERROR!!!\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
if (argc < 3) {
|
||||||
|
fprintf(stderr, "Usage: %s <a> <b>\n", argv[0]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int a, b;
|
||||||
|
if (EOF == sscanf(argv[1], "%d", &a)) {
|
||||||
|
fprintf(stderr, "%s is not a valid integer\n", argv[1]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EOF == sscanf(argv[2], "%d", &b)) {
|
||||||
|
fprintf(stderr, "%s is not a valid integer\n", argv[2]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stdout, "%d\n", test(a, b));
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user