summaryrefslogtreecommitdiff
path: root/markdown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'markdown.cpp')
-rw-r--r--markdown.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/markdown.cpp b/markdown.cpp
index ddad512..358edcf 100644
--- a/markdown.cpp
+++ b/markdown.cpp
@@ -54,10 +54,18 @@ static void resized(GLFWwindow *, int width, int height)
g_window_size.y = static_cast<float>(height);
}
+static void print_usage(const char * program)
+{
+ std::cerr << "Usage: " << program << " FILE" << std::endl;
+}
+
int main(int argc, char ** argv)
{
if (2 != argc)
- return 1;
+ {
+ print_usage(argv[0]);
+ return 2;
+ }
glfwSetErrorCallback(glfw_error_callback);
if (!glfwInit())