Subversion Repositories tendra.SVN

Rev

Rev 7 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7 Rev 38
Line 131... Line 131...
131
*/
131
*/
132
 
132
 
133
char *
133
char *
134
relative(char *from, char *to, int n)
134
relative(char *from, char *to, int n)
135
{
135
{
-
 
136
 
136
    char *s = buffer;
137
    char *s = buffer;
137
    if (from == null) return(to);
138
    if (from == null) return(to);
138
    if (to == null) return(from);
139
    if (to == null) return(from);
139
    for (from = from + n; *from; from++) {
140
    for (from = from + n; *from; from++) {
140
	if (*from == '/') {
141
	if (*from == '/') {
Line 142... Line 143...
142
	    s += 3;
143
	    s += 3;
143
	}
144
	}
144
    }
145
    }
145
    IGNORE strcpy(s, to + n);
146
    IGNORE strcpy(s, to + n);
146
    return(buffer);
147
    return(buffer);
147
}
148
}
-
 
149
 
-
 
150
char *
-
 
151
relative2(char *from, char *to)
-
 
152
{
-
 
153
	int i=0;
-
 
154
	while (from[i] == to[i] && from[i] !=0 && to[i] != 0 )
-
 
155
		i++;
148
 
156
 
-
 
157
	return relative(from,to,i);
-
 
158
}
149
 
159
 
150
/*
160
/*
151
    HACK A NAME
161
    HACK A NAME
152
 
162
 
153
    This routine hacks the name nm according to the given key.
163
    This routine hacks the name nm according to the given key.