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:
@ -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;
|
||||
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user