Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made some publicly exported symbols static, prefixed others with H5_ #347

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions hl/src/H5LTanalyze.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ char *H5LTyytext;
#include <hdf5.h>
#include "H5LTparse.h"

int my_yyinput(char *, int);
static int my_yyinput(char *, int);
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms))
#define token(x) (int)x
Expand All @@ -920,30 +920,30 @@ struct cmpd_info {
hbool_t is_field;
hbool_t first_memb;
};
extern struct cmpd_info cmpd_stack[STACK_SIZE];
extern int csindex;
extern struct cmpd_info H5_cmpd_stack[STACK_SIZE];
extern int H5_csindex;

/*variables for array type*/
struct arr_info {
hsize_t dims[H5S_MAX_RANK];
int ndim;
hbool_t is_dim;
};
extern struct arr_info arr_stack[STACK_SIZE];
extern int asindex;
extern struct arr_info H5_arr_stack[STACK_SIZE];
extern int H5_asindex;

/*variables for enumerate type*/
extern hbool_t is_enum;
extern hbool_t is_enum_memb;
extern hbool_t H5_is_enum;
extern hbool_t H5_is_enum_memb;

/*variables for string type*/
extern hbool_t is_str_size;
extern hbool_t H5_is_str_size;

/*variables for opaque type*/
extern hbool_t is_opq_size;
extern hbool_t is_opq_tag;
extern hbool_t H5_is_opq_size;
extern hbool_t H5_is_opq_tag;

hbool_t first_quote = 1;
static hbool_t first_quote = 1;


#line 920 "hl/src/H5LTanalyze.c"
Expand Down Expand Up @@ -1491,9 +1491,9 @@ case 55:
YY_RULE_SETUP
#line 140 "hl/src/H5LTanalyze.l"
{
if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
if( H5_is_str_size || (H5_is_enum && H5_is_enum_memb) ||
H5_is_opq_size || (H5_asindex>-1 && H5_arr_stack[H5_asindex].is_dim) ||
(H5_csindex>-1 && H5_cmpd_stack[H5_csindex].is_field) ) {
H5LTyylval.ival = atoi(H5LTyytext);
return NUMBER;
} else
Expand All @@ -1505,7 +1505,7 @@ YY_RULE_SETUP
#line 150 "hl/src/H5LTanalyze.l"
{
/*if it's first quote, and is a compound field name or an enum symbol*/
if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
if((H5_is_opq_tag || H5_is_enum || (H5_csindex>-1 && H5_cmpd_stack[H5_csindex].is_field))
&& first_quote) {
first_quote = 0;
BEGIN TAG_STRING;
Expand Down Expand Up @@ -2550,7 +2550,7 @@ void H5LTyyfree (void * ptr )
#line 179 "hl/src/H5LTanalyze.l"


int my_yyinput(char *buf, int max_size)
static int my_yyinput(char *buf, int max_size)
{
int ret;

Expand Down
32 changes: 16 additions & 16 deletions hl/src/H5LTanalyze.l
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <hdf5.h>
#include "H5LTparse.h"

int my_yyinput(char *, int);
static int my_yyinput(char *, int);
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms))
#define token(x) (int)x
Expand All @@ -45,30 +45,30 @@ struct cmpd_info {
hbool_t is_field;
hbool_t first_memb;
};
extern struct cmpd_info cmpd_stack[STACK_SIZE];
extern int csindex;
extern struct cmpd_info H5_cmpd_stack[STACK_SIZE];
extern int H5_csindex;

/*variables for array type*/
struct arr_info {
hsize_t dims[H5S_MAX_RANK];
int ndim;
hbool_t is_dim;
};
extern struct arr_info arr_stack[STACK_SIZE];
extern int asindex;
extern struct arr_info H5_arr_stack[STACK_SIZE];
extern int H5_asindex;

/*variables for enumerate type*/
extern hbool_t is_enum;
extern hbool_t is_enum_memb;
extern hbool_t H5_is_enum;
extern hbool_t H5_is_enum_memb;

/*variables for string type*/
extern hbool_t is_str_size;
extern hbool_t H5_is_str_size;

/*variables for opaque type*/
extern hbool_t is_opq_size;
extern hbool_t is_opq_tag;
extern hbool_t H5_is_opq_size;
extern hbool_t H5_is_opq_tag;

hbool_t first_quote = 1;
static hbool_t first_quote = 1;

%}

Expand Down Expand Up @@ -138,9 +138,9 @@ OPQ_SIZE {return token(OPQ_SIZE_TOKEN);}
OPQ_TAG {return token(OPQ_TAG_TOKEN);}

[0-9]+ {
if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
if( H5_is_str_size || (H5_is_enum && H5_is_enum_memb) ||
H5_is_opq_size || (H5_asindex>-1 && H5_arr_stack[H5_asindex].is_dim) ||
(H5_csindex>-1 && H5_cmpd_stack[H5_csindex].is_field) ) {
H5LTyylval.ival = atoi(yytext);
return NUMBER;
} else
Expand All @@ -149,7 +149,7 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);}

"\"" {
/*if it's first quote, and is a compound field name or an enum symbol*/
if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
if((H5_is_opq_tag || H5_is_enum || (H5_csindex>-1 && H5_cmpd_stack[H5_csindex].is_field))
&& first_quote) {
first_quote = 0;
BEGIN TAG_STRING;
Expand Down Expand Up @@ -177,7 +177,7 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);}
"\n" { return 0; }

%%
int my_yyinput(char *buf, int max_size)
static int my_yyinput(char *buf, int max_size)
{
int ret;

Expand Down
Loading