projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
24031af
)
Fix printing of match string in updating code
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 10 May 2006 13:54:01 +0000
(13:54 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 10 May 2006 13:54:01 +0000
(13:54 +0000)
index/extract.c
patch
|
blob
|
history
diff --git
a/index/extract.c
b/index/extract.c
index
66212ce
..
06b285a
100644
(file)
--- a/
index/extract.c
+++ b/
index/extract.c
@@
-1,4
+1,4
@@
-/* $Id: extract.c,v 1.210 2006-05-10 12:31:08 adam Exp $
+/* $Id: extract.c,v 1.211 2006-05-10 13:54:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-387,6
+387,7
@@
static ZEBRA_RES file_extract_record(ZebraHandle zh,
RecType recType,
void *recTypeClientData)
{
RecType recType,
void *recTypeClientData)
{
+ const char *match_str_to_print = "";
RecordAttr *recordAttr;
int r;
const char *matchStr = 0;
RecordAttr *recordAttr;
int r;
const char *matchStr = 0;
@@
-475,7
+476,13
@@
static ZEBRA_RES file_extract_record(ZebraHandle zh,
matchStr = extractCtrl.match_criteria;
}
matchStr = extractCtrl.match_criteria;
}
- /* perform match if sysno not known and if match criteria is specified */
+ /* if matchStr is set now - we assume it's printable .
+ For internal matchStr (see below) we don't print */
+ if (matchStr)
+ match_str_to_print = matchStr;
+
+ /* perform internal match if sysno not known and if match criteria is
+ specified already */
if (!sysno)
{
sysnotmp = 0;
if (!sysno)
{
sysnotmp = 0;
@@
-533,16
+540,10
@@
static ZEBRA_RES file_extract_record(ZebraHandle zh,
if (zh->records_processed < zh->m_file_verbose_limit)
{
if (zh->records_processed < zh->m_file_verbose_limit)
{
- if (matchStr)
- yaz_log(YLOG_LOG, "add %s %s " PRINTF_OFF_T
- " " ZINT_FORMAT " %s" ,
- zh->m_record_type,
- fname, recordOffset, *sysno, matchStr);
- else
- yaz_log(YLOG_LOG, "add %s %s " PRINTF_OFF_T
- " " ZINT_FORMAT ,
- zh->m_record_type,
- fname, recordOffset, *sysno);
+ yaz_log(YLOG_LOG, "add %s %s " PRINTF_OFF_T
+ " " ZINT_FORMAT " %s" ,
+ zh->m_record_type,
+ fname, recordOffset, *sysno, match_str_to_print);
}
recordAttr = rec_init_attr (zh->reg->zei, rec);
recordAttr->staticrank = extractCtrl.staticrank;
}
recordAttr = rec_init_attr (zh->reg->zei, rec);
recordAttr->staticrank = extractCtrl.staticrank;
@@
-613,16
+614,10
@@
static ZEBRA_RES file_extract_record(ZebraHandle zh,
{
if (zh->records_processed < zh->m_file_verbose_limit)
{
{
if (zh->records_processed < zh->m_file_verbose_limit)
{
- if (matchStr)
- yaz_log(YLOG_LOG, "delete %s %s " PRINTF_OFF_T
- " " ZINT_FORMAT " %s" ,
- zh->m_record_type,
- fname, recordOffset, *sysno, matchStr);
- else
- yaz_log(YLOG_LOG, "delete %s %s " PRINTF_OFF_T
- " " ZINT_FORMAT ,
- zh->m_record_type,
- fname, recordOffset, *sysno);
+ yaz_log(YLOG_LOG, "delete %s %s " PRINTF_OFF_T
+ " " ZINT_FORMAT " %s" ,
+ zh->m_record_type,
+ fname, recordOffset, *sysno, match_str_to_print);
}
zh->records_deleted++;
if (matchStr)
}
zh->records_deleted++;
if (matchStr)
@@
-641,16
+636,10
@@
static ZEBRA_RES file_extract_record(ZebraHandle zh,
/* flush new keys for sort&search etc */
if (zh->records_processed < zh->m_file_verbose_limit)
{
/* flush new keys for sort&search etc */
if (zh->records_processed < zh->m_file_verbose_limit)
{
- if (matchStr)
- yaz_log(YLOG_LOG, "update %s %s " PRINTF_OFF_T
- " " ZINT_FORMAT " %s" ,
- zh->m_record_type,
- fname, recordOffset, *sysno, matchStr);
- else
- yaz_log(YLOG_LOG, "update %s %s " PRINTF_OFF_T
- " " ZINT_FORMAT ,
- zh->m_record_type,
- fname, recordOffset, *sysno);
+ yaz_log(YLOG_LOG, "update %s %s " PRINTF_OFF_T
+ " " ZINT_FORMAT " %s" ,
+ zh->m_record_type,
+ fname, recordOffset, *sysno, match_str_to_print);
}
recordAttr->staticrank = extractCtrl.staticrank;
#if NATTR
}
recordAttr->staticrank = extractCtrl.staticrank;
#if NATTR