enum projection str_pro=projection_none;
dbg(1,"enter('%s',%d,%p)\n", c_str, pro, c_ret);
- s=index(str,' ');
- co=index(str,':');
+ s=strchr(str,' ');
+ co=strchr(str,':');
if (co && co < s) {
proj=malloc(co-str+1);
strncpy(proj, str, co-str);
proj[co-str]='\0';
dbg(1,"projection=%s\n", proj);
str=co+1;
- s=index(str,' ');
+ s=strchr(str,' ');
if (!strcmp(proj, "mg"))
str_pro = projection_mg;
else if (!strcmp(proj, "garmin"))
i=name;
n=name;
men=rmen;
- while (h && (i=index(n, '/'))) {
+ while (h && (i=strchr(n, '/'))) {
strcpy(buffer2, name);
buffer2[i-name]='\0';
if (!(nmen=g_hash_table_lookup(h, buffer2))) {
cp[strlen(cp)-1]='\0';
s=cp+pos+1;
if (!strncmp(s,"type=", 5)) {
- i=index(s, '"');
+ i=strchr(s, '"');
if (i) {
s=i+1;
- i=index(s, '"');
+ i=strchr(s, '"');
if (i)
*i='\0';
}
gpointer *data;
GHashTable *key_hash,*value_hash;
t=line;
- p=index(t,'\t');
+ p=strchr(t,'\t');
if (p) {
while (*p == '\t')
*p++='\0';
k=p;
- p=index(k,'\t');
+ p=strchr(k,'\t');
}
if (p) {
while (*p == '\t')
*p++='\0';
v=p;
- p=index(v,'\t');
+ p=strchr(v,'\t');
}
if (p) {
while (*p == '\t')
way_key_hash=g_hash_table_new(g_str_hash, g_str_equal);
node_key_hash=g_hash_table_new(g_str_hash, g_str_equal);
while (map) {
- p=index(map,'\n');
+ p=strchr(map,'\n');
if (p)
*p++='\0';
if (strlen(map))
s=*pos++;
if (! s)
return 0;
- i=index(pos, s);
+ i=strchr(pos, s);
if (! i)
return 0;
if (i - pos > buffer_size)
char *p;
sig_alrm(0);
while (fgets(buffer, size, in)) {
- p=index(buffer,'<');
+ p=strchr(buffer,'<');
if (! p) {
fprintf(stderr,"WARNING: wrong line %s\n", buffer);
continue;
value=find_attribute(state, "order", required);
if (! value)
return 0;
- pos=index(value, '-');
+ pos=strchr(value, '-');
if (! pos) {
ret=sscanf(value,"%d",min);
*max=*min;