Fixed exit codes.

This commit is contained in:
Camilla Berglund 2011-09-08 22:47:37 +02:00
parent e20ea6b005
commit bca0283fdd
2 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@ int main(void)
if (!glfwInit()) if (!glfwInit())
{ {
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError())); fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(1); exit(EXIT_FAILURE);
} }
window = glfwOpenWindow(0, 0, GLFW_WINDOWED, "Defaults", NULL); window = glfwOpenWindow(0, 0, GLFW_WINDOWED, "Defaults", NULL);
@ -81,7 +81,7 @@ int main(void)
glfwTerminate(); glfwTerminate();
fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError())); fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError()));
exit(1); exit(EXIT_FAILURE);
} }
glfwGetWindowSize(window, &width, &height); glfwGetWindowSize(window, &width, &height);
@ -99,6 +99,6 @@ int main(void)
window = NULL; window = NULL;
glfwTerminate(); glfwTerminate();
exit(0); exit(EXIT_SUCCESS);
} }

View File

@ -336,7 +336,7 @@ int main(void)
if (!glfwInit()) if (!glfwInit())
{ {
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError())); fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(1); exit(EXIT_FAILURE);
} }
printf("Library initialized\n"); printf("Library initialized\n");
@ -358,7 +358,7 @@ int main(void)
glfwTerminate(); glfwTerminate();
fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError())); fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError()));
exit(1); exit(EXIT_FAILURE);
} }
printf("Window opened\n"); printf("Window opened\n");
@ -378,6 +378,6 @@ int main(void)
} }
glfwTerminate(); glfwTerminate();
exit(0); exit(EXIT_SUCCESS);
} }