Lines Matching refs:result
113 char * result;
117 result = strdup( string );
118 if (result == NULL) {
123 result = malloc( 2 + strlen( dot_path ) + strlen( string ) );
124 if (result == NULL) {
127 strcpy( result, dot_path );
128 result_len = (int)strlen(result);
129 if (result[result_len - 1] != '/') {
130 result[result_len++] = '/';
131 result[result_len] = '\0';
134 result = malloc( 3 + strlen( string ) );
135 if (result == NULL) {
138 result[0] = '.'; result[1] = '/'; result[2] = '\0';
142 strcpy( result + result_len, string );
145 return result;
163 char stub_char, *result;
165 /* The result cannot be larger than the input PATH. */
166 result = strdup( path );
167 if (result == NULL) {
174 while (result[i]) {
175 while (result[i] != '\0' && result[i] != '/')
183 if (!result[start])
187 while (result[i] == '/')
196 strcpy( result + start + 1, result + i );
201 if (start > 0 && result[start - 1] == '\\')
205 if ((start && !result[i])
206 || (result[i] == '.' && !result[i+1])) {
207 result[--i] = '\0';
212 if (result[i] == '.') {
214 if (result[i + 1] == '/') {
215 strcpy( result + i, result + i + 1 );
221 if (result[i + 1] == '.' &&
222 (result[i + 2] == '/' || !result[i + 2])) {
223 while (--start > -1 && result[start] != '/')
225 strcpy( result + start + 1, result + i + 2 );
232 if (!*result) {
233 *result = stub_char;
234 result[1] = '\0';
237 return result;