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:
3484170
)
Use strchr instead of index (which was only standard in 4.3 BSD).
author
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 7 May 2006 18:35:47 +0000
(18:35 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 7 May 2006 18:35:47 +0000
(18:35 +0000)
src/srwutil.c
patch
|
blob
|
history
diff --git
a/src/srwutil.c
b/src/srwutil.c
index
1f39728
..
9a54e23
100644
(file)
--- a/
src/srwutil.c
+++ b/
src/srwutil.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: srwutil.c,v 1.39 2006-05-05 20:02:22 quinn Exp $
+ * $Id: srwutil.c,v 1.40 2006-05-07 18:35:47 adam Exp $
*/
/**
* \file srwutil.c
*/
/**
* \file srwutil.c
@@
-188,11
+188,11
@@
static int yaz_base64decode(const char *in, char *out)
char i0, i1, i2, i3;
char *p;
char i0, i1, i2, i3;
char *p;
- if (!(p = index(map, in[0])))
+ if (!(p = strchr(map, in[0])))
return 0;
i0 = p - map;
len--;
return 0;
i0 = p - map;
len--;
- if (!(p = index(map, in[1])))
+ if (!(p = strchr(map, in[1])))
return 0;
i1 = p - map;
len--;
return 0;
i1 = p - map;
len--;
@@
-200,7
+200,7
@@
static int yaz_base64decode(const char *in, char *out)
olen++;
if (in[2] == '=')
break;
olen++;
if (in[2] == '=')
break;
- if (!(p = index(map, in[2])))
+ if (!(p = strchr(map, in[2])))
return 0;
i2 = p - map;
len--;
return 0;
i2 = p - map;
len--;
@@
-208,7
+208,7
@@
static int yaz_base64decode(const char *in, char *out)
olen++;
if (in[3] == '=')
break;
olen++;
if (in[3] == '=')
break;
- if (!(p = index(map, in[3])))
+ if (!(p = strchr(map, in[3])))
return 0;
i3 = p - map;
len--;
return 0;
i3 = p - map;
len--;
@@
-249,7
+249,7
@@
static void yaz_srw_decodeauth(Z_SRW_PDU *sr, Z_HTTP_Request *hreq, char *userna
olen = yaz_base64decode(basic, out);
/* Format of out should be username:password at this point */
strcpy(ubuf, out);
olen = yaz_base64decode(basic, out);
/* Format of out should be username:password at this point */
strcpy(ubuf, out);
- if ((p = index(ubuf, ':'))) {
+ if ((p = strchr(ubuf, ':'))) {
*(p++) = '\0';
if (*p)
strcpy(pbuf, p);
*(p++) = '\0';
if (*p)
strcpy(pbuf, p);