blob: a40d841c27905437b126c8796eecacefb719a7d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <stdio.h>
#include <posthaste/core.h>
static void usage(FILE *f, const char *pname)
{
fprintf(f, "Usage:\n %s <filename>\n", pname);
}
/**
* Main entry to posthaste.
* Checks command line and drives the rest of the language.
*
* Feels kind of weird documenting main, but doxygen warns about not
* doing it so whatever.
*
* @param argc Number of command line arguments.
* @param argv Array of command line arguments.
* @return \c 0 when succesful, non-zero otherwise.
*/
int main(int argc, char *argv[])
{
if (argc != 2) {
usage(stderr, argv[0]);
return -1;
}
return run(argv[1]);
}
|