- lineNext = uprv_strchr(linePtr, ' ');
- if(lineNext) {
- *lineNext = 0; /* terminate at space */
- lineNext++;
- }
- }
-
- /* add the file */
- s = (char*)getLongPathname(linePtr);
-
- baseName = findBasename(s);
-
- if(s != baseName) {
- /* s was something 'long' with a path */
- if(fixPrefix && uprv_strncmp(pkgPrefix, baseName, pkgPrefixLen)) {
- /* path don't have the prefix, add package prefix to short and longname */
- uprv_strcpy(tmp, pkgPrefix);
- uprv_strcpy(tmp+pkgPrefixLen, baseName);
-
- uprv_strncpy(tmp2, s, uprv_strlen(s)-uprv_strlen(baseName)); /* should be: dirpath only, ending in sep */
- tmp2[uprv_strlen(s)-uprv_strlen(baseName)]=0;
- uprv_strcat(tmp2, pkgPrefix);
- uprv_strcat(tmp2, baseName);
-
- o->files = pkg_appendToList(o->files, &tail, uprv_strdup(tmp));
- o->filePaths = pkg_appendToList(o->filePaths, &tail2, uprv_strdup(tmp2));
- } else {
- /* paths already have the prefix */
- o->files = pkg_appendToList(o->files, &tail, uprv_strdup(baseName));
- o->filePaths = pkg_appendToList(o->filePaths, &tail2, uprv_strdup(s));
- }
-
- } else { /* s was just a basename, we want to prepend source dir*/
- /* check for prefix of package */
- uprv_strcpy(tmp, o->srcDir);
- uprv_strcat(tmp, o->srcDir[uprv_strlen(o->srcDir)-1]==U_FILE_SEP_CHAR?"":U_FILE_SEP_STRING);
-
- if(fixPrefix && strncmp(pkgPrefix,s, pkgPrefixLen)) {
- /* didn't have the prefix - add it */
- uprv_strcat(tmp, pkgPrefix);
- /* make up a new basename */
- uprv_strcpy(tmp2, pkgPrefix);
- uprv_strcat(tmp2, s);
- o->files = pkg_appendToList(o->files, &tail, uprv_strdup(tmp2));
- } else {
- o->files = pkg_appendToList(o->files, &tail, uprv_strdup(baseName));