summaryrefslogtreecommitdiff
path: root/codec/compat/getopt.h
diff options
context:
space:
mode:
authorParvatha Elangovan <p.elangovan@intopix.com>2007-02-26 15:40:01 +0000
committerParvatha Elangovan <p.elangovan@intopix.com>2007-02-26 15:40:01 +0000
commit0781b7d441e303e89d9ef5f03b54a66536369923 (patch)
treed5b4c47ca1bdaa957c5987aac2f92ca1a4a8c6e8 /codec/compat/getopt.h
parente6ce7958f2c3f0b8fd4872ef954b3525c5239030 (diff)
Option to read images from a Folder whose path is specified in the Input parameters by "-ImgDir" along with output decod format specified by "-OutFor" . Modifications in image_to_j2k.c, j2k_to_image.c, getopt.c, getopt.h
Enabling use of multi character input parameters in the codec. Modifications in image_to_j2k.c, j2k_to_image.c, getopt.c, getopt.h
Diffstat (limited to 'codec/compat/getopt.h')
-rw-r--r--codec/compat/getopt.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/codec/compat/getopt.h b/codec/compat/getopt.h
index ab9c1a7b..4492e850 100644
--- a/codec/compat/getopt.h
+++ b/codec/compat/getopt.h
@@ -3,6 +3,18 @@
#ifndef _GETOPT_H_
#define _GETOPT_H_
+typedef struct option
+{
+ char *name;
+ int has_arg;
+ int *flag;
+ int val;
+}option_t;
+
+#define NO_ARG 0
+#define REQ_ARG 1
+#define OPT_ARG 2
+
extern int opterr;
extern int optind;
extern int optopt;
@@ -10,5 +22,8 @@ extern int optreset;
extern char *optarg;
extern int getopt(int nargc, char *const *nargv, const char *ostr);
+extern int getopt_long(int argc, char * const argv[], const char *optstring,
+ const struct option *longopts, int *longindex,int totlen);
+
#endif /* _GETOPT_H_ */