projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cdea632
)
Retrieval module no longer uses ctype.h - functions.
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 21 Oct 1999 12:06:28 +0000
(12:06 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 21 Oct 1999 12:06:28 +0000
(12:06 +0000)
include/data1.h
patch
|
blob
|
history
retrieval/d1_absyn.c
patch
|
blob
|
history
retrieval/d1_attset.c
patch
|
blob
|
history
retrieval/d1_espec.c
patch
|
blob
|
history
retrieval/d1_map.c
patch
|
blob
|
history
retrieval/d1_marc.c
patch
|
blob
|
history
retrieval/d1_read.c
patch
|
blob
|
history
retrieval/d1_sutrs.c
patch
|
blob
|
history
retrieval/d1_tagset.c
patch
|
blob
|
history
retrieval/d1_write.c
patch
|
blob
|
history
diff --git
a/include/data1.h
b/include/data1.h
index
d09d5b0
..
9ea9cfc
100644
(file)
--- a/
include/data1.h
+++ b/
include/data1.h
@@
-24,7
+24,10
@@
* OF THIS SOFTWARE.
*
* $Log: data1.h,v $
* OF THIS SOFTWARE.
*
* $Log: data1.h,v $
- * Revision 1.41 1999-07-13 13:23:47 adam
+ * Revision 1.42 1999-10-21 12:06:28 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.41 1999/07/13 13:23:47 adam
* Non-recursive version of data1_read_node. data1_read_nodex reads
* stream of bytes (instead of buffer in memory).
*
* Non-recursive version of data1_read_node. data1_read_nodex reads
* stream of bytes (instead of buffer in memory).
*
@@
-224,6
+227,8
@@
#include <yaz-util.h>
#include <wrbuf.h>
#include <yaz-util.h>
#include <wrbuf.h>
+#define d1_isspace(c) strchr(" \r\n\t\f", c)
+#define d1_isdigit(c) ((c) <= '9' && (c) >= '0')
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
diff --git
a/retrieval/d1_absyn.c
b/retrieval/d1_absyn.c
index
6ff747b
..
a89eb91
100644
(file)
--- a/
retrieval/d1_absyn.c
+++ b/
retrieval/d1_absyn.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_absyn.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_absyn.c,v $
- * Revision 1.24 1999-08-27 09:40:32 adam
+ * Revision 1.25 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.24 1999/08/27 09:40:32 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.23 1998/10/15 08:29:16 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.23 1998/10/15 08:29:16 adam
@@
-96,7
+99,6
@@
*
*/
*
*/
-#include <ctype.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
diff --git
a/retrieval/d1_attset.c
b/retrieval/d1_attset.c
index
30d84ec
..
81d7682
100644
(file)
--- a/
retrieval/d1_attset.c
+++ b/
retrieval/d1_attset.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_attset.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_attset.c,v $
- * Revision 1.12 1999-08-27 09:40:32 adam
+ * Revision 1.13 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.12 1999/08/27 09:40:32 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.11 1998/10/14 13:31:56 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.11 1998/10/14 13:31:56 adam
@@
-51,7
+54,6
@@
*
*/
*
*/
-#include <ctype.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
diff --git
a/retrieval/d1_espec.c
b/retrieval/d1_espec.c
index
0b6b638
..
48d54f3
100644
(file)
--- a/
retrieval/d1_espec.c
+++ b/
retrieval/d1_espec.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_espec.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_espec.c,v $
- * Revision 1.16 1999-08-27 09:40:32 adam
+ * Revision 1.17 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.16 1999/08/27 09:40:32 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.15 1998/10/13 16:09:49 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.15 1998/10/13 16:09:49 adam
@@
-69,7
+72,6
@@
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
-#include <ctype.h>
#include <odr.h>
#include <proto.h>
#include <log.h>
#include <odr.h>
#include <proto.h>
#include <log.h>
@@
-120,7
+122,7
@@
static Z_Variant *read_variant(int argc, char **argv, NMEM nmem,
t->which = Z_Triple_null;
t->value.null = odr_nullval();
}
t->which = Z_Triple_null;
t->value.null = odr_nullval();
}
- else if (isdigit(*value))
+ else if (d1_isdigit(*value))
{
t->which = Z_Triple_integer;
t->value.integer = (int *)
{
t->which = Z_Triple_integer;
t->value.integer = (int *)
@@
-167,7
+169,7
@@
static Z_Occurrences *read_occurrences(char *occ, NMEM nmem,
{
Z_OccurValues *ov = (Z_OccurValues *)nmem_malloc(nmem, sizeof(*ov));
{
Z_OccurValues *ov = (Z_OccurValues *)nmem_malloc(nmem, sizeof(*ov));
- if (!isdigit(*occ))
+ if (!d1_isdigit(*occ))
{
yaz_log(LOG_WARN, "%s:%d: Bad occurrences-spec %s",
file, lineno, occ);
{
yaz_log(LOG_WARN, "%s:%d: Bad occurrences-spec %s",
file, lineno, occ);
diff --git
a/retrieval/d1_map.c
b/retrieval/d1_map.c
index
84367af
..
c7faa42
100644
(file)
--- a/
retrieval/d1_map.c
+++ b/
retrieval/d1_map.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_map.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_map.c,v $
- * Revision 1.15 1999-08-27 09:40:32 adam
+ * Revision 1.16 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.15 1999/08/27 09:40:32 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.14 1998/10/13 16:09:50 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.14 1998/10/13 16:09:50 adam
@@
-63,7
+66,6
@@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
#include <oid.h>
#include <log.h>
#include <oid.h>
#include <log.h>
@@
-183,7
+185,7
@@
data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
(*mtp)->new_field = 1;
else
(*mtp)->new_field = 0;
(*mtp)->new_field = 1;
else
(*mtp)->new_field = 0;
- if ((type != 3 || local_numeric) && isdigit(*valstr))
+ if ((type != 3 || local_numeric) && d1_isdigit(*valstr))
{
(*mtp)->which = D1_MAPTAG_numeric;
(*mtp)->value.numeric = atoi(valstr);
{
(*mtp)->which = D1_MAPTAG_numeric;
(*mtp)->value.numeric = atoi(valstr);
diff --git
a/retrieval/d1_marc.c
b/retrieval/d1_marc.c
index
84c6569
..
4ddf45e
100644
(file)
--- a/
retrieval/d1_marc.c
+++ b/
retrieval/d1_marc.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_marc.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_marc.c,v $
- * Revision 1.14 1999-08-27 09:40:32 adam
+ * Revision 1.15 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.14 1999/08/27 09:40:32 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.13 1998/10/13 16:09:52 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.13 1998/10/13 16:09:52 adam
@@
-59,7
+62,6
@@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
#include <oid.h>
#include <log.h>
#include <oid.h>
#include <log.h>
@@
-213,7
+215,7
@@
static char *get_data(data1_node *n, int *len)
}
*len = n->u.data.len;
}
*len = n->u.data.len;
- while (*len && isspace(n->u.data.data[*len - 1]))
+ while (*len && d1_isspace(n->u.data.data[*len - 1]))
(*len)--;
return n->u.data.data;
}
(*len)--;
return n->u.data.data;
}
diff --git
a/retrieval/d1_read.c
b/retrieval/d1_read.c
index
dfa0f89
..
92b1b59
100644
(file)
--- a/
retrieval/d1_read.c
+++ b/
retrieval/d1_read.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_read.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_read.c,v $
- * Revision 1.28 1999-10-21 09:50:33 adam
+ * Revision 1.29 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.28 1999/10/21 09:50:33 adam
* SGML reader uses own isspace - it doesn't do 8-bit on WIN32!
*
* Revision 1.27 1999/08/27 09:40:32 adam
* SGML reader uses own isspace - it doesn't do 8-bit on WIN32!
*
* Revision 1.27 1999/08/27 09:40:32 adam
@@
-156,7
+159,6
@@
#include <log.h>
#include <data1.h>
#include <log.h>
#include <data1.h>
-#define d1_isspace(c) strchr(" \r\n\t\f", c)
/*
* get the tag which is the immediate parent of this node (this may mean
* traversing intermediate things like variants and stuff.
/*
* get the tag which is the immediate parent of this node (this may mean
* traversing intermediate things like variants and stuff.
diff --git
a/retrieval/d1_sutrs.c
b/retrieval/d1_sutrs.c
index
504007f
..
fea2d02
100644
(file)
--- a/
retrieval/d1_sutrs.c
+++ b/
retrieval/d1_sutrs.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_sutrs.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_sutrs.c,v $
- * Revision 1.4 1997-09-17 12:10:38 adam
+ * Revision 1.5 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.4 1997/09/17 12:10:38 adam
* YAZ version 1.4.
*
* Revision 1.3 1995/12/15 16:57:11 quinn
* YAZ version 1.4.
*
* Revision 1.3 1995/12/15 16:57:11 quinn
@@
-19,8
+22,6
@@
*
*/
*
*/
-#include <ctype.h>
-
#include <data1.h>
#define NTOBUF_INDENT 2
#include <data1.h>
#define NTOBUF_INDENT 2
@@
-30,7
+31,7
@@
static int wordlen(char *b)
{
int l = 0;
{
int l = 0;
- while (*b && !isspace(*b))
+ while (*b && !d1_isspace(*b))
l++, b++;
return l;
}
l++, b++;
return l;
}
@@
-83,7
+84,7
@@
static int nodetobuf(data1_node *n, int select, WRBUF b, int indent, int col)
{
int wlen;
{
int wlen;
- while (l && isspace(*p))
+ while (l && d1_isspace(*p))
p++, l--;
if (!l)
break;
p++, l--;
if (!l)
break;
@@
-101,7
+102,7
@@
static int nodetobuf(data1_node *n, int select, WRBUF b, int indent, int col)
wrbuf_putc(b, ' ');
col++;
}
wrbuf_putc(b, ' ');
col++;
}
- while (l && !isspace(*p))
+ while (l && !d1_isspace(*p))
{
if (col > NTOBUF_MARGIN)
{
{
if (col > NTOBUF_MARGIN)
{
diff --git
a/retrieval/d1_tagset.c
b/retrieval/d1_tagset.c
index
65b9daa
..
f02ed58
100644
(file)
--- a/
retrieval/d1_tagset.c
+++ b/
retrieval/d1_tagset.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_tagset.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_tagset.c,v $
- * Revision 1.12 1999-08-27 09:40:32 adam
+ * Revision 1.13 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.12 1999/08/27 09:40:32 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.11 1998/10/19 14:16:36 adam
* Renamed logf function to yaz_log. Removed VC++ project files.
*
* Revision 1.11 1998/10/19 14:16:36 adam
@@
-54,7
+57,6
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-#include <ctype.h>
#include <string.h>
#include <log.h>
#include <string.h>
#include <log.h>
diff --git
a/retrieval/d1_write.c
b/retrieval/d1_write.c
index
3cff061
..
3990c14
100644
(file)
--- a/
retrieval/d1_write.c
+++ b/
retrieval/d1_write.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_write.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_write.c,v $
- * Revision 1.6 1999-07-06 12:16:00 adam
+ * Revision 1.7 1999-10-21 12:06:29 adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.6 1999/07/06 12:16:00 adam
* Improved layout generated record in SGML/XML format.
*
* Revision 1.5 1998/06/05 08:57:43 adam
* Improved layout generated record in SGML/XML format.
*
* Revision 1.5 1998/06/05 08:57:43 adam
@@
-28,7
+31,6
@@
*/
#include <string.h>
*/
#include <string.h>
-#include <ctype.h>
#include <data1.h>
#include <wrbuf.h>
#include <data1.h>
#include <wrbuf.h>
@@
-39,7
+41,7
@@
static int wordlen(char *b, int max)
{
int l = 0;
{
int l = 0;
- while (l < max && !isspace(*b))
+ while (l < max && !d1_isspace(*b))
l++, b++;
return l;
}
l++, b++;
return l;
}
@@
-92,7
+94,7
@@
static int nodetoidsgml(data1_node *n, int select, WRBUF b, int col)
{
int wlen;
{
int wlen;
- while (l && isspace(*p))
+ while (l && d1_isspace(*p))
p++, l--;
if (!l)
break;
p++, l--;
if (!l)
break;
@@
-110,7
+112,7
@@
static int nodetoidsgml(data1_node *n, int select, WRBUF b, int col)
wrbuf_putc(b, ' ');
lcol++;
}
wrbuf_putc(b, ' ');
lcol++;
}
- while (l && !isspace(*p))
+ while (l && !d1_isspace(*p))
{
wrbuf_putc(b, *p);
p++;
{
wrbuf_putc(b, *p);
p++;