summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-01-30 09:51:32 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-01-30 09:51:32 +0000
commit326c58b4e1bd7bca5522f7f0130b1a10f4336483 (patch)
tree6caa435cbc6528d2861c64300aedcbfeef7ccc54
parentec0c69af7a33eb969bbccd050bfd0d9fe7c7d234 (diff)
Remove unistd.h from win32 compilation
-rw-r--r--applications/jpip/libopenjpip/query_parser.h48
-rw-r--r--applications/jpip/util/test_index.c5
2 files changed, 29 insertions, 24 deletions
diff --git a/applications/jpip/libopenjpip/query_parser.h b/applications/jpip/libopenjpip/query_parser.h
index 7774b3d8..f72e16df 100644
--- a/applications/jpip/libopenjpip/query_parser.h
+++ b/applications/jpip/libopenjpip/query_parser.h
@@ -34,40 +34,40 @@
#include "bool.h"
-//! maximum number of meta request box
+/** maximum number of meta request box */
#define MAX_NUMOFBOX 10
-//! cnew aux transport name
+/** cnew aux transport name */
typedef enum cnew_transport { non, http, tcp, udp} cnew_transport_t;
-//! image return type
+/** image return type */
typedef enum image_return { JPPstream, JPTstream, UNKNOWN=-1} image_return_t;
-//! Query parameters
+/** Query parameters */
typedef struct query_param{
- char *target; //!< target name
- char *tid; //!< target identifier
- int fx, fy; //!< frame size (fx,fy)
- int rx, ry, rw, rh; //!< roi region
- int layers; //!< quality layers
- int lastcomp; //!< last component number
- bool *comps; //!< components (dynamic array) for jpp-stream, null means all components
- char *cid; //!< channel identifier
- cnew_transport_t cnew; //!< transport name if there is new channel request, else non
- char *cclose; //!< list of closing channel identifiers, separated by '\0'
- int numOfcclose; //!< number of closing channels
- char box_type[MAX_NUMOFBOX][4]; //!< interested box-types
- int limit[MAX_NUMOFBOX]; //!< limit value, -1: skeleton request "r", 0: entire contents
- bool w[MAX_NUMOFBOX]; //!< Metadata request qualifier flags
+ char *target; /**< target name */
+ char *tid; /**< target identifier */
+ int fx, fy; /**< frame size (fx,fy) */
+ int rx, ry, rw, rh; /**< roi region */
+ int layers; /**< quality layers */
+ int lastcomp; /**< last component number */
+ bool *comps; /**< components (dynamic array) for jpp-stream, null means all components */
+ char *cid; /**< channel identifier */
+ cnew_transport_t cnew; /**< transport name if there is new channel request, else non */
+ char *cclose; /**< list of closing channel identifiers, separated by '\0' */
+ int numOfcclose; /**< number of closing channels */
+ char box_type[MAX_NUMOFBOX][4]; /**< interested box-types */
+ int limit[MAX_NUMOFBOX]; /**< limit value, -1: skeleton request "r", 0: entire contents */
+ bool w[MAX_NUMOFBOX]; /**< Metadata request qualifier flags */
bool s[MAX_NUMOFBOX];
bool g[MAX_NUMOFBOX];
bool a[MAX_NUMOFBOX];
- bool priority[MAX_NUMOFBOX]; //!< priority flag
- int root_bin; //!< root-bin
- int max_depth; //!< max-depth
- bool metadata_only; //!< metadata-only request
- image_return_t return_type; //!< image return type
- int len; //!< maximum response length
+ bool priority[MAX_NUMOFBOX]; /**< priority flag */
+ int root_bin; /**< root-bin */
+ int max_depth; /**< max-depth */
+ bool metadata_only; /**< metadata-only request */
+ image_return_t return_type; /**< image return type */
+ int len; /**< maximum response length */
} query_param_t;
diff --git a/applications/jpip/util/test_index.c b/applications/jpip/util/test_index.c
index abad323a..1a22c1eb 100644
--- a/applications/jpip/util/test_index.c
+++ b/applications/jpip/util/test_index.c
@@ -41,7 +41,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef _WIN32
+#include <io.h>
+#else
#include <unistd.h>
+#endif
#include "openjpip.h"
int
@@ -49,6 +53,7 @@ main(int argc, char *argv[])
{
int fd;
index_t *jp2idx;
+ if( argc < 2 ) return 1;
if( (fd = open( argv[1], O_RDONLY)) == -1){
fprintf( stderr, "Error: Target %s not found\n", argv[1]);