[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ChangeLog src/preproc/tbl/table.cpp src/p...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ChangeLog src/preproc/tbl/table.cpp src/p... |
Date: |
Mon, 12 Feb 2007 00:25:24 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 07/02/12 00:25:24
Modified files:
. : ChangeLog
src/preproc/tbl: table.cpp table.h
Log message:
* src/preproc/tbl/table.h: Don't include `stdbool.h'.
(table): Replace `bool' type with `char' for orthogonality.
Update all users.
* src/preproc/tbl/table.cpp (block_entry::do_divert): Fix usage of
AVAIlABLE_REG and COLCOUNT_REG.
(table::table): Fix order call of initializers.
(table::~table): Deallocate `blockflag'.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1060&r2=1.1061
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/table.cpp?cvsroot=groff&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/tbl/table.h?cvsroot=groff&r1=1.11&r2=1.12
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1060
retrieving revision 1.1061
diff -u -b -r1.1060 -r1.1061
--- ChangeLog 11 Feb 2007 21:55:49 -0000 1.1060
+++ ChangeLog 12 Feb 2007 00:25:24 -0000 1.1061
@@ -1,3 +1,14 @@
+2007-02-11 Werner LEMBERG <address@hidden>
+
+ * src/preproc/tbl/table.h: Don't include `stdbool.h'.
+ (table): Replace `bool' type with `char' for orthogonality.
+ Update all users.
+
+ * src/preproc/tbl/table.cpp (block_entry::do_divert): Fix usage of
+ AVAIlABLE_REG and COLCOUNT_REG.
+ (table::table): Fix order call of initializers.
+ (table::~table): Deallocate `blockflag'.
+
2007-02-09 Eric S. Raymond <address@hidden>
A try at the new rule for block column allocation is now enabled by
Index: src/preproc/tbl/table.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/table.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- src/preproc/tbl/table.cpp 11 Feb 2007 21:30:50 -0000 1.11
+++ src/preproc/tbl/table.cpp 12 Feb 2007 00:25:24 -0000 1.12
@@ -698,10 +698,8 @@
// Each column containing a block entry gets 1/n of the remaining
// available line width, where n is the number of columns with block
// entries.
- printfs("(u;\\n[%1]+(\\[%2]/\\[%3]))",
- span_width_reg(start_col, end_col),
- AVAILABLE_REG,
- COLCOUNT_REG);
+ printfs("(u;\\n[%1]+(\\n[" AVAILABLE_REG "]/\\n[" COLCOUNT_REG "]))",
+ span_width_reg(start_col, end_col));
else
// Assign each column with a block entry 1/(n+1) of the line
// width, where n is the column count.
@@ -740,7 +738,7 @@
void block_entry::do_width()
{
for (int i=start_col; i <= end_col; i++)
- parent->blockflag[i] = true;
+ parent->blockflag[i] = (char)1;
}
void block_entry::do_depth()
@@ -1229,11 +1227,11 @@
}
table::table(int nc, unsigned f, int ls, char dpc)
-: flags(f), nrows(0), ncolumns(nc), linesize(ls), decimal_point_char(dpc),
+: nrows(0), ncolumns(nc), linesize(ls), decimal_point_char(dpc),
vrule_list(0), stuff_list(0), span_list(0),
entry_list(0), entry_list_tailp(&entry_list), entry(0),
vline(0), row_is_all_lines(0), left_separation(0), right_separation(0),
- allocated_rows(0), blockflag(0)
+ allocated_rows(0), blockflag(0), flags(f)
{
minimum_width = new string[ncolumns];
column_separation = ncolumns > 1 ? new int[ncolumns - 1] : 0;
@@ -1254,6 +1252,7 @@
}
a_delete entry;
a_delete vline;
+ a_delete blockflag;
while (entry_list) {
table_entry *tem = entry_list;
entry_list = entry_list->next;
@@ -1339,7 +1338,7 @@
allocated_rows = r + 1;
entry = new PPtable_entry[allocated_rows];
vline = new char*[allocated_rows];
- blockflag = new bool[allocated_rows];
+ blockflag = new char[allocated_rows];
}
else {
table_entry ***old_entry = entry;
@@ -1354,9 +1353,9 @@
vline = new char*[allocated_rows];
memcpy(vline, old_vline, sizeof(char*)*old_allocated_rows);
a_delete old_vline;
- bool *old_blockflag = blockflag;
- blockflag = new bool[allocated_rows];
- memcpy(blockflag, old_blockflag, sizeof(bool)*old_allocated_rows);
+ char *old_blockflag = blockflag;
+ blockflag = new char[allocated_rows];
+ memcpy(blockflag, old_blockflag, sizeof(char)*old_allocated_rows);
a_delete old_blockflag;
}
}
Index: src/preproc/tbl/table.h
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/tbl/table.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- src/preproc/tbl/table.h 11 Feb 2007 21:29:58 -0000 1.11
+++ src/preproc/tbl/table.h 12 Feb 2007 00:25:24 -0000 1.12
@@ -25,7 +25,6 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
-#include <stdbool.h>
#include "cset.h"
#include "cmap.h"
@@ -131,7 +130,7 @@
void determine_row_type();
int count_block_columns();
public:
- bool *blockflag;
+ char *blockflag;
unsigned flags;
enum {
CENTER = 0x00000001,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ChangeLog src/preproc/tbl/table.cpp src/p...,
Werner LEMBERG <=