Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d65bea2

Browse files
committed
Move psql's print.c and mbprint.c into src/fe_utils.
Just turning the crank ...
1 parent a376960 commit d65bea2

File tree

21 files changed

+108
-94
lines changed

21 files changed

+108
-94
lines changed

src/bin/psql/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
2222
LDFLAGS += -L$(top_builddir)/src/fe_utils -lpgfeutils
2323

2424
OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
25-
startup.o prompt.o variables.o large_obj.o print.o describe.o \
26-
tab-complete.o mbprint.o \
25+
startup.o prompt.o variables.o large_obj.o describe.o \
26+
tab-complete.o \
2727
sql_help.o psqlscan.o psqlscanslash.o \
2828
$(WIN32RES)
2929

src/bin/psql/command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include "input.h"
4545
#include "large_obj.h"
4646
#include "mainloop.h"
47-
#include "print.h"
47+
#include "fe_utils/print.h"
4848
#include "psqlscanslash.h"
4949
#include "settings.h"
5050
#include "variables.h"

src/bin/psql/command.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMMAND_H
99
#define COMMAND_H
1010

11-
#include "print.h"
11+
#include "fe_utils/print.h"
1212
#include "psqlscan.h"
1313

1414

src/bin/psql/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "settings.h"
2424
#include "command.h"
2525
#include "copy.h"
26-
#include "mbprint.h"
26+
#include "fe_utils/mbprint.h"
2727

2828

2929
static bool ExecQueryUsingCursor(const char *query, double *elapsed_msec);

src/bin/psql/common.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <setjmp.h>
1212

1313
#include "libpq-fe.h"
14-
#include "print.h"
14+
#include "fe_utils/print.h"
1515

1616
#define atooid(x) ((Oid) strtoul((x), NULL, 10))
1717

@@ -28,10 +28,6 @@ extern volatile bool sigint_interrupt_enabled;
2828

2929
extern sigjmp_buf sigint_interrupt_jmp;
3030

31-
extern volatile bool cancel_pressed;
32-
33-
/* Note: cancel_pressed is defined in print.c, see that file for reasons */
34-
3531
extern void setup_cancel_handler(void);
3632

3733
extern void SetCancelConn(void);

src/bin/psql/describe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
#include "common.h"
2121
#include "describe.h"
22-
#include "mbprint.h"
23-
#include "print.h"
22+
#include "fe_utils/mbprint.h"
23+
#include "fe_utils/print.h"
2424
#include "settings.h"
2525
#include "variables.h"
2626

src/bin/psql/mbprint.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/bin/psql/nls.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
CATALOG_NAME = psql
33
AVAIL_LANGUAGES = cs de es fr it ja pl pt_BR ru zh_CN zh_TW
44
GETTEXT_FILES = command.c common.c copy.c help.c input.c large_obj.c \
5-
mainloop.c print.c psqlscan.c psqlscanslash.c startup.c \
5+
mainloop.c psqlscan.c psqlscanslash.c startup.c \
66
describe.c sql_help.h sql_help.c \
77
tab-complete.c variables.c \
8+
../../fe_utils/print.c \
89
../../common/exec.c ../../common/fe_memutils.c ../../common/username.c \
910
../../common/wait_error.c
1011
GETTEXT_TRIGGERS = N_ psql_error simple_prompt

src/bin/psql/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
#include "variables.h"
13-
#include "print.h"
13+
#include "fe_utils/print.h"
1414

1515
#define DEFAULT_FIELD_SEP "|"
1616
#define DEFAULT_RECORD_SEP "\n"

src/bin/psql/startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "help.h"
2727
#include "input.h"
2828
#include "mainloop.h"
29-
#include "print.h"
29+
#include "fe_utils/print.h"
3030
#include "settings.h"
3131

3232

0 commit comments

Comments
 (0)