toolbox

Check-in [31342d5054]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:retab: cosmetic changes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 31342d505437f11f39f05eb427898cc46300b77f007fea9784cdc074c58b9659
User & Date: jef 2020-07-19 17:15:48
Context
2020-07-23
16:18
lib: cleanup jtlst_iter_start() check-in: da11de00e7 user: jef tags: trunk
2020-07-19
17:15
retab: cosmetic changes check-in: 31342d5054 user: jef tags: trunk
17:15
lib: cosmetic changes check-in: e9fdbcbff2 user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/retab/retab.c.

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
}

int
is_line(const char *str)
{
	if (str[0] == '\0')
		return 0;
	for (; *str && *str == '-'; str++)
		;
	return *str == '\0';
}

int
is_row(const char *str)
{
	if (strlen(str) < 2)
................................................................................
{
	struct jtlst_str *col;

	str_del_prefix(str, "|");
	str_del_suffix(str, "|");
	jtlst_init(&row->cols, struct jtlst_str, node);
	str_split(str, "|", &row->cols);

	jtlst_foreach(col, &row->cols)
		str_trim(col->str);
}

struct row *
row_new(char *str)
{







|
|







 







<







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
..
85
86
87
88
89
90
91

92
93
94
95
96
97
98
}

int
is_line(const char *str)
{
	if (str[0] == '\0')
		return 0;
	while (*str && *str == '-')
		str++;
	return *str == '\0';
}

int
is_row(const char *str)
{
	if (strlen(str) < 2)
................................................................................
{
	struct jtlst_str *col;

	str_del_prefix(str, "|");
	str_del_suffix(str, "|");
	jtlst_init(&row->cols, struct jtlst_str, node);
	str_split(str, "|", &row->cols);

	jtlst_foreach(col, &row->cols)
		str_trim(col->str);
}

struct row *
row_new(char *str)
{