From af8ccba94d959a4c5b27278a1ff4d9a81fc056af Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 23 Dec 2015 22:32:43 +0100 Subject: satq and satr does not take any arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satq.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/satq.c') diff --git a/src/satq.c b/src/satq.c index fa5146f..3d87d1c 100644 --- a/src/satq.c +++ b/src/satq.c @@ -19,12 +19,39 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ +#include +#include +/** + * The name of the process. + */ +char *argv0 = "satq"; + + + +/** + * Print usage information. + */ +static void +usage(void) +{ + fprintf(stderr, "usage: %s\n", + strrchr(argv0) ? (strrchr(argv0) + 1) : argv0); + exit(2); +} + + int main(int argc, char *argv[]) { + if (argc > 1) { + usage(); + } else if (argc == 1) { + argv0 = argv[0]; + } + /* TODO print the job queue */ } -- cgit v1.2.3-70-g09d2