Fixes in 2000/primenum - int main from void main
To make the entry more portable the void main was changed to int main. The no arg check was NOT fixed: this is a documented feature not a bug and should not be fixed. If one wants to fix it for personal enjoyment (if they can get pleasure from a couple seconds :-) ) they may do so but it is not to be committed.
This commit is contained in:
1 parent
b2feec3575
commit
d155a3fde8
2 files changed
+7
-2
No files matched your search
@@ -1,8 +1,8 @@
|
|||||||
#define BeginProgram void main(int argc, char *argv[])
|
#define BeginProgram int main(int argc, char *argv[])
|
||||||
#define CloseBrace }
|
#define CloseBrace }
|
||||||
#define CommandLineArgument -1
|
#define CommandLineArgument -1
|
||||||
#define Declare int i,j,n,Flag=1;
|
#define Declare int i,j,n,Flag=1;
|
||||||
#define EndOfProgram return;
|
#define EndOfProgram return 0;
|
||||||
#define False 0;
|
#define False 0;
|
||||||
#define ForLoop ;for
|
#define ForLoop ;for
|
||||||
#define GetCommandLineArgument n=atoi(argv[1]);
|
#define GetCommandLineArgument n=atoi(argv[1]);
|
||||||
|
|||||||
@@ -1657,6 +1657,11 @@ itself a one-line like the code is in the original entry. Now it looks much more
|
|||||||
like the original entry but with the two fixes.
|
like the original entry but with the two fixes.
|
||||||
|
|
||||||
|
|
||||||
|
## [2000/primenum](2000/primenum/primenum.c) ([README.md](2000/primenum/README.md]))
|
||||||
|
|
||||||
|
Cody made this more portable by changing the `void main` to `int main`.
|
||||||
|
|
||||||
|
|
||||||
## [2000/thadgavin](2000/thadgavin/thadgavin.c) ([README.md](2000/thadgavin/README.md]))
|
## [2000/thadgavin](2000/thadgavin/thadgavin.c) ([README.md](2000/thadgavin/README.md]))
|
||||||
|
|
||||||
Cody fixed the code and added an appropriate make rule so that the SDL version
|
Cody fixed the code and added an appropriate make rule so that the SDL version
|
||||||
|
|||||||
Reference in new issue
Block a user