![Tom Lane](/assets/img/avatar_default.png)
This improves on commit bbfd7edae5aa5ad5553d3c7e102f2e450d4380d4 by making two simple changes: * pg_attribute_noreturn now takes parentheses, ie pg_attribute_noreturn(). Likewise pg_attribute_unused(), pg_attribute_packed(). This reduces pgindent's tendency to misformat declarations involving them. * attributes are now always attached to function declarations, not definitions. Previously some places were taking creative shortcuts, which were not merely candidates for bad misformatting by pgindent but often were outright wrong anyway. (It does little good to put a noreturn annotation where callers can't see it.) In any case, if we would like to believe that these macros can be used with non-gcc compilers, we should avoid gratuitous variance in usage patterns. I also went through and manually improved the formatting of a lot of declarations, and got rid of excessively repetitive (and now obsolete anyway) comments informing the reader what pg_attribute_printf is for.
25 lines
482 B
C
25 lines
482 B
C
/*
|
|
* contrib/seg/segdata.h
|
|
*/
|
|
typedef struct SEG
|
|
{
|
|
float4 lower;
|
|
float4 upper;
|
|
char l_sigd;
|
|
char u_sigd;
|
|
char l_ext;
|
|
char u_ext;
|
|
} SEG;
|
|
|
|
/* in seg.c */
|
|
extern int significant_digits(char *str);
|
|
|
|
/* in segscan.l */
|
|
extern int seg_yylex(void);
|
|
extern void seg_yyerror(SEG *result, const char *message) pg_attribute_noreturn();
|
|
extern void seg_scanner_init(const char *str);
|
|
extern void seg_scanner_finish(void);
|
|
|
|
/* in segparse.y */
|
|
extern int seg_yyparse(SEG *result);
|