Merge pull request #1706 from xexyl/bellard2018-main-args
This commit is contained in:
3 files changed
+12
-4
No files matched your search
@@ -111,7 +111,7 @@ o[C?j*f+a:a*f+j]+=*i*(8-J)+i[1]*J+4>>3;
|
|||||||
K(b){
|
K(b){
|
||||||
putchar(b<0?0:b>255?255:b);
|
putchar(b<0?0:b>255?255:b);
|
||||||
}
|
}
|
||||||
main(D){
|
main(D,char**V){
|
||||||
int a,l,L,M,g,N;
|
int a,l,L,M,g,N;
|
||||||
_setmode(0, 32768); _setmode(1, 32768);
|
_setmode(0, 32768); _setmode(1, 32768);
|
||||||
s=D>1?256:1968;
|
s=D>1?256:1968;
|
||||||
|
|||||||
+1
-1
@@ -109,7 +109,7 @@ o[C?j*f+a:a*f+j]+=*i*(8-J)+i[1]*J+4>>3;
|
|||||||
K(b){
|
K(b){
|
||||||
putchar(b<0?0:b>255?255:b);
|
putchar(b<0?0:b>255?255:b);
|
||||||
}
|
}
|
||||||
main(D){
|
main(int D,char**V){
|
||||||
int a,l,L,M,g,N;
|
int a,l,L,M,g,N;
|
||||||
s=D>1?256:1968;
|
s=D>1?256:1968;
|
||||||
Q();
|
Q();
|
||||||
|
|||||||
+10
-2
@@ -3965,11 +3965,19 @@ He also added the [try.sh](/2015/yang/try.sh) script.
|
|||||||
|
|
||||||
## <a name="2018_bellard"></a>[2018/bellard](/2018/bellard/prog.c) ([README.md](/2018/bellard/README.md))
|
## <a name="2018_bellard"></a>[2018/bellard](/2018/bellard/prog.c) ([README.md](/2018/bellard/README.md))
|
||||||
|
|
||||||
[Cody](#cody) added explicit linking of libm (`-lm`) for systems that do not do this
|
[Cody](#cody), out of abundance of caution, added a second arg to `main()`
|
||||||
|
because some versions of clang object to the number of args of `main()`, saying
|
||||||
|
that it must be 0, 2 or 3. The version this has been observed in does not
|
||||||
|
actually object to 1 arg but it is entirely possible that this changes so a
|
||||||
|
second arg (that's not needed and is unused) has been added just in case.
|
||||||
|
|
||||||
|
Cody also added explicit linking of libm (`-lm`) for systems that do not do this
|
||||||
(Linux doesn't seem to but macOS does).
|
(Linux doesn't seem to but macOS does).
|
||||||
|
|
||||||
Cody also added [alt code](/2018/bellard/README.md#alternate-code) that should
|
Cody also added [alt code](/2018/bellard/README.md#alternate-code) that should
|
||||||
work for Windows, based on the author's remarks.
|
work for Windows, based on the author's remarks. The same thing with the number
|
||||||
|
of args to `main()` that was done in the original entry was done with this
|
||||||
|
version as well.
|
||||||
|
|
||||||
|
|
||||||
## <a name="2018_burton1"></a>[2018/burton1](/2018/burton1/prog.c) ([README.md](/2018/burton1/README.md))
|
## <a name="2018_burton1"></a>[2018/burton1](/2018/burton1/prog.c) ([README.md](/2018/burton1/README.md))
|
||||||
|
|||||||
Reference in new issue
Block a user