Rev 6745 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6745 | Rev 6764 | ||
---|---|---|---|
Line 152... | Line 152... | ||
152 | if (cp == (char *)NULL) /* no '/' or not junking dirs */ |
152 | if (cp == (char *)NULL) /* no '/' or not junking dirs */ |
153 | cp = G.filename; /* point to internal zipfile-member pathname */ |
153 | cp = G.filename; /* point to internal zipfile-member pathname */ |
154 | else |
154 | else |
155 | ++cp; /* point to start of last component of path */ |
155 | ++cp; /* point to start of last component of path */ |
Line -... | Line 156... | ||
- | 156 | ||
- | 157 | fprintf(stderr, "mapname start[%s]\n", cp); |
|
156 | 158 | ||
157 | /*--------------------------------------------------------------------------- |
159 | /*--------------------------------------------------------------------------- |
158 | Begin main loop through characters in filename. |
160 | Begin main loop through characters in filename. |
Line 159... | Line 161... | ||
159 | ---------------------------------------------------------------------------*/ |
161 | ---------------------------------------------------------------------------*/ |
Line 178... | Line 180... | ||
178 | return error; |
180 | return error; |
179 | pp = pathcomp; /* reset conversion buffer for next piece */ |
181 | pp = pathcomp; /* reset conversion buffer for next piece */ |
180 | lastsemi = (char *)NULL; /* leave direct. semi-colons alone */ |
182 | lastsemi = (char *)NULL; /* leave direct. semi-colons alone */ |
181 | break; |
183 | break; |
Line 182... | Line 184... | ||
182 | 184 | ||
183 | #ifdef __CYGWIN__ /* Cygwin runs on Win32, apply FAT/NTFS filename rules */ |
185 | #ifdef KOS32 /* Cygwin runs on Win32, apply FAT/NTFS filename rules */ |
184 | case ':': /* drive spec not stored, so no colon allowed */ |
186 | case ':': /* drive spec not stored, so no colon allowed */ |
185 | case '\\': /* '\\' may come as normal filename char (not */ |
187 | case '\\': /* '\\' may come as normal filename char (not */ |
186 | case '<': /* dir sep char!) from unix-like file system */ |
188 | case '<': /* dir sep char!) from unix-like file system */ |
187 | case '>': /* no redirection symbols allowed either */ |
189 | case '>': /* no redirection symbols allowed either */ |
Line 203... | Line 205... | ||
203 | lastcomma = pp; |
205 | lastcomma = pp; |
204 | *pp++ = ','; /* keep for now; may need to remove */ |
206 | *pp++ = ','; /* keep for now; may need to remove */ |
205 | break; /* later, if requested */ |
207 | break; /* later, if requested */ |
206 | #endif |
208 | #endif |
Line 207... | Line 209... | ||
207 | 209 | ||
208 | #ifdef MTS |
210 | #ifdef KOS32 |
209 | case ' ': /* change spaces to underscore under */ |
211 | case ' ': /* change spaces to underscore under */ |
210 | *pp++ = '_'; /* MTS; leave as spaces under Unix */ |
212 | *pp++ = '_'; /* MTS; leave as spaces under Unix */ |
211 | break; |
213 | break; |
Line 215... | Line 217... | ||
215 | /* disable control character filter when requested, |
217 | /* disable control character filter when requested, |
216 | * else allow 8-bit characters (e.g. UTF-8) in filenames: |
218 | * else allow 8-bit characters (e.g. UTF-8) in filenames: |
217 | */ |
219 | */ |
218 | if ((isprint(workch) || (128 <= workch && workch <= 254))) |
220 | if ((isprint(workch) || (128 <= workch && workch <= 254))) |
219 | *pp++ = (char)workch; |
221 | *pp++ = (char)workch; |
220 | /*kos |
- | |
221 | if (uO.cflxflag || |
- | |
222 | (isprint(workch) || (128 <= workch && workch <= 254))) |
- | |
223 | *pp++ = (char)workch; |
- | |
224 | */ |
- | |
225 | } /* end switch */ |
222 | } /* end switch */ |
Line 226... | Line 223... | ||
226 | 223 | ||
Line 227... | Line 224... | ||
227 | } /* end while loop */ |
224 | } /* end while loop */ |
Line 324... | Line 321... | ||
324 | } |
321 | } |
Line 325... | Line 322... | ||
325 | 322 | ||
326 | checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ |
323 | checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ |
Line -... | Line 324... | ||
- | 324 | checkdir(__G__ G.filename, GETPATH); |
|
- | 325 | ||
- | 326 | fprintf(stderr, "mapname end[%s]\n", pathcomp); |
|
327 | checkdir(__G__ G.filename, GETPATH); |
327 | |
Line 328... | Line 328... | ||
328 | 328 | ||
Line 465... | Line 465... | ||
465 | GETPATH: copy full path to the string pointed at by pathcomp, and free |
465 | GETPATH: copy full path to the string pointed at by pathcomp, and free |
466 | G.buildpath. |
466 | G.buildpath. |
467 | ---------------------------------------------------------------------------*/ |
467 | ---------------------------------------------------------------------------*/ |
Line 468... | Line 468... | ||
468 | 468 | ||
- | 469 | if (FUNCTION == GETPATH) { |
|
- | 470 | if(G.native_is_utf8) |
|
- | 471 | { |
|
- | 472 | pathcomp[0] = 3; // kolibri utf8 flag |
|
- | 473 | strcpy(pathcomp + 1, G.buildpath); |
|
- | 474 | } |
|
469 | if (FUNCTION == GETPATH) { |
475 | else |
470 | strcpy(pathcomp, G.buildpath); |
476 | strcpy(pathcomp, G.buildpath); |
471 | Trace((stderr, "getting and freeing path [%s]\n", |
477 | Trace((stderr, "getting and freeing path [%s]\n", |
472 | FnFilter1(pathcomp))); |
478 | FnFilter1(pathcomp))); |
473 | free(G.buildpath); |
479 | free(G.buildpath); |