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
e9c3f025
Commit
e9c3f025
authored
Sep 19, 2000
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
a5a290ca
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
587 additions
and
336 deletions
+587
-336
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+10
-0
src/interfaces/ecpg/TODO
src/interfaces/ecpg/TODO
+2
-1
src/interfaces/ecpg/include/ecpgtype.h
src/interfaces/ecpg/include/ecpgtype.h
+3
-2
src/interfaces/ecpg/lib/Makefile
src/interfaces/ecpg/lib/Makefile
+2
-2
src/interfaces/ecpg/lib/data.c
src/interfaces/ecpg/lib/data.c
+37
-2
src/interfaces/ecpg/lib/descriptor.c
src/interfaces/ecpg/lib/descriptor.c
+15
-9
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/lib/execute.c
+44
-1
src/interfaces/ecpg/lib/typename.c
src/interfaces/ecpg/lib/typename.c
+4
-0
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/Makefile
+2
-2
src/interfaces/ecpg/preproc/descriptor.c
src/interfaces/ecpg/preproc/descriptor.c
+2
-0
src/interfaces/ecpg/preproc/ecpg_keywords.c
src/interfaces/ecpg/preproc/ecpg_keywords.c
+0
-1
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/keywords.c
+13
-1
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+62
-8
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+382
-306
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/type.c
+7
-1
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/preproc/variable.c
+2
-0
No files found.
src/interfaces/ecpg/ChangeLog
View file @
e9c3f025
...
...
@@ -925,3 +925,13 @@ Wed May 17 07:52:59 CEST 2000
handling.
- Set library version to 3.1.1.
Mon Sep 4 14:10:38 PDT 2000
- Synced preproc.y with gram.y.
- Synced keyword.c.
Mon Sep 18 13:55:11 PDT 2000
- Added int8 support based on a patch by Martijn Schoemaker <martijn@osp.nl>
- Set ecpg version to 2.8.0.
- Set library version to 3.2.0.
src/interfaces/ecpg/TODO
View file @
e9c3f025
...
...
@@ -26,5 +26,6 @@ instead of libpq so we can write backend functions using ecpg.
remove space_or_nl and line_end from pgc.l
Missing
statement
s:
Missing
feature
s:
- SQLSTATE
- LONG LONG datatype
src/interfaces/ecpg/include/ecpgtype.h
View file @
e9c3f025
...
...
@@ -47,13 +47,14 @@ extern "C"
ECPGt_char_variable
,
ECPGt_EOIT
,
/* End of insert types. */
ECPGt_EORT
,
/* End of result types. */
ECPGt_NO_INDICATOR
/* no indicator */
ECPGt_NO_INDICATOR
,
/* no indicator */
ECPGt_long_long
,
ECPGt_unsigned_long_long
};
/* descriptor items */
enum
ECPGdtype
{
ECPGd_count
,
ECPGd_count
=
1
,
ECPGd_data
,
ECPGd_di_code
,
ECPGd_di_precision
,
...
...
src/interfaces/ecpg/lib/Makefile
View file @
e9c3f025
...
...
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile,v 1.
8 2000/09/17 13:02:46 petere
Exp $
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile,v 1.
9 2000/09/19 11:47:13 meskes
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
NAME
=
ecpg
SO_MAJOR_VERSION
=
3
SO_MINOR_VERSION
=
1.1
SO_MINOR_VERSION
=
2.0
CPPFLAGS
+=
-I
$(top_srcdir)
/src/interfaces/ecpg/include
-I
$(libpq_srcdir)
...
...
src/interfaces/ecpg/lib/data.c
View file @
e9c3f025
...
...
@@ -60,6 +60,12 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
case
ECPGt_unsigned_long
:
((
long
*
)
ind
)[
act_tuple
]
=
-
PQgetisnull
(
results
,
act_tuple
,
act_field
);
break
;
case
ECPGt_long_long
:
((
long
long
int
*
)
ind
)[
act_tuple
]
=
-
PQgetisnull
(
results
,
act_tuple
,
act_field
);
break
;
case
ECPGt_unsigned_long_long
:
((
unsigned
long
long
int
*
)
ind
)[
act_tuple
]
=
-
PQgetisnull
(
results
,
act_tuple
,
act_field
);
break
;
case
ECPGt_NO_INDICATOR
:
if
(
PQgetisnull
(
results
,
act_tuple
,
act_field
))
{
...
...
@@ -93,7 +99,6 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
{
ECPGraise
(
lineno
,
ECPG_INT_FORMAT
,
pval
);
return
(
false
);
res
=
0L
;
}
}
else
...
...
@@ -127,7 +132,6 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
{
ECPGraise
(
lineno
,
ECPG_UINT_FORMAT
,
pval
);
return
(
false
);
ures
=
0L
;
}
}
else
...
...
@@ -150,6 +154,37 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
}
break
;
case
ECPGt_long_long
:
if
(
pval
)
{
((
long
long
int
*
)
var
)[
act_tuple
]
=
strtoull
(
pval
,
&
scan_length
,
10
);
if
((
isarray
&&
*
scan_length
!=
','
&&
*
scan_length
!=
'}'
)
||
(
!
isarray
&&
*
scan_length
!=
'\0'
))
/* Garbage left */
{
ECPGraise
(
lineno
,
ECPG_INT_FORMAT
,
pval
);
return
(
false
);
}
}
else
((
long
long
int
*
)
var
)[
act_tuple
]
=
0LL
;
break
;
case
ECPGt_unsigned_long_long
:
if
(
pval
)
{
((
unsigned
long
long
int
*
)
var
)[
act_tuple
]
=
strtoull
(
pval
,
&
scan_length
,
10
);
if
((
isarray
&&
*
scan_length
!=
','
&&
*
scan_length
!=
'}'
)
||
(
!
isarray
&&
*
scan_length
!=
'\0'
))
/* Garbage left */
{
ECPGraise
(
lineno
,
ECPG_UINT_FORMAT
,
pval
);
return
(
false
);
}
}
else
((
unsigned
long
long
int
*
)
var
)[
act_tuple
]
=
0LL
;
break
;
case
ECPGt_float
:
case
ECPGt_double
:
...
...
src/interfaces/ecpg/lib/descriptor.c
View file @
e9c3f025
...
...
@@ -64,28 +64,34 @@ get_int_item(int lineno, void *var, enum ECPGdtype vartype, int value)
switch
(
vartype
)
{
case
ECPGt_short
:
*
(
short
*
)
var
=
value
;
*
(
short
*
)
var
=
(
short
)
value
;
break
;
case
ECPGt_int
:
*
(
int
*
)
var
=
value
;
*
(
int
*
)
var
=
(
int
)
value
;
break
;
case
ECPGt_long
:
*
(
long
*
)
var
=
value
;
*
(
long
*
)
var
=
(
long
)
value
;
break
;
case
ECPGt_unsigned_short
:
*
(
unsigned
short
*
)
var
=
value
;
*
(
unsigned
short
*
)
var
=
(
unsigned
short
)
value
;
break
;
case
ECPGt_unsigned_int
:
*
(
unsigned
int
*
)
var
=
value
;
*
(
unsigned
int
*
)
var
=
(
unsigned
int
)
value
;
break
;
case
ECPGt_unsigned_long
:
*
(
unsigned
long
*
)
var
=
value
;
*
(
unsigned
long
*
)
var
=
(
unsigned
long
)
value
;
break
;
case
ECPGt_long_long
:
*
(
long
long
int
*
)
var
=
(
long
long
int
)
value
;
break
;
case
ECPGt_unsigned_long_long
:
*
(
unsigned
long
long
int
*
)
var
=
(
unsigned
long
long
int
)
value
;
break
;
case
ECPGt_float
:
*
(
float
*
)
var
=
value
;
*
(
float
*
)
var
=
(
float
)
value
;
break
;
case
ECPGt_double
:
*
(
double
*
)
var
=
value
;
*
(
double
*
)
var
=
(
double
)
value
;
break
;
default:
ECPGraise
(
lineno
,
ECPG_VAR_NOT_NUMERIC
,
NULL
);
...
...
src/interfaces/ecpg/lib/execute.c
View file @
e9c3f025
...
...
@@ -305,6 +305,11 @@ ECPGexecute(struct statement * stmt)
if
(
*
(
long
*
)
var
->
ind_value
<
0L
)
strcpy
(
buff
,
"null"
);
break
;
case
ECPGt_long_long
:
case
ECPGt_unsigned_long_long
:
if
(
*
(
long
long
int
*
)
var
->
ind_value
<
0LL
)
strcpy
(
buff
,
"null"
);
break
;
default:
break
;
}
...
...
@@ -429,6 +434,44 @@ ECPGexecute(struct statement * stmt)
tobeinserted
=
mallocedval
;
break
;
case
ECPGt_long_long
:
if
(
!
(
mallocedval
=
ecpg_alloc
(
var
->
arrsize
*
25
,
stmt
->
lineno
)))
return
false
;
if
(
var
->
arrsize
>
1
)
{
strncpy
(
mallocedval
,
"'{"
,
sizeof
(
"'{"
));
for
(
element
=
0
;
element
<
var
->
arrsize
;
element
++
)
sprintf
(
mallocedval
+
strlen
(
mallocedval
),
"%lld,"
,
((
long
long
*
)
var
->
value
)[
element
]);
strncpy
(
mallocedval
+
strlen
(
mallocedval
)
-
1
,
"}'"
,
sizeof
(
"}'"
));
}
else
sprintf
(
mallocedval
,
"%lld"
,
*
((
long
long
*
)
var
->
value
));
tobeinserted
=
mallocedval
;
break
;
case
ECPGt_unsigned_long_long
:
if
(
!
(
mallocedval
=
ecpg_alloc
(
var
->
arrsize
*
25
,
stmt
->
lineno
)))
return
false
;
if
(
var
->
arrsize
>
1
)
{
strncpy
(
mallocedval
,
"'{"
,
sizeof
(
"'{"
));
for
(
element
=
0
;
element
<
var
->
arrsize
;
element
++
)
sprintf
(
mallocedval
+
strlen
(
mallocedval
),
"%llu,"
,
((
unsigned
long
long
*
)
var
->
value
)[
element
]);
strncpy
(
mallocedval
+
strlen
(
mallocedval
)
-
1
,
"}'"
,
sizeof
(
"}'"
));
}
else
sprintf
(
mallocedval
,
"%llu"
,
*
((
unsigned
long
long
*
)
var
->
value
));
tobeinserted
=
mallocedval
;
break
;
case
ECPGt_float
:
if
(
!
(
mallocedval
=
ecpg_alloc
(
var
->
arrsize
*
20
,
stmt
->
lineno
)))
return
false
;
...
...
@@ -868,7 +911,7 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
*
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
*
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
7 2000/05/29 21:25:00 momjian
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
8 2000/09/19 11:47:13 meskes
Exp $
*/
PGconn
*
ECPG_internal_get_connection
(
char
*
name
);
...
...
src/interfaces/ecpg/lib/typename.c
View file @
e9c3f025
...
...
@@ -28,6 +28,10 @@ ECPGtype_name(enum ECPGttype typ)
return
"long"
;
case
ECPGt_unsigned_long
:
return
"unsigned long"
;
case
ECPGt_long_long
:
return
"long long"
;
case
ECPGt_unsigned_long_long
:
return
"unsigned long long"
;
case
ECPGt_float
:
return
"float"
;
case
ECPGt_double
:
...
...
src/interfaces/ecpg/preproc/Makefile
View file @
e9c3f025
...
...
@@ -3,8 +3,8 @@ top_builddir = ../../../..
include
$(top_builddir)/src/Makefile.global
MAJOR_VERSION
=
2
MINOR_VERSION
=
7
PATCHLEVEL
=
1
MINOR_VERSION
=
8
PATCHLEVEL
=
0
CPPFLAGS
+=
-I
../include
-DMAJOR_VERSION
=
$(MAJOR_VERSION)
\
-DMINOR_VERSION
=
$(MINOR_VERSION)
-DPATCHLEVEL
=
$(PATCHLEVEL)
\
...
...
src/interfaces/ecpg/preproc/descriptor.c
View file @
e9c3f025
...
...
@@ -46,9 +46,11 @@ ECPGnumeric_lvalue(FILE *f, char *name)
case
ECPGt_short
:
case
ECPGt_int
:
case
ECPGt_long
:
case
ECPGt_long_long
:
case
ECPGt_unsigned_short
:
case
ECPGt_unsigned_int
:
case
ECPGt_unsigned_long
:
case
ECPGt_unsigned_long_long
:
fputs
(
name
,
yyout
);
break
;
default:
...
...
src/interfaces/ecpg/preproc/ecpg_keywords.c
View file @
e9c3f025
...
...
@@ -50,7 +50,6 @@ static ScanKeyword ScanKeywords[] = {
{
"name"
,
SQL_NAME
},
{
"nullable"
,
SQL_NULLABLE
},
{
"octet_length"
,
SQL_OCTET_LENGTH
},
{
"off"
,
SQL_OFF
},
{
"open"
,
SQL_OPEN
},
{
"prepare"
,
SQL_PREPARE
},
{
"reference"
,
SQL_REFERENCE
},
...
...
src/interfaces/ecpg/preproc/keywords.c
View file @
e9c3f025
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.2
8 2000/06/12 19:40:55 momjian
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.2
9 2000/09/19 11:47:14 meskes
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -55,8 +55,10 @@ static ScanKeyword ScanKeywords[] = {
{
"cascade"
,
CASCADE
},
{
"case"
,
CASE
},
{
"cast"
,
CAST
},
{
"chain"
,
CHAIN
},
{
"char"
,
CHAR
},
{
"character"
,
CHARACTER
},
{
"characteristics"
,
CHARACTERISTICS
},
{
"check"
,
CHECK
},
{
"close"
,
CLOSE
},
{
"cluster"
,
CLUSTER
},
...
...
@@ -100,6 +102,7 @@ static ScanKeyword ScanKeywords[] = {
{
"else"
,
ELSE
},
{
"encoding"
,
ENCODING
},
{
"end"
,
END_TRANS
},
{
"escape"
,
ESCAPE
},
{
"except"
,
EXCEPT
},
{
"exclusive"
,
EXCLUSIVE
},
{
"execute"
,
EXECUTE
},
...
...
@@ -123,6 +126,7 @@ static ScanKeyword ScanKeywords[] = {
{
"handler"
,
HANDLER
},
{
"having"
,
HAVING
},
{
"hour"
,
HOUR_P
},
{
"ilike"
,
ILIKE
},
{
"immediate"
,
IMMEDIATE
},
{
"in"
,
IN
},
{
"increment"
,
INCREMENT
},
...
...
@@ -130,6 +134,7 @@ static ScanKeyword ScanKeywords[] = {
{
"inherits"
,
INHERITS
},
{
"initially"
,
INITIALLY
},
{
"inner"
,
INNER_P
},
{
"inout"
,
INOUT
},
{
"insensitive"
,
INSENSITIVE
},
{
"insert"
,
INSERT
},
{
"instead"
,
INSTEAD
},
...
...
@@ -178,6 +183,7 @@ static ScanKeyword ScanKeywords[] = {
{
"nullif"
,
NULLIF
},
{
"numeric"
,
NUMERIC
},
{
"of"
,
OF
},
{
"off"
,
OFF
},
{
"offset"
,
OFFSET
},
{
"oids"
,
OIDS
},
{
"old"
,
OLD
},
...
...
@@ -188,9 +194,11 @@ static ScanKeyword ScanKeywords[] = {
{
"overlaps"
,
OVERLAPS
},
{
"or"
,
OR
},
{
"order"
,
ORDER
},
{
"out"
,
OUT
},
{
"outer"
,
OUTER_P
},
{
"partial"
,
PARTIAL
},
{
"password"
,
PASSWORD
},
{
"path"
,
PATH_P
},
{
"pendant"
,
PENDANT
},
{
"position"
,
POSITION
},
{
"precision"
,
PRECISION
},
...
...
@@ -213,12 +221,14 @@ static ScanKeyword ScanKeywords[] = {
{
"rollback"
,
ROLLBACK
},
{
"row"
,
ROW
},
{
"rule"
,
RULE
},
{
"schema"
,
SCHEMA
},
{
"scroll"
,
SCROLL
},
{
"second"
,
SECOND_P
},
{
"select"
,
SELECT
},
{
"sequence"
,
SEQUENCE
},
{
"serial"
,
SERIAL
},
{
"serializable"
,
SERIALIZABLE
},
{
"session"
,
SESSION
},
{
"session_user"
,
SESSION_USER
},
{
"set"
,
SET
},
{
"setof"
,
SETOF
},
...
...
@@ -240,6 +250,7 @@ static ScanKeyword ScanKeywords[] = {
{
"timezone_hour"
,
TIMEZONE_HOUR
},
{
"timezone_minute"
,
TIMEZONE_MINUTE
},
{
"to"
,
TO
},
{
"toast"
,
TOAST
},
{
"trailing"
,
TRAILING
},
{
"transaction"
,
TRANSACTION
},
{
"trigger"
,
TRIGGER
},
...
...
@@ -267,6 +278,7 @@ static ScanKeyword ScanKeywords[] = {
{
"when"
,
WHEN
},
{
"where"
,
WHERE
},
{
"with"
,
WITH
},
{
"without"
,
WITHOUT
},
{
"work"
,
WORK
},
{
"year"
,
YEAR_P
},
{
"zone"
,
ZONE
},
...
...
src/interfaces/ecpg/preproc/pgc.l
View file @
e9c3f025
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.6
0 2000/06/28 18:29:40 petere
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.6
1 2000/09/19 11:47:14 meskes
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -50,6 +50,8 @@ static char *literalbuf = NULL; /* expandable buffer */
static int literallen; /* actual current length */
static int literalalloc; /* current allocated buffer size */
static int xcdepth = 0;
#define startlit() (literalbuf[0] = '\0', literallen = 0)
static void addlit(char *ytext, int yleng);
...
...
@@ -140,6 +142,7 @@ xqcat {quote}{whitespace_with_newline}{quote}
dquote \"
xdstart {dquote}
xdstop {dquote}
xddouble {dquote}{dquote}
xdinside [^"]+
/* special stuff for C strings */
...
...
@@ -169,7 +172,7 @@ xdcinside ({xdcqq}|{xdcqdq}|{xdcother})
*/
xcstart \/\*{op_chars}*
xcstop \*+\/
xcinside
([^*]+)|(\*+[^/])
xcinside
[^*/]+
digit [0-9]
letter [\200-\377_A-Za-z]
...
...
@@ -190,7 +193,7 @@ typecast "::"
* rule for "operator"!
*/
self [,()\[\].;$\:\+\-\*\/\%\^\<\>\=\|]
op_chars [\~\!\@\#\^\&\|\`\?\$\
:\
+\-\*\/\%\<\>\=]
op_chars [\~\!\@\#\^\&\|\`\?\$\+\-\*\/\%\<\>\=]
operator {op_chars}+
/* we no longer allow unary minus in numbers.
...
...
@@ -281,15 +284,30 @@ cppline {space}*#(.*\\{line_end})*.*
{xcstart} {
state_before = YYSTATE;
xcdepth = 0;
BEGIN(xc);
/* Put back any characters past slash-star; see above */
yyless(2);
fputs("/*", yyout);
}
<xc>{xcstop} { ECHO; BEGIN(state_before); }
<xc>{xcstart} {
xcdepth++;
/* Put back any characters past slash-star; see above */
yyless(2);
fputs("/*", yyout);
}
<xc>{xcstop} {
ECHO;
if (xcdepth <= 0)
BEGIN(state_before);
else
xcdepth--;
}
<xc>{xcinside} { ECHO; }
<xc>{op_chars} { ECHO; }
<xc><<EOF>> { mmerror(ET_ERROR, "Unterminated /* comment"); }
...
...
@@ -361,11 +379,36 @@ cppline {space}*#(.*\\{line_end})*.*
BEGIN(xd);
startlit();
}
<xd
,xdc>{xdstop}
{
<xd
>{xdstop}
{
BEGIN(state_before);
if (strlen(literalbuf) >= NAMEDATALEN)
{
#ifdef MULTIBYTE
int len;
len = pg_mbcliplen(literalbuf,strlen(literalbuf),NAMEDATALEN-1);
sprintf(errortext, "identifier \"%s\" will be truncated to \"%.*s\"",
literalbuf, len, literalbuf);
literalbuf[len] = '\0';
#else
sprintf(errortext, "identifier \"%s\" will be truncated to \"%.*s\"",
literalbuf, NAMEDATALEN-1, literalbuf);
literalbuf[NAMEDATALEN-1] = '\0';
#endif
mmerror(ET_WARN, errortext);
}
yylval.str = mm_strdup(literalbuf);
return CSTRING;
}
<xdc>{xdstop} {
BEGIN(state_before);
yylval.str = mm_strdup(literalbuf);
return CSTRING;
}
<xd>{xddouble} {
addlit(yytext, yyleng-1);
}
<xd>{xdinside} {
addlit(yytext, yyleng);
}
...
...
@@ -426,7 +469,7 @@ cppline {space}*#(.*\\{line_end})*.*
for (ic = nchars-2; ic >= 0; ic--)
{
if (strchr("~!@#
&`?$:%^|
", yytext[ic]))
if (strchr("~!@#
^&|`?$%
", yytext[ic]))
break;
}
if (ic >= 0)
...
...
@@ -498,8 +541,19 @@ cppline {space}*#(.*\\{line_end})*.*
if (i >= NAMEDATALEN)
{
sprintf(errortext, "Identifier \"%s\" will be truncated to \"%.*s\"", yytext, NAMEDATALEN-1, yytext);
mmerror (ET_WARN, errortext);
#ifdef MULTIBYTE
int len;
len = pg_mbcliplen(lower_text,strlen(lower_text),NAMEDATALEN-1);
sprintf(errortext, "identifier \"%s\" will be truncated to \"%.*s\"",
lower_text, len, lower_text);
lower_text[len] = '\0';
#else
sprintf(errortext, "identifier \"%s\" will be truncated to \"%.*s\"",
lower_text, NAMEDATALEN-1, lower_text);
lower_text[NAMEDATALEN-1] = '\0';
#endif
mmerror(ET_WARN, errortext);
yytext[NAMEDATALEN-1] = '\0';
}
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
e9c3f025
This diff is collapsed.
Click to expand it.
src/interfaces/ecpg/preproc/type.c
View file @
e9c3f025
...
...
@@ -146,7 +146,13 @@ get_type(enum ECPGttype typ)
return
(
"ECPGt_long"
);
break
;
case
ECPGt_unsigned_long
:
return
(
"ECPGt_unsigned_int"
);
return
(
"ECPGt_unsigned_long"
);
break
;
case
ECPGt_long_long
:
return
(
"ECPGt_long_long"
);
break
;
case
ECPGt_unsigned_long_long
:
return
(
"ECPGt_unsigned_long_long"
);
break
;
case
ECPGt_float
:
return
(
"ECPGt_float"
);
...
...
src/interfaces/ecpg/preproc/variable.c
View file @
e9c3f025
...
...
@@ -260,9 +260,11 @@ check_indicator(struct ECPGtype * var)
case
ECPGt_short
:
case
ECPGt_int
:
case
ECPGt_long
:
case
ECPGt_long_long
:
case
ECPGt_unsigned_short
:
case
ECPGt_unsigned_int
:
case
ECPGt_unsigned_long
:
case
ECPGt_unsigned_long_long
:
break
;
case
ECPGt_struct
:
...
...
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