# -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.165 2003/08/08 02:48:24 momjian Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.166 2003/08/08 04:52:20 momjian Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
#
# substitute implementations of the C library
-LIBOBJS = @LIBOBJS@ path.o thread.o
+LIBOBJS = @LIBOBJS@ path.o sprompt.o thread.o
ifneq (,$(LIBOBJS))
LIBS += -lpgport
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.39 2002/12/12 21:02:00 tgl Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.40 2003/08/08 04:52:21 momjian Exp $
#
#-------------------------------------------------------------------------
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
- pg_backup_files.o pg_backup_null.o pg_backup_tar.o \
- sprompt.o dumputils.o
+OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
+ pg_backup_files.o pg_backup_null.o pg_backup_tar.o \
+ dumputils.o
EXTRA_OBJS = $(top_builddir)/src/backend/parser/keywords.o
$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
pg_dumpall: pg_dumpall.o $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) pg_dumpall.o dumputils.o sprompt.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
+ $(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@
.PHONY: submake-backend
submake-backend:
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: dumputils.h,v 1.7 2003/08/04 02:40:09 momjian Exp $
+ * $Id: dumputils.h,v 1.8 2003/08/08 04:52:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "pqexpbuffer.h"
-extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
-
extern const char *fmtId(const char *identifier);
extern void appendStringLiteral(PQExpBuffer buf, const char *str,
bool escapeAll);
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_dump.h,v 1.103 2003/08/04 02:40:09 momjian Exp $
+ * $Id: pg_dump.h,v 1.104 2003/08/08 04:52:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
const bool schemaOnly, const bool dataOnly);
extern void dumpIndexes(Archive *fout, TableInfo *tbinfo, int numTables);
-/* sprompt.h */
-extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
-
#endif /* PG_DUMP_H */
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.36 2003/06/06 22:17:42 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.37 2003/08/08 04:52:21 momjian Exp $
#
#-------------------------------------------------------------------------
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -DFRONTEND
-OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
+OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
startup.o prompt.o variables.o large_obj.o print.o describe.o \
- sprompt.o tab-complete.o mbprint.o
+ tab-complete.o mbprint.o
all: submake-libpq submake-libpgport psql
-@erase "$(INTDIR)\copy.obj"
-@erase "$(INTDIR)\startup.obj"
-@erase "$(INTDIR)\prompt.obj"
- -@erase "$(INTDIR)\sprompt.obj"
-@erase "$(INTDIR)\variables.obj"
-@erase "$(INTDIR)\large_obj.obj"
-@erase "$(INTDIR)\print.obj"
copy.obj \
startup.obj \
prompt.obj \
- sprompt.obj \
variables.obj \
large_obj.obj \
print.obj \
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.27 2003/08/04 23:59:39 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.28 2003/08/08 04:52:21 momjian Exp $
*/
#ifndef COMMON_H
#define COMMON_H
extern void NoticeProcessor(void *arg, const char *message);
-extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
-
extern volatile bool cancel_pressed;
extern void ResetCancelConn(void);
extern bool is_superuser(void);
-/* sprompt.h */
-extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
-
/* Parse a numeric character code from the string pointed at by *buf, e.g.
* one written as 0x0c (hexadecimal) or 015 (octal); advance *buf to the last
* character of the numeric character code.
-@erase "$(INTDIR)\copy.obj"
-@erase "$(INTDIR)\startup.obj"
-@erase "$(INTDIR)\prompt.obj"
- -@erase "$(INTDIR)\sprompt.obj"
-@erase "$(INTDIR)\variables.obj"
-@erase "$(INTDIR)\large_obj.obj"
-@erase "$(INTDIR)\print.obj"
"$(INTDIR)\copy.obj" \
"$(INTDIR)\startup.obj" \
"$(INTDIR)\prompt.obj" \
- "$(INTDIR)\sprompt.obj" \
"$(INTDIR)\variables.obj" \
"$(INTDIR)\large_obj.obj" \
"$(INTDIR)\print.obj" \
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.21 2003/06/18 12:19:11 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.22 2003/08/08 04:52:21 momjian Exp $
#
#-------------------------------------------------------------------------
override CPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir) $(CPPFLAGS)
-
all: submake-libpq submake-backend $(PROGRAMS)
%: %.o
$(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@
-createdb: createdb.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
-createlang: createlang.o common.o sprompt.o print.o mbprint.o
-createuser: createuser.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
-dropdb: dropdb.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
-droplang: droplang.o common.o sprompt.o print.o mbprint.o
-dropuser: dropuser.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
-clusterdb: clusterdb.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
-vacuumdb: vacuumdb.o common.o sprompt.o
+createdb: createdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+createlang: createlang.o common.o print.o mbprint.o
+createuser: createuser.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+dropdb: dropdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+droplang: droplang.o common.o print.o mbprint.o
+dropuser: dropuser.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+clusterdb: clusterdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+vacuumdb: vacuumdb.o common.o
-dumputils.c sprompt.c : % : $(top_srcdir)/src/bin/pg_dump/%
+dumputils.c: % : $(top_srcdir)/src/bin/pg_dump/%
rm -f $@ && $(LN_S) $< .
print.c mbprint.c : % : $(top_srcdir)/src/bin/psql/%
clean distclean maintainer-clean:
- rm -f $(addsuffix $(X), $(PROGRAMS)) $(addsuffix .o, $(PROGRAMS)) common.o dumputils.o sprompt.o print.o mbprint.o dumputils.c sprompt.c print.c mbprint.c
+ rm -f $(addsuffix $(X), $(PROGRAMS)) $(addsuffix .o, $(PROGRAMS)) common.o dumputils.o print.o mbprint.o dumputils.c print.c mbprint.c
void handle_help_version_opts(int argc, char *argv[], const char *fixed_progname, help_handler hlp);
-extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
-
PGconn *connectDatabase(const char *dbname, const char *pghost, const char *pgport,
const char *pguser, bool require_password, const char *progname);
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: port.h,v 1.10 2003/08/04 02:40:10 momjian Exp $
+ * $Id: port.h,v 1.11 2003/08/08 04:52:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif
/* Portable path handling for Unix/Win32 */
-bool is_absolute_path(const char *filename);
-char *first_path_separator(const char *filename);
-char *last_path_separator(const char *filename);
-char *get_progname(char *argv0);
+extern bool is_absolute_path(const char *filename);
+extern char *first_path_separator(const char *filename);
+extern char *last_path_separator(const char *filename);
+extern char *get_progname(char *argv0);
+
+extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
#if defined(bsdi) || defined(netbsd)
-int fseeko(FILE *stream, off_t offset, int whence);
-off_t ftello(FILE *stream);
+extern int fseeko(FILE *stream, off_t offset, int whence);
+extern off_t ftello(FILE *stream);
#endif
#ifdef WIN32
* Win32 doesn't have reliable rename/unlink during concurrent access
*/
#ifndef FRONTEND
-int pgrename(const char *from, const char *to);
-int pgunlink(const char *path);
+extern int pgrename(const char *from, const char *to);
+extern int pgunlink(const char *path);
#define rename(from, to) pgrename(from, to)
#define unlink(path) pgunlink(path)
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.89 2003/08/08 03:22:24 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.90 2003/08/08 04:52:22 momjian Exp $
#
#-------------------------------------------------------------------------
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o \
dllist.o md5.o ip.o wchar.o encnames.o \
- $(filter crypt.o getaddrinfo.o inet_aton.o snprintf.o strerror.o path.o thread.o, $(LIBOBJS))
+ $(filter crypt.o getaddrinfo.o inet_aton.o snprintf.o sprompt.o strerror.o path.o thread.o, $(LIBOBJS))
# Add libraries that libpq depends (or might depend) on into the
# For port modules, this only happens if configure decides the module
# is needed (see filter hack in OBJS, above).
-crypt.c getaddrinfo.c inet_aton.c snprintf.c strerror.c path.c thread.c: % : $(top_srcdir)/src/port/%
+crypt.c getaddrinfo.c inet_aton.c snprintf.c sprompt.c strerror.c path.c thread.c: % : $(top_srcdir)/src/port/%
rm -f $@ && $(LN_S) $< .
md5.c ip.c: % : $(backend_src)/libpq/%
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/sprompt.c,v 1.6 2003/08/04 00:43:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/port/sprompt.c,v 1.1 2003/08/08 04:52:22 momjian Exp $
*/
-/* This file is shared by psql and pg_dump. */
-
-
/*
* simple_prompt
*
*
* Returns a malloc()'ed string with the input (w/o trailing newline).
*/
-#include "postgres_fe.h"
+#include "postgres.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>