summaryrefslogtreecommitdiff
path: root/src/asn1Coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/asn1Coding.c')
-rw-r--r--src/asn1Coding.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/asn1Coding.c b/src/asn1Coding.c
index 5a7ad07..62804cb 100644
--- a/src/asn1Coding.c
+++ b/src/asn1Coding.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2002 Fabio Fiorina
+ * Copyright (C) 2002, 2005 Fabio Fiorina
*
* This file is part of LIBTASN1.
*
@@ -35,10 +35,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-
-#ifdef HAVE_GETOPT_H
- #include <getopt.h>
-#endif
+#include <getopt.h>
char version_man[] = "asn1Coding (GNU libtasn1) " VERSION;
@@ -49,7 +46,6 @@ char help_man[] = "asn1Coding generates a DER encoding from a file\n"
" <file1> file with ASN1 definitions.\n"
" <file2> file with assignments.\n"
"\n"
-#ifdef HAVE_GETOPT_LONG
"Operation modes:\n"
" -h, --help shows this message and exit.\n"
" -v, --version shows version information and exit.\n"
@@ -57,15 +53,6 @@ char help_man[] = "asn1Coding generates a DER encoding from a file\n"
"\n"
"Output:\n"
" -o <file>, --output <file> output file.\n";
-#else
- "Operation modes:\n"
- " -h shows this message and exit.\n"
- " -v shows version information and exit.\n"
- " -c checks the syntax only.\n"
- "\n"
- "Output:\n"
- " -o <file> output file.\n";
-#endif
#define ASSIGNMENT_SUCCESS 1
@@ -127,7 +114,6 @@ int
main(int argc,char *argv[])
{
-#ifdef HAVE_GETOPT_LONG
static struct option long_options[] =
{
{"help", no_argument, 0, 'h'},
@@ -137,8 +123,6 @@ main(int argc,char *argv[])
{0, 0, 0, 0}
};
int option_index=0;
-#endif
-
int option_result;
char *outputFileName=NULL;
char *inputFileAsnName=NULL;
@@ -162,11 +146,7 @@ main(int argc,char *argv[])
while(1){
-#ifdef HAVE_GETOPT_LONG
option_result=getopt_long(argc,argv,"hvco:",long_options,&option_index);
-#else
- option_result=getopt(argc,argv,"hvco:");
-#endif
if(option_result == -1) break;