diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-03-26 22:48:45 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-03-26 22:48:45 +0100 |
commit | 904220276d56d5887fb22141d4593bc0e9b02273 (patch) | |
tree | 0c17046bb0416734e2f4f2218732bf20b1a30cf8 | |
parent | 33dbd46983e7194a507f6a324abc5e06beab8194 (diff) |
Check for filename as cmdline argument
-rw-r--r-- | main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,9 @@ +/* This program can extract the raw ASN.1 source from the MS Word for DOS + * file of the MAP ASN.1 spec, such as 380-6.DOC which is part of + * http://ftp.3gpp.org/specs/archive/09_series/09.02/0902-380.zip */ + +/* (C) 2011 by Harald Welte <laforge@gnumonks.org> */ + #include <stdint.h> #include <stdlib.h> #include <string.h> @@ -74,6 +80,11 @@ int main(int argc, char **argv) { struct word_handle *wh; + if (argc < 2) { + fprintf(stderr, "You need to specify the file name of the DOC file\n"); + exit(2); + } + wh = word_file_open(argv[1]); if (!wh) exit(1); |