summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1997-09-08 21:56:23 +0000
committerBruce Momjian <bruce@momjian.us>1997-09-08 21:56:23 +0000
commit59f6a57e59fe8353f9edaa3703516ea67e06672b (patch)
tree1b083fb66cf0be3890480a1ed5fb077dd7293790 /src/bin/pg_dump
parent075cede74858a9a04e97097b1ccd555121516c20 (diff)
downloadpostgresql-59f6a57e59fe8353f9edaa3703516ea67e06672b.tar.gz
Used modified version of indent that understands over 100 typedefs.
Diffstat (limited to 'src/bin/pg_dump')
-rw-r--r--src/bin/pg_dump/common.c36
-rw-r--r--src/bin/pg_dump/pg_dump.c68
-rw-r--r--src/bin/pg_dump/pg_dump.h56
3 files changed, 80 insertions, 80 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c
index 61d0879e31..7eeeeac1e7 100644
--- a/src/bin/pg_dump/common.c
+++ b/src/bin/pg_dump/common.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.15 1997/09/08 02:32:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.16 1997/09/08 21:49:50 momjian Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
@@ -36,14 +36,14 @@
#include "pg_dump.h"
static char **
-findParentsByOid(TableInfo * tbinfo, int numTables,
- InhInfo * inhinfo, int numInherits,
+findParentsByOid(TableInfo *tbinfo, int numTables,
+ InhInfo *inhinfo, int numInherits,
const char *oid,
int *numParents);
-static int findTableByOid(TableInfo * tbinfo, int numTables, const char *oid);
+static int findTableByOid(TableInfo *tbinfo, int numTables, const char *oid);
static void
-flagInhAttrs(TableInfo * tbinfo, int numTables,
- InhInfo * inhinfo, int numInherits);
+flagInhAttrs(TableInfo *tbinfo, int numTables,
+ InhInfo *inhinfo, int numInherits);
static int strInArray(const char *pattern, char **arr, int arr_size);
/*
@@ -56,7 +56,7 @@ static int strInArray(const char *pattern, char **arr, int arr_size);
*/
char *
-findTypeByOid(TypeInfo * tinfo, int numTypes, const char *oid)
+findTypeByOid(TypeInfo *tinfo, int numTypes, const char *oid)
{
int i;
@@ -84,7 +84,7 @@ findTypeByOid(TypeInfo * tinfo, int numTypes, const char *oid)
*
*/
char *
-findOprByOid(OprInfo * oprinfo, int numOprs, const char *oid)
+findOprByOid(OprInfo *oprinfo, int numOprs, const char *oid)
{
int i;
@@ -111,8 +111,8 @@ findOprByOid(OprInfo * oprinfo, int numOprs, const char *oid)
*/
static char **
-findParentsByOid(TableInfo * tblinfo, int numTables,
- InhInfo * inhinfo, int numInherits, const char *oid,
+findParentsByOid(TableInfo *tblinfo, int numTables,
+ InhInfo *inhinfo, int numInherits, const char *oid,
int *numParentsPtr)
{
int i,
@@ -221,7 +221,7 @@ strInArray(const char *pattern, char **arr, int arr_size)
*/
TableInfo *
-dumpSchema(FILE * fout,
+dumpSchema(FILE *fout,
int *numTablesPtr,
const char *tablename,
const bool acls)
@@ -336,8 +336,8 @@ dumpSchema(FILE * fout,
*/
extern void
-dumpSchemaIdx(FILE * fout, int *numTablesPtr, const char *tablename,
- TableInfo * tblinfo, int numTables)
+dumpSchemaIdx(FILE *fout, int *numTablesPtr, const char *tablename,
+ TableInfo *tblinfo, int numTables)
{
int numIndices;
IndInfo *indinfo;
@@ -367,8 +367,8 @@ dumpSchemaIdx(FILE * fout, int *numTablesPtr, const char *tablename,
*
*/
static void
-flagInhAttrs(TableInfo * tblinfo, int numTables,
- InhInfo * inhinfo, int numInherits)
+flagInhAttrs(TableInfo *tblinfo, int numTables,
+ InhInfo *inhinfo, int numInherits)
{
int i,
j,
@@ -413,7 +413,7 @@ flagInhAttrs(TableInfo * tblinfo, int numTables,
*/
int
-findTableByName(TableInfo * tblinfo, int numTables, const char *relname)
+findTableByName(TableInfo *tblinfo, int numTables, const char *relname)
{
int i;
@@ -434,7 +434,7 @@ findTableByName(TableInfo * tblinfo, int numTables, const char *relname)
*/
static int
-findTableByOid(TableInfo * tblinfo, int numTables, const char *oid)
+findTableByOid(TableInfo *tblinfo, int numTables, const char *oid)
{
int i;
@@ -456,7 +456,7 @@ findTableByOid(TableInfo * tblinfo, int numTables, const char *oid)
*/
int
-findFuncByName(FuncInfo * finfo, int numFuncs, const char *name)
+findFuncByName(FuncInfo *finfo, int numFuncs, const char *name)
{
int i;
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 82b0f71bea..38ebfd49dc 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.43 1997/09/08 20:57:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.44 1997/09/08 21:49:57 momjian Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
@@ -67,15 +67,15 @@
#include "pg_dump.h"
-static void dumpSequence(FILE * fout, TableInfo tbinfo);
+static void dumpSequence(FILE *fout, TableInfo tbinfo);
static char *checkForQuote(const char *s);
static void clearTableInfo(TableInfo *, int);
static void
-dumpOneFunc(FILE * fout, FuncInfo * finfo, int i,
- TypeInfo * tinfo, int numTypes);
+dumpOneFunc(FILE *fout, FuncInfo *finfo, int i,
+ TypeInfo *tinfo, int numTypes);
static int findLastBuiltinOid(void);
static bool isViewRule(char *relname);
-static void setMaxOid(FILE * fout);
+static void setMaxOid(FILE *fout);
extern char *optarg;
extern int optind,
@@ -137,7 +137,7 @@ usage(const char *progname)
}
static void
-exit_nicely(PGconn * conn)
+exit_nicely(PGconn *conn)
{
PQfinish(conn);
exit(1);
@@ -189,7 +189,7 @@ isViewRule(char *relname)
static void
-dumpClasses_nodumpData(FILE * fout, const char *classname, const bool oids)
+dumpClasses_nodumpData(FILE *fout, const char *classname, const bool oids)
{
PGresult *res;
@@ -282,7 +282,7 @@ dumpClasses_nodumpData(FILE * fout, const char *classname, const bool oids)
static void
-dumpClasses_dumpData(FILE * fout, const char *classname,
+dumpClasses_dumpData(FILE *fout, const char *classname,
const TableInfo tblinfo, bool oids)
{
@@ -389,7 +389,7 @@ dumpClasses_dumpData(FILE * fout, const char *classname,
* dump the contents of all the classes.
*/
static void
-dumpClasses(const TableInfo tblinfo[], const int numTables, FILE * fout,
+dumpClasses(const TableInfo tblinfo[], const int numTables, FILE *fout,
const char *onlytable, const bool oids)
{
@@ -816,7 +816,7 @@ getOperators(int *numOprs)
}
void
-clearTypeInfo(TypeInfo * tp, int numTypes)
+clearTypeInfo(TypeInfo *tp, int numTypes)
{
int i;
@@ -855,7 +855,7 @@ clearTypeInfo(TypeInfo * tp, int numTypes)
}
void
-clearFuncInfo(FuncInfo * fun, int numFuncs)
+clearFuncInfo(FuncInfo *fun, int numFuncs)
{
int i,
a;
@@ -884,7 +884,7 @@ clearFuncInfo(FuncInfo * fun, int numFuncs)
}
static void
-clearTableInfo(TableInfo * tblinfo, int numTables)
+clearTableInfo(TableInfo *tblinfo, int numTables)
{
int i,
j;
@@ -938,7 +938,7 @@ clearTableInfo(TableInfo * tblinfo, int numTables)
}
void
-clearInhInfo(InhInfo * inh, int numInherits)
+clearInhInfo(InhInfo *inh, int numInherits)
{
int i;
@@ -955,7 +955,7 @@ clearInhInfo(InhInfo * inh, int numInherits)
}
void
-clearOprInfo(OprInfo * opr, int numOprs)
+clearOprInfo(OprInfo *opr, int numOprs)
{
int i;
@@ -996,7 +996,7 @@ clearOprInfo(OprInfo * opr, int numOprs)
}
void
-clearIndInfo(IndInfo * ind, int numIndices)
+clearIndInfo(IndInfo *ind, int numIndices)
{
int i,
a;
@@ -1416,7 +1416,7 @@ getInherits(int *numInherits)
* modifies tblinfo
*/
void
-getTableAttrs(TableInfo * tblinfo, int numTables)
+getTableAttrs(TableInfo *tblinfo, int numTables)
{
int i,
j;
@@ -1596,8 +1596,8 @@ getIndices(int *numIndices)
*
*/
void
-dumpTypes(FILE * fout, FuncInfo * finfo, int numFuncs,
- TypeInfo * tinfo, int numTypes)
+dumpTypes(FILE *fout, FuncInfo *finfo, int numFuncs,
+ TypeInfo *tinfo, int numTypes)
{
int i;
char q[MAXQUERYLEN];
@@ -1670,8 +1670,8 @@ dumpTypes(FILE * fout, FuncInfo * finfo, int numFuncs,
*
*/
void
-dumpFuncs(FILE * fout, FuncInfo * finfo, int numFuncs,
- TypeInfo * tinfo, int numTypes)
+dumpFuncs(FILE *fout, FuncInfo *finfo, int numFuncs,
+ TypeInfo *tinfo, int numTypes)
{
int i;
@@ -1689,8 +1689,8 @@ dumpFuncs(FILE * fout, FuncInfo * finfo, int numFuncs,
*/
static void
-dumpOneFunc(FILE * fout, FuncInfo * finfo, int i,
- TypeInfo * tinfo, int numTypes)
+dumpOneFunc(FILE *fout, FuncInfo *finfo, int i,
+ TypeInfo *tinfo, int numTypes)
{
char q[MAXQUERYLEN];
int j;
@@ -1730,8 +1730,8 @@ dumpOneFunc(FILE * fout, FuncInfo * finfo, int i,
*
*/
void
-dumpOprs(FILE * fout, OprInfo * oprinfo, int numOperators,
- TypeInfo * tinfo, int numTypes)
+dumpOprs(FILE *fout, OprInfo *oprinfo, int numOperators,
+ TypeInfo *tinfo, int numTypes)
{
int i;
char q[MAXQUERYLEN];
@@ -1837,8 +1837,8 @@ dumpOprs(FILE * fout, OprInfo * oprinfo, int numOperators,
*
*/
void
-dumpAggs(FILE * fout, AggInfo *agginfo, int numAggs,
- TypeInfo * tinfo, int numTypes)
+dumpAggs(FILE *fout, AggInfo *agginfo, int numAggs,
+ TypeInfo *tinfo, int numTypes)
{
int i;
char q[MAXQUERYLEN];
@@ -1924,9 +1924,9 @@ dumpAggs(FILE * fout, AggInfo *agginfo, int numAggs,
*/
void
-dumpTables(FILE * fout, TableInfo * tblinfo, int numTables,
- InhInfo * inhinfo, int numInherits,
- TypeInfo * tinfo, int numTypes, const char *tablename,
+dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
+ InhInfo *inhinfo, int numInherits,
+ TypeInfo *tinfo, int numTypes, const char *tablename,
const bool acls)
{
int i,
@@ -2064,8 +2064,8 @@ dumpTables(FILE * fout, TableInfo * tblinfo, int numTables,
* write out to fout all the user-define indices
*/
void
-dumpIndices(FILE * fout, IndInfo * indinfo, int numIndices,
- TableInfo * tblinfo, int numTables, const char *tablename)
+dumpIndices(FILE *fout, IndInfo *indinfo, int numIndices,
+ TableInfo *tblinfo, int numTables, const char *tablename)
{
int i,
k;
@@ -2212,7 +2212,7 @@ dumpIndices(FILE * fout, IndInfo * indinfo, int numIndices,
*/
#ifdef NOT_USED
void
-dumpTuples(PGresult * res, FILE * fout, int *attrmap)
+dumpTuples(PGresult *res, FILE *fout, int *attrmap)
{
int j,
k;
@@ -2271,7 +2271,7 @@ dumpTuples(PGresult * res, FILE * fout, int *attrmap)
*/
static void
-setMaxOid(FILE * fout)
+setMaxOid(FILE *fout)
{
PGresult *res;
Oid max_oid;
@@ -2387,7 +2387,7 @@ checkForQuote(const char *s)
static void
-dumpSequence(FILE * fout, TableInfo tbinfo)
+dumpSequence(FILE *fout, TableInfo tbinfo)
{
PGresult *res;
int4 last,
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index ba5da2dc6d..63180d6c26 100644
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_dump.h,v 1.22 1997/09/08 20:57:56 momjian Exp $
+ * $Id: pg_dump.h,v 1.23 1997/09/08 21:49:59 momjian Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
@@ -42,7 +42,7 @@ typedef struct _typeInfo
char *usename;
int passedbyvalue;
int isArray;
-} TypeInfo;
+} TypeInfo;
typedef struct _funcInfo
{
@@ -60,7 +60,7 @@ typedef struct _funcInfo
char *probin;
char *usename;
int dumped; /* 1 if already dumped */
-} FuncInfo;
+} FuncInfo;
typedef struct _tableInfo
{
@@ -89,13 +89,13 @@ typedef struct _tableInfo
int *attlen; /* attribute lengths */
char *usename;
-} TableInfo;
+} TableInfo;
typedef struct _inhInfo
{
char *inhrel;
char *inhparent;
-} InhInfo;
+} InhInfo;
typedef struct _indInfo
{
@@ -109,7 +109,7 @@ typedef struct _indInfo
* attributes */
char *indclass[INDEX_MAX_KEYS]; /* opclass of the keys */
char *indisunique; /* is this index unique? */
-} IndInfo;
+} IndInfo;
typedef struct _aggInfo
{
@@ -146,7 +146,7 @@ typedef struct _oprInfo
* operators */
char *oprrsortop;
char *usename;
-} OprInfo;
+} OprInfo;
/* global decls */
@@ -170,21 +170,21 @@ extern char g_opaque_type[10]; /* name for the opaque type */
*/
extern TableInfo *
-dumpSchema(FILE * fout,
+dumpSchema(FILE *fout,
int *numTablesPtr,
const char *tablename,
const bool acls);
extern void
-dumpSchemaIdx(FILE * fout,
+dumpSchemaIdx(FILE *fout,
int *numTablesPtr,
const char *tablename,
- TableInfo * tblinfo,
+ TableInfo *tblinfo,
int numTables);
-extern char *findTypeByOid(TypeInfo * tinfo, int numTypes, const char *oid);
-extern char *findOprByOid(OprInfo * oprinfo, int numOprs, const char *oid);
-extern int findFuncByName(FuncInfo * finfo, int numFuncs, const char *name);
-extern int findTableByName(TableInfo * tbinfo, int numTables, const char *relname);
+extern char *findTypeByOid(TypeInfo *tinfo, int numTypes, const char *oid);
+extern char *findOprByOid(OprInfo *oprinfo, int numOprs, const char *oid);
+extern int findFuncByName(FuncInfo *finfo, int numFuncs, const char *name);
+extern int findTableByName(TableInfo *tbinfo, int numTables, const char *relname);
extern void check_conn_and_db(void);
extern void parseArgTypes(char **argtypes, const char *str);
@@ -207,28 +207,28 @@ extern void clearTypeInfo(TypeInfo *, int);
extern OprInfo *getOperators(int *numOperators);
extern TableInfo *getTables(int *numTables);
extern InhInfo *getInherits(int *numInherits);
-extern void getTableAttrs(TableInfo * tbinfo, int numTables);
+extern void getTableAttrs(TableInfo *tbinfo, int numTables);
extern IndInfo *getIndices(int *numIndices);
extern void
-dumpTypes(FILE * fout, FuncInfo * finfo, int numFuncs,
- TypeInfo * tinfo, int numTypes);
+dumpTypes(FILE *fout, FuncInfo *finfo, int numFuncs,
+ TypeInfo *tinfo, int numTypes);
extern void
-dumpFuncs(FILE * fout, FuncInfo * finfo, int numFuncs,
- TypeInfo * tinfo, int numTypes);
+dumpFuncs(FILE *fout, FuncInfo *finfo, int numFuncs,
+ TypeInfo *tinfo, int numTypes);
extern void
-dumpAggs(FILE * fout, AggInfo *agginfo, int numAggregates,
- TypeInfo * tinfo, int numTypes);
+dumpAggs(FILE *fout, AggInfo *agginfo, int numAggregates,
+ TypeInfo *tinfo, int numTypes);
extern void
-dumpOprs(FILE * fout, OprInfo * agginfo, int numOperators,
- TypeInfo * tinfo, int numTypes);
+dumpOprs(FILE *fout, OprInfo *agginfo, int numOperators,
+ TypeInfo *tinfo, int numTypes);
extern void
-dumpTables(FILE * fout, TableInfo * tbinfo, int numTables,
- InhInfo * inhinfo, int numInherits,
- TypeInfo * tinfo, int numTypes, const char *tablename,
+dumpTables(FILE *fout, TableInfo *tbinfo, int numTables,
+ InhInfo *inhinfo, int numInherits,
+ TypeInfo *tinfo, int numTypes, const char *tablename,
const bool acls);
extern void
-dumpIndices(FILE * fout, IndInfo * indinfo, int numIndices,
- TableInfo * tbinfo, int numTables, const char *tablename);
+dumpIndices(FILE *fout, IndInfo *indinfo, int numIndices,
+ TableInfo *tbinfo, int numTables, const char *tablename);
/* largest query string size */
#define MAXQUERYLEN 5000