version 1.17, 2000/06/20 01:39:40 |
version 1.18, 2000/07/08 23:17:31 |
|
|
int |
int |
proto_spec(const char *spec) |
proto_spec(const char *spec) |
{ |
{ |
char *s, *p; |
char *s, *p, *q; |
int ret = SSH_PROTO_UNKNOWN; |
int ret = SSH_PROTO_UNKNOWN; |
|
|
if (spec == NULL) |
if (spec == NULL) |
return ret; |
return ret; |
s = xstrdup(spec); |
q = s = xstrdup(spec); |
for ((p = strtok(s, SEP)); p; (p = strtok(NULL, SEP))) { |
for ((p = strsep(&q, SEP)); p; (p = strsep(&q, SEP))) { |
switch(atoi(p)) { |
switch(atoi(p)) { |
case 1: |
case 1: |
if (ret == SSH_PROTO_UNKNOWN) |
if (ret == SSH_PROTO_UNKNOWN) |