Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
51a5921d
Commit
51a5921d
authored
Dec 21, 2007
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a few minor glitches pointed out by splint.
parent
7b009a2a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
16 deletions
+20
-16
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/preproc/descriptor.c
src/interfaces/ecpg/preproc/descriptor.c
+6
-6
src/interfaces/ecpg/preproc/ecpg.c
src/interfaces/ecpg/preproc/ecpg.c
+3
-3
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+3
-3
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/type.c
+2
-2
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/preproc/variable.c
+2
-2
No files found.
src/interfaces/ecpg/ChangeLog
View file @
51a5921d
...
...
@@ -2268,6 +2268,10 @@ Wed, 10 Oct 2007 08:31:44 +0200
Tue, 06 Nov 2007 09:29:22 +0100
- Fixed two parser bugs.
Fri, 21 Dec 2007 15:30:39 +0100
- Fixed a few minor glitches pointed out by splint.
- Set pgtypes library version to 3.0.
- Set compat library version to 3.0.
- Set ecpg library version to 6.0.
...
...
src/interfaces/ecpg/preproc/descriptor.c
View file @
51a5921d
/*
* functions needed for descriptor handling
*
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.2
5 2007/02/07 00:52:35 petere
Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.2
6 2007/12/21 14:33:20 meskes
Exp $
*
* since descriptor might be either a string constant or a string var
* we need to check for a constant if we expect a constant
...
...
@@ -15,7 +15,7 @@
* assignment handling function (descriptor)
*/
struct
assignment
*
assignments
;
st
atic
st
ruct
assignment
*
assignments
;
void
push_assignment
(
char
*
var
,
enum
ECPGdtype
value
)
...
...
@@ -43,7 +43,7 @@ drop_assignments(void)
}
static
void
ECPGnumeric_lvalue
(
FILE
*
f
,
char
*
name
)
ECPGnumeric_lvalue
(
char
*
name
)
{
const
struct
variable
*
v
=
find_variable
(
name
);
...
...
@@ -156,7 +156,7 @@ output_get_descr_header(char *desc_name)
for
(
results
=
assignments
;
results
!=
NULL
;
results
=
results
->
next
)
{
if
(
results
->
value
==
ECPGd_count
)
ECPGnumeric_lvalue
(
yyout
,
results
->
variable
);
ECPGnumeric_lvalue
(
results
->
variable
);
else
mmerror
(
PARSE_ERROR
,
ET_WARNING
,
"unknown descriptor header item '%d'"
,
results
->
value
);
}
...
...
@@ -205,7 +205,7 @@ output_set_descr_header(char *desc_name)
for
(
results
=
assignments
;
results
!=
NULL
;
results
=
results
->
next
)
{
if
(
results
->
value
==
ECPGd_count
)
ECPGnumeric_lvalue
(
yyout
,
results
->
variable
);
ECPGnumeric_lvalue
(
results
->
variable
);
else
mmerror
(
PARSE_ERROR
,
ET_WARNING
,
"unknown descriptor header item '%d'"
,
results
->
value
);
}
...
...
@@ -317,7 +317,7 @@ struct variable *
descriptor_variable
(
const
char
*
name
,
int
input
)
{
static
char
descriptor_names
[
2
][
MAX_DESCRIPTOR_NAMELEN
];
static
const
struct
ECPGtype
descriptor_type
=
{
ECPGt_descriptor
,
NULL
};
static
const
struct
ECPGtype
descriptor_type
=
{
ECPGt_descriptor
,
NULL
,
NULL
,
{
NULL
},
0
};
static
const
struct
variable
varspace
[
2
]
=
{
{
descriptor_names
[
0
],
(
struct
ECPGtype
*
)
&
descriptor_type
,
0
,
NULL
},
{
descriptor_names
[
1
],
(
struct
ECPGtype
*
)
&
descriptor_type
,
0
,
NULL
}
...
...
src/interfaces/ecpg/preproc/ecpg.c
View file @
51a5921d
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.10
2 2007/11/15 21:14:45 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.10
3 2007/12/21 14:33:20 meskes
Exp $ */
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
...
...
@@ -18,7 +18,6 @@ int ret_value = 0,
system_includes
=
false
,
force_indicator
=
true
,
questionmarks
=
false
,
header_mode
=
false
,
regression_mode
=
false
,
auto_prepare
=
false
;
...
...
@@ -132,6 +131,7 @@ main(int argc, char *const argv[])
int
fnr
,
c
,
verbose
=
false
,
header_mode
=
false
,
out_option
=
0
;
struct
_include_path
*
ip
;
const
char
*
progname
;
...
...
@@ -200,7 +200,7 @@ main(int argc, char *const argv[])
case
'h'
:
header_mode
=
true
;
/* this must include "-c" to make sense */
/* so do not place a
break;
here */
/* so do not place a
"break;"
here */
case
'c'
:
auto_create_c
=
true
;
break
;
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
51a5921d
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.35
5 2007/11/06 08:32:08
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.35
6 2007/12/21 14:33:20
meskes Exp $ */
/* Copyright comment */
%{
...
...
@@ -47,10 +47,10 @@ static char *ECPGstruct_sizeof = NULL;
/* for forward declarations we have to store some data as well */
static char *forward_name = NULL;
struct ECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR,
0L, NULL, {NULL}
};
struct ECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR,
NULL, NULL, {NULL}, 0
};
struct variable no_indicator = {"no_indicator", &ecpg_no_indicator, 0, NULL};
struct ECPGtype ecpg_query = {ECPGt_char_variable,
0L, NULL, {NULL}
};
struct ECPGtype ecpg_query = {ECPGt_char_variable,
NULL, NULL, {NULL}, 0
};
/*
* Handle parsing errors and warnings
...
...
src/interfaces/ecpg/preproc/type.c
View file @
51a5921d
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.7
6 2007/11/15 21:14:45 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.7
7 2007/12/21 14:33:20 meskes
Exp $ */
#include "postgres_fe.h"
...
...
@@ -6,7 +6,7 @@
#define indicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR
struct
ECPGstruct_member
struct_no_indicator
=
{
"no_indicator"
,
&
ecpg_no_indicator
,
NULL
};
st
atic
st
ruct
ECPGstruct_member
struct_no_indicator
=
{
"no_indicator"
,
&
ecpg_no_indicator
,
NULL
};
/* malloc + error check */
void
*
...
...
src/interfaces/ecpg/preproc/variable.c
View file @
51a5921d
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.4
2 2007/08/14 10:01:53
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.4
3 2007/12/21 14:33:20
meskes Exp $ */
#include "postgres_fe.h"
#include "extern.h"
struct
variable
*
allvariables
=
NULL
;
st
atic
st
ruct
variable
*
allvariables
=
NULL
;
struct
variable
*
new_variable
(
const
char
*
name
,
struct
ECPGtype
*
type
,
int
brace_level
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment