Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
52d1d2e6
Commit
52d1d2e6
authored
Jul 14, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
barebones variable name -> tuples_only, for consistency.
parent
cff9c574
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
51 deletions
+51
-51
src/bin/psql/command.c
src/bin/psql/command.c
+2
-2
src/bin/psql/print.c
src/bin/psql/print.c
+49
-49
No files found.
src/bin/psql/command.c
View file @
52d1d2e6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.14
7 2005/07/10 03:46:13
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.14
8 2005/07/14 06:49:58
momjian Exp $
*/
*/
#include "postgres_fe.h"
#include "postgres_fe.h"
#include "command.h"
#include "command.h"
...
@@ -1472,7 +1472,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
...
@@ -1472,7 +1472,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
}
}
}
}
/* toggle between full and
barebones
format */
/* toggle between full and
tuples-only
format */
else
if
(
strcmp
(
param
,
"t"
)
==
0
||
strcmp
(
param
,
"tuples_only"
)
==
0
)
else
if
(
strcmp
(
param
,
"t"
)
==
0
||
strcmp
(
param
,
"tuples_only"
)
==
0
)
{
{
popt
->
topt
.
tuples_only
=
!
popt
->
topt
.
tuples_only
;
popt
->
topt
.
tuples_only
=
!
popt
->
topt
.
tuples_only
;
...
...
src/bin/psql/print.c
View file @
52d1d2e6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.6
4 2005/07/14 06:46:17
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.6
5 2005/07/14 06:49:58
momjian Exp $
*/
*/
#include "postgres_fe.h"
#include "postgres_fe.h"
#include "common.h"
#include "common.h"
...
@@ -134,7 +134,7 @@ static void
...
@@ -134,7 +134,7 @@ static void
print_unaligned_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_unaligned_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
const
char
*
opt_fieldsep
,
const
char
*
opt_align
,
const
char
*
opt_fieldsep
,
const
char
*
opt_recordsep
,
bool
opt_
barebones
,
const
char
*
opt_recordsep
,
bool
opt_
tuples_only
,
char
*
opt_numericsep
,
FILE
*
fout
)
char
*
opt_numericsep
,
FILE
*
fout
)
{
{
unsigned
int
col_count
=
0
;
unsigned
int
col_count
=
0
;
...
@@ -148,21 +148,21 @@ print_unaligned_text(const char *title, const char *const *headers,
...
@@ -148,21 +148,21 @@ print_unaligned_text(const char *title, const char *const *headers,
opt_recordsep
=
""
;
opt_recordsep
=
""
;
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
fprintf
(
fout
,
"%s%s"
,
title
,
opt_recordsep
);
fprintf
(
fout
,
"%s%s"
,
title
,
opt_recordsep
);
/* print headers and count columns */
/* print headers and count columns */
for
(
ptr
=
headers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
headers
;
*
ptr
;
ptr
++
)
{
{
col_count
++
;
col_count
++
;
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
if
(
col_count
>
1
)
if
(
col_count
>
1
)
fputs
(
opt_fieldsep
,
fout
);
fputs
(
opt_fieldsep
,
fout
);
fputs
(
*
ptr
,
fout
);
fputs
(
*
ptr
,
fout
);
}
}
}
}
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
need_recordsep
=
true
;
need_recordsep
=
true
;
/* print cells */
/* print cells */
...
@@ -196,7 +196,7 @@ print_unaligned_text(const char *title, const char *const *headers,
...
@@ -196,7 +196,7 @@ print_unaligned_text(const char *title, const char *const *headers,
/* print footers */
/* print footers */
if
(
!
opt_
barebones
&&
footers
)
if
(
!
opt_
tuples_only
&&
footers
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
{
{
if
(
need_recordsep
)
if
(
need_recordsep
)
...
@@ -220,7 +220,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
...
@@ -220,7 +220,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
const
char
*
const
*
cells
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
const
char
*
opt_fieldsep
,
const
char
*
opt_recordsep
,
const
char
*
opt_fieldsep
,
const
char
*
opt_recordsep
,
bool
opt_
barebones
,
char
*
opt_numericsep
,
FILE
*
fout
)
bool
opt_
tuples_only
,
char
*
opt_numericsep
,
FILE
*
fout
)
{
{
unsigned
int
col_count
=
0
;
unsigned
int
col_count
=
0
;
unsigned
int
i
;
unsigned
int
i
;
...
@@ -232,7 +232,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
...
@@ -232,7 +232,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
opt_recordsep
=
""
;
opt_recordsep
=
""
;
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
fputs
(
title
,
fout
);
fputs
(
title
,
fout
);
/* count columns */
/* count columns */
...
@@ -242,7 +242,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
...
@@ -242,7 +242,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
/* print records */
/* print records */
for
(
i
=
0
,
ptr
=
cells
;
*
ptr
;
i
++
,
ptr
++
)
for
(
i
=
0
,
ptr
=
cells
;
*
ptr
;
i
++
,
ptr
++
)
{
{
if
(
i
!=
0
||
(
!
opt_
barebones
&&
title
))
if
(
i
!=
0
||
(
!
opt_
tuples_only
&&
title
))
{
{
fputs
(
opt_recordsep
,
fout
);
fputs
(
opt_recordsep
,
fout
);
if
(
i
%
col_count
==
0
)
if
(
i
%
col_count
==
0
)
...
@@ -266,7 +266,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
...
@@ -266,7 +266,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
}
}
/* print footers */
/* print footers */
if
(
!
opt_
barebones
&&
footers
&&
*
footers
)
if
(
!
opt_
tuples_only
&&
footers
&&
*
footers
)
{
{
fputs
(
opt_recordsep
,
fout
);
fputs
(
opt_recordsep
,
fout
);
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
...
@@ -325,7 +325,7 @@ _print_horizontal_line(const unsigned int col_count, const unsigned int *widths,
...
@@ -325,7 +325,7 @@ _print_horizontal_line(const unsigned int col_count, const unsigned int *widths,
static
void
static
void
print_aligned_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_aligned_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
char
*
opt_numericsep
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
char
*
opt_numericsep
,
unsigned
short
int
opt_border
,
int
encoding
,
unsigned
short
int
opt_border
,
int
encoding
,
FILE
*
fout
)
FILE
*
fout
)
{
{
...
@@ -417,7 +417,7 @@ print_aligned_text(const char *title, const char *const *headers,
...
@@ -417,7 +417,7 @@ print_aligned_text(const char *title, const char *const *headers,
total_w
+=
widths
[
i
];
total_w
+=
widths
[
i
];
/* print title */
/* print title */
if
(
title
&&
!
opt_
barebones
)
if
(
title
&&
!
opt_
tuples_only
)
{
{
tmp
=
pg_wcswidth
((
unsigned
char
*
)
title
,
strlen
(
title
),
encoding
);
tmp
=
pg_wcswidth
((
unsigned
char
*
)
title
,
strlen
(
title
),
encoding
);
if
(
tmp
>=
total_w
)
if
(
tmp
>=
total_w
)
...
@@ -427,7 +427,7 @@ print_aligned_text(const char *title, const char *const *headers,
...
@@ -427,7 +427,7 @@ print_aligned_text(const char *title, const char *const *headers,
}
}
/* print headers */
/* print headers */
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
if
(
opt_border
==
2
)
if
(
opt_border
==
2
)
_print_horizontal_line
(
col_count
,
widths
,
opt_border
,
fout
);
_print_horizontal_line
(
col_count
,
widths
,
opt_border
,
fout
);
...
@@ -522,7 +522,7 @@ print_aligned_text(const char *title, const char *const *headers,
...
@@ -522,7 +522,7 @@ print_aligned_text(const char *title, const char *const *headers,
_print_horizontal_line
(
col_count
,
widths
,
opt_border
,
fout
);
_print_horizontal_line
(
col_count
,
widths
,
opt_border
,
fout
);
/* print footers */
/* print footers */
if
(
footers
&&
!
opt_
barebones
)
if
(
footers
&&
!
opt_
tuples_only
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
fprintf
(
fout
,
"%s
\n
"
,
*
ptr
);
fprintf
(
fout
,
"%s
\n
"
,
*
ptr
);
...
@@ -546,7 +546,7 @@ print_aligned_text(const char *title, const char *const *headers,
...
@@ -546,7 +546,7 @@ print_aligned_text(const char *title, const char *const *headers,
static
void
static
void
print_aligned_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_aligned_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
char
*
opt_numericsep
,
unsigned
short
int
opt_border
,
char
*
opt_numericsep
,
unsigned
short
int
opt_border
,
int
encoding
,
FILE
*
fout
)
int
encoding
,
FILE
*
fout
)
{
{
...
@@ -625,7 +625,7 @@ print_aligned_vertical(const char *title, const char *const *headers,
...
@@ -625,7 +625,7 @@ print_aligned_vertical(const char *title, const char *const *headers,
}
}
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
fprintf
(
fout
,
"%s
\n
"
,
title
);
fprintf
(
fout
,
"%s
\n
"
,
title
);
/* make horizontal border */
/* make horizontal border */
...
@@ -649,7 +649,7 @@ print_aligned_vertical(const char *title, const char *const *headers,
...
@@ -649,7 +649,7 @@ print_aligned_vertical(const char *title, const char *const *headers,
{
{
if
(
i
%
col_count
==
0
)
if
(
i
%
col_count
==
0
)
{
{
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
char
*
record_str
=
pg_local_malloc
(
32
);
char
*
record_str
=
pg_local_malloc
(
32
);
size_t
record_str_len
;
size_t
record_str_len
;
...
@@ -712,7 +712,7 @@ print_aligned_vertical(const char *title, const char *const *headers,
...
@@ -712,7 +712,7 @@ print_aligned_vertical(const char *title, const char *const *headers,
/* print footers */
/* print footers */
if
(
!
opt_
barebones
&&
footers
&&
*
footers
)
if
(
!
opt_
tuples_only
&&
footers
&&
*
footers
)
{
{
if
(
opt_border
<
2
)
if
(
opt_border
<
2
)
fputc
(
'\n'
,
fout
);
fputc
(
'\n'
,
fout
);
...
@@ -784,7 +784,7 @@ html_escaped_print(const char *in, FILE *fout)
...
@@ -784,7 +784,7 @@ html_escaped_print(const char *in, FILE *fout)
static
void
static
void
print_html_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_html_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
char
*
opt_numericsep
,
unsigned
short
int
opt_border
,
char
*
opt_numericsep
,
unsigned
short
int
opt_border
,
const
char
*
opt_table_attr
,
FILE
*
fout
)
const
char
*
opt_table_attr
,
FILE
*
fout
)
{
{
...
@@ -798,7 +798,7 @@ print_html_text(const char *title, const char *const *headers,
...
@@ -798,7 +798,7 @@ print_html_text(const char *title, const char *const *headers,
fputs
(
">
\n
"
,
fout
);
fputs
(
">
\n
"
,
fout
);
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
{
{
fputs
(
" <caption>"
,
fout
);
fputs
(
" <caption>"
,
fout
);
html_escaped_print
(
title
,
fout
);
html_escaped_print
(
title
,
fout
);
...
@@ -806,19 +806,19 @@ print_html_text(const char *title, const char *const *headers,
...
@@ -806,19 +806,19 @@ print_html_text(const char *title, const char *const *headers,
}
}
/* print headers and count columns */
/* print headers and count columns */
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
fputs
(
" <tr>
\n
"
,
fout
);
fputs
(
" <tr>
\n
"
,
fout
);
for
(
i
=
0
,
ptr
=
headers
;
*
ptr
;
i
++
,
ptr
++
)
for
(
i
=
0
,
ptr
=
headers
;
*
ptr
;
i
++
,
ptr
++
)
{
{
col_count
++
;
col_count
++
;
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
fputs
(
" <th align=
\"
center
\"
>"
,
fout
);
fputs
(
" <th align=
\"
center
\"
>"
,
fout
);
html_escaped_print
(
*
ptr
,
fout
);
html_escaped_print
(
*
ptr
,
fout
);
fputs
(
"</th>
\n
"
,
fout
);
fputs
(
"</th>
\n
"
,
fout
);
}
}
}
}
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
fputs
(
" </tr>
\n
"
,
fout
);
fputs
(
" </tr>
\n
"
,
fout
);
/* print cells */
/* print cells */
...
@@ -854,7 +854,7 @@ print_html_text(const char *title, const char *const *headers,
...
@@ -854,7 +854,7 @@ print_html_text(const char *title, const char *const *headers,
/* print footers */
/* print footers */
if
(
!
opt_
barebones
&&
footers
&&
*
footers
)
if
(
!
opt_
tuples_only
&&
footers
&&
*
footers
)
{
{
fputs
(
"<p>"
,
fout
);
fputs
(
"<p>"
,
fout
);
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
...
@@ -872,7 +872,7 @@ print_html_text(const char *title, const char *const *headers,
...
@@ -872,7 +872,7 @@ print_html_text(const char *title, const char *const *headers,
static
void
static
void
print_html_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_html_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
char
*
opt_numericsep
,
unsigned
short
int
opt_border
,
char
*
opt_numericsep
,
unsigned
short
int
opt_border
,
const
char
*
opt_table_attr
,
FILE
*
fout
)
const
char
*
opt_table_attr
,
FILE
*
fout
)
{
{
...
@@ -887,7 +887,7 @@ print_html_vertical(const char *title, const char *const *headers,
...
@@ -887,7 +887,7 @@ print_html_vertical(const char *title, const char *const *headers,
fputs
(
">
\n
"
,
fout
);
fputs
(
">
\n
"
,
fout
);
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
{
{
fputs
(
" <caption>"
,
fout
);
fputs
(
" <caption>"
,
fout
);
html_escaped_print
(
title
,
fout
);
html_escaped_print
(
title
,
fout
);
...
@@ -903,7 +903,7 @@ print_html_vertical(const char *title, const char *const *headers,
...
@@ -903,7 +903,7 @@ print_html_vertical(const char *title, const char *const *headers,
{
{
if
(
i
%
col_count
==
0
)
if
(
i
%
col_count
==
0
)
{
{
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
fprintf
(
fout
,
"
\n
<tr><td colspan=
\"
2
\"
align=
\"
center
\"
>Record %d</td></tr>
\n
"
,
record
++
);
fprintf
(
fout
,
"
\n
<tr><td colspan=
\"
2
\"
align=
\"
center
\"
>Record %d</td></tr>
\n
"
,
record
++
);
else
else
fputs
(
"
\n
<tr><td colspan=
\"
2
\"
> </td></tr>
\n
"
,
fout
);
fputs
(
"
\n
<tr><td colspan=
\"
2
\"
> </td></tr>
\n
"
,
fout
);
...
@@ -936,7 +936,7 @@ print_html_vertical(const char *title, const char *const *headers,
...
@@ -936,7 +936,7 @@ print_html_vertical(const char *title, const char *const *headers,
fputs
(
"</table>
\n
"
,
fout
);
fputs
(
"</table>
\n
"
,
fout
);
/* print footers */
/* print footers */
if
(
!
opt_
barebones
&&
footers
&&
*
footers
)
if
(
!
opt_
tuples_only
&&
footers
&&
*
footers
)
{
{
fputs
(
"<p>"
,
fout
);
fputs
(
"<p>"
,
fout
);
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
...
@@ -998,7 +998,7 @@ latex_escaped_print(const char *in, FILE *fout)
...
@@ -998,7 +998,7 @@ latex_escaped_print(const char *in, FILE *fout)
static
void
static
void
print_latex_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_latex_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
{
unsigned
int
col_count
=
0
;
unsigned
int
col_count
=
0
;
...
@@ -1007,7 +1007,7 @@ print_latex_text(const char *title, const char *const *headers,
...
@@ -1007,7 +1007,7 @@ print_latex_text(const char *title, const char *const *headers,
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
{
{
fputs
(
"
\\
begin{center}
\n
"
,
fout
);
fputs
(
"
\\
begin{center}
\n
"
,
fout
);
latex_escaped_print
(
title
,
fout
);
latex_escaped_print
(
title
,
fout
);
...
@@ -1034,13 +1034,13 @@ print_latex_text(const char *title, const char *const *headers,
...
@@ -1034,13 +1034,13 @@ print_latex_text(const char *title, const char *const *headers,
fputs
(
"}
\n
"
,
fout
);
fputs
(
"}
\n
"
,
fout
);
if
(
!
opt_
barebones
&&
opt_border
==
2
)
if
(
!
opt_
tuples_only
&&
opt_border
==
2
)
fputs
(
"
\\
hline
\n
"
,
fout
);
fputs
(
"
\\
hline
\n
"
,
fout
);
/* print headers and count columns */
/* print headers and count columns */
for
(
i
=
0
,
ptr
=
headers
;
i
<
col_count
;
i
++
,
ptr
++
)
for
(
i
=
0
,
ptr
=
headers
;
i
<
col_count
;
i
++
,
ptr
++
)
{
{
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
if
(
i
!=
0
)
if
(
i
!=
0
)
fputs
(
" & "
,
fout
);
fputs
(
" & "
,
fout
);
...
@@ -1050,7 +1050,7 @@ print_latex_text(const char *title, const char *const *headers,
...
@@ -1050,7 +1050,7 @@ print_latex_text(const char *title, const char *const *headers,
}
}
}
}
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
fputs
(
"
\\\\\n
"
,
fout
);
fputs
(
"
\\\\\n
"
,
fout
);
fputs
(
"
\\
hline
\n
"
,
fout
);
fputs
(
"
\\
hline
\n
"
,
fout
);
...
@@ -1075,7 +1075,7 @@ print_latex_text(const char *title, const char *const *headers,
...
@@ -1075,7 +1075,7 @@ print_latex_text(const char *title, const char *const *headers,
/* print footers */
/* print footers */
if
(
footers
&&
!
opt_
barebones
)
if
(
footers
&&
!
opt_
tuples_only
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
{
{
latex_escaped_print
(
*
ptr
,
fout
);
latex_escaped_print
(
*
ptr
,
fout
);
...
@@ -1090,7 +1090,7 @@ print_latex_text(const char *title, const char *const *headers,
...
@@ -1090,7 +1090,7 @@ print_latex_text(const char *title, const char *const *headers,
static
void
static
void
print_latex_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_latex_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
{
unsigned
int
col_count
=
0
;
unsigned
int
col_count
=
0
;
...
@@ -1101,7 +1101,7 @@ print_latex_vertical(const char *title, const char *const *headers,
...
@@ -1101,7 +1101,7 @@ print_latex_vertical(const char *title, const char *const *headers,
(
void
)
opt_align
;
/* currently unused parameter */
(
void
)
opt_align
;
/* currently unused parameter */
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
{
{
fputs
(
"
\\
begin{center}
\n
"
,
fout
);
fputs
(
"
\\
begin{center}
\n
"
,
fout
);
latex_escaped_print
(
title
,
fout
);
latex_escaped_print
(
title
,
fout
);
...
@@ -1130,7 +1130,7 @@ print_latex_vertical(const char *title, const char *const *headers,
...
@@ -1130,7 +1130,7 @@ print_latex_vertical(const char *title, const char *const *headers,
/* new record */
/* new record */
if
(
i
%
col_count
==
0
)
if
(
i
%
col_count
==
0
)
{
{
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
if
(
opt_border
==
2
)
if
(
opt_border
==
2
)
{
{
...
@@ -1158,7 +1158,7 @@ print_latex_vertical(const char *title, const char *const *headers,
...
@@ -1158,7 +1158,7 @@ print_latex_vertical(const char *title, const char *const *headers,
/* print footers */
/* print footers */
if
(
footers
&&
!
opt_
barebones
)
if
(
footers
&&
!
opt_
tuples_only
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
{
{
latex_escaped_print
(
*
ptr
,
fout
);
latex_escaped_print
(
*
ptr
,
fout
);
...
@@ -1196,7 +1196,7 @@ troff_ms_escaped_print(const char *in, FILE *fout)
...
@@ -1196,7 +1196,7 @@ troff_ms_escaped_print(const char *in, FILE *fout)
static
void
static
void
print_troff_ms_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_troff_ms_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
{
unsigned
int
col_count
=
0
;
unsigned
int
col_count
=
0
;
...
@@ -1205,7 +1205,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
...
@@ -1205,7 +1205,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
{
{
fputs
(
".LP
\n
.DS C
\n
"
,
fout
);
fputs
(
".LP
\n
.DS C
\n
"
,
fout
);
troff_ms_escaped_print
(
title
,
fout
);
troff_ms_escaped_print
(
title
,
fout
);
...
@@ -1234,7 +1234,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
...
@@ -1234,7 +1234,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
/* print headers and count columns */
/* print headers and count columns */
for
(
i
=
0
,
ptr
=
headers
;
i
<
col_count
;
i
++
,
ptr
++
)
for
(
i
=
0
,
ptr
=
headers
;
i
<
col_count
;
i
++
,
ptr
++
)
{
{
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
if
(
i
!=
0
)
if
(
i
!=
0
)
fputc
(
'\t'
,
fout
);
fputc
(
'\t'
,
fout
);
...
@@ -1244,7 +1244,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
...
@@ -1244,7 +1244,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
}
}
}
}
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
fputs
(
"
\n
_
\n
"
,
fout
);
fputs
(
"
\n
_
\n
"
,
fout
);
}
}
...
@@ -1265,7 +1265,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
...
@@ -1265,7 +1265,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
/* print footers */
/* print footers */
if
(
footers
&&
!
opt_
barebones
)
if
(
footers
&&
!
opt_
tuples_only
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
{
{
troff_ms_escaped_print
(
*
ptr
,
fout
);
troff_ms_escaped_print
(
*
ptr
,
fout
);
...
@@ -1280,7 +1280,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
...
@@ -1280,7 +1280,7 @@ print_troff_ms_text(const char *title, const char *const *headers,
static
void
static
void
print_troff_ms_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
print_troff_ms_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_
barebones
,
const
char
*
opt_align
,
bool
opt_
tuples_only
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
{
unsigned
int
col_count
=
0
;
unsigned
int
col_count
=
0
;
...
@@ -1292,7 +1292,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
...
@@ -1292,7 +1292,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
(
void
)
opt_align
;
/* currently unused parameter */
(
void
)
opt_align
;
/* currently unused parameter */
/* print title */
/* print title */
if
(
!
opt_
barebones
&&
title
)
if
(
!
opt_
tuples_only
&&
title
)
{
{
fputs
(
".LP
\n
.DS C
\n
"
,
fout
);
fputs
(
".LP
\n
.DS C
\n
"
,
fout
);
troff_ms_escaped_print
(
title
,
fout
);
troff_ms_escaped_print
(
title
,
fout
);
...
@@ -1307,7 +1307,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
...
@@ -1307,7 +1307,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
fputs
(
"center;
\n
"
,
fout
);
fputs
(
"center;
\n
"
,
fout
);
/* basic format */
/* basic format */
if
(
opt_
barebones
)
if
(
opt_
tuples_only
)
fputs
(
"c l;
\n
"
,
fout
);
fputs
(
"c l;
\n
"
,
fout
);
...
@@ -1322,7 +1322,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
...
@@ -1322,7 +1322,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
/* new record */
/* new record */
if
(
i
%
col_count
==
0
)
if
(
i
%
col_count
==
0
)
{
{
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
if
(
current_format
!=
1
)
if
(
current_format
!=
1
)
...
@@ -1340,7 +1340,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
...
@@ -1340,7 +1340,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
fputs
(
"_
\n
"
,
fout
);
fputs
(
"_
\n
"
,
fout
);
}
}
if
(
!
opt_
barebones
)
if
(
!
opt_
tuples_only
)
{
{
if
(
current_format
!=
2
)
if
(
current_format
!=
2
)
{
{
...
@@ -1365,7 +1365,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
...
@@ -1365,7 +1365,7 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
/* print footers */
/* print footers */
if
(
footers
&&
!
opt_
barebones
)
if
(
footers
&&
!
opt_
tuples_only
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
{
{
troff_ms_escaped_print
(
*
ptr
,
fout
);
troff_ms_escaped_print
(
*
ptr
,
fout
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment