mirror of
https://github.com/postgres/postgres.git
synced 2025-06-08 22:02:03 +03:00
Fix some more 'old-style parameter declaration' warnings.
This commit is contained in:
parent
f1283ed6cc
commit
0636d55843
@ -274,18 +274,25 @@ ftp"://" {
|
|||||||
%%
|
%%
|
||||||
|
|
||||||
/* clearing after parsing from string */
|
/* clearing after parsing from string */
|
||||||
void end_parse() {
|
void
|
||||||
if (s) { free(s); s=NULL; }
|
end_parse(void)
|
||||||
|
{
|
||||||
|
if (s)
|
||||||
|
{
|
||||||
|
free(s);
|
||||||
|
s = NULL;
|
||||||
|
}
|
||||||
tsearch_yy_delete_buffer( buf );
|
tsearch_yy_delete_buffer( buf );
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* start parse from string */
|
/* start parse from string */
|
||||||
void start_parse_str(char* str, int limit) {
|
void
|
||||||
if (buf) end_parse();
|
start_parse_str(char* str, int limit)
|
||||||
|
{
|
||||||
|
if (buf)
|
||||||
|
end_parse();
|
||||||
buf = tsearch_yy_scan_bytes( str, limit );
|
buf = tsearch_yy_scan_bytes( str, limit );
|
||||||
tsearch_yy_switch_to_buffer( buf );
|
tsearch_yy_switch_to_buffer( buf );
|
||||||
BEGIN INITIAL;
|
BEGIN INITIAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,8 @@ typedef struct {
|
|||||||
static TagStorage ts={0,0,NULL};
|
static TagStorage ts={0,0,NULL};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
addTag() {
|
addTag(void)
|
||||||
|
{
|
||||||
while( ts.clen+tsearch2_yyleng+1 > ts.tlen ) {
|
while( ts.clen+tsearch2_yyleng+1 > ts.tlen ) {
|
||||||
ts.tlen*=2;
|
ts.tlen*=2;
|
||||||
ts.str=realloc(ts.str,ts.tlen);
|
ts.str=realloc(ts.str,ts.tlen);
|
||||||
@ -38,7 +39,8 @@ addTag() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
startTag() {
|
startTag(void)
|
||||||
|
{
|
||||||
if ( ts.str==NULL ) {
|
if ( ts.str==NULL ) {
|
||||||
ts.tlen=tsearch2_yyleng+1;
|
ts.tlen=tsearch2_yyleng+1;
|
||||||
ts.str=malloc(ts.tlen);
|
ts.str=malloc(ts.tlen);
|
||||||
@ -319,17 +321,25 @@ ftp"://" {
|
|||||||
%%
|
%%
|
||||||
|
|
||||||
/* clearing after parsing from string */
|
/* clearing after parsing from string */
|
||||||
void tsearch2_end_parse() {
|
void
|
||||||
if (s) { free(s); s=NULL; }
|
tsearch2_end_parse(void)
|
||||||
|
{
|
||||||
|
if (s)
|
||||||
|
{
|
||||||
|
free(s);
|
||||||
|
s = NULL;
|
||||||
|
}
|
||||||
tsearch2_yy_delete_buffer( buf );
|
tsearch2_yy_delete_buffer( buf );
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* start parse from string */
|
/* start parse from string */
|
||||||
void tsearch2_start_parse_str(char* str, int limit) {
|
void
|
||||||
if (buf) tsearch2_end_parse();
|
tsearch2_start_parse_str(char* str, int limit)
|
||||||
|
{
|
||||||
|
if (buf)
|
||||||
|
tsearch2_end_parse();
|
||||||
buf = tsearch2_yy_scan_bytes( str, limit );
|
buf = tsearch2_yy_scan_bytes( str, limit );
|
||||||
tsearch2_yy_switch_to_buffer( buf );
|
tsearch2_yy_switch_to_buffer( buf );
|
||||||
BEGIN INITIAL;
|
BEGIN INITIAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user