projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renew testing certificate (PEM)
[yaz-moved-to-github.git]
/
ztest
/
read-grs.c
diff --git
a/ztest/read-grs.c
b/ztest/read-grs.c
index
f67f053
..
b2f63b7
100644
(file)
--- a/
ztest/read-grs.c
+++ b/
ztest/read-grs.c
@@
-1,21
+1,22
@@
-/*
- * Copyright (C) 1995-2005, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: read-grs.c,v 1.13 2005-06-25 15:46:09 adam Exp $
*/
*/
-
-/*
- * Little toy-thing to read a GRS-1 records from a file.
+/** \file
+ * \brief Little toy-thing to read GRS-1 records from a file.
*/
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <stdio.h>
-#include <ctype.h>
#include <stdlib.h>
#include <yaz/proto.h>
#include <yaz/log.h>
#include <stdlib.h>
#include <yaz/proto.h>
#include <yaz/log.h>
+#include "ztest.h"
+
#define GRS_MAX_FIELDS 50
static Z_GenericRecord *read_grs1(FILE *f, ODR o)
#define GRS_MAX_FIELDS 50
static Z_GenericRecord *read_grs1(FILE *f, ODR o)
@@
-32,7
+33,7
@@
static Z_GenericRecord *read_grs1(FILE *f, ODR o)
while (fgets(buf = line, 512, f))
{
while (fgets(buf = line, 512, f))
{
- while (*buf && isspace(*(unsigned char *) buf))
+ while (*buf && yaz_isspace(*buf))
buf++;
if (!*buf || *buf == '#')
continue;
buf++;
if (!*buf || *buf == '#')
continue;
@@
-50,7
+51,7
@@
static Z_GenericRecord *read_grs1(FILE *f, ODR o)
if (!(buf = strchr(buf, ')')))
return 0;
buf++;
if (!(buf = strchr(buf, ')')))
return 0;
buf++;
- while (*buf && isspace(*(unsigned char *) buf))
+ while (*buf && yaz_isspace(*buf))
buf++;
if (!*buf)
return 0;
buf++;
if (!*buf)
return 0;
@@
-118,6
+119,7
@@
Z_GenericRecord *dummy_grs_record (int num, ODR o)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab