From 6186d581cef14eeac47ae71fb343d8b6b1b5b013 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 29 Jul 2016 15:23:57 +0000 Subject: No need to populate the TYPE_arch and TYPE_sec bits, the information is provided directly to dba_page_add() in dbadd_mlink() and to dba_page_new() in dbadd(). No need for a dedicated loop for NAME_FILE. It's done in dbadd_mlink() anyway. In this context, also record section numbers taken from filenames and from .Dt and .TH macros, architectures taken from .Dt macros, and fix the filtering of duplicate filename entries. --- dba.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dba.c') diff --git a/dba.c b/dba.c index a9a48785..2fb2ab64 100644 --- a/dba.c +++ b/dba.c @@ -1,4 +1,4 @@ -/* $Id: dba.c,v 1.1 2016/07/19 21:31:55 schwarze Exp $ */ +/* $Id: dba.c,v 1.2 2016/07/29 15:23:57 schwarze Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * @@ -175,9 +175,12 @@ dba_page_add(struct dba_array *page, int32_t ie, const char *str) } if (*str == '\0') return; - dba_array_FOREACH(entries, entry) + dba_array_FOREACH(entries, entry) { + if (ie == DBP_FILE && *entry < ' ') + entry++; if (strcmp(entry, str) == 0) return; + } dba_array_add(entries, (void *)str); } -- cgit v1.2.3