Deleted Added
full compact
archive_write_set_format_iso9660.c (315432) archive_write_set_format_iso9660.c (342360)
1/*-
2 * Copyright (c) 2009-2012 Michihiro NAKAJIMA
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4885 unchanged lines hidden (view full) ---

4894 }
4895 if (ll == len)
4896 break;
4897 }
4898 while (*p) {
4899 if (p[0] == '/') {
4900 if (p[1] == '/')
4901 /* Convert '//' --> '/' */
1/*-
2 * Copyright (c) 2009-2012 Michihiro NAKAJIMA
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4885 unchanged lines hidden (view full) ---

4894 }
4895 if (ll == len)
4896 break;
4897 }
4898 while (*p) {
4899 if (p[0] == '/') {
4900 if (p[1] == '/')
4901 /* Convert '//' --> '/' */
4902 strcpy(p, p+1);
4902 memmove(p, p+1, strlen(p+1) + 1);
4903 else if (p[1] == '.' && p[2] == '/')
4904 /* Convert '/./' --> '/' */
4903 else if (p[1] == '.' && p[2] == '/')
4904 /* Convert '/./' --> '/' */
4905 strcpy(p, p+2);
4905 memmove(p, p+2, strlen(p+2) + 1);
4906 else if (p[1] == '.' && p[2] == '.' && p[3] == '/') {
4907 /* Convert 'dir/dir1/../dir2/'
4908 * --> 'dir/dir2/'
4909 */
4910 char *rp = p -1;
4911 while (rp >= dirname) {
4912 if (*rp == '/')
4913 break;

--- 3251 unchanged lines hidden ---
4906 else if (p[1] == '.' && p[2] == '.' && p[3] == '/') {
4907 /* Convert 'dir/dir1/../dir2/'
4908 * --> 'dir/dir2/'
4909 */
4910 char *rp = p -1;
4911 while (rp >= dirname) {
4912 if (*rp == '/')
4913 break;

--- 3251 unchanged lines hidden ---