mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Replaced plain 0's and 1's in exit statements with EXIT_SUCCESS or EXIT_FAILURE
This commit is contained in:
parent
c9355734f5
commit
7bae9038cf
@ -16,7 +16,7 @@ const graphicStr Table = {
|
||||
|
||||
void Exit(void)
|
||||
{
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
void Menu = {
|
||||
|
@ -26,7 +26,7 @@ void main (void)
|
||||
// MainLoop();
|
||||
// we can do:
|
||||
// (nothing as this is the end of main function)
|
||||
// exit(0);
|
||||
// exit(EXIT_SUCCESS);
|
||||
// return;
|
||||
|
||||
return;
|
||||
|
@ -44,7 +44,7 @@ void main (void)
|
||||
// MainLoop();
|
||||
// we can do:
|
||||
// (nothing as this is the end of main function)
|
||||
// exit(0);
|
||||
// exit(EXIT_SUCCESS);
|
||||
// return;
|
||||
|
||||
return;
|
||||
|
@ -62,7 +62,7 @@ int main(int argc,char **argv)
|
||||
#ifdef USECMDLINE
|
||||
if (argc < 2) {
|
||||
printf("Usage: %s [duration] [disks]\n", argv[0]);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ err(s) char *s; {
|
||||
int err(char *s) {
|
||||
#endif
|
||||
printf("? %s\n", s);
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* getword - get next input word into buf, return 0 on EOF */
|
||||
|
@ -22,6 +22,8 @@
|
||||
#define BADCH '?'
|
||||
#define ENDARGS "--"
|
||||
|
||||
#define NUMARGS 2
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
char *optstring = argv[1];
|
||||
@ -34,9 +36,9 @@ int main (int argc, char **argv)
|
||||
|
||||
char *opi;
|
||||
|
||||
if (argc == 1) {
|
||||
if (argc != NUMARGS) {
|
||||
fprintf (stderr, "Usage: %s optstring args\n", argv0);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
argv++;
|
||||
argc--;
|
||||
|
@ -58,7 +58,7 @@ static void TestUnsignedLeftShift (void)
|
||||
fprintf (stderr,
|
||||
"Failed: %u << %u != %u (%u)\n",
|
||||
L, R, V, L << R);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
V = UnsignedShiftLeft1 (V);
|
||||
}
|
||||
@ -85,7 +85,7 @@ static void TestUnsignedRightShift (void)
|
||||
fprintf (stderr,
|
||||
"Failed: %u >> %u != %u (%u)\n",
|
||||
L, R, V, L >> R);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
V = UnsignedShiftRight1 (V);
|
||||
}
|
||||
@ -112,7 +112,7 @@ static void TestSignedRightShift (void)
|
||||
fprintf (stderr,
|
||||
"Failed: %d >> %d != %d (%d)\n",
|
||||
L, R, V, L >> R);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
V = SignedShiftRight1 (V);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user