Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit63c4d15

Browse files
committed
Move simple_prompt()/sprompt.c into /port.
1 parent522b493 commit63c4d15

File tree

13 files changed

+40
-58
lines changed

13 files changed

+40
-58
lines changed

‎src/Makefile.global.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.165 2003/08/0802:48:24 momjian Exp $
2+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.166 2003/08/0804:52:20 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -341,7 +341,7 @@ endif
341341
#
342342
# substitute implementations of the C library
343343

344-
LIBOBJS = @LIBOBJS@ path.o thread.o
344+
LIBOBJS = @LIBOBJS@ path.osprompt.othread.o
345345

346346
ifneq (,$(LIBOBJS))
347347
LIBS += -lpgport

‎src/bin/pg_dump/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.39 2002/12/12 21:02:00 tgl Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.40 2003/08/08 04:52:21 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

1212
subdir = src/bin/pg_dump
1313
top_builddir = ../../..
1414
include$(top_builddir)/src/Makefile.global
1515

16-
OBJS=pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o\
17-
pg_backup_files.o pg_backup_null.o pg_backup_tar.o\
18-
sprompt.odumputils.o
16+
OBJS=pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o\
17+
pg_backup_files.o pg_backup_null.o pg_backup_tar.o\
18+
dumputils.o
1919

2020
EXTRA_OBJS =$(top_builddir)/src/backend/parser/keywords.o
2121

@@ -31,7 +31,7 @@ pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
3131
$(CC)$(CFLAGS) pg_restore.o$(OBJS)$(EXTRA_OBJS)$(libpq)$(LDFLAGS)$(LIBS) -o$@
3232

3333
pg_dumpall: pg_dumpall.o$(libpq_builddir)/libpq.a
34-
$(CC)$(CFLAGS) pg_dumpall.o dumputils.osprompt.o$(EXTRA_OBJS)$(libpq)$(LDFLAGS)$(LIBS) -o$@
34+
$(CC)$(CFLAGS) pg_dumpall.o dumputils.o$(EXTRA_OBJS)$(libpq)$(LDFLAGS)$(LIBS) -o$@
3535

3636
.PHONY: submake-backend
3737
submake-backend:

‎src/bin/pg_dump/dumputils.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: dumputils.h,v 1.7 2003/08/04 02:40:09 momjian Exp $
10+
* $Id: dumputils.h,v 1.8 2003/08/08 04:52:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -18,8 +18,6 @@
1818
#include"pqexpbuffer.h"
1919

2020

21-
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
22-
2321
externconstchar*fmtId(constchar*identifier);
2422
externvoidappendStringLiteral(PQExpBufferbuf,constchar*str,
2523
boolescapeAll);

‎src/bin/pg_dump/pg_dump.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: pg_dump.h,v 1.103 2003/08/04 02:40:09 momjian Exp $
9+
* $Id: pg_dump.h,v 1.104 2003/08/08 04:52:21 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -235,7 +235,4 @@ extern void dumpTables(Archive *fout, TableInfo tblinfo[], int numTables,
235235
constboolschemaOnly,constbooldataOnly);
236236
externvoiddumpIndexes(Archive*fout,TableInfo*tbinfo,intnumTables);
237237

238-
/* sprompt.h */
239-
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
240-
241238
#endif/* PG_DUMP_H */

‎src/bin/psql/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.36 2003/06/06 22:17:42 momjian Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.37 2003/08/08 04:52:21 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -17,9 +17,9 @@ REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
1717

1818
overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS) -DFRONTEND
1919

20-
OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o\
20+
OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o\
2121
startup.o prompt.o variables.o large_obj.o print.o describe.o\
22-
sprompt.otab-complete.o mbprint.o
22+
tab-complete.o mbprint.o
2323

2424
all: submake-libpq submake-libpgport psql
2525

‎src/bin/psql/bcc32.mak

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ CLEAN :
6565
-@erase"$(INTDIR)\copy.obj"
6666
-@erase"$(INTDIR)\startup.obj"
6767
-@erase"$(INTDIR)\prompt.obj"
68-
-@erase"$(INTDIR)\sprompt.obj"
6968
-@erase"$(INTDIR)\variables.obj"
7069
-@erase"$(INTDIR)\large_obj.obj"
7170
-@erase"$(INTDIR)\print.obj"
@@ -119,7 +118,6 @@ LINK32_OBJS= \
119118
copy.obj\
120119
startup.obj\
121120
prompt.obj\
122-
sprompt.obj\
123121
variables.obj\
124122
large_obj.obj\
125123
print.obj\

‎src/bin/psql/common.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.27 2003/08/04 23:59:39 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.28 2003/08/08 04:52:21 momjian Exp $
77
*/
88
#ifndefCOMMON_H
99
#defineCOMMON_H
@@ -24,8 +24,6 @@ __attribute__((format(printf, 1, 2)));
2424

2525
externvoidNoticeProcessor(void*arg,constchar*message);
2626

27-
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
28-
2927
externvolatileboolcancel_pressed;
3028

3129
externvoidResetCancelConn(void);
@@ -40,9 +38,6 @@ extern bool SendQuery(const char *query);
4038

4139
externboolis_superuser(void);
4240

43-
/* sprompt.h */
44-
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
45-
4641
/* Parse a numeric character code from the string pointed at by *buf, e.g.
4742
* one written as 0x0c (hexadecimal) or 015 (octal); advance *buf to the last
4843
* character of the numeric character code.

‎src/bin/psql/win32.mak

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ CLEAN :
2828
-@erase"$(INTDIR)\copy.obj"
2929
-@erase"$(INTDIR)\startup.obj"
3030
-@erase"$(INTDIR)\prompt.obj"
31-
-@erase"$(INTDIR)\sprompt.obj"
3231
-@erase"$(INTDIR)\variables.obj"
3332
-@erase"$(INTDIR)\large_obj.obj"
3433
-@erase"$(INTDIR)\print.obj"
@@ -66,7 +65,6 @@ LINK32_OBJS= \
6665
"$(INTDIR)\copy.obj"\
6766
"$(INTDIR)\startup.obj"\
6867
"$(INTDIR)\prompt.obj"\
69-
"$(INTDIR)\sprompt.obj"\
7068
"$(INTDIR)\variables.obj"\
7169
"$(INTDIR)\large_obj.obj"\
7270
"$(INTDIR)\print.obj"\

‎src/bin/scripts/Makefile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.21 2003/06/18 12:19:11 petere Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.22 2003/08/08 04:52:21 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -17,22 +17,21 @@ PROGRAMS = createdb createlang createuser dropdb droplang dropuser clusterdb vac
1717

1818
overrideCPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir)$(CPPFLAGS)
1919

20-
2120
all: submake-libpq submake-backend$(PROGRAMS)
2221

2322
%:%.o
2423
$(CC)$(CFLAGS)$^$(libpq)$(LDFLAGS)$(LIBS) -o$@
2524

26-
createdb: createdb.o common.o dumputils.osprompt.o$(top_builddir)/src/backend/parser/keywords.o
27-
createlang: createlang.o common.osprompt.oprint.o mbprint.o
28-
createuser: createuser.o common.o dumputils.osprompt.o$(top_builddir)/src/backend/parser/keywords.o
29-
dropdb: dropdb.o common.o dumputils.osprompt.o$(top_builddir)/src/backend/parser/keywords.o
30-
droplang: droplang.o common.osprompt.oprint.o mbprint.o
31-
dropuser: dropuser.o common.o dumputils.osprompt.o$(top_builddir)/src/backend/parser/keywords.o
32-
clusterdb: clusterdb.o common.o dumputils.osprompt.o$(top_builddir)/src/backend/parser/keywords.o
33-
vacuumdb: vacuumdb.o common.o sprompt.o
25+
createdb: createdb.o common.o dumputils.o$(top_builddir)/src/backend/parser/keywords.o
26+
createlang: createlang.o common.o print.o mbprint.o
27+
createuser: createuser.o common.o dumputils.o$(top_builddir)/src/backend/parser/keywords.o
28+
dropdb: dropdb.o common.o dumputils.o$(top_builddir)/src/backend/parser/keywords.o
29+
droplang: droplang.o common.o print.o mbprint.o
30+
dropuser: dropuser.o common.o dumputils.o$(top_builddir)/src/backend/parser/keywords.o
31+
clusterdb: clusterdb.o common.o dumputils.o$(top_builddir)/src/backend/parser/keywords.o
32+
vacuumdb: vacuumdb.o common.o
3433

35-
dumputils.csprompt.c:% :$(top_srcdir)/src/bin/pg_dump/%
34+
dumputils.c:% :$(top_srcdir)/src/bin/pg_dump/%
3635
rm -f$@&&$(LN_S)$<.
3736

3837
print.cmbprint.c :% :$(top_srcdir)/src/bin/psql/%
@@ -61,4 +60,4 @@ uninstall:
6160

6261

6362
cleandistcleanmaintainer-clean:
64-
rm -f$(addsuffix$(X),$(PROGRAMS))$(addsuffix .o,$(PROGRAMS)) common.o dumputils.osprompt.oprint.o mbprint.o dumputils.c sprompt.c print.c mbprint.c
63+
rm -f$(addsuffix$(X),$(PROGRAMS))$(addsuffix .o,$(PROGRAMS)) common.o dumputils.o print.o mbprint.o dumputils.c print.c mbprint.c

‎src/bin/scripts/common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ typedef void (*help_handler) (const char *);
1717

1818
voidhandle_help_version_opts(intargc,char*argv[],constchar*fixed_progname,help_handlerhlp);
1919

20-
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
21-
2220
PGconn*connectDatabase(constchar*dbname,constchar*pghost,constchar*pgport,
2321
constchar*pguser,boolrequire_password,constchar*progname);
2422

‎src/include/port.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port.h,v 1.10 2003/08/04 02:40:10 momjian Exp $
9+
* $Id: port.h,v 1.11 2003/08/08 04:52:22 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -18,23 +18,25 @@
1818
#endif
1919

2020
/* Portable path handling for Unix/Win32 */
21-
boolis_absolute_path(constchar*filename);
22-
char*first_path_separator(constchar*filename);
23-
char*last_path_separator(constchar*filename);
24-
char*get_progname(char*argv0);
21+
externboolis_absolute_path(constchar*filename);
22+
externchar*first_path_separator(constchar*filename);
23+
externchar*last_path_separator(constchar*filename);
24+
externchar*get_progname(char*argv0);
25+
26+
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
2527

2628
#if defined(bsdi)|| defined(netbsd)
27-
intfseeko(FILE*stream,off_toffset,intwhence);
28-
off_tftello(FILE*stream);
29+
externintfseeko(FILE*stream,off_toffset,intwhence);
30+
externoff_tftello(FILE*stream);
2931
#endif
3032

3133
#ifdefWIN32
3234
/*
3335
* Win32 doesn't have reliable rename/unlink during concurrent access
3436
*/
3537
#ifndefFRONTEND
36-
intpgrename(constchar*from,constchar*to);
37-
intpgunlink(constchar*path);
38+
externintpgrename(constchar*from,constchar*to);
39+
externintpgunlink(constchar*path);
3840

3941
#definerename(from,to)pgrename(from, to)
4042
#defineunlink(path)pgunlink(path)

‎src/interfaces/libpq/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.89 2003/08/0803:22:24 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.90 2003/08/0804:52:22 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -23,7 +23,7 @@ override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) $(THREAD_CFLAGS) -DFRONTEND -DSYSCO
2323
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o\
2424
fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o\
2525
dllist.o md5.o ip.o wchar.o encnames.o\
26-
$(filter crypt.o getaddrinfo.o inet_aton.o snprintf.o strerror.o path.o thread.o,$(LIBOBJS))
26+
$(filter crypt.o getaddrinfo.o inet_aton.o snprintf.osprompt.ostrerror.o path.o thread.o,$(LIBOBJS))
2727

2828

2929
# Add libraries that libpq depends (or might depend) on into the
@@ -46,7 +46,7 @@ backend_src = $(top_srcdir)/src/backend
4646
# For port modules, this only happens if configure decides the module
4747
# is needed (see filter hack in OBJS, above).
4848

49-
crypt.cgetaddrinfo.cinet_aton.csnprintf.cstrerror.cpath.cthread.c:% :$(top_srcdir)/src/port/%
49+
crypt.cgetaddrinfo.cinet_aton.csnprintf.csprompt.cstrerror.cpath.cthread.c:% :$(top_srcdir)/src/port/%
5050
rm -f$@&&$(LN_S)$<.
5151

5252
md5.cip.c:% :$(backend_src)/libpq/%

‎src/bin/psql/sprompt.crenamed to‎src/port/sprompt.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/sprompt.c,v 1.6 2003/08/04 00:43:29 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/port/sprompt.c,v 1.1 2003/08/08 04:52:22 momjian Exp $
77
*/
88

99

10-
/* This file is shared by psql and pg_dump. */
11-
12-
1310
/*
1411
* simple_prompt
1512
*
@@ -22,7 +19,7 @@
2219
*
2320
* Returns a malloc()'ed string with the input (w/o trailing newline).
2421
*/
25-
#include"postgres_fe.h"
22+
#include"postgres.h"
2623

2724
#ifdefHAVE_TERMIOS_H
2825
#include<termios.h>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp