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
9309eac1
Commit
9309eac1
authored
Mar 02, 2000
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
0eb5ab82
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
302 additions
and
372 deletions
+302
-372
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+6
-0
src/interfaces/ecpg/preproc/extern.h
src/interfaces/ecpg/preproc/extern.h
+1
-1
src/interfaces/ecpg/preproc/output.c
src/interfaces/ecpg/preproc/output.c
+20
-10
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+275
-359
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/preproc/variable.c
+0
-2
No files found.
src/interfaces/ecpg/ChangeLog
View file @
9309eac1
...
...
@@ -837,5 +837,11 @@ Wed Mar 1 10:49:03 CET 2000
- Synced preproc.y with gram.y.
- Added output of arrays.
Thu Mar 2 11:25:09 CET 2000
- Fixed some parsing problems. A variable can now be a reserved
SQL keyword.
- Made sure double quotes in statements are correctly quoted.
- Set library version to 3.1.0.
- Set ecpg version to 2.7.0.
src/interfaces/ecpg/preproc/extern.h
View file @
9309eac1
...
...
@@ -39,7 +39,7 @@ extern const char *get_dtype(enum ECPGdtype);
extern
void
lex_init
(
void
);
extern
char
*
make_str
(
const
char
*
);
extern
void
output_line_number
(
void
);
extern
void
output_statement
(
char
*
,
int
,
char
*
);
extern
void
output_statement
(
char
*
,
int
,
char
*
,
char
*
,
struct
arguments
*
,
struct
arguments
*
);
extern
void
output_simple_statement
(
char
*
);
extern
char
*
hashline_number
(
void
);
extern
int
yyparse
(
void
);
...
...
src/interfaces/ecpg/preproc/output.c
View file @
9309eac1
...
...
@@ -13,7 +13,15 @@ output_line_number()
void
output_simple_statement
(
char
*
cmd
)
{
fputs
(
cmd
,
yyout
);
int
i
,
j
=
strlen
(
cmd
);;
/* do this char by char as we have to filter '\"' */
for
(
i
=
0
;
i
<
j
;
i
++
)
{
if
(
cmd
[
i
]
!=
'"'
)
fputc
(
cmd
[
i
],
yyout
);
else
fputs
(
"
\\\"
"
,
yyout
);
}
output_line_number
();
free
(
cmd
);
}
...
...
@@ -86,19 +94,20 @@ hashline_number(void)
}
void
output_statement
(
char
*
stmt
,
int
mode
,
char
*
descriptor
)
output_statement
(
char
*
stmt
,
int
mode
,
char
*
descriptor
,
char
*
con
,
struct
arguments
*
insert
,
struct
arguments
*
result
)
{
int
i
,
j
=
strlen
(
stmt
);
int
i
,
j
=
strlen
(
stmt
);
if
(
descriptor
==
NULL
)
fprintf
(
yyout
,
"{ ECPGdo(__LINE__, %s,
\"
"
,
con
nection
?
connecti
on
:
"NULL"
);
fprintf
(
yyout
,
"{ ECPGdo(__LINE__, %s,
\"
"
,
con
?
c
on
:
"NULL"
);
else
fprintf
(
yyout
,
"{ ECPGdo_descriptor(__LINE__, %s,
\"
%s
\"
,
\"
"
,
con
nection
?
connecti
on
:
"NULL"
,
descriptor
);
con
?
c
on
:
"NULL"
,
descriptor
);
/* do this char by char as we have to filter '\"' */
for
(
i
=
0
;
i
<
j
;
i
++
)
{
if
(
stmt
[
i
]
!=
'
\
"'
)
for
(
i
=
0
;
i
<
j
;
i
++
)
{
if
(
stmt
[
i
]
!=
'"'
)
fputc
(
stmt
[
i
],
yyout
);
else
fputs
(
"
\\\"
"
,
yyout
);
...
...
@@ -109,9 +118,9 @@ output_statement(char * stmt, int mode, char *descriptor)
fputs
(
"
\"
, "
,
yyout
);
/* dump variables to C file */
dump_variables
(
args
insert
,
1
);
dump_variables
(
insert
,
1
);
fputs
(
"ECPGt_EOIT, "
,
yyout
);
dump_variables
(
args
result
,
1
);
dump_variables
(
result
,
1
);
fputs
(
"ECPGt_EORT);"
,
yyout
);
}
else
...
...
@@ -120,7 +129,8 @@ output_statement(char * stmt, int mode, char *descriptor)
mode
|=
2
;
whenever_action
(
mode
);
free
(
stmt
);
free
(
descriptor
);
if
(
descriptor
!=
NULL
)
free
(
descriptor
);
if
(
connection
!=
NULL
)
free
(
connection
);
}
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
9309eac1
This diff is collapsed.
Click to expand it.
src/interfaces/ecpg/preproc/variable.c
View file @
9309eac1
...
...
@@ -222,8 +222,6 @@ dump_variables(struct arguments * list, int mode)
/* Then the current element and its indicator */
ECPGdump_a_type
(
yyout
,
list
->
variable
->
name
,
list
->
variable
->
type
,
/* (list->indicator->type->typ != ECPGt_NO_INDICATOR) ? list->indicator->name : NULL,
(list->indicator->type->typ != ECPGt_NO_INDICATOR) ? list->indicator->type : NULL, NULL, NULL);*/
list
->
indicator
->
name
,
list
->
indicator
->
type
,
NULL
,
NULL
);
/* Then release the list element. */
...
...
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