Lines Matching defs:result
88 void appendpath(char *result, char *tmp)
93 if (strcmp(result, "/")) {
94 if (result[strlen(result) - 1] == '/')
95 result[strlen(result) - 1] = '\0';
96 tmp = result;
100 if ((result[strlen(result) - 1] == '/') && (strlen(result) > 1))
101 result[strlen(result) - 1] = '\0';
104 if (result[strlen(result) - 1] != '/')
105 strcat(result, "/");
106 strcat(result, tmp);
114 char *result = malloc(strlen(path) + strlen(cwd) + 16);
118 if (! result)
123 free(result);
128 strcpy(result, "/");
130 strcpy(result, cwd);
136 appendpath(result, tmp);
139 appendpath(result, path2);
141 return result;