aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/formatting.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-10-13 01:25:13 +0000
committerNeil Conway <neilc@samurai.com>2004-10-13 01:25:13 +0000
commit7069dbcc317c287f98e55d5296ff7ca77fadab49 (patch)
treef6fb8476c006cef473c986f8200695bd78f9033b /src/backend/utils/adt/formatting.c
parent1da2bccabbabbebc76af07c0c2276217420cef7d (diff)
downloadpostgresql-7069dbcc317c287f98e55d5296ff7ca77fadab49.tar.gz
postgresql-7069dbcc317c287f98e55d5296ff7ca77fadab49.zip
More minor cosmetic improvements:
- remove another senseless "extern" keyword that was applied to a function definition - change a foo more function signatures from "some_type foo()" to "some_type foo(void)" - rewrite another K&R style function definition - make the type of the "action" function pointer in the KeyWord struct in src/backend/utils/adt/formatting.c more precise
Diffstat (limited to 'src/backend/utils/adt/formatting.c')
-rw-r--r--src/backend/utils/adt/formatting.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 369353e6ce0..a982a0071af 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------
* formatting.c
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.78 2004/08/30 02:54:39 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.79 2004/10/13 01:25:11 neilc Exp $
*
*
* Portions Copyright (c) 1999-2004, PostgreSQL Global Development Group
@@ -129,23 +129,25 @@ typedef struct
type; /* prefix / postfix */
} KeySuffix;
+typedef struct FormatNode FormatNode;
+
typedef struct
{
char *name; /* keyword */
/* action for keyword */
int len, /* keyword length */
- (*action) (),
+ (*action) (int arg, char *inout, int suf, int flag, FormatNode *node, void *data),
id; /* keyword id */
bool isitdigit; /* is expected output/input digit */
} KeyWord;
-typedef struct
+struct FormatNode
{
int type; /* node type */
KeyWord *key; /* if node type is KEYWORD */
int character, /* if node type is CHAR */
suffix; /* keyword suffix */
-} FormatNode;
+};
#define NODE_TYPE_END 1
#define NODE_TYPE_ACTION 2