1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Partial pgindent of .l and .y files

Trying to clean up the code a bit while we're working on these files
for the reentrant scanner/pure parser patches.  This cleanup only
touches the code sections after the second '%%' in each file, via a
manually-supervised and locally hacked up pgindent.
This commit is contained in:
Peter Eisentraut
2024-12-25 17:52:42 +01:00
parent 2571c1d5cc
commit 301de6a6f6
16 changed files with 207 additions and 188 deletions

View File

@ -244,8 +244,8 @@ write_box(int dim, char *str1, char *str2,
* The value turned out to be a point, ie. all the upper-right
* coordinates were equal to the lower-left coordinates. Resize the
* cube we constructed. Note: we don't bother to repalloc() it
* smaller, as it's unlikely that the tiny amount of memory freed
* that way would be useful, and the output is always short-lived.
* smaller, as it's unlikely that the tiny amount of memory freed that
* way would be useful, and the output is always short-lived.
*/
size = POINT_SIZE(dim);
SET_VARSIZE(bp, size);
@ -260,7 +260,7 @@ static bool
write_point_as_box(int dim, char *str,
NDBOX **result, struct Node *escontext)
{
NDBOX *bp;
NDBOX *bp;
int i,
size;
char *s;

View File

@ -73,14 +73,15 @@ cube_yyerror(NDBOX **result, Size scanbuflen,
yyscan_t yyscanner,
const char *message)
{
struct yyguts_t * yyg = (struct yyguts_t *) yyscanner; /* needed for yytext macro */
struct yyguts_t *yyg = (struct yyguts_t *) yyscanner; /* needed for yytext
* macro */
if (*yytext == YY_END_OF_BUFFER_CHAR)
{
errsave(escontext,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for cube"),
/* translator: %s is typically "syntax error" */
/* translator: %s is typically "syntax error" */
errdetail("%s at end of input", message)));
}
else
@ -88,7 +89,7 @@ cube_yyerror(NDBOX **result, Size scanbuflen,
errsave(escontext,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for cube"),
/* translator: first %s is typically "syntax error" */
/* translator: first %s is typically "syntax error" */
errdetail("%s at or near \"%s\"", message, yytext)));
}
}