aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/define.c4
-rw-r--r--src/backend/executor/nodeGroup.c3
-rw-r--r--src/backend/executor/nodeUnique.c3
-rw-r--r--src/backend/parser/gram.y5
-rw-r--r--src/backend/parser/parser.c19
-rw-r--r--src/backend/parser/scan.l5
-rw-r--r--src/backend/storage/ipc/shmem.c3
-rw-r--r--src/backend/utils/Gen_fmgrtab.sh11
-rw-r--r--src/backend/utils/hash/dynahash.c3
-rw-r--r--src/bin/psql/psql.c4
-rw-r--r--src/include/parser/gramparse.h24
-rw-r--r--src/include/storage/smgr.h5
12 files changed, 59 insertions, 30 deletions
diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c
index 49237fac7b4..eae7873d0d1 100644
--- a/src/backend/commands/define.c
+++ b/src/backend/commands/define.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.8 1996/11/08 06:24:58 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.9 1996/11/08 20:45:16 momjian Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -137,7 +137,7 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
if (sscanf(param->val, "%d", perbyte_cpu_p) == 0) {
int count;
char *ptr;
- for (ptr = param->val; *ptr != '\0'; ptr++)
+ for (count = 0, ptr = param->val; *ptr != '\0'; ptr++)
if (*ptr == '!') count++;
*perbyte_cpu_p = (int) pow(10.0, (double) count);
}
diff --git a/src/backend/executor/nodeGroup.c b/src/backend/executor/nodeGroup.c
index 7457794156d..79616ea8a97 100644
--- a/src/backend/executor/nodeGroup.c
+++ b/src/backend/executor/nodeGroup.c
@@ -13,11 +13,12 @@
* columns. (ie. tuples from the same group are consecutive)
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.3 1996/11/08 05:56:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.4 1996/11/08 20:45:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "fmgr.h"
#include "access/heapam.h"
#include "catalog/catalog.h"
diff --git a/src/backend/executor/nodeUnique.c b/src/backend/executor/nodeUnique.c
index 18e25a443fe..11790093e19 100644
--- a/src/backend/executor/nodeUnique.c
+++ b/src/backend/executor/nodeUnique.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.4 1996/11/08 05:56:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.5 1996/11/08 20:45:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,6 +23,7 @@
*
*/
#include "postgres.h"
+#include "fmgr.h"
#include "executor/executor.h"
#include "executor/nodeUnique.h"
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 0fd80f6ce1b..184b20c6feb 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.13 1996/10/30 02:01:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.14 1996/11/08 20:45:33 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -32,10 +32,13 @@
*/
#include <string.h>
#include <ctype.h>
+
#include "postgres.h"
#include "nodes/parsenodes.h"
+#include "parser/gramparse.h"
#include "parser/catalog_utils.h"
#include "parser/parse_query.h"
+#include "storage/smgr.h"
#include "utils/acl.h"
#include "catalog/catname.h"
#include "utils/elog.h"
diff --git a/src/backend/parser/parser.c b/src/backend/parser/parser.c
index 3d1a5542d6e..c0b1376073f 100644
--- a/src/backend/parser/parser.c
+++ b/src/backend/parser/parser.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.6 1996/11/08 05:57:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.7 1996/11/08 20:45:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,22 +19,23 @@
#include "postgres.h"
#include "parser/catalog_utils.h"
+#include "parser/gramparse.h"
+#include "parser/parse_query.h"
#include "nodes/pg_list.h"
+#include "nodes/execnodes.h"
+#include "nodes/makefuncs.h"
+#include "nodes/primnodes.h"
+#include "nodes/plannodes.h"
+#include "nodes/relation.h"
+#include "utils/builtins.h"
#include "utils/exc.h"
#include "utils/excid.h"
+#include "utils/lsyscache.h"
#include "utils/palloc.h"
#include "utils/syscache.h"
#include "catalog/pg_aggregate.h"
#include "catalog/pg_type.h"
-#include "nodes/primnodes.h"
-#include "nodes/plannodes.h"
-#include "nodes/execnodes.h"
-#include "nodes/relation.h"
-#include "parser/parse_query.h"
-#include "utils/builtins.h"
-#include "utils/lsyscache.h"
#include "access/heapam.h"
-#include "nodes/makefuncs.h"
#include "optimizer/clauses.h"
void init_io(); /* from scan.l */
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index 5bbe242c31d..616843f4eb1 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.2 1996/07/23 02:23:34 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.3 1996/11/08 20:45:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,12 +27,11 @@
#include "miscadmin.h"
#include "nodes/pg_list.h"
#include "nodes/parsenodes.h"
+#include "parser/gramparse.h"
#include "parser/keywords.h"
#include "parser/scansup.h"
#include "parser/sysfunc.h"
#include "parse.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
extern char *parseString;
extern char *parseCh;
diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index 58a1e6f3cca..42a5ba38636 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.4 1996/11/08 05:58:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.5 1996/11/08 20:45:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,6 +64,7 @@
#include "storage/ipc.h"
#include "storage/shmem.h"
#include "storage/spin.h"
+#include "utils/dynahash.h"
#include "utils/hsearch.h"
/* shared memory global variables */
diff --git a/src/backend/utils/Gen_fmgrtab.sh b/src/backend/utils/Gen_fmgrtab.sh
index 6a8d45cc65a..bc40659aa08 100644
--- a/src/backend/utils/Gen_fmgrtab.sh
+++ b/src/backend/utils/Gen_fmgrtab.sh
@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.6 1996/11/06 10:22:13 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.7 1996/11/08 20:45:57 momjian Exp $
#
# NOTES
# Passes any -D options on to cpp prior to generating the list
@@ -81,7 +81,7 @@ cat > $HFILE <<FuNkYfMgRsTuFf
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: Gen_fmgrtab.sh,v 1.6 1996/11/06 10:22:13 scrappy Exp $
+ * $Id: Gen_fmgrtab.sh,v 1.7 1996/11/08 20:45:57 momjian Exp $
*
* NOTES
* ******************************
@@ -173,7 +173,7 @@ cat > $TABCFILE <<FuNkYfMgRtAbStUfF
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.6 1996/11/06 10:22:13 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.7 1996/11/08 20:45:57 momjian Exp $
*
* NOTES
*
@@ -194,8 +194,7 @@ cat > $TABCFILE <<FuNkYfMgRtAbStUfF
#include <limits.h>
#else
# if defined(BSD44_derived) || \
- defined(bsdi) || \
- defined(bsdi_2_1)
+ defined(bsdi)
# include <machine/limits.h>
# define MAXINT INT_MAX
# else
@@ -226,7 +225,7 @@ static int fmgr_nbuiltins = (sizeof(fmgr_builtins) / sizeof(FmgrCall)) - 1;
FmgrCall *fmgr_isbuiltin(Oid id)
{
- register int i;
+ register int i = 0;
int low = 0;
int high = fmgr_nbuiltins;
diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c
index f5ac53b776c..af835d279ac 100644
--- a/src/backend/utils/hash/dynahash.c
+++ b/src/backend/utils/hash/dynahash.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.4 1996/11/08 06:00:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.5 1996/11/08 20:46:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -70,7 +70,6 @@ static uint32 call_hash(HTAB *hashp, char *k, int len);
static SEG_OFFSET seg_alloc(HTAB *hashp);
static int bucket_alloc(HTAB *hashp);
static int dir_realloc(HTAB *hashp);
-static int my_log2(long num);
typedef long * ((*dhalloc_ptr)());
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index 95a111f1930..1d0f5883cae 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -1,4 +1,4 @@
-*-------------------------------------------------------------------------
+/*-------------------------------------------------------------------------
*
* psql.c--
* an interactive front-end to postgres95
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.25 1996/11/08 06:01:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.26 1996/11/08 20:46:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
diff --git a/src/include/parser/gramparse.h b/src/include/parser/gramparse.h
new file mode 100644
index 00000000000..95de9f0f395
--- /dev/null
+++ b/src/include/parser/gramparse.h
@@ -0,0 +1,24 @@
+/*-------------------------------------------------------------------------
+ *
+ * gramparse.h--
+ * scanner support routines. used by both the bootstrap lexer
+ * as well as the normal lexer
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: gramparse.h,v 1.1 1996/11/08 20:46:26 momjian Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef GRAMPARSE_H
+#define GRAMPARSE_H /* include once only */
+
+/* from scan.l */
+extern void init_io();
+
+/* from gram.y */
+extern void parser_init(Oid *typev, int nargs);
+extern int yyparse();
+
+#endif /* GRAMPARSE_H */
diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h
index 0e3eb4cf6c4..02ba5627d82 100644
--- a/src/include/storage/smgr.h
+++ b/src/include/storage/smgr.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: smgr.h,v 1.3 1996/11/08 06:02:22 momjian Exp $
+ * $Id: smgr.h,v 1.4 1996/11/08 20:46:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,6 +83,7 @@ extern int mmabort(void);
extern int MMShmemSize(void);
/* smgrtype.c */
-char *smgrout(int2 i);
+extern char *smgrout(int2 i);
+extern int2 smgrin(char *s);
#endif /* SMGR_H */