This commit is contained in:
Ward Fisher 2012-08-08 19:45:38 +00:00
parent 77bd943296
commit a6c95c65b1
5 changed files with 479 additions and 449 deletions

View File

@ -129,9 +129,11 @@ nc_uriparse(const char* uri0, NC_URI** nc_urip)
/* 8. extract host and port */
host = p;
port = strchr(p,':');
if(port) {
if(strncmp(protocol,"file",4)) {
port = strchr(p,':');
if(port) {
*port++ = '\0';
}
}
/* 9. Look for '?' */

View File

@ -16,7 +16,7 @@ IF(USE_NETCDF4)
SET(ncDumpTests ${ncDumpTests} tst_create_files tst_group_data tst_enum_data tst_opaque_data tst_string_data tst_vlen_data tst_comp tst_comp2 tst_nans tst_special_atts tst_h_rdc0 tst_unicode tst_fillbug tst_compress tst_chunking)
ENDIF()
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(GLOB COPY_FILES ${CMAKE_BINARY_DIR}/ncgen/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
ADD_EXECUTABLE(ncdump ${ncdump_FILES})

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,8 @@
/* A Bison parser, made by GNU Bison 2.4.2. */
/* A Bison parser, made by GNU Bison 2.6.2. */
/* Skeleton interface for Bison's Yacc-like parsers in C
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -31,6 +30,15 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef NCG_NCGEN_TAB_H
# define NCG_NCGEN_TAB_H
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int ncgdebug;
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
@ -62,7 +70,6 @@
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
@ -72,4 +79,18 @@ typedef int YYSTYPE;
extern YYSTYPE ncglval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int ncgparse (void *YYPARSE_PARAM);
#else
int ncgparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int ncgparse (void);
#else
int ncgparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !NCG_NCGEN_TAB_H */

View File

@ -189,9 +189,12 @@ ocuriparse(const char* uri0, OCURI** ocurip)
/* extract host and port */
p = host;
port = strchr(p,':');
if(port!=NULL)
*port++ = '\0';
if(strncmp(protocol,"file",4)) {
port = strchr(p,':');
if(port!=NULL) {
*port++ = '\0';
}
}
/* Locate end of the file */
constraint = strchr(file,'?');